:root {
  color-scheme: light;
  --forest-950: #153b2a;
  --forest-850: #205238;
  --forest-700: #347149;
  --forest-550: #57a563;
  --leaf-200: #d9efcf;
  --leaf-100: #edf8e8;
  --cream: #fff9e8;
  --paper: #ffffff;
  --sun: #f6c64b;
  --sun-dark: #cc8f17;
  --sky: #7cc7df;
  --berry: #d85e58;
  --berry-dark: #a43d39;
  --ink: #17342a;
  --muted: #60736b;
  --line: rgba(32, 82, 56, 0.16);
  --shadow: 0 18px 42px rgba(21, 59, 42, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Avenir Next", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.8), transparent 22%),
    linear-gradient(145deg, #e5f6de, #a9d6b4 58%, #82bca3);
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 4px solid rgba(246, 198, 75, 0.75);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.48;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(260px, 330px);
  align-items: center;
  justify-content: center;
  gap: 42px;
  padding: 28px;
}

.app-shell {
  position: relative;
  width: min(430px, 100%);
  height: min(880px, calc(100vh - 56px));
  min-height: 680px;
  overflow: hidden;
  border: 8px solid #173128;
  border-radius: 46px;
  background: var(--cream);
  box-shadow: 0 26px 70px rgba(21, 55, 42, 0.3);
}

.desktop-note {
  max-width: 330px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.desktop-note h1 {
  margin: 15px 0 8px;
  color: var(--forest-950);
  font-size: 44px;
  letter-spacing: -0.05em;
}

.desktop-note p,
.desktop-note li {
  font-weight: 650;
  line-height: 1.5;
}

.desktop-note ul {
  padding-left: 21px;
}

.desktop-warning {
  margin-bottom: 0;
  color: var(--berry-dark);
  font-size: 13px;
}

.prototype-pill,
.eyebrow,
.status-pill,
.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--forest-850);
  background: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: max(24px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: var(--cream);
}

.screen-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.adult-screen {
  background:
    radial-gradient(circle at 90% 8%, rgba(246, 198, 75, 0.35), transparent 22%),
    linear-gradient(180deg, #edf8e8, var(--cream) 46%);
}

.adult-header,
.child-topbar,
.task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.back-button,
.icon-button,
.voice-button,
.small-button,
.test-button {
  min-width: 48px;
  min-height: 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 7px 17px rgba(21, 59, 42, 0.09);
  cursor: pointer;
  font-size: 21px;
  font-weight: 900;
}

.small-button {
  min-height: 42px;
  padding: 8px 13px;
  font-size: 14px;
}

.hero {
  margin: 26px 0 22px;
  text-align: center;
}

.hero-fox,
.round-illustration {
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border: 7px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: #fff0ca;
  box-shadow: var(--shadow);
  font-size: 76px;
}

.hero h1,
.prepare-copy h1,
.child-intro h1,
.arrival-copy h1,
.task-copy h1,
.finish-copy h1 {
  margin: 12px 0 8px;
  color: var(--forest-950);
  font-size: clamp(34px, 9vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero p,
.prepare-copy p,
.child-intro p,
.arrival-copy p,
.task-copy p,
.finish-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.42;
}

.privacy-strip {
  margin: 16px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  color: var(--forest-850);
  background: var(--leaf-100);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.privacy-strip .privacy-icon {
  font-size: 26px;
}

.child-profile-card {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(21, 59, 42, 0.08);
}

.child-profile-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.child-profile-card label span {
  font-size: 24px;
}

.child-profile-card input {
  width: 100%;
  min-height: 50px;
  padding: 10px 13px;
  border: 2px solid rgba(32, 82, 56, 0.2);
  border-radius: 14px;
  color: var(--forest-950);
  background: white;
  font: inherit;
  font-size: 17px;
  font-weight: 750;
}

.child-profile-card input:focus {
  border-color: var(--forest-550);
  outline: 3px solid rgba(87, 165, 99, 0.22);
}

.child-profile-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.live-panel {
  display: grid;
  gap: 11px;
  margin: 0 0 16px;
  padding: 15px;
  border: 1px solid rgba(32, 82, 56, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(21, 59, 42, 0.08);
}

.live-panel.paired {
  border-color: rgba(52, 113, 73, 0.35);
  background: #f0faeb;
}

.live-panel-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.live-panel-heading strong,
.live-panel-heading small {
  display: block;
}

.live-panel-heading strong {
  font-size: 14px;
}

.live-panel-heading small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.live-panel-heading a {
  color: var(--forest-850);
  font-size: 11px;
  font-weight: 850;
}

.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a4afa9;
  box-shadow: 0 0 0 5px rgba(96, 115, 107, 0.1);
}

.live-dot.online {
  background: var(--forest-550);
  box-shadow: 0 0 0 5px rgba(87, 165, 99, 0.16);
}

.live-panel > p,
.live-paired-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.live-paired-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
}

.live-paired-copy > span {
  font-size: 27px;
}

.home-adult-unlock {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(175, 93, 33, 0.28);
  border-radius: 13px;
  background: #fff8e9;
}

.home-adult-unlock label {
  color: var(--berry-dark);
  font-size: 12px;
  font-weight: 850;
}

.home-adult-unlock input {
  min-height: 44px;
  padding: 8px 11px;
  border: 2px solid rgba(32, 82, 56, 0.2);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.pair-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.pair-row label {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 850;
}

.pair-row input {
  min-width: 0;
  min-height: 46px;
  padding: 8px 11px;
  border: 2px solid rgba(32, 82, 56, 0.2);
  border-radius: 13px;
  color: var(--forest-950);
  background: white;
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pair-row button,
.small-danger-button {
  min-height: 46px;
  padding: 9px 13px;
  border-radius: 13px;
  color: white;
  background: var(--forest-850);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.small-danger-button {
  width: fit-content;
  color: var(--berry-dark);
  background: #fff0ed;
}

.live-panel .live-message {
  color: var(--berry-dark);
}

.live-panel .live-warning {
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--berry-dark);
  font-size: 11px;
}

.action-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.task-actions {
  margin-top: 0;
}

.task-actions .secondary-button {
  min-height: 52px;
  font-size: 15px;
}

.scenario-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.scenario-card {
  min-width: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 12px;
  border: 2px solid rgba(32, 82, 56, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  cursor: pointer;
  text-align: left;
}

.scenario-card.selected {
  border-color: var(--forest-700);
  background: var(--leaf-100);
  box-shadow: 0 8px 20px rgba(21, 59, 42, 0.12);
}

.scenario-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.scenario-icon {
  font-size: 30px;
}

.scenario-card strong,
.scenario-card small {
  display: block;
}

.scenario-card strong {
  font-size: 15px;
}

.scenario-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.scenario-check {
  color: var(--forest-700);
  font-weight: 950;
}

.primary-button,
.secondary-button,
.danger-button,
.choice-button,
.record-action,
.sim-action {
  width: 100%;
  min-height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.primary-button {
  color: white;
  background: var(--forest-850);
  box-shadow: 0 8px 0 #143b28, 0 15px 25px rgba(21, 59, 42, 0.18);
}

.primary-button:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #143b28, 0 9px 17px rgba(21, 59, 42, 0.16);
}

.secondary-button {
  border: 2px solid rgba(32, 82, 56, 0.22);
  color: var(--forest-850);
  background: rgba(255, 255, 255, 0.9);
}

.danger-button {
  min-height: 48px;
  color: var(--berry-dark);
  background: #fff0ed;
  font-size: 14px;
}

.route-summary,
.check-card,
.gps-card,
.record-stats,
.message-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(21, 59, 42, 0.08);
}

.route-summary {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 13px;
  align-items: center;
  text-align: left;
}

.route-summary-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--leaf-200);
  font-size: 34px;
}

.route-summary strong,
.route-summary span {
  display: block;
}

.route-summary strong {
  margin-bottom: 3px;
  font-size: 18px;
}

.route-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.animal-target-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 2px solid rgba(32, 82, 56, 0.24);
  border-radius: 22px;
  background: var(--leaf-100);
  box-shadow: 0 9px 24px rgba(21, 59, 42, 0.1);
}

.zoo-home-screen {
  padding: max(14px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 92% 4%, rgba(246, 198, 75, 0.3), transparent 20%),
    linear-gradient(180deg, #e8f7e2, var(--cream) 44%);
}

.zoo-home-screen .hero {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  margin: 0 4px 10px;
  text-align: left;
}

.zoo-home-screen .hero-fox {
  width: 58px;
  height: 58px;
  grid-row: 1 / 4;
  margin: 0;
  border-width: 4px;
  font-size: 34px;
}

.zoo-home-screen .hero h1 {
  margin: 2px 0 0;
  font-size: 30px;
}

.zoo-home-screen .hero p {
  overflow: hidden;
  display: -webkit-box;
  margin-top: 1px;
  font-size: 12px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.zoo-target-map-panel {
  gap: 9px;
  margin: 0 0 14px;
  padding: 10px;
  border-color: rgba(32, 82, 56, 0.32);
  border-radius: 24px;
  background: rgba(237, 248, 232, 0.94);
}

.zoo-target-map-panel .animal-target-heading {
  padding: 1px 3px;
}

.zoo-target-map-panel .animal-target-heading > span {
  font-size: 30px;
}

.zoo-target-map-card {
  height: min(390px, 52dvh);
  min-height: 340px;
  border-width: 3px;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(21, 59, 42, 0.2);
}

.zoo-map-gps {
  position: absolute;
  z-index: 5;
  top: 8px;
  right: 8px;
  left: 8px;
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  padding: 7px 8px 7px 10px;
  border: 1px solid rgba(32, 82, 56, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 7px 18px rgba(21, 59, 42, 0.18);
  backdrop-filter: blur(10px);
}

.zoo-map-gps.good {
  border-color: rgba(36, 111, 186, 0.4);
  background: rgba(239, 249, 255, 0.95);
}

.zoo-map-gps.error {
  border-color: rgba(164, 61, 57, 0.32);
  background: rgba(255, 244, 241, 0.95);
}

.zoo-map-gps-icon {
  font-size: 24px;
}

.zoo-map-gps strong,
.zoo-map-gps small {
  display: block;
}

.zoo-map-gps strong {
  font-size: 14px;
}

.zoo-map-gps small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zoo-map-gps button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(36, 111, 186, 0.22);
  border-radius: 13px;
  color: #155d9c;
  background: white;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
}

.animal-map-shortcuts {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.animal-map-shortcuts button {
  min-width: max-content;
  min-height: 43px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(32, 82, 56, 0.2);
  border-radius: 14px;
  color: var(--forest-950);
  background: white;
  scroll-snap-align: start;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.animal-map-shortcuts button span {
  font-size: 20px;
}

.zoo-map-help {
  margin: 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.route-details {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.route-details > summary {
  padding: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
}

.route-details .approved-route-preview {
  margin: 0;
  padding: 0 10px 12px;
}

.animal-target-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.animal-target-heading > span {
  font-size: 34px;
}

.animal-target-heading strong,
.animal-target-heading small {
  display: block;
}

.animal-target-heading strong {
  font-size: 19px;
}

.animal-target-heading small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.animal-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.animal-target-button {
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(32, 82, 56, 0.22);
  border-radius: 16px;
  color: var(--forest-950);
  background: white;
  text-align: left;
  cursor: pointer;
}

.animal-target-button span {
  font-size: 29px;
}

.animal-target-button strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.15;
}

.animal-roster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 10px 0 2px;
}

.animal-roster span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32, 82, 56, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 20px;
}

.approved-route-preview {
  margin: 16px 0 4px;
}

.approved-route-heading {
  display: grid;
  gap: 3px;
  margin: 0 4px 10px;
  text-align: left;
}

.approved-route-heading strong {
  color: var(--forest-950);
  font-size: 20px;
}

.approved-route-heading small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.approved-badge {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: var(--forest-700);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.map-mode-toggle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
  margin: 0 0 9px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.64);
}

.map-mode-button {
  min-height: 44px;
  padding: 7px 8px;
  border-radius: 11px;
  color: var(--forest-850);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
}

.map-mode-button.selected {
  color: white;
  background: var(--forest-700);
  box-shadow: 0 5px 12px rgba(21, 59, 42, 0.18);
}

.approved-route-map {
  min-height: 390px;
}

.mapy-static-map {
  width: 100%;
  height: 100%;
  min-height: 390px;
  display: block;
  object-fit: cover;
}

.map-source {
  margin: 5px 4px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
}

.map-source-link {
  color: var(--forest-850);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.approved-stop-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}

.approved-stop-list li {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
}

.approved-stop-list li > span {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--forest-700);
  font-size: 11px;
  font-weight: 900;
}

.approved-stop-list strong {
  font-size: 12px;
  line-height: 1.2;
}

.source-copy {
  margin: 9px 4px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.section-title {
  margin: 22px 0 9px;
  color: var(--forest-950);
  font-size: 22px;
  letter-spacing: -0.025em;
}

.tiny-copy {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.record-layout {
  display: grid;
  grid-template-rows: auto minmax(250px, 1fr) auto auto;
  gap: 12px;
  height: 100%;
}

.map-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.88);
  border-radius: 25px;
  background: #cce9c4;
  box-shadow: var(--shadow);
}

.route-map {
  width: 100%;
  height: 100%;
  display: block;
}

.map-ground {
  fill: #cce9c4;
}

.map-pattern {
  fill: rgba(70, 132, 71, 0.12);
}

.zoo-boundary {
  fill: rgba(95, 155, 91, 0.2);
  stroke: rgba(32, 82, 56, 0.46);
  stroke-width: 2;
}

.zoo-building {
  fill: rgba(201, 173, 122, 0.72);
  stroke: rgba(105, 79, 46, 0.5);
  stroke-width: 1.5;
}

.zoo-path-edge,
.zoo-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zoo-path-edge {
  stroke: rgba(65, 86, 72, 0.34);
  stroke-width: 13;
}

.zoo-path {
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 9;
}

.route-shadow {
  fill: none;
  stroke: rgba(76, 70, 41, 0.26);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 22;
}

.route-line {
  fill: none;
  stroke: #fff9dd;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 14;
}

.route-map.real-basemap .route-shadow {
  stroke: rgba(101, 68, 11, 0.45);
  stroke-width: 18;
}

.route-map.real-basemap .route-line {
  stroke: var(--sun);
  stroke-width: 11;
}

.route-progress {
  fill: none;
  stroke: var(--sun);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.record-line {
  fill: none;
  stroke: var(--forest-700);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.map-stop circle {
  fill: var(--sun);
  stroke: white;
  stroke-width: 5;
}

.map-stop.selectable {
  cursor: pointer;
  outline: none;
}

.map-stop.selectable .map-stop-hit {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.map-stop.selectable:focus > circle:not(.map-stop-hit),
.map-stop.selectable:hover > circle:not(.map-stop-hit) {
  stroke: var(--forest-850);
  stroke-width: 7;
}

.map-stop text.map-stop-name {
  display: none;
  fill: var(--forest-950);
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 4px;
  paint-order: stroke fill;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: -0.02em;
  text-anchor: middle;
}

.map-stop-leader {
  stroke: var(--forest-850);
  stroke-linecap: round;
  stroke-width: 2;
}

.map-stop.overview circle {
  fill: white;
  stroke: var(--sun);
}

.map-stop.overview circle.map-stop-number-bg {
  fill: var(--forest-850);
  stroke: white;
  stroke-width: 2;
}

.map-stop text.map-stop-number {
  fill: white;
  font-size: 9px;
}

.map-stop text.map-stop-icon {
  font-size: 18px;
}

.map-stop.entrance circle {
  fill: var(--forest-850);
}

.map-stop.done circle {
  fill: var(--forest-700);
}

.map-stop.finish circle {
  fill: var(--sky);
}

.map-stop text {
  fill: var(--forest-950);
  font-size: 17px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
}

.map-stop.done text {
  fill: white;
}

.player-halo {
  fill: rgba(124, 199, 223, 0.33);
}

.player-accuracy {
  fill: rgba(36, 135, 220, 0.12);
  stroke: rgba(36, 135, 220, 0.34);
  stroke-width: 2;
}

.player-dot {
  fill: var(--sky);
  stroke: white;
  stroke-width: 4;
}

.player-face {
  font-size: 18px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.phone-player .player-halo {
  fill: rgba(36, 135, 220, 0.28);
  animation: location-pulse 1.8s ease-in-out infinite;
}

.phone-player .player-dot {
  fill: #2487dc;
}

.phone-player-label-bg {
  fill: #155d9c;
  stroke: white;
  stroke-width: 2;
}

.phone-player-label {
  fill: white;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-anchor: middle;
  dominant-baseline: middle;
}

.map-empty {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--forest-850);
  text-align: center;
  font-weight: 850;
}

.map-overlay-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--forest-950);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 5px 12px rgba(21, 59, 42, 0.13);
  font-size: 11px;
  font-weight: 900;
}

.gps-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.gps-light {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #a4afa9;
  box-shadow: 0 0 0 6px rgba(96, 115, 107, 0.1);
}

.gps-light.good {
  background: var(--forest-550);
  box-shadow: 0 0 0 6px rgba(87, 165, 99, 0.16);
}

.gps-light.weak {
  background: var(--sun-dark);
  box-shadow: 0 0 0 6px rgba(204, 143, 23, 0.13);
}

.gps-card strong,
.gps-card span {
  display: block;
}

.gps-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.record-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  text-align: center;
}

.record-stats strong,
.record-stats span {
  display: block;
}

.record-stats strong {
  font-size: 19px;
}

.record-stats span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.record-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.record-action {
  min-height: 58px;
  color: white;
  background: var(--forest-850);
  font-size: 15px;
}

.record-action.stop {
  color: var(--berry-dark);
  background: #fff0ed;
}

.record-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 750;
}

.prepare-copy,
.child-intro,
.arrival-copy,
.finish-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.check-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 11px;
  align-items: center;
  padding: 13px;
  text-align: left;
}

.check-icon {
  font-size: 28px;
  text-align: center;
}

.check-card strong,
.check-card span {
  display: block;
}

.check-card.ready {
  border-color: rgba(52, 113, 73, 0.3);
  background: #f0faeb;
}

.compact-checks {
  margin: 14px 0;
}

.review-map {
  height: 340px;
  margin-top: 14px;
}

.check-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.child-intro-screen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  background:
    radial-gradient(circle at 82% 12%, rgba(246, 198, 75, 0.5) 0 9%, transparent 10%),
    linear-gradient(180deg, #e1f4da 0 62%, #91c878 62% 70%, #5d9a58 70% 100%);
}

.child-intro {
  position: relative;
  z-index: 2;
  padding-top: 18px;
}

.child-name-chip {
  display: block;
  width: fit-content;
  margin: 0 auto 9px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--forest-950);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 14px rgba(21, 59, 42, 0.12);
  font-size: 14px;
  font-weight: 900;
}

.forest-scene {
  position: relative;
  min-height: 285px;
  display: grid;
  place-items: center;
}

.forest-scene .round-illustration {
  position: relative;
  z-index: 2;
  width: 154px;
  height: 154px;
  margin: 0;
  font-size: 86px;
  animation: bob 2.3s ease-in-out infinite;
}

.scene-tree {
  position: absolute;
  bottom: 5px;
  font-size: 90px;
}

.scene-tree.left {
  left: -8px;
}

.scene-tree.right {
  right: -8px;
}

.navigation-screen {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto auto;
  gap: 11px;
  background: linear-gradient(180deg, #e8f7e2, var(--cream) 48%);
}

.progress-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.progress-compact {
  min-width: 210px;
  display: grid;
  grid-template-columns: 36px auto minmax(80px, 1fr);
  gap: 8px;
  align-items: center;
}

.progress-current {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 3px solid var(--sun-dark);
  border-radius: 50%;
  background: var(--sun);
  font-size: 19px;
}

.progress-compact strong {
  color: var(--forest-850);
  font-size: 14px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 82, 56, 0.14);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--forest-550);
  transition: width 220ms ease;
}

