/* Layout: one full-screen journey. Mint sea everywhere; screens fade in over it; during play the map sits left and a challenge panel slides in on the right. Deliberately one light look, matching headstartgo.com. */
:root {
  color-scheme: light;
  --sea: #DEEFEF;
  --sea-2: #CBE5E6;
  --sea-deep: #94C2CA;
  --ink: #201E1D;
  --ink-2: #4A4643;
  --ink-3: #6E6862;
  --navy: #214985;
  --navy-2: #3463A8;
  --paper: #FBFDFE;
  --blue: #D3E4FC;
  --sage: #D3E9DE;
  --amber: #F7E4B6;
  --amber-ink: #8A5A12;
  --glow: #F3B13F;
  --line: rgba(33, 73, 133, .14);
  --display: "Caprasimo", "Caprasimo Fallback Georgia", "Caprasimo Fallback Noto Serif", Georgia, "Times New Roman", serif; /* Fallback faces: /site/fonts.css */
  --body: "Figtree", "Figtree Fallback Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --panel-w: 440px;
}
html, body { height: 100%; }
body {
  background: var(--sea); color: var(--ink); font-family: var(--body); font-size: 15px;
  overflow: hidden;
  padding-left: max(0px, env(safe-area-inset-left, 0px)); padding-right: max(0px, env(safe-area-inset-right, 0px));
}
button { font: inherit; color: inherit; cursor: pointer; }
/* Hover looks only where there is a mouse (on a touch screen :hover sticks to
   what was tapped last); a tap shows a pressed look instead of the grey flash. */
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--navy-2); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: 72px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
  pointer-events: none;
  transition: background .2s, box-shadow .2s;
}
/* Once the start screen is scrolled, the bar gets a ground so the page never shows through it. */
.topbar.scrolled { background: rgba(222, 239, 239, .94); box-shadow: 0 1px 0 #C1CDD8; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.topbar > * { pointer-events: auto; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 22px; color: var(--ink); text-decoration: none; justify-self: start; }
/* Moving to or from another page of the site is a short crossfade; the bar and
   the logo are captured on their own and stay put (the same names as
   daylight.css and the start screen use). Off when the reader asks for less motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .18s; }
::view-transition-group(hs-topbar), ::view-transition-group(hs-logo) { animation: none; }
.topbar { view-transition-name: hs-topbar; }
.topbar > .logo { view-transition-name: hs-logo; }
.bar-center { grid-column: 2; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-topic { font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.stars { display: flex; gap: 4px; }
.stars i { width: 16px; height: 16px; background: rgba(138,90,18,.22); clip-path: polygon(50% 0, 63% 35%, 100% 38%, 71% 60%, 82% 96%, 50% 76%, 18% 96%, 29% 60%, 0 38%, 37% 35%); transition: background .4s; }
.stars i.on { background: var(--glow); }
.stars i.miss { background: #A9A296; }
.bar-right { grid-column: 3; justify-self: end; display: flex; gap: 10px; }
.chip-btn {
  border: 0; background: linear-gradient(#fff, #EEF4F8); color: var(--ink-2); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 18px; border-radius: 999px; box-shadow: 0 2px 0 rgba(33,73,133,.12), 0 6px 14px rgba(33,73,133,.08);
}
.acct { position: relative; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; letter-spacing: 0; text-transform: none; padding: 10px 14px 10px 18px; max-width: 46vw; }
.acct-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: 1px solid #D9E2E9; border-radius: 16px; padding: 6px; box-shadow: 0 10px 24px rgba(33,73,133,.18); }
.acct-menu button { border: 0; background: transparent; min-height: 44px; padding: 0 18px; border-radius: 10px; font: 700 15px var(--body); color: var(--ink); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .acct-menu button:hover { background: #ECF4FE; color: var(--navy); } }
.acct-menu button:active { background: #ECF4FE; color: var(--navy); }
.chip-btn:active { filter: brightness(.95); }
.chip-btn.blue { color: var(--navy); box-shadow: 0 2px 0 rgba(33,73,133,.25), 0 6px 14px rgba(33,73,133,.12), inset 0 0 0 1.5px rgba(116,166,237,.6); }

/* ---------- shared bits ---------- */
.screen { position: fixed; inset: 0; }
.btn-primary {
  border: 0; color: #fff; font-family: var(--display); font-size: 19px; padding: 14px 28px; border-radius: 999px;
  background: linear-gradient(#3B66A8, var(--navy)); box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 4px 0 #17345F, 0 10px 22px rgba(23,52,95,.25);
  transition: transform .12s, box-shadow .12s;
}
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { transform: translateY(-1px); } }
.btn-primary:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 1px 0 #17345F, 0 4px 10px rgba(23,52,95,.2); }
.btn-primary:disabled { opacity: .45; cursor: default; transform: none; }
.link-btn { border: 0; background: none; color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 4px 2px; }
.link-btn:active { opacity: .7; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.waves::before {
  content: ""; position: absolute; inset: -40px; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='60'%3E%3Cpath d='M0 30 Q20 22 40 30 T80 30' fill='none' stroke='%23A9CFD3' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M90 52 Q105 46 120 52' fill='none' stroke='%23B8D9DC' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  animation: wave 26s linear infinite;
}
@keyframes wave { to { transform: translate(160px, 0); } }

/* ---------- screen 1: search ---------- */
#s1 { background: radial-gradient(ellipse 70% 60% at 50% 48%, #E8F5F4 0%, var(--sea) 55%, var(--sea-2) 100%); overflow: hidden; }
.tiles { position: absolute; inset: 72px 0 0 0; transition: opacity .5s; }
.tile {
  position: absolute; left: 0; top: 0; transform: rotate(var(--r)); border: 0; white-space: nowrap;
  padding: 12px 18px; border-radius: 16px; font-weight: 700; font-size: 15px; color: var(--ink-2);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.06), 0 3px 0 rgba(33,73,133,.1), 0 10px 20px rgba(33,73,133,.08);
  animation: rise .6s ease-out var(--in) backwards, drift var(--d) ease-in-out var(--delay) infinite alternate; transition: opacity .4s, filter .4s;
}
.tile.blue { background: var(--blue); } .tile.sage { background: var(--sage); } .tile.amber { background: var(--amber); color: #5C4313; }
@media (hover: hover) and (pointer: fine) { .tile:hover { filter: brightness(1.03) saturate(1.1); } }
.tile:active { filter: brightness(1.03) saturate(1.1); }
.tile .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--glow); margin-left: 8px; vertical-align: 2px; box-shadow: 0 0 6px var(--glow); }
@keyframes drift { from { translate: 0 -6px; } to { translate: 10px 7px; } }
.tiles.quiet { opacity: .18; pointer-events: none; }
.hero { position: absolute; left: 50%; top: calc(50% + 36px); transform: translate(-50%, -50%); width: min(620px, calc(100% - 32px)); text-align: center; display: grid; gap: 18px; justify-items: center; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(46px, 6.4vw, 88px); line-height: 1; letter-spacing: -.01em; text-wrap: balance; animation: rise .8s .15s ease-out backwards; }
.hero .after { display: grid; gap: 18px; justify-items: center; width: 100%; animation: rise .7s 1.25s ease-out backwards; }
.no-intro .hero h1, .no-intro .hero .after, .no-intro .tile { animation-delay: 0s, var(--delay); }
@keyframes rise { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.sub { margin: 0; font-size: 19px; color: var(--ink-2); line-height: 1.45; text-wrap: balance; }
.search { position: relative; width: 100%; display: flex; gap: 10px; padding: 8px; background: #fff; border-radius: 999px; box-shadow: 0 3px 0 rgba(33,73,133,.12), 0 18px 40px rgba(33,73,133,.14); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 18px; padding: 0 16px; color: var(--ink); }
.search input::placeholder { color: #9A938B; }
.search:focus-within { box-shadow: 0 3px 0 rgba(33,73,133,.12), 0 18px 40px rgba(33,73,133,.14), 0 0 0 3px rgba(52,99,168,.35); }
.suggest { position: absolute; left: 16px; right: 16px; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 18px; box-shadow: 0 18px 40px rgba(33,73,133,.18); text-align: left; z-index: 5; }
.suggest li { padding: 10px 14px; border-radius: 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.suggest li[aria-selected="true"], .suggest li:active { background: #EEF4FB; }
@media (hover: hover) and (pointer: fine) { .suggest li:hover { background: #EEF4FB; } }
.suggest small { color: var(--amber-ink); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.note { margin: 0; color: var(--ink-3); font-size: 14px; font-weight: 500; }
.resume { margin-top: -6px; }

/* ---------- home: the minimal start (docs/home-page-mockup.html) ---------- */
#s1 {
  overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column;
  background-color: var(--sea);
  background-image: radial-gradient(120% 70% at 20% -10%, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 60%), radial-gradient(90% 60% at 100% 100%, rgba(66,116,189,.10) 0%, rgba(66,116,189,0) 60%);
}
#s1 .tiles { display: none; }
#s1 .hero {
  position: relative; left: auto; top: auto; transform: none; flex: 1 0 auto; margin: 0 auto;
  width: min(760px, calc(100% - 32px)); gap: 24px; align-content: center;
  padding-top: 72px; padding-bottom: 72px; /* the top bar's height on both sides, so the content sits in the middle */
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box; /* the footer starts below the first screen */
}
#s1 .hero h1 { font-size: clamp(44px, 6.4vw, 76px); line-height: 1.02; }
#s1 .hero .after { gap: 24px; }
#s1 .sub { max-width: 560px; margin-top: -8px; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: #3A3634; }
#s1 .search {
  align-items: center; padding: 10px; border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 55%), #FBFDFE;
  border: 1px solid #D9E2E9; box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -2px 0 rgba(46,43,37,.07), 0 4px 0 #CAD6E0, 0 10px 20px rgba(46,43,37,.13);
}
#s1 .search:focus-within { border-color: #AFC9EC; }
#s1 .search input { min-height: 56px; padding: 0 20px; }
#s1 .search input::placeholder { color: #645C50; }
#s1 .search .btn-primary { flex: none; min-width: 96px; min-height: 58px; padding: 0 30px; font-size: 20px; }
.m-attach { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: 999px; color: var(--navy); font: 700 15px var(--body); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .m-attach:hover { background: #ECF4FE; } }
.m-attach:active { background: #ECF4FE; }
.m-attach .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.m-examples { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.m-try { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-right: 4px; }
.m-opt { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #C1CDD8; background: #FBFDFE; color: var(--ink); font: 700 14.5px var(--body); }
@media (hover: hover) and (pointer: fine) { .m-opt:hover { border-color: #AFC9EC; background: #ECF4FE; color: var(--navy); } }
.m-opt:active { border-color: #AFC9EC; background: #ECF4FE; color: var(--navy); }
.m-continue {
  width: 100%; margin-top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left;
  padding: 16px 20px; border-radius: 24px; border: 1px solid #AFC9EC; color: var(--ink); font-family: var(--display); font-size: 21px; line-height: 1.15;
  background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 55%), #D3E4FC;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -2px 0 rgba(46,43,37,.07), 0 4px 0 #98B7E0, 0 10px 20px rgba(46,43,37,.13);
  transition: transform .14s ease;
}
.m-continue::after { content: "›"; font-family: var(--body); font-weight: 700; font-size: 28px; color: var(--navy); }
@media (hover: hover) and (pointer: fine) { .m-continue:hover { transform: translateY(-2px); } }
.m-continue:active { transform: translateY(3px); }
.m-next { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.m-next-topic { font: 800 12.5px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.m-next-title { font-family: var(--display); font-size: 21px; line-height: 1.15; }
.m-next-why { font: 500 14.5px/1.4 var(--body); color: var(--ink-2); }
.m-next-go { flex: none; font: 800 15px var(--body); color: var(--navy); }
.m-more { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 56px; display: flex; flex-direction: column; gap: 56px; }
.m-sec { display: flex; flex-direction: column; gap: 14px; }
.m-sec h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; }
.m-eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.m-small { margin: 0; font-size: 14px; color: var(--ink-2); }
.m-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 6px; }
.m-price, .m-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 24px; background: #FBFDFE; border: 1px solid #D9E2E9; box-shadow: 0 4px 0 #CAD6E0; }
.m-price-on { background: #D3E4FC; border-color: #AFC9EC; box-shadow: 0 4px 0 #98B7E0; }
.m-price h3 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.m-price p { margin: 0; }
.m-price .amt { font-family: var(--display); font-size: 34px; }
.m-chip { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: #fff; }
.m-price ul, .m-card ul { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.m-price li, .m-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.m-price li svg, .m-card li svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--navy-2); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.m-btn { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #EFF5F9; border: 1px solid #C1CDD8; color: var(--ink); font-weight: 800; font-size: 14px; text-decoration: none; }
.m-btn-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.m-footer { flex: none; border-top: 1px solid #C1CDD8; padding: 32px 0 36px; color: #645C50; font-size: 15px; }
.m-footer-in { width: min(1160px, calc(100% - 32px)); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.m-footer-in > div { display: flex; flex-direction: column; gap: 12px; flex: 1 1 200px; min-width: 0; }
.m-footer p { margin: 0; font-size: 13px; }
.m-footer nav { display: flex; flex-direction: column; gap: 8px; }
.m-footer nav b { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.m-cols { display: grid; grid-template-columns: repeat(2, auto); grid-auto-flow: column; gap: 8px 40px; }
.m-cols.r3 { grid-template-rows: repeat(3, auto); }
.m-cols.r2 { grid-template-rows: repeat(2, auto); }
.m-footer nav a { color: var(--ink-2); text-underline-offset: 3px; }
.m-footer nav span { color: var(--ink-2); }
.m-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 24px; line-height: 1; }
.m-brand svg { width: 26px; height: auto; }
@media (max-width: 560px) {
  #s1 .search { padding: 6px; gap: 6px; }
  #s1 .search input { padding: 0 12px; font-size: 16px; }
  #s1 .search .btn-primary { min-width: 0; padding: 0 20px; }
  .m-attach { padding: 0 10px; }
  .m-attach .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .m-ex4 { display: none; }
  .m-footer nav { flex: 1 1 100%; }
  .m-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
}
.proto { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 40; font-size: 12px; font-weight: 700; color: var(--ink-3); background: rgba(255,255,255,.7); padding: 6px 12px; border-radius: 999px; }
.proto .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--glow); margin: 0 4px 0 8px; vertical-align: 1px; }

/* ---------- screen 2: purpose ---------- */
#s2 { background: radial-gradient(ellipse 70% 60% at 50% 48%, #E8F5F4 0%, var(--sea) 55%, var(--sea-2) 100%); overflow: hidden; display: grid; place-items: center; }
.purpose-wrap { position: relative; width: min(680px, calc(100% - 32px)); display: grid; gap: 22px; justify-items: center; text-align: center; animation: rise .5s ease-out; }
.topic-tag { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: var(--navy); font-weight: 700; padding: 8px 8px 8px 16px; border-radius: 999px; }
.topic-tag button { border: 0; background: rgba(255,255,255,.7); width: 28px; height: 28px; border-radius: 50%; font-size: 14px; color: var(--navy); }
.topic-tag button:active { background: #fff; }
.purpose-wrap h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; }
.purpose { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.ptile {
  border: 0; text-align: left; padding: 22px 22px 20px; border-radius: 22px; display: grid; gap: 10px;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.06), 0 4px 0 rgba(33,73,133,.12), 0 14px 26px rgba(33,73,133,.1);
  transition: transform .15s, opacity .5s, translate .6s;
}
@media (hover: hover) and (pointer: fine) { .ptile:hover { transform: translateY(-2px); } }
.ptile:active { transform: translateY(2px); }
.ptile svg { width: 34px; height: 34px; }
.ptile b { font-family: var(--display); font-weight: 400; font-size: 24px; }
.ptile span { color: var(--ink-2); font-size: 14px; }
.ptile.blue { background: var(--blue); } .ptile.sage { background: var(--sage); } .ptile.amber { background: var(--amber); } .ptile.white { background: #fff; }
.leaving .ptile { opacity: 0; translate: 0 -40px; }
.leaving .ptile:nth-child(2) { transition-delay: .06s; } .leaving .ptile:nth-child(3) { transition-delay: .12s; } .leaving .ptile:nth-child(4) { transition-delay: .18s; }
.exam-box { width: 100%; display: flex; gap: 10px; align-items: center; background: #fff; padding: 10px 10px 10px 18px; border-radius: 18px; box-shadow: 0 10px 26px rgba(33,73,133,.12); animation: rise .3s ease-out; }
.exam-box label { font-weight: 700; white-space: nowrap; }
.exam-box input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 8px; background: #F3F7FA; border-radius: 10px; }
.exam-box .btn-primary { font-size: 16px; padding: 10px 18px; }

/* ---------- map ---------- */
#sMap { overflow: hidden; background: var(--sea-2); }
#mapWrap { position: absolute; inset: 0; transition: right .7s cubic-bezier(.3,.7,.2,1); }
.panel-open #mapWrap { right: var(--panel-w); }
#map { width: 100%; height: 100%; display: block; transition: opacity .3s; }
#mapG, #boat { transition: transform 1.25s cubic-bezier(.45,.05,.25,1); transform-origin: 0 0; }
.fog-c { transition: opacity 1.1s ease; }
.glow-c { transition: opacity 1.1s ease; }
.isl { cursor: default; }
.intro .isl { cursor: pointer; }
.skipchip { opacity: 0; transition: opacity .2s; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .intro .isl:hover .skipchip { opacity: 1; } }
.isl.skipped { opacity: .38; }
.map-intro { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); text-align: center; display: grid; gap: 10px; justify-items: center; animation: rise .6s ease-out; width: min(640px, calc(100% - 32px)); }
.map-intro h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.6vw, 46px); text-shadow: 0 2px 18px rgba(255,255,255,.9); }
.map-intro p { margin: 0; color: var(--ink-2); font-weight: 600; background: rgba(255,255,255,.6); padding: 4px 12px; border-radius: 999px; }
.map-start { position: absolute; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; }
.map-start small { color: var(--ink-2); font-weight: 600; background: rgba(255,255,255,.6); padding: 3px 10px; border-radius: 999px; }
.legend { position: absolute; left: 24px; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 14px; background: rgba(255,255,255,.75); padding: 10px 14px; border-radius: 14px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 50%; background: var(--glow); }

/* fog veil between screen 2 and the map */
#veil { position: fixed; inset: 0; z-index: 25; pointer-events: none; opacity: 0; transition: opacity .7s ease; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,.98), rgba(245,250,250,.94) 60%, rgba(230,242,242,.9)); display: grid; place-items: center; }
#veil.on { opacity: 1; pointer-events: auto; }
#veil .puff { position: absolute; border-radius: 50%; background: #fff; filter: blur(30px); animation: puff 6s ease-in-out infinite alternate; }
@keyframes puff { to { transform: translate(40px, -20px) scale(1.15); } }
.veil-msg { position: relative; text-align: center; display: grid; gap: 14px; justify-items: center; color: var(--ink-2); font-weight: 600; width: min(520px, calc(100% - 32px)); }
.veil-msg h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--ink); }
.veil-msg .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.veil-msg .row button { border: 0; padding: 10px 14px; border-radius: 14px; background: var(--blue); font-weight: 700; }
.veil-msg .row button:active { filter: brightness(.95); }

/* ---------- challenge / result panel ---------- */
#panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: var(--panel-w); background: var(--paper);
  box-shadow: -10px 0 40px rgba(33,73,133,.12); transform: translateX(100%); transition: transform .7s cubic-bezier(.3,.7,.2,1);
  display: flex; flex-direction: column; z-index: 20;
}
.panel-open #panel { transform: none; }
.panel-in { flex: 1; overflow-y: auto; padding: 92px 30px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 18px; }
.who { display: flex; gap: 12px; align-items: center; }
.who svg { width: 56px; height: 56px; flex: none; }
.who b { display: block; font-size: 16px; }
.who span { color: var(--ink-3); font-size: 13px; }
.isl-chip { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-ink); background: var(--amber); padding: 5px 10px; border-radius: 8px; }
.isl-chip.showme { background: var(--navy); color: #fff; }
.scene { margin: 0; position: relative; background: #fff; border-radius: 18px; padding: 16px 18px; font-size: 17px; line-height: 1.45; box-shadow: 0 0 0 1.5px var(--line), 0 6px 16px rgba(33,73,133,.06); }
.scene::before { content: ""; position: absolute; left: 22px; top: -8px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: -1.5px -1.5px 0 0 var(--line); }
.answers { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: #fff; padding: 12px 14px; border-radius: 14px; font-size: 15px; font-weight: 600;
  box-shadow: 0 0 0 1.5px var(--line), 0 3px 0 rgba(33,73,133,.08); transition: box-shadow .15s, background .15s;
}
.opt kbd { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: #EEF3F8; font: 700 12px var(--body); color: var(--ink-3); }
.opt[aria-pressed="true"] { background: #EAF1FC; box-shadow: 0 0 0 2.5px var(--navy-2), 0 3px 0 rgba(33,73,133,.15); }
.opt:disabled { cursor: default; }
.slots { display: grid; gap: 8px; padding: 10px; border-radius: 14px; background: #F2F6F9; min-height: 52px; }
.slots .ph { color: var(--ink-3); font-size: 13px; padding: 6px; }
.slot { display: flex; gap: 10px; align-items: center; border: 0; background: #fff; padding: 9px 12px; border-radius: 10px; font-weight: 600; text-align: left; box-shadow: 0 0 0 1.5px rgba(52,99,168,.35); white-space: pre-wrap; }
.slot em { font-style: normal; font-weight: 800; color: var(--navy); }
.pool { display: flex; flex-wrap: wrap; gap: 8px; }
.pool .opt { padding: 9px 12px; white-space: pre-wrap; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.match .opt { font-size: 14px; padding: 10px 12px; }
.match .opt[data-pair] { box-shadow: 0 0 0 2.5px var(--pc), 0 3px 0 rgba(33,73,133,.08); background: color-mix(in srgb, var(--pc) 12%, #fff); }
.type-in { width: 100%; border: 0; outline: 0; font: inherit; font-size: 17px; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1.5px var(--line); }
.type-in:focus { box-shadow: 0 0 0 2.5px var(--navy-2); }
textarea.type-in { min-height: 110px; resize: vertical; line-height: 1.45; }
.sure-q { display: grid; gap: 10px; padding-top: 4px; }
.sure-q > span { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.sure-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sure { border: 0; border-radius: 14px; padding: 12px 6px 10px; background: #fff; box-shadow: 0 0 0 1.5px var(--line), 0 3px 0 rgba(33,73,133,.08); display: grid; justify-items: center; gap: 4px; font-weight: 700; font-size: 14px; transition: transform .12s, box-shadow .2s; }
.sure small { font-weight: 500; color: var(--ink-3); font-size: 12px; }
@media (hover: hover) and (pointer: fine) { .sure:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--glow), 0 3px 0 rgba(33,73,133,.08); } }
.sure:not(:disabled):active { box-shadow: 0 0 0 2px var(--glow), 0 3px 0 rgba(33,73,133,.08); }
.sure:disabled { opacity: .45; cursor: default; }
.sure kbd { font: 700 11px var(--body); color: var(--ink-3); }
.idk { justify-self: start; }
.fb { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; animation: rise .3s ease-out; }
.fb.ok { background: #FFF4DA; } .fb.no { background: #EEF1F2; } .fb.idk { background: #EEF3F8; }
.fb p { margin: 0; font-weight: 700; }
.fb .btn-primary { font-size: 16px; padding: 10px 20px; }
.keys { margin: auto 0 0; font-size: 12px; color: var(--ink-3); }
.keys kbd { font: 700 11px var(--body); background: #EEF3F8; padding: 1px 6px; border-radius: 5px; }
.wait { display: grid; gap: 10px; justify-items: start; color: var(--ink-2); font-weight: 600; }
.wait .bar { width: 100%; height: 6px; border-radius: 3px; background: #E8EEF2; overflow: hidden; }
.wait .bar::after { content: ""; display: block; width: 40%; height: 100%; background: var(--glow); border-radius: 3px; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* halfway */
.halfway { position: absolute; left: calc((100% - var(--panel-w)) / 2); top: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 26px; padding: 28px 36px; text-align: center; display: grid; gap: 10px; justify-items: center; box-shadow: 0 24px 60px rgba(33,73,133,.22); animation: rise .4s ease-out; z-index: 15; }
.halfway h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 40px; }
.halfway p { margin: 0; color: var(--ink-2); }

/* result */
.res h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1.05; }
.res .meta { margin: 6px 0 0; color: var(--ink-3); font-weight: 600; }
.res-block { display: grid; gap: 8px; }
.res-block .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.res-block .chips span { background: var(--sage); padding: 7px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.res-block.start .chips span { background: var(--amber); color: #5C4313; }
.res-block p { margin: 0; color: var(--ink-2); }
.res .btn-primary { width: 100%; font-size: 18px; }
.res-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.hover-card { position: fixed; z-index: 50; width: 280px; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 16px 40px rgba(33,73,133,.22); pointer-events: none; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.hover-card b { font-size: 16px; }
.hover-card .lv { font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-ink); }
.hover-card .warn { background: #FFF1DD; padding: 6px 8px; border-radius: 8px; color: #7A4A06; font-weight: 600; }
.hover-card p { margin: 0; color: var(--ink-2); }

/* modal */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(32,30,29,.28); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--paper); border-radius: 26px; padding: 28px; display: grid; gap: 16px; box-shadow: 0 30px 80px rgba(23,52,95,.3); }
.modal h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.modal p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.modal .row { display: flex; flex-wrap: wrap; gap: 10px; }
.modal .pick { border: 0; padding: 12px 16px; border-radius: 14px; background: #fff; font-weight: 700; box-shadow: 0 0 0 1.5px var(--line), 0 3px 0 rgba(33,73,133,.08); }
@media (hover: hover) and (pointer: fine) { .modal .pick:hover { box-shadow: 0 0 0 2px var(--navy-2), 0 3px 0 rgba(33,73,133,.08); } }
.modal .pick:active { box-shadow: 0 0 0 2px var(--navy-2), 0 3px 0 rgba(33,73,133,.08); }
.modal .actions { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.review { display: grid; gap: 12px; }
.review article { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 0 0 1.5px var(--line); display: grid; gap: 6px; }
.review .tag { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.review .q { font-weight: 600; }
.review .a { font-size: 14px; color: var(--ink-2); white-space: pre-wrap; }
.review .a b { color: var(--ink); }
.review .ok { color: #3D7A55; } .review .no { color: #9A5A1A; }

@media (max-width: 760px) {
  :root { --panel-w: 100%; }
  .panel-open #mapWrap { right: 0; bottom: 58%; }
  #panel { top: auto; height: 58%; width: 100%; transform: translateY(100%); border-radius: 22px 22px 0 0; }
  .panel-in { padding: 22px 16px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .purpose { grid-template-columns: 1fr; }
  .halfway { left: 50%; top: 22%; }
  .legend { display: none; }
  .topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
