/* Flight to Snowcap Island (PL3, 2026-10-31): the story layer over PL2's look (game.css). Upright phone first, 48px+ buttons. */
body.story #gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#chip { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 16px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line); font-weight: 800; font-size: 14px; min-width: 0; }
#chip b { width: 32px; height: 32px; border-radius: 10px; background: var(--amber); color: #0f1720; display: grid; place-items: center; flex: none; }
#chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud__r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
#clock { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px; border-radius: 14px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; font-weight: 800; color: var(--ink2); max-width: 180px; }
#clock i { width: 22px; height: 22px; flex: none; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 16a4 4 0 0 1 .5-8A5.5 5.5 0 0 1 18 9.5 3.3 3.3 0 0 1 17.5 16Z' fill='%23cfd8e3'/%3E%3Cpath d='M9 19l-1 2M13 19l-1 2M17 19l-1 2' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
#clock.near { color: #ffd88a; } #clock.here { color: #fff; background: rgba(120, 140, 170, .55); }
@media (max-width: 480px) { #clock span { display: none; } #chip span { max-width: 128px; } }
body.menuing #hud, body.cutting #hud .hud__r { visibility: hidden; }
#flash { z-index: 12; }
.ask__t { flex: 1; min-width: 0; }
#askEng { margin: 4px 0 0 !important; font-size: 13.5px !important; font-weight: 700 !important; color: var(--ink2); line-height: 1.35; }
#askEng:empty { display: none; }
body:not(.big-level) #askEng { display: none; }
#ask.wait { box-shadow: 0 0 0 2px var(--sky), 0 12px 30px rgba(0, 0, 0, .4); }

/* the control area (levers, switches, buttons) sits at the bottom */
#ctl { position: fixed; z-index: 14; left: 10px; right: 10px; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; gap: 10px; justify-content: center; align-items: flex-end; flex-wrap: wrap; max-width: 760px; margin: 0 auto; }
.cbig { min-width: 120px; min-height: 64px; border-radius: 18px; background: var(--glass2); box-shadow: inset 0 0 0 1px var(--line), 0 8px 20px rgba(0, 0, 0, .3); font-weight: 900; font-size: 17px; padding: 8px 16px; display: flex; align-items: center; justify-content: center; gap: 8px; touch-action: none; }
.cbig small { display: block; font-size: 12px; color: var(--ink2); font-weight: 700; }
.cbig--go { background: linear-gradient(#f6c45c, #e09a26); color: #1a1206; box-shadow: 0 8px 22px rgba(224, 154, 38, .45); }
.cbig--wide { flex: 1 1 100%; }
.cbig.hold, .cbig:active { transform: scale(.97); filter: brightness(1.15); }
.cbig.glow, .eng.glow, .sw.glow, .lever.glow { box-shadow: inset 0 0 0 3px var(--amber), 0 0 26px rgba(242, 181, 68, .8); animation: glowc .8s ease-in-out infinite alternate; }
.cbig.wob, .eng.wob, .sw.wob { animation: wob2 .5s ease; box-shadow: inset 0 0 0 2px var(--bad); }
.cbig[disabled] { opacity: .45; }
/* a lever you drag up (or tap) */
.lever { position: relative; width: 120px; height: 190px; border-radius: 20px; background: var(--glass2); box-shadow: inset 0 0 0 1px var(--line); touch-action: none; }
.lever::before { content: ""; position: absolute; left: 50%; top: 18px; bottom: 18px; width: 10px; margin-left: -5px; border-radius: 6px; background: rgba(0, 0, 0, .45); }
.lever .knob { position: absolute; left: 22px; right: 22px; height: 40px; border-radius: 12px; background: linear-gradient(#e8edf3, #9aa6b4); box-shadow: 0 4px 10px rgba(0, 0, 0, .4); display: grid; place-items: center; color: #17202b; font-weight: 900; font-size: 13px; }
.lever .lab { position: absolute; left: 0; right: 0; bottom: -2px; transform: translateY(100%); text-align: center; font-weight: 800; font-size: 13px; padding-top: 6px; }
.lever .tk { position: absolute; right: 6px; font-size: 10.5px; color: var(--ink2); font-weight: 800; }
/* switches */
.sw { min-width: 150px; min-height: 70px; border-radius: 16px; background: #26313f; box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; gap: 12px; padding: 8px 14px; font-weight: 900; text-align: left; }
.sw i { width: 34px; height: 54px; border-radius: 10px; background: #111821; position: relative; flex: none; box-shadow: inset 0 0 0 2px #3a4656; }
.sw i::after { content: ""; position: absolute; left: 5px; right: 5px; height: 22px; bottom: 5px; border-radius: 6px; background: #c7ced6; transition: bottom .2s; }
.sw.on i::after { bottom: 27px; background: var(--ok); }
.sw small { display: block; color: var(--ink2); font-size: 12px; font-weight: 700; }
/* rudder pad */
.pad { flex: 1 1 100%; display: flex; gap: 10px; align-items: stretch; }
.pad .cbig { flex: 1; min-height: 84px; font-size: 22px; }
.pad__mid { flex: 1.2; display: grid; place-items: center; font-size: 12px; color: var(--ink2); font-weight: 800; text-align: center; border-radius: 18px; background: rgba(255, 255, 255, .05); }

/* Glimmer, the little helper for Little players */
#glim { position: fixed; z-index: 13; width: 64px; height: 64px; left: 0; top: 0; pointer-events: none; transition: transform .9s cubic-bezier(.3, .8, .3, 1); filter: drop-shadow(0 0 12px rgba(255, 220, 120, .9)); }
#glim img { width: 100%; height: 100%; object-fit: contain; animation: hov 1.6s ease-in-out infinite alternate; }
@keyframes hov { to { transform: translateY(-8px); } }

/* instruments */
#speed { position: fixed; z-index: 13; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 140px); width: 220px; text-align: center; background: var(--glass); border-radius: 22px; padding: 8px 10px 6px; box-shadow: inset 0 0 0 1px var(--line); }
#speed svg { width: 100%; display: block; } #speed b { display: block; font-size: 26px; font-weight: 900; margin-top: -8px; } #speed small { color: var(--ink2); font-weight: 800; font-size: 12px; }
#ecam { position: fixed; z-index: 14; left: 10px; right: 10px; top: calc(max(10px, env(safe-area-inset-top)) + 150px); max-width: 520px; margin: 0 auto; background: #070b10; border-radius: 18px; padding: 10px 12px; box-shadow: inset 0 0 0 2px #2b3644, 0 12px 30px rgba(0, 0, 0, .5); font-family: ui-monospace, Menlo, Consolas, monospace; }
.ecam__k { margin: 0 0 8px; color: #8fd2ff; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ecam__row { display: flex; gap: 10px; }
.eng { flex: 1; min-height: 110px; border-radius: 14px; background: #0f1721; box-shadow: inset 0 0 0 1px #2b3644; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 8px; }
.eng i { width: 54px; height: 54px; border-radius: 50%; border: 5px solid #5fe36a; border-right-color: transparent; transform: rotate(-30deg); }
.eng b { font-size: 15px; } .eng span { font-size: 11.5px; color: #5fe36a; font-weight: 800; }
.eng.warn i { border-color: #ffb13a; border-right-color: transparent; } .eng.warn span { color: #ffb13a; } .eng.warn { animation: amb 1s steps(2) infinite; }
.eng.off i { border-color: #59626c; border-right-color: transparent; } .eng.off span { color: #9aa3ad; }
@keyframes amb { 50% { box-shadow: inset 0 0 0 2px #ffb13a; } }
#ecamMsg { margin: 8px 0 0; color: #ffb13a; font-weight: 900; font-size: 14px; min-height: 18px; }
#hdg { position: fixed; z-index: 13; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 140px); width: min(92vw, 420px); height: 82px; background: var(--glass); border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.hdg__tape { position: absolute; left: 0; right: 0; top: 0; height: 46px; }
.hdg__tape i { position: absolute; top: 8px; width: 2px; height: 14px; background: rgba(255, 255, 255, .5); }
.hdg__tape i.tgt { width: 8px; margin-left: -3px; height: 40px; top: 3px; border-radius: 4px; background: var(--ok); box-shadow: 0 0 14px var(--ok); }
.hdg__nose { position: absolute; left: 50%; top: 0; margin-left: -9px; border: 9px solid transparent; border-top: 16px solid var(--amber); }
.hdg__lab { position: absolute; left: 0; right: 0; top: 44px; text-align: center; font-size: 12px; color: var(--ink2); }
.hdg__bar { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .12); } .hdg__bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--ok); }
#stopbar { position: fixed; z-index: 13; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 140px); width: min(92vw, 420px); background: var(--glass); border-radius: 18px; padding: 10px 14px; box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.sb__rw { position: relative; height: 30px; border-radius: 8px; background: linear-gradient(90deg, #3b4350, #3b4350 85%, #5a2a26 85%); box-shadow: inset 0 0 0 1px var(--line); }
.sb__plane { position: absolute; top: 2px; left: 0; font-style: normal; font-size: 22px; transform: translateX(-50%); }
.sb__end { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; background: #ff3b30; border-radius: 0 8px 8px 0; }
#stopbar b { display: block; margin-top: 6px; font-size: 14px; }

/* cutscenes: characters come in from the sides, a speech box at the bottom */
#cut { position: fixed; inset: 0; z-index: 22; background: linear-gradient(rgba(6, 10, 16, .05), rgba(6, 10, 16, .55) 70%); }
#cutCast { position: absolute; left: 0; right: 0; top: 70px; bottom: 150px; }
.cc { position: absolute; bottom: 0; height: 100%; max-height: 560px; transition: transform .6s cubic-bezier(.3, .8, .3, 1), opacity .5s, filter .4s; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.cc img { height: 100%; width: auto; display: block; }
.cc--l { left: 2%; } .cc--r { right: 2%; } .cc--c { left: 50%; transform: translateX(-50%); }
.cc.dim { filter: brightness(.55) drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.cc.in-l { transform: translateX(-120%); opacity: 0; } .cc.in-r { transform: translateX(120%); opacity: 0; }
.cc.small { height: 30%; bottom: 55%; }
.cut__box { position: absolute; left: 10px; right: 10px; bottom: max(14px, env(safe-area-inset-bottom)); max-width: 680px; margin: 0 auto; background: var(--glass2); border-radius: 20px; padding: 12px 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line); }
.cut__who { margin: 0; color: var(--amber); font-weight: 900; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.cut__line { margin: 4px 0 10px; font-size: 19px; font-weight: 800; line-height: 1.35; min-height: 52px; }
.cut__btns { display: flex; justify-content: space-between; gap: 10px; }
.cbtn2 { min-height: 48px; min-width: 96px; border-radius: 14px; background: rgba(255, 255, 255, .09); font-weight: 900; padding: 0 16px; }
.cbtn2--go { background: linear-gradient(#f6c45c, #e09a26); color: #1a1206; }
@media (orientation: landscape) and (max-height: 500px) { #cutCast { top: 8px; bottom: 8px; left: 0; right: 0; } .cc { max-height: none; } .cut__box { left: 30%; right: 30%; bottom: 8px; padding: 8px 12px; } .cut__line { font-size: 16px; min-height: 0; } .cc--l { left: 4%; } .cc--r { right: 4%; } }

/* the "you learned a part" card */
#learn { position: fixed; z-index: 21; left: 10px; right: 10px; bottom: max(14px, env(safe-area-inset-bottom)); max-width: 620px; margin: 0 auto; }
.learn__in { display: flex; gap: 12px; align-items: flex-start; background: var(--glass2); border-radius: 20px; padding: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(242, 181, 68, .6); animation: cardin .45s ease both; }
.learn__in > div { flex: 1; min-width: 0; }
#learnPic { width: 78px; height: 78px; flex: none; border-radius: 14px; background-color: rgba(255, 255, 255, .08); background-repeat: no-repeat; }
.learn__k { margin: 0; color: var(--amber); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
#learnName { margin: 2px 0 4px; font-size: 22px; font-weight: 900; }
#learnSay { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; }
.learn__big, .learn__fact { margin: 6px 0 0; font-size: 13.5px; color: var(--ink2); line-height: 1.4; }
.learn__fact:not(:empty)::before { content: "Cool fact: "; color: var(--amber); font-weight: 900; }
body:not(.big-level) .learn__big, body:not(.big-level) .learn__fact { display: none; }
#learnOk { align-self: center; }
@media (orientation: landscape) and (min-width: 700px) { #learn { left: auto; right: 14px; width: 420px; } }

/* the menu */
#menu { position: fixed; inset: 0; z-index: 26; overflow: auto; background: linear-gradient(rgba(8, 14, 22, .35), rgba(8, 14, 22, .85)); padding: max(18px, env(safe-area-inset-top)) 14px 24px; }
.menu__in { max-width: 720px; margin: 0 auto; }
.menu__k { margin: 6px 0 0; color: var(--amber); font-weight: 900; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
#menu h1 { margin: 4px 0 6px; font-size: clamp(30px, 8vw, 46px); font-weight: 900; line-height: 1.05; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.menu__p { margin: 0 0 14px; font-size: 16px; color: var(--ink2); max-width: 560px; }
.menu__go .big { width: 100%; max-width: 360px; min-height: 60px; font-size: 19px; justify-content: center; }
#mChapters { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
#mChapters button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; min-height: 60px; border-radius: 16px; background: var(--glass2); box-shadow: inset 0 0 0 1px var(--line); padding: 8px 12px; }
#mChapters button[disabled] { opacity: .45; }
#mChapters b { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; flex: none; }
#mChapters .ok b { background: var(--ok); color: #0f1720; }
#mChapters span { flex: 1; font-weight: 800; } #mChapters small { display: block; color: var(--ink2); font-weight: 700; font-size: 12.5px; }
#mChapters em { font-style: normal; color: var(--amber); letter-spacing: 2px; white-space: nowrap; }
.menu__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.mlink { display: block; text-decoration: none; color: var(--ink); background: rgba(255, 255, 255, .07); border-radius: 16px; padding: 12px 14px; text-align: left; box-shadow: inset 0 0 0 1px var(--line); }
.mlink b { display: block; font-size: 16px; } .mlink span { color: var(--ink2); font-size: 13px; }
.menu__note { color: var(--ink2); font-size: 12.5px; margin-top: 14px; } .menu__note a { color: var(--ink); }

/* chapter done, finale */
.stars { font-size: 40px; letter-spacing: 6px; color: rgba(255, 255, 255, .2); margin: 4px 0 8px; }
.stars .on { color: var(--amber); display: inline-block; animation: pop .5s ease both; }
.stars .on:nth-child(2) { animation-delay: .25s; } .stars .on:nth-child(3) { animation-delay: .5s; }
@keyframes pop { from { transform: scale(0); } 60% { transform: scale(1.3); } to { transform: scale(1); } }
.done__parts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 14px; }
.done__parts span { padding: 4px 10px; border-radius: 10px; background: rgba(242, 181, 68, .16); color: #ffe2a6; font-weight: 800; font-size: 13px; }
.pick--go { background: linear-gradient(#f6c45c, #e09a26) !important; color: #1a1206 !important; }
a.pick { text-decoration: none; display: inline-grid; place-items: center; }
.sheetcard--fin { max-height: calc(100vh - 32px); overflow: auto; }
.badge { width: 110px; height: 110px; margin: -4px auto 4px; animation: pop .7s ease both; } .badge svg { width: 110px !important; height: 110px !important; }
.fin__list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; text-align: left; font-size: 14px; }
.fin__list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); } .fin__list em { font-style: normal; color: var(--amber); letter-spacing: 2px; }
.fin__parts { color: var(--ink2); margin: 0 0 12px; } .fin__parts b { color: var(--amber); font-size: 22px; }

/* journal (story): parts learned, by chapter */
#jGrid h3 { margin: 14px 0 6px; font-size: 14px; color: var(--ink2); }
#learnPic.anti, .jcard i.anti { background: radial-gradient(circle at 50% 60%, #ffb35c, #c2410c 60%, #2a1a10); }
.jcred a { color: var(--ink); }

/* marks over the 3D (a pulsing ring on something to find) */
#marks { position: fixed; inset: 0; z-index: 11; pointer-events: none; }
.mk { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; box-shadow: 0 0 0 4px var(--amber), 0 0 30px rgba(242, 181, 68, .9); animation: ring 1s ease-in-out infinite alternate; }
@keyframes ring { from { transform: scale(.8); opacity: .6; } to { transform: scale(1.15); opacity: 1; } }
.mk--ok { box-shadow: 0 0 0 4px var(--ok), 0 0 20px rgba(88, 214, 141, .8); animation: none; }
#pushes { position: fixed; inset: 0; z-index: 12; width: 100%; height: 100%; pointer-events: none; }
#pushes .pa { pointer-events: auto; cursor: pointer; } #pushes text { font-weight: 900; font-size: 18px; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, .6); stroke-width: 4px; }
.walk { position: fixed; z-index: 13; bottom: max(14px, env(safe-area-inset-bottom)); width: 64px; height: 64px; border-radius: 50%; background: var(--glass2); box-shadow: inset 0 0 0 1px var(--line); font-size: 28px; font-weight: 900; }
.walk--l { left: 12px; } .walk--r { right: 12px; }
@media (prefers-reduced-motion: reduce) { .cc, #glim { transition: none; } .mk, #glim img, .stars .on, .badge, .eng.warn { animation: none !important; } }

/* ── F1 (2026-11-07): the display font (Chewy, via shared/world.css --display) on titles, kickers and buttons.
      Body copy, hints and the instrument canvases stay Nunito / sans-serif. ───────────────────────────── */
#menu h1, .sheetcard h2, #jT, .learn__in h2, #nogl h1, .mlink b, #mChapters span,
body.game button.big, body.game button.pick, body.game a.pick, body.game #tools button, body.game #crumbs button, body.game button.pbtn--sm { font-family: var(--display); font-weight: 400; letter-spacing: .015em; }
#menu h1 { font-size: clamp(34px, 9vw, 54px); line-height: 1.02; }
.sheetcard h2 { font-size: 32px; }
#jT { font-size: 28px; }
.menu__k, .sheet__k, .learn__k, .cut__who, .ecam__k { font-family: var(--display); font-weight: 400; text-transform: none; letter-spacing: .03em; font-size: 16px; }
body.game button.big { font-size: 21px; }
body.game .menu__go button.big { font-size: 24px; }
body.game button.pick, body.game a.pick { font-size: 18px; }
.mlink b { font-size: 19px; }
#mChapters span { font-size: 18px; }
#mChapters small { font-family: var(--body); }
body.game #tools button { font-size: 17px; }
body.game #crumbs button { font-size: 16px; }
#learnName { font-size: 26px; }