.progress-fill-1 { width: 10%; }
.progress-fill-2 { width: 20%; }
.progress-fill-3 { width: 30%; }
.progress-fill-4 { width: 40%; }
.progress-fill-5 { width: 50%; }
.progress-fill-6 { width: 60%; }
.progress-fill-7 { width: 70%; }
.progress-fill-8 { width: 80%; }
.progress-fill-9 { width: 90%; }
.progress-fill-10 { width: 100%; }

.manual-arrival-button {
  min-height: 46px;
  padding: 8px 14px;
  font-size: 13px;
}

.progress-dot {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(32, 82, 56, 0.19);
  border-radius: 50%;
  color: var(--forest-850);
  background: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  font-weight: 900;
}

.progress-dot.active {
  border-color: var(--sun-dark);
  background: var(--sun);
  animation: pulse 1.8s ease-in-out infinite;
}

.progress-dot.done {
  border-color: var(--forest-700);
  color: white;
  background: var(--forest-700);
}

.direction-card {
  min-height: 105px;
  display: grid;
  grid-template-columns: 78px 1fr 50px;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border-radius: 23px;
  color: white;
  background: var(--forest-850);
  box-shadow: 0 12px 26px rgba(21, 59, 42, 0.2);
}

.direction-arrow-wrap {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--forest-950);
  background: var(--sun);
}

