:root {
  --navy-950: #041a31;
  --navy-900: #082d54;
  --navy-800: #0d426f;
  --sky-700: #087fb9;
  --sky-500: #18aee4;
  --sky-200: #bcecff;
  --cloud: #f8fdff;
  --paper: #fffdf5;
  --ink: #112f49;
  --muted: #5e7890;
  --coral: #ff765f;
  --coral-dark: #d94d3b;
  --gold: #ffc94f;
  --gold-dark: #c98208;
  --green: #35b879;
  --green-dark: #137a51;
  --red: #d84f50;
  --shadow: 0 18px 55px rgba(3, 24, 45, .24);
  --small-shadow: 0 8px 24px rgba(3, 24, 45, .17);
  --radius: 24px;
  --radius-small: 15px;
  --tap: 52px;
  --plane-accent: #18aee4;
  font-family: "Avenir Next", Avenir, "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--navy-950);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--navy-950);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 8%, rgba(30, 172, 228, .28), transparent 35%),
    radial-gradient(circle at 84% 88%, rgba(255, 118, 95, .18), transparent 32%),
    var(--navy-950);
  overscroll-behavior: none;
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}

button:disabled { cursor: default; }

a { color: var(--sky-700); font-weight: 700; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.025em; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript-card {
  max-width: 620px;
  margin: 12vh auto;
  padding: 32px;
  border-radius: var(--radius);
  background: white;
}

.app-shell {
  position: relative;
  width: min(1180px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  background: #eaf8ff;
  box-shadow: 0 0 70px rgba(0, 0, 0, .32);
  overflow: hidden;
}

.scene {
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.scene-sky {
  background:
    radial-gradient(circle at 84% 13%, rgba(255, 255, 255, .8) 0 5%, transparent 5.2%),
    linear-gradient(180deg, #aee9ff 0%, #effbff 48%, #d7f4ff 100%);
}

.scene-paper {
  background:
    linear-gradient(rgba(15, 81, 123, .055) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 32px;
}

.scene-night {
  color: white;
  background:
    radial-gradient(circle at 18% 20%, rgba(24, 174, 228, .26), transparent 30%),
    radial-gradient(circle at 85% 65%, rgba(255, 201, 79, .12), transparent 30%),
    var(--navy-950);
}

.scene-night::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .65;
  background-image:
    radial-gradient(circle at 12% 19%, white 0 1px, transparent 1.5px),
    radial-gradient(circle at 26% 78%, white 0 1px, transparent 1.5px),
    radial-gradient(circle at 66% 23%, white 0 1px, transparent 1.5px),
    radial-gradient(circle at 81% 42%, white 0 1px, transparent 1.5px),
    radial-gradient(circle at 91% 12%, white 0 1px, transparent 1.5px);
  background-size: 180px 180px, 230px 230px, 260px 260px, 200px 200px, 310px 310px;
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin-bottom: 20px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-right { justify-content: flex-end; }

.brand-button, .icon-button, .pill-button {
  min-width: var(--tap);
  min-height: var(--tap);
  border: 1px solid rgba(17, 47, 73, .12);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 16px rgba(7, 51, 83, .1);
  cursor: pointer;
}

.brand-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  font-weight: 900;
}

.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.15rem;
}

.pill-button {
  padding: 0 16px;
  font-weight: 850;
}

.scene-night .brand-button,
.scene-night .icon-button,
.scene-night .pill-button {
  color: white;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(8, 45, 84, .82);
}

.stamp-meter {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 5px 18px rgba(7, 51, 83, .1);
}

.scene-night .stamp-meter {
  color: white;
  background: rgba(8, 45, 84, .78);
}

.stamp-dot {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px dashed #8eacc0;
  border-radius: 50%;
  color: #7795a9;
  font-size: .72rem;
  font-weight: 900;
}

.stamp-dot.done {
  color: #5d3b00;
  border-style: solid;
  border-color: var(--gold-dark);
  background: var(--gold);
  transform: rotate(-6deg);
}

.stamp-dot.current {
  color: var(--navy-900);
  border-style: solid;
  border-color: var(--sky-700);
  background: var(--sky-200);
  box-shadow: 0 0 0 3px rgba(24, 174, 228, .16);
}

.home-scene {
  display: flex;
  flex-direction: column;
  padding-bottom: max(38px, env(safe-area-inset-bottom));
  color: white;
  isolation: isolate;
  background-image:
    linear-gradient(180deg, rgba(3, 22, 43, .24) 0%, rgba(3, 22, 43, .02) 38%, rgba(3, 22, 43, .78) 100%),
    url("assets/title-art.png");
  background-size: cover;
  background-position: 50% 50%;
}

.home-scene::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 22, 43, .38), transparent 54%);
  pointer-events: none;
}