.direction-arrow {
  display: block;
  width: 58px;
  height: 58px;
}

.direction-arrow path {
  fill: var(--forest-950);
  transform-origin: 50% 50%;
  transition: transform 350ms ease;
}

.direction-wait {
  font-size: 38px;
}

.direction-copy strong,
.direction-copy span {
  display: block;
}

.direction-copy strong {
  font-size: 16px;
  line-height: 1.2;
}

.direction-copy span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 750;
}

.direction-card .voice-button {
  color: var(--forest-950);
  background: white;
}

.child-status {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--forest-850);
  font-size: 12px;
  font-weight: 850;
}

.state-overlay {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(21, 59, 42, 0.6);
  backdrop-filter: blur(7px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.state-card {
  width: 100%;
  padding: 26px 22px 22px;
  border: 5px solid white;
  border-radius: 30px;
  background: var(--cream);
  box-shadow: 0 24px 70px rgba(10, 30, 20, 0.35);
  text-align: center;
}

.state-card.stop {
  background: #fff2dd;
}

.state-icon {
  font-size: 70px;
}

.state-card h2 {
  margin: 8px 0;
  color: var(--forest-950);
  font-size: 34px;
  letter-spacing: -0.04em;
}

.state-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.4;
}

.arrival-screen,
.task-screen,
.reward-screen,
.finish-screen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.arrival-screen {
  background:
    radial-gradient(circle at 18% 13%, rgba(246, 198, 75, 0.45), transparent 18%),
    linear-gradient(180deg, #e5f6df, var(--cream));
}

.arrival-copy,
.task-copy,
.finish-copy {
  justify-content: center;
  flex: 1;
}

.arrival-icon,
.task-icon,
.reward-icon,
.finish-icon {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 7px solid white;
  border-radius: 50%;
  background: #fff0c9;
  box-shadow: var(--shadow);
  font-size: 82px;
}

.task-screen {
  background: linear-gradient(180deg, #e9f7e4, var(--cream) 45%);
}

.task-copy h1 {
  font-size: 34px;
}

.choice-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 22px;
}

.choice-button {
  min-height: 116px;
  flex-direction: column;
  padding: 10px;
  border: 3px solid rgba(32, 82, 56, 0.12);
  color: var(--forest-950);
  background: white;
  box-shadow: 0 7px 16px rgba(21, 59, 42, 0.08);
  font-size: 14px;
}

.choice-button .choice-icon {
  font-size: 43px;
}

.feedback {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--berry-dark);
  text-align: center;
  font-weight: 800;
}

.jump-dots {
  display: flex;
  gap: 12px;
  margin: 24px 0 6px;
}

.jump-dot {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 4px solid var(--leaf-200);
  border-radius: 50%;
  color: var(--muted);
  background: white;
  font-size: 20px;
  font-weight: 900;
}

.jump-dot.done {
  border-color: var(--forest-700);
  color: white;
  background: var(--forest-700);
}

.reward-screen,
.finish-screen {
  text-align: center;
  background:
    radial-gradient(circle at 16% 18%, rgba(246, 198, 75, 0.48), transparent 15%),
    radial-gradient(circle at 86% 30%, rgba(124, 199, 223, 0.5), transparent 16%),
    linear-gradient(180deg, #e3f5dc, var(--cream));
}

.reward-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.reward-copy h1 {
  margin: 8px 0;
  color: var(--forest-950);
  font-size: 45px;
  letter-spacing: -0.045em;
}

.reward-copy p {
  max-width: 290px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 750;
}

.test-panel {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(21, 59, 42, 0.25);
}

.adult-gate-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.adult-answer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px 0 8px;
}

.adult-answer {
  min-height: 88px;
  font-size: 28px;
}

.adult-password-form {
  display: grid;
  gap: 10px;
  margin: 28px 0 8px;
}

.adult-password-form label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.adult-password-form input {
  min-height: 54px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 15px;
  color: var(--forest-950);
  background: #fff;
  font: inherit;
  font-size: 18px;
}

.adult-password-form input:focus {
  border-color: var(--forest-600);
  outline: 3px solid rgba(38, 126, 91, 0.16);
}

.sim-action {
  min-height: 45px;
  padding: 7px 5px;
  border-radius: 12px;
  color: var(--forest-850);
  background: var(--leaf-100);
  font-size: 11px;
}

.sim-action.danger {
  color: var(--berry-dark);
  background: #fff0ed;
}

.toast {
  position: absolute;
  z-index: 30;
  right: 18px;
  bottom: 24px;
  left: 18px;
  padding: 12px 16px;
  border-radius: 16px;
  color: white;
  background: rgba(21, 59, 42, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246, 198, 75, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(246, 198, 75, 0); }
}

@keyframes location-pulse {
  0%, 100% { r: 25px; opacity: 0.42; }
  50% { r: 34px; opacity: 0.12; }
}

@media (max-width: 760px) {
  body {
    background: var(--cream);
  }

  .page-shell {
    display: block;
    min-height: 100dvh;
    padding: 0;
  }

  .app-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .desktop-note {
    display: none;
  }

  .prepare-screen {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .prepare-primary-button:not(:disabled) {
    position: fixed;
    z-index: 45;
    right: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 14px;
    width: auto;
    border: 3px solid rgba(255, 255, 255, 0.92);
  }
}

@media (max-height: 720px) and (max-width: 760px) {
  .screen {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .hero {
    margin: 14px 0;
  }

  .hero-fox {
    width: 105px;
    height: 105px;
    margin-bottom: 10px;
    font-size: 58px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .scenario-card {
    min-height: 78px;
    padding: 9px;
  }

  .forest-scene {
    min-height: 210px;
  }

  .navigation-screen {
    grid-template-rows: auto minmax(210px, 1fr) auto auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