.home-controls {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.home-controls button {
  color: white;
  border: 1px solid rgba(255, 255, 255, .5);
  background: rgba(4, 26, 49, .78);
  backdrop-filter: blur(12px);
}

.compact-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(610px, 86%);
  margin-top: clamp(24px, 7vh, 76px);
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, .27);
  border-radius: 34px;
  background: rgba(4, 26, 49, .68);
  box-shadow: 0 22px 65px rgba(0, 0, 0, .3);
  backdrop-filter: blur(16px) saturate(120%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 10ch;
  margin-bottom: 12px;
  color: white;
  font-size: clamp(2.65rem, 7vw, 5.7rem);
  line-height: .92;
  text-wrap: balance;
  text-shadow: 0 4px 22px rgba(0, 0, 0, .25);
}

.hero-copy p {
  max-width: 42ch;
  margin-bottom: 18px;
  color: #eaf8ff;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 650;
  line-height: 1.45;
}

.route-ticket {
  display: inline-grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  min-width: min(100%, 390px);
  padding: 12px 16px;
  border-radius: 17px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(17, 47, 73, .1);
}

.route-ticket strong { display: block; font-size: 1.06rem; }
.route-ticket small { color: var(--muted); font-weight: 750; }
.route-line {
  position: relative;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--sky-700) 0 7px, transparent 7px 12px);
}
.route-line::after {
  content: "✈";
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 0 4px;
  color: var(--sky-700);
  background: var(--paper);
  transform: translate(-50%, -52%);
}

.home-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}

.offline-ready {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  color: #e8fff3;
  background: rgba(4, 50, 39, .76);
  font-size: .84rem;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.offline-ready[hidden] { display: none; }

.primary-button, .secondary-button, .ghost-button, .danger-button {
  min-height: 56px;
  padding: 0 24px;
  border-radius: 17px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.primary-button {
  color: #4b3000;
  border: 2px solid #ffe69b;
  background: var(--gold);
  box-shadow: 0 9px 0 #b77500, 0 14px 26px rgba(0, 0, 0, .22);
}

.primary-button:hover:not(:disabled) { transform: translateY(-2px); }
.primary-button:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 4px 0 #b77500; }

.secondary-button {
  color: white;
  border: 2px solid rgba(255, 255, 255, .5);
  background: rgba(4, 26, 49, .78);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
  backdrop-filter: blur(10px);
}

.ghost-button {
  color: var(--ink);
  border: 2px solid #bed8e8;
  background: white;
  box-shadow: var(--small-shadow);
}

.danger-button {
  color: #792328;
  border: 2px solid #f5b9bb;
  background: #fff2f2;
}

.button-wide { min-width: min(100%, 270px); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.page-wrap {
  position: relative;
  z-index: 2;
  width: min(1030px, 100%);
  margin: 0 auto;
}

.page-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  margin: 12px 0 25px;
}

.page-heading h1 {
  margin-bottom: 5px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.page-heading p { margin: 0; color: var(--muted); font-weight: 650; }
.scene-night .page-heading p { color: var(--sky-200); }

.route-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 16px 0 30px;
}

.route-map::before { display: none; }

.mission-card {
  position: relative;
  display: flex;
  min-height: 228px;
  flex-direction: column;
  padding: 21px;
  border: 2px solid rgba(8, 127, 185, .12);
  border-radius: 24px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--small-shadow);
  overflow: hidden;
}

.mission-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -32px;
  bottom: -46px;
  border-radius: 50%;
  background: var(--card-tint, #d7f4ff);
  opacity: .6;
}

.mission-card.locked {
  filter: saturate(.72);
  background: rgba(248, 252, 254, .92);
}
.mission-card.locked .mission-number { color: #4f6879; background: #dbe6ec; }
.mission-card.locked h2 { color: #405b6d; }
.mission-card.locked p { color: #617987; }
.mission-card.done { border-color: #e5b234; }
.mission-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 14px;
  color: white;
  background: var(--navy-800);
  font-weight: 950;
}

.mission-card.done .mission-number { color: #5b3a00; background: var(--gold); transform: rotate(-5deg); }
.mission-card h2 { margin-bottom: 7px; font-size: 1.32rem; }
.mission-card p { margin-bottom: 16px; color: var(--muted); line-height: 1.4; }
.mission-card button { position: relative; z-index: 2; width: 100%; margin-top: auto; }

.locked-status {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 9px 12px;
  border-radius: 14px;
  color: #536d7d;
  background: #e5eef3;
  font-size: .88rem;
  font-weight: 850;
  text-align: center;
}

.mini-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  color: var(--gold-dark);
  font-weight: 900;
}

.info-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: center;
  margin: 10px 0 22px;
  padding: 15px 18px;
  border: 1px solid #acd9ed;
  border-radius: 17px;
  color: var(--navy-900);
  background: #e1f7ff;
}

.info-banner .info-icon { font-size: 1.7rem; }
.info-banner p { margin: 0; font-weight: 700; line-height: 1.35; }

.intro-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: clamp(22px, 5vw, 52px);
  align-items: center;
  min-height: 62vh;
  padding: clamp(26px, 6vw, 60px);
  border-radius: 34px;
  background: white;
  box-shadow: var(--shadow);
}

.intro-visual {
  position: relative;
  display: grid;
  min-height: 330px;
  place-items: center;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 25% 24%, rgba(255,255,255,.22), transparent 24%),
    linear-gradient(145deg, var(--navy-800), var(--sky-500));
  overflow: hidden;
}

.intro-visual::before,
.intro-visual::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 78px;
  border-radius: 60%;
  background: rgba(255,255,255,.82);
  filter: blur(.2px);
}
.intro-visual::before { left: -50px; bottom: 30px; }
.intro-visual::after { right: -55px; top: 38px; }

.intro-icon { position: relative; z-index: 2; font-size: clamp(6rem, 16vw, 10rem); filter: drop-shadow(0 15px 15px rgba(0,0,0,.2)); }
.intro-copy h1 { margin-bottom: 12px; font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1; }
.intro-copy > p { color: var(--muted); font-size: 1.12rem; line-height: 1.5; }

.source-fact {
  margin: 20px 0;
  padding: 17px 18px;
  border-left: 5px solid var(--gold);
  border-radius: 0 15px 15px 0;
  background: #fff8dd;
}
.source-fact strong { display: block; margin-bottom: 5px; }
.source-fact p { margin: 0; color: #5e4c15; line-height: 1.45; }

.mission-stage {
  min-height: calc(100dvh - 112px);
}

.mission-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.mission-head .mission-emoji {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 19px;
  font-size: 2rem;
  background: white;
  box-shadow: var(--small-shadow);
}
.mission-head h1 { margin: 0 0 3px; font-size: clamp(1.55rem, 4vw, 2.45rem); }
.mission-head p { margin: 0; color: var(--muted); font-weight: 700; }

.progress-chip {
  min-width: 98px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy-900);
  background: white;
  box-shadow: var(--small-shadow);
  font-weight: 900;
  text-align: center;
}

.play-panel {
  padding: clamp(18px, 3vw, 28px);
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.instruction {
  max-width: 66ch;
  margin: 0 auto 20px;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.choice-card {
  position: relative;
  display: grid;
  min-height: 132px;
  place-items: center;
  gap: 7px;
  padding: 14px 10px;
  border: 3px solid #d6e7f0;
  border-radius: 19px;
  color: var(--ink);
  background: white;
  box-shadow: 0 5px 0 #c6dbe7;
  cursor: pointer;
  text-align: center;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.choice-card:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--sky-500); }
.choice-card .choice-icon { display: grid; min-height: 48px; place-items: center; font-size: 2.5rem; line-height: 1; }
.choice-icon svg { display: block; width: 48px; height: 48px; }
.choice-card .choice-label { font-weight: 900; }
.choice-card.correct, .choice-card.selected {
  border-color: var(--green-dark);
  background: #e4faef;
  box-shadow: 0 5px 0 #80c8a5;
}
.choice-card.wrong {
  border-color: #e4b5b5;
  background: #fff1f1;
  animation: nudge .24s ease-in-out 2;
}

@keyframes nudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(5px); } }

.status-line {
  min-height: 48px;
  margin-top: 17px;
  padding: 12px 16px;
  border-radius: 14px;
  color: var(--navy-900);
  background: #e7f7ff;
  font-weight: 800;
  text-align: center;
}
.status-line.success { color: #0f6944; background: #e4faef; }
.status-line.try { color: #8d3c35; background: #fff0ed; }

.runway-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 20px;
  align-items: stretch;
}

.runway-board {
  position: relative;
  min-height: 510px;
  border: 12px solid #66a153;
  border-radius: 28px;
  background:
    linear-gradient(90deg, transparent 0 47%, #f8f2d8 47% 53%, transparent 53%),
    repeating-linear-gradient(180deg, #48545b 0 58px, #4e5b62 58px 116px);
  box-shadow: inset 0 0 0 5px #f5f2db, var(--small-shadow);
  overflow: hidden;
}

.runway-board::before,
.runway-board::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  height: 18px;
  border-top: 7px solid white;
  border-bottom: 7px solid white;
}
.runway-board::before { top: 23px; }
.runway-board::after { bottom: 23px; }

.runway-light {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #e5fbff;
  border-radius: 50%;
  background: var(--sky-500);
  box-shadow: 0 0 9px #8ee5ff;
}

.fod-button {
  position: absolute;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 3px solid rgba(255,255,255,.85);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 6px 14px rgba(0,0,0,.22);
  font-size: 2rem;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--turn, 0deg));
}
.fod-button:hover { scale: 1.08; }
.fod-button.found { animation: pop-away .38s ease forwards; pointer-events: none; }

@keyframes pop-away { to { opacity: 0; scale: 1.8; rotate: 18deg; } }

.detective-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 23px;
  border-radius: 24px;
  background: var(--navy-900);
  color: white;
  box-shadow: var(--small-shadow);
}
.detective-panel .big-count { color: var(--gold); font-size: 4rem; font-weight: 950; line-height: 1; }
.detective-panel p { color: var(--sky-200); line-height: 1.45; }

.quiz-scene {
  display: grid;
  grid-template-columns: minmax(210px, .65fr) minmax(0, 1.35fr);
  gap: 24px;
  align-items: stretch;
}
.quiz-picture {
  display: grid;
  min-height: 350px;
  place-items: center;
  border-radius: 24px;
  color: white;
  background: linear-gradient(155deg, var(--navy-900), var(--sky-500));
  font-size: clamp(5rem, 14vw, 9rem);
  text-align: center;
}
.quiz-content { display: flex; flex-direction: column; justify-content: center; }
.quiz-content h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); }
.quiz-options { display: grid; gap: 12px; }
.quiz-option {
  min-height: 64px;
  padding: 12px 18px;
  border: 3px solid #d7e6ee;
  border-radius: 17px;
  color: var(--ink);
  background: white;
  font-weight: 850;
  cursor: pointer;
  text-align: left;
}
.quiz-option:hover:not(:disabled) { border-color: var(--sky-500); }
.quiz-option.correct { border-color: var(--green); background: #e4faef; }
.quiz-option.wrong { border-color: #e29d9d; background: #fff0ed; }
.quiz-explain { margin-top: 15px; padding: 15px; border-radius: 14px; background: #edf8fd; font-weight: 720; line-height: 1.45; }
.quiz-next { margin-top: 15px; align-self: flex-start; }

.star-panel {
  padding: 12px;
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 28px;
  background: rgba(5, 28, 52, .62);
  box-shadow: var(--shadow);
}

.star-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px 15px;
  color: white;
  font-weight: 900;
}
.star-hud strong { color: var(--gold); font-size: 1.3rem; }
#sky-canvas {
  display: block;
  width: 100%;
  max-height: 55vh;
  border-radius: 19px;
  background: #72d7f4;
  touch-action: none;
}
.flight-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 15px 5px 3px;
}
.flight-control {
  width: 78px;
  height: 58px;
  border: 2px solid rgba(255,255,255,.4);
  border-radius: 18px;
  color: white;
  background: rgba(255,255,255,.15);
  font-size: 1.8rem;
  font-weight: 900;
  cursor: pointer;
}

.lane-game { display: grid; gap: 12px; }
.lane-button {
  min-height: 94px;
  border: 3px solid rgba(255,255,255,.28);
  border-radius: 18px;
  color: white;
  background: rgba(255,255,255,.09);
  font-size: 2.3rem;
  cursor: pointer;
}

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.bingo-tile {
  position: relative;
  display: grid;
  min-height: 122px;
  place-items: center;
  gap: 5px;
  padding: 12px 8px;
  border: 3px solid #d7e6ee;
  border-radius: 18px;
  color: var(--ink);
  background: white;
  box-shadow: 0 5px 0 #c7dce6;
  cursor: pointer;
  text-align: center;
}
.bingo-tile .choice-icon { font-size: 2.35rem; }
.bingo-tile strong { font-size: .92rem; }
.bingo-tile.found {
  color: #0d5f3d;
  border-color: var(--green-dark);
  background: #e2faed;
  box-shadow: 0 5px 0 #72b994;
}
.bingo-tile.found::after {
  content: "✓";
  position: absolute;
  right: 8px;
  top: 6px;
  font-size: 1.2rem;
  font-weight: 950;
}

.complete-card {
  width: min(720px, 100%);
  margin: 5vh auto 0;
  padding: clamp(28px, 6vw, 58px);
  border-radius: 34px;
  background: white;
  box-shadow: var(--shadow);
  text-align: center;
}
.stamp-burst {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  margin: 0 auto 22px;
  border: 8px double var(--gold-dark);
  border-radius: 50%;
  color: #5f3b00;
  background: var(--gold);
  font-size: 4.4rem;
  box-shadow: 0 0 0 9px #fff3bf, 0 16px 32px rgba(94, 59, 0, .22);
  animation: stamp-in .55s cubic-bezier(.2, 1.7, .4, 1);
  transform: rotate(-7deg);
}
@keyframes stamp-in { from { opacity: 0; scale: .2; rotate: -30deg; } }
.complete-card h1 { margin-bottom: 8px; font-size: clamp(2.1rem, 6vw, 3.8rem); }
.complete-card .score-stars { margin-bottom: 18px; color: var(--gold-dark); font-size: 1.35rem; font-weight: 950; }

.passport {
  padding: clamp(22px, 5vw, 48px);
  border: 10px solid #bb4e3d;
  border-radius: 28px;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 118, 95, .14), transparent 20%),
    linear-gradient(90deg, transparent 49.6%, rgba(17,47,73,.1) 49.8% 50.2%, transparent 50.4%),
    #fffaf0;
  box-shadow: var(--shadow);
}
.passport-title { text-align: center; }
.passport-title .tiny-caps { color: var(--coral-dark); font-size: .76rem; font-weight: 950; letter-spacing: .2em; }
.passport-title h1 { margin: 4px 0 7px; font-size: clamp(2rem, 5vw, 3.3rem); }
.passport-route { color: var(--muted); font-weight: 800; }
.passport-stamps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 30px 0;
}
.passport-stamp {
  display: grid;
  min-height: 145px;
  place-items: center;
  padding: 12px;
  border: 4px dashed #bdcbd2;
  border-radius: 50%;
  color: #93a4ac;
  text-align: center;
  transform: rotate(var(--angle));
}
.passport-stamp.done { color: #7c3b2f; border-color: var(--coral-dark); background: rgba(255, 118, 95, .08); }
.passport-stamp .stamp-icon { font-size: 2rem; }
.passport-stamp strong { display: block; font-size: .82rem; }

.badge-section { margin-top: 28px; }
.badge-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px 15px;
  border: 2px solid #e9c659;
  border-radius: 999px;
  background: #fff4c6;
  font-weight: 900;
}
.badge.locked { color: #7d8c94; border-color: #d5dfe3; background: #f1f5f7; filter: grayscale(1); }

.plane-picker {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin: 28px 0;
  padding: 19px;
  border-radius: 18px;
  background: rgba(24, 174, 228, .1);
}
.color-options { display: flex; flex-wrap: wrap; gap: 11px; }
.color-swatch {
  width: 54px;
  height: 54px;
  border: 5px solid white;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 2px #adc7d4;
  cursor: pointer;
}
.color-swatch.selected { box-shadow: 0 0 0 4px var(--navy-900); }
.plane-preview { color: var(--plane-accent); font-size: 4rem; transform: rotate(-8deg); }

.certificate {
  position: relative;
  margin-top: 27px;
  padding: clamp(25px, 5vw, 48px);
  border: 10px double var(--gold-dark);
  background: white;
  text-align: center;
}
.certificate::before, .certificate::after {
  content: "★";
  position: absolute;
  top: 50%;
  color: var(--gold-dark);
  font-size: 2rem;
}
.certificate::before { left: 18px; }
.certificate::after { right: 18px; }
.certificate h2 { font-size: clamp(1.8rem, 5vw, 3rem); }
.certificate .name { color: var(--coral-dark); font-family: Georgia, serif; font-size: clamp(2.5rem, 7vw, 4.8rem); font-style: italic; }

.guide-card {
  padding: clamp(22px, 5vw, 44px);
  border-radius: 27px;
  background: white;
  box-shadow: var(--shadow);
}
.guide-card h2 { margin-top: 30px; }
.guide-card p, .guide-card li { line-height: 1.55; }
.source-list { display: grid; gap: 12px; padding: 0; list-style: none; }
.source-list li { padding: 13px 15px; border-left: 4px solid var(--sky-500); background: #eff9fd; }
.offline-note { padding: 14px 16px; border-radius: 15px; background: #fff4c6; font-weight: 750; }

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 26, 49, .7);
  backdrop-filter: blur(8px);
}
.modal {
  width: min(540px, 100%);
  max-height: 88dvh;
  overflow: auto;
  padding: 27px;
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  padding: 13px 19px;
  border-radius: 999px;
  color: white;
  background: var(--navy-950);
  box-shadow: var(--shadow);
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .brand-label { display: none; }
  .stamp-meter { justify-self: center; }
  .stamp-dot:nth-child(n+5) { display: none; }
  .route-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro-card { grid-template-columns: 1fr; }
  .intro-visual { min-height: 220px; }
  .runway-wrap { grid-template-columns: 1fr; }
  .runway-board { min-height: 420px; }
  .detective-panel { min-height: 150px; }
  .quiz-scene { grid-template-columns: 1fr; }
  .quiz-picture { min-height: 190px; }
  .bingo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .scene { padding-inline: 12px; }
  .home-scene { background-position: 57% 50%; }
  .home-controls { justify-content: space-between; }
  .hero-copy { width: 100%; margin-top: 24px; padding: 22px; border-radius: 25px; }
  .hero-copy h1 { font-size: 3rem; }
  .route-ticket { width: 100%; }
  .home-actions { display: grid; grid-template-columns: 1fr; }
  .home-actions button { width: 100%; }
  .page-heading { grid-template-columns: 1fr; }
  .route-map { grid-template-columns: 1fr; }
  .route-map::before { display: none; }
  .mission-card { min-height: 190px; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mission-head { grid-template-columns: auto 1fr; }
  .mission-head .progress-chip { grid-column: 1 / -1; justify-self: stretch; }
  .runway-board { min-height: 390px; }
  .bingo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bingo-tile { min-height: 110px; }
  .passport { border-width: 7px; }
  .passport-stamps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .passport::before { display: none; }
  .plane-picker { grid-template-columns: 1fr; }
  .button-row > button { width: 100%; }
}

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

[data-reduced-motion="true"] *,
[data-reduced-motion="true"] *::before,
[data-reduced-motion="true"] *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}

@media print {
  body { background: white; }
  .topbar, .passport > :not(.certificate), .button-row, .toast { display: none !important; }
  .scene, .app-shell { min-height: auto; padding: 0; box-shadow: none; background: white; }
  .passport { border: 0; padding: 0; box-shadow: none; }
  .certificate { margin: 0; break-inside: avoid; }
}
