/* Gate 41 */
:root {
  --ink: #14304f; --ink2: #43566f; --muted: #6a7a8d; --navy: #0f2742; --sky: #4a90d9; --sky-l: #cfe8fb; --sky-xl: #eaf4fc;
  --amber: #f5a94a; --amber-d: #b86b0a; --coral: #ef6f6c; --teal: #2bb3a3; --green: #2f9e6a; --lilac: #8c7ae6;
  --paper: #ffffff; --paper2: #f6f9fc; --line: #d9e3ee; --shadow: 0 10px 30px rgba(10, 30, 60, .22);
  --panel-w: 440px; --top-h: 56px; --r: 16px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--navy); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 10px; transition: top .2s; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
kbd { font: 700 12px/1 var(--font); background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; }
em { font-style: normal; color: var(--amber-d); }

/* ---------- layout ---------- */
#app { height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
#topbar { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: rgba(15, 39, 66, .96); color: #fff; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; white-space: nowrap; }
.brand .logo { width: 34px; height: 34px; border-radius: 4px; display: block; outline: 1px solid rgba(255,255,255,.22); outline-offset: 0; }
.intro-logo { width: 72px; height: 72px; border-radius: 8px; display: block; margin: 0 0 14px; }
.brand em { color: var(--amber); }
#locmap { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#locmap ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; justify-content: center; }
.stop { border: 0; background: transparent; color: #b9cce0; padding: 8px 12px; border-radius: 999px; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.stop i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #6f8fb0; }
.stop.seen i { background: #6f8fb0; }
.stop:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.stop.here { background: #fff; color: var(--ink); }
.stop.here i { background: var(--amber); border-color: var(--amber); }
.tools { display: flex; gap: 4px; }
.tool { border: 0; background: rgba(255, 255, 255, .08); color: #fff; padding: 8px 12px; border-radius: 10px; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; position: relative; white-space: nowrap; }
.tool:hover { background: rgba(255, 255, 255, .18); }
.tool[aria-pressed="true"] { background: var(--teal); color: #05302a; }
.tool b { font-weight: 700; }
.badge { font-style: normal; background: var(--amber); color: #3a2200; border-radius: 999px; font-size: 11px; min-width: 18px; padding: 1px 5px; text-align: center; font-weight: 800; }
#stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: radial-gradient(120% 100% at 50% 45%, transparent 55%, rgba(8, 22, 42, .32) 100%); }
#stage { flex: 1; min-height: 0; position: relative; overflow: hidden; transition: margin .25s ease; touch-action: pan-y; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; outline: none; }
#world text { font-family: var(--font); }
#app.panel-open #stage { margin-right: var(--panel-w); }
#bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* ---------- stage overlays ---------- */
#scene-card { position: absolute; left: 14px; top: 12px; max-width: min(360px, 60%); background: rgba(15, 39, 66, .78); color: #fff; padding: 10px 14px; border-radius: 14px; backdrop-filter: blur(6px); transition: opacity .8s, transform .8s; pointer-events: none; }
#scene-card h1 { margin: 0; font-size: 16px; }
#scene-card p { margin: 2px 0 0; font-size: 12px; color: #c4d5e8; }
#scene-card .msg { margin-top: 6px; color: #fff; font-size: 12.5px; }
#scene-card.fade { opacity: .0; transform: translateY(-6px); }
#scene-card.fade:hover { opacity: 1; }
.back { position: absolute; left: 14px; bottom: 14px; z-index: 5; border: 0; background: rgba(255, 255, 255, .94); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: 13px; box-shadow: var(--shadow); }
.back:hover { background: #fff; transform: translateX(-2px); }
.stage-tools { position: absolute; right: 14px; bottom: 14px; z-index: 5; display: flex; gap: 8px; }
.is-flight .back { bottom: 14px; }
.banner { position: absolute; top: 12px; right: 14px; max-width: min(420px, 48%); background: #fff7e0; color: #6a4300; border: 1px solid #f1d28b; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700; z-index: 4; }
.guide { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 6; display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow); max-width: calc(100% - 28px); font-size: 14px; animation: rise .5s ease both; }
.guide[hidden] { display: none; }
.is-flight .guide { left: 14px; transform: none; bottom: 62px; border-radius: 18px; max-width: min(430px, calc(100% - 28px)); }
.panel-open .guide, .panel-open #invites { display: none; }
.guide p { margin: 0; line-height: 1.3; }
.guide .g-ico { color: var(--amber-d); font-size: 16px; }
.guide .x { border: 0; background: var(--paper2); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--muted); }
.walkhint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(15, 39, 66, .6); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12px; pointer-events: none; display: flex; gap: 4px; align-items: center; white-space: nowrap; transition: opacity .5s; }
.is-flight .walkhint, .overlay-open .walkhint { display: none; }
#app:not(.is-flight):has(#guide:not([hidden])) .walkhint { opacity: 0; }
#toast { position: absolute; left: 50%; top: 74px; transform: translate(-50%, -20px); background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: .3s; z-index: 9; max-width: 90%; text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#invites { position: absolute; left: 50%; transform: translateX(-50%); bottom: 78px; display: flex; flex-direction: column; gap: 6px; align-items: center; z-index: 5; }
.invite-chip { border: 0; background: var(--amber); color: #3a2200; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; box-shadow: var(--shadow); animation: rise .4s both; }
#app::after { content: ""; position: absolute; inset: 0; background: var(--navy); opacity: 0; pointer-events: none; transition: opacity .38s ease; z-index: 18; }
#app.curtain::after { opacity: 1; }

/* ---------- bubbles ---------- */
.bub { position: absolute; left: 0; top: 0; padding: 7px 12px; border-radius: 14px; font-size: 13px; font-weight: 800; white-space: nowrap; box-shadow: 0 6px 18px rgba(10, 30, 60, .3); will-change: transform; }
.bub::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.bub.label { background: var(--ink); color: #fff; }
.bub.label.person { background: #fff; color: var(--ink); }
.bub.invite { background: var(--amber); color: #3a2200; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }

/* ---------- hotspots (SVG) ---------- */
.hs { cursor: pointer; outline: none; }
.hs-hit { fill: transparent; }
.hs-hl { fill: none; stroke: var(--amber); stroke-width: 3; stroke-dasharray: 9 7; opacity: 0; transition: opacity .2s; pointer-events: none; }
.hs:hover .hs-hl, .hs:focus-visible .hs-hl, .hs.active .hs-hl { opacity: .95; }
.hs.active .hs-hl { opacity: 1; stroke-width: 4; animation: march 1s linear infinite; }
.hs .core { fill: #fff; stroke: var(--ink); stroke-width: 2.5; transition: transform .2s, fill .2s; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 3px 5px rgba(10, 30, 60, .35)); }
.hs .glyph { font-size: 15px; font-weight: 900; fill: var(--ink); pointer-events: none; }
.hs.tier2 .glyph { font-size: 12px; }
.hs .ring { display: none; fill: none; stroke: #fff; stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ping 2.4s ease-out infinite; pointer-events: none; }
.hs .ring.r2 { animation-delay: 1.2s; }
.hs.tier1 .core { filter: drop-shadow(0 0 7px rgba(255,255,255,.9)) drop-shadow(0 3px 5px rgba(10, 30, 60, .45)); }
.hs.tier2:not(.near):not(:hover):not(:focus-visible):not(.invite):not(.suggested):not(.active) .hs-dot { opacity: 0; }
.hs .hs-dot { transition: opacity .25s; }
.hs:hover .core, .hs:focus-visible .core, .hs.near .core { transform: scale(1.18); }
.hs .tick { display: none; fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.hs.kind-door .core { fill: var(--sky-l); }
.hs.kind-door .ring { stroke: var(--sky-l); }
.hs.kind-custom .core { fill: var(--sky-l); }
.hs.invite .core { fill: var(--amber); stroke: #5b3300; }
.hs.invite .ring { stroke: var(--amber); display: block; }
.hs.invite .glyph { display: block !important; }
.hs.invite .tick { display: none !important; }
.hs.suggested .core { fill: #ffe08a; }
.hs.suggested .ring { stroke: #ffe08a; stroke-width: 4; display: block; }
.hs.off { display: none; }
.no-hints .hs:not(:hover):not(.near):not(.active):not(:focus-visible):not(.invite):not(.suggested) .hs-dot { opacity: 0; }
.hs.has-hl-dim { opacity: .5; }
.has-active .hs:not(.active) .hs-dot { opacity: .3 !important; }
.has-active .hs.active .hs-hl { fill: rgba(255, 255, 255, .14); }
.has-active #layer-scene { opacity: .86; transition: opacity .3s; }
#layer-scene { transition: opacity .3s; }

/* ---------- character & scene animation ---------- */
.patrol { animation: patrol var(--d, 16s) linear infinite; }
.walking .lg-a, .walking .lg-b, .walking .arm { transform-box: fill-box; transform-origin: 50% 0; }
.walking .lg-a { animation: stepA .55s ease-in-out infinite alternate; }
.walking .lg-b { animation: stepA .55s ease-in-out infinite alternate-reverse; }
.walking .arm-a { animation: stepA .55s ease-in-out infinite alternate-reverse; }
.bob { animation: bob 3.8s ease-in-out infinite; }
.taxijet { animation: taxijet 70s linear infinite; }
.bagbelt { animation: belt 7s linear infinite; }
.xtray { }
.floatpass { animation: flutter 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pigeon { animation: pigeon 14s linear infinite; }
.late { animation: bob 1.4s ease-in-out infinite; }
.zzz text { animation: zz 2.6s ease-in-out infinite; }
.sweat { animation: bob 1.2s ease-in-out infinite; }
.mask { opacity: 0; transform: translateY(-40px); transition: transform .8s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; transition-delay: calc(var(--i) * .12s); }
.mask.drop { opacity: 1; transform: none; }
#player.walking .lg-a, #player.walking .lg-b { }
@keyframes patrol { 0% { transform: translateX(0) scaleX(1); } 49.9% { transform: translateX(var(--dx)) scaleX(1); } 50% { transform: translateX(var(--dx)) scaleX(-1); } 99.9% { transform: translateX(0) scaleX(-1); } 100% { transform: translateX(0) scaleX(1); } }
@keyframes stepA { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes taxijet { from { transform: translateX(-200px); } to { transform: translateX(2000px); } }
@keyframes belt { from { transform: translateX(0); } to { transform: translateX(150px); } }
@keyframes flutter { 0%, 100% { transform: rotate(-12deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-3px); } }
@keyframes pigeon { 0% { transform: translate(760px, 566px); } 25% { transform: translate(830px, 566px); } 50% { transform: translate(830px, 566px) scaleX(-1); } 100% { transform: translate(760px, 566px) scaleX(-1); } }
@keyframes zz { 0%, 100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-8px); } }
@keyframes ping { 0% { transform: scale(.7); opacity: .95; } 80%, 100% { transform: scale(2.3); opacity: 0; } }
@keyframes march { to { stroke-dashoffset: -32; } }
@keyframes pop { from { transform: translate(var(--tx, 0), var(--ty, 0)) scale(.6); opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.guide { animation-name: rise2; } @keyframes rise2 { from { opacity: 0; margin-bottom: -14px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dash { to { stroke-dashoffset: -44; } }
@keyframes bump { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(calc(var(--amp, 6px) * -1)); } 60% { transform: translateY(var(--amp, 6px)); } }
.flow { stroke-dasharray: 8 10; animation: dash 1.2s linear infinite; }

/* ---------- flight bar ---------- */
#flightbar { flex: none; background: rgba(15, 39, 66, .97); color: #fff; padding: 8px 14px 6px; display: none; z-index: 12; }
.is-flight #flightbar { display: block; }
.fb-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fb-id b { font-size: 14px; margin-right: 10px; }
.link { border: 0; background: none; color: var(--sky-l); text-decoration: underline; font-size: 12.5px; font-weight: 700; padding: 2px; }
.fb-read { display: flex; gap: 14px; font-size: 12.5px; color: #c6d6e8; }
.fb-read b { color: #fff; font-variant-numeric: tabular-nums; }
#fb-phases { list-style: none; margin: 6px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.ph { width: 100%; position: relative; overflow: hidden; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .12); color: #cfe0f1; padding: 7px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; font-weight: 700; min-height: 46px; }
.ph .fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(77, 224, 182, .35); width: 0; pointer-events: none; }
.ph .n { font-size: 14px; position: relative; font-weight: 800; }
.ph .nm { font-size: 11.5px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ph.on { background: #fff; color: var(--ink); }
.ph.on .fill { background: rgba(245, 169, 74, .55); }
.ph:hover { background: rgba(255, 255, 255, .24); }
.ph.on:hover { background: #fff; }
.fb-ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fb-ctl .grp { display: flex; gap: 4px; }
.fb-note { margin: 4px 0 0; font-size: 11.5px; color: #a9bdd3; }
.btn { border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 800; font-size: 14px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; gap: 8px; line-height: 1.1; }
.btn:hover { background: #24508a; }
.btn.play:hover { background: #ffbd6b; }
.btn.ghost:hover { background: rgba(255, 255, 255, .26); }
#panel .btn.ghost:hover, .overlay .btn.ghost:hover, #journal .btn.ghost:hover, .guide .btn.ghost:hover, .demo .btn.ghost:hover, .btn.big.ghost:hover { background: var(--sky-xl); border-color: var(--sky); color: var(--ink); }
.btn.big:not(.ghost):hover { background: #24508a; }
.btn:active { transform: translateY(1px); }
.back:hover { background: var(--sky-xl); }
.btn.ghost { background: rgba(255, 255, 255, .12); color: inherit; }
.btn.small { padding: 7px 12px; font-size: 13px; }
#panel .btn.ghost, .overlay .btn.ghost, #journal .btn.ghost, .guide .btn.ghost, .demo .btn.ghost { background: var(--paper2); color: var(--ink); border: 1px solid var(--line); }
.btn.play { background: var(--amber); color: #3a2200; min-width: 150px; justify-content: center; }
.seg { display: inline-flex; background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 3px; gap: 2px; }
.seg.wrap { flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: inherit; padding: 7px 12px; border-radius: 9px; font-weight: 800; font-size: 13px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.overlay .seg, #settings .seg, #journal .seg, .ac-detail .seg { background: var(--paper2); border: 1px solid var(--line); }
.overlay .seg button[aria-pressed="true"], #settings .seg button[aria-pressed="true"], .ac-detail .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip { border: 1px solid var(--line); background: var(--paper2); color: var(--ink); border-radius: 999px; padding: 8px 13px; font-weight: 700; font-size: 13px; text-align: left; }
.chip small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); }
.chip:hover { background: var(--sky-xl); border-color: var(--sky); }
.chip.solid { background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); border: 0; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }

/* ---------- panel ---------- */
#panel { position: fixed; z-index: 25; right: 0; top: var(--top-h); bottom: 0; width: var(--panel-w); max-width: 100vw; background: var(--paper); color: var(--ink); box-shadow: -12px 0 40px rgba(10, 30, 60, .3); transform: translateX(104%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
#panel.open { transform: none; }
#panel[hidden] { display: none; }
#panel-body { padding: 20px 22px 24px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
#panel .x, #journal .x { position: absolute; top: 10px; right: 12px; z-index: 2; border: 0; background: var(--paper2); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--ink2); }
#panel .x:hover, #journal .x:hover { background: var(--sky-l); }
.eyebrow { margin: 0 0 4px; font-size: 11.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--sky); padding-right: 40px; }
.eyebrow.cat-scary { color: var(--coral); } .eyebrow.cat-airport { color: var(--sky); } .eyebrow.cat-cabin { color: var(--teal); } .eyebrow.cat-cockpit { color: var(--lilac); }
#panel h2, .ac-detail h3 { margin: 0 0 8px; font-size: 24px; line-height: 1.15; }
#panel h2:focus { outline: none; }
#panel h3 { margin: 18px 0 6px; font-size: 14px; color: var(--ink2); text-transform: uppercase; letter-spacing: .05em; }
#panel h4, .ac-detail h4, .ex-card h4 { margin: 18px 0 4px; font-size: 13px; color: var(--ink2); text-transform: uppercase; letter-spacing: .05em; }
.q { margin: 6px 0 10px; padding: 12px 14px; background: var(--sky-xl); border-left: 4px solid var(--sky); border-radius: 0 12px 12px 0; font-size: 17px; font-weight: 800; line-height: 1.3; }
.joke { margin: 0 0 12px; font-style: italic; color: var(--ink2); background: #fff7e0; border-radius: 12px; padding: 10px 12px; }
#panel p, .ex-card p, .ac-detail p { line-height: 1.55; font-size: 15px; margin: 0 0 10px; }
.role { color: var(--ink2); margin: 0 0 12px !important; font-weight: 700; }
.fine { color: var(--muted); font-size: 12px !important; margin-top: 16px !important; }
.speech { position: relative; background: var(--sky-xl); border-radius: 16px; padding: 12px 14px; font-weight: 700; font-size: 16px !important; margin: 4px 0 14px !important; }
.speech::before { content: ""; position: absolute; left: 24px; top: -7px; width: 14px; height: 14px; background: var(--sky-xl); transform: rotate(45deg); border-radius: 3px; }
.person-head { display: flex; gap: 14px; align-items: center; }
.person-head .face { width: 84px; height: 94px; border-radius: 20px; background: linear-gradient(180deg, var(--sky-l), #fff); flex: none; }
.profile { margin: 0; display: grid; gap: 2px; }
.profile dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 900; color: var(--ink2); margin-top: 12px; }
.profile dd { margin: 2px 0 0; line-height: 1.5; font-size: 15px; }
ul.plain { margin: 0; padding-left: 20px; line-height: 1.55; font-size: 15px; }
ul.plain li { margin: 3px 0; }
.demo-wrap { margin: 16px 0; padding: 14px; background: var(--paper2); border: 1px solid var(--line); border-radius: var(--r); }
.demo-wrap h3 { margin-top: 0 !important; }
.deeper { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; }
.deeper summary { cursor: pointer; font-weight: 800; padding: 10px 0; }
.related { margin-top: 8px; }
.panel-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; position: sticky; bottom: -24px; padding: 12px 0; background: linear-gradient(180deg, transparent, #fff 30%); }
.card-actions { margin: 14px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.look { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.look button { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--paper2); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 8px; }
.look button:hover { background: var(--sky-xl); }
.look small { color: var(--muted); font-weight: 700; }

/* ---------- demos ---------- */
.dsvg { width: 100%; height: auto; display: block; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.dlab { font-size: 10.5px; fill: var(--ink2); font-weight: 700; }
.ctl { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; margin: 12px 0 4px; }
.ctl-l { font-size: 13px; font-weight: 800; }
.ctl output { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--sky); text-align: right; }
.ctl input { grid-column: 1 / -1; width: 100%; accent-color: var(--sky); height: 28px; }
.readout { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--ink2); }
.readout b { color: var(--ink); }
.readout .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.dnote { font-size: 13.5px !important; color: var(--ink2); background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0 0 !important; }
.dnote.small { font-size: 12.5px !important; }
.demo-chips { margin: 10px 0 0; }
.steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; justify-content: space-between; position: relative; }
.steps::before { content: ""; position: absolute; left: 14px; right: 14px; top: 16px; height: 4px; background: var(--line); border-radius: 2px; }
.steps::after { content: ""; position: absolute; left: 14px; top: 16px; height: 4px; width: calc((100% - 28px) * var(--p, 0) / 100); background: var(--green); border-radius: 2px; transition: width .4s; }
.step-dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); background: #fff; font-weight: 900; color: var(--muted); }
.step-dot.done { border-color: var(--green); color: var(--green); }
.step-dot.on { background: var(--ink); border-color: var(--ink); color: #fff; transform: scale(1.12); }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 76px; }
.step-card b { display: block; font-size: 16px; margin-bottom: 3px; }
.step-card span { font-size: 14.5px; color: var(--ink2); line-height: 1.45; }
.step-ctl { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
[style*="--prog"] .steps::after { width: calc((100% - 28px) * 1); }
.bp { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 6px 16px rgba(10, 30, 60, .08); }
.bp-head { display: flex; justify-content: space-between; align-items: baseline; background: var(--ink); color: #fff; margin: -12px -12px 10px; padding: 10px 12px; border-radius: 13px 13px 0 0; font-size: 12px; }
.bp-head b { letter-spacing: .1em; }
.bp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bp-f { text-align: left; border: 1px solid var(--line); background: var(--paper2); border-radius: 10px; padding: 6px 8px; }
.bp-f i { display: block; font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }
.bp-f b { font-size: 14px; }
.bp-f:hover, .bp-f.on { background: #fff0cf; border-color: var(--amber); }
.bp-bar { margin-top: 10px; border: 0; background: transparent; }
.xr-svg { background: #0b121c; }
.xr-i { cursor: pointer; } .xr-i:hover path, .xr-i.on path, .xr-i:focus path { stroke: #fff; stroke-opacity: 1; stroke-width: 3; }
.xr-scan { animation: scan 3s linear infinite; } @keyframes scan { from { transform: translateY(0); } to { transform: translateY(156px); } }
.xr-legend { display: flex; gap: 14px; font-size: 12px; margin-top: 8px; flex-wrap: wrap; } .xr-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.tb-pax { display: flex; gap: 14px; justify-content: center; margin-top: 8px; } .tb-p { text-align: center; font-size: 12px; font-weight: 800; width: 80px; } .tb-p svg { width: 60px; height: 70px; display: block; margin: 0 auto 2px; }
#tb-ac { animation-name: bump; }
.chime-sign { display: flex; align-items: center; gap: 10px; background: #2a3342; color: #fff; padding: 12px 14px; border-radius: 12px; font-weight: 800; } .chime-sign .lamp { width: 14px; height: 14px; border-radius: 50%; background: #ff6b5b; box-shadow: 0 0 10px #ff6b5b; } .chime-sign.on .lamp { background: #4de0b6; box-shadow: 0 0 10px #4de0b6; }
.chime-list { display: grid; gap: 8px; margin-top: 10px; } .chime-b { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; } .chime-b b { display: block; } .chime-b span { font-size: 13.5px; color: var(--ink2); } .chime-b.ping { background: #fff0cf; }
.radio-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 280px; overflow-y: auto; } .radio-list li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; } .radio-list i { font-style: normal; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--lilac); } .radio-list p { margin: 3px 0 !important; font-size: 13.5px !important; } .radio-list .pilot { color: var(--ink2); }
.ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; } .pad { position: relative; aspect-ratio: 1; background: #fff; border: 2px solid var(--line); border-radius: 18px; touch-action: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 50% 50%; background-position: center; } .pad .knob { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); transform: translate(-50%, -50%); left: 50%; top: 50%; box-shadow: 0 4px 10px rgba(10, 30, 60, .4); pointer-events: none; } .pad .lab { position: absolute; font-style: normal; font-size: 10px; font-weight: 800; color: var(--muted); } .pad .t { top: 4px; left: 50%; transform: translateX(-50%); } .pad .b { bottom: 4px; left: 50%; transform: translateX(-50%); } .pad .l { left: 6px; top: 50%; } .pad .r { right: 6px; top: 50%; } .ctrl .views { display: grid; gap: 6px; } .ct-svg { border-radius: 8px; }
@media (max-width: 520px) { .ctrl { grid-template-columns: 1fr; } }

/* ---------- journal / settings ---------- */
#journal { position: fixed; z-index: 24; left: 0; top: var(--top-h); bottom: 0; width: min(380px, 100vw); background: var(--paper); box-shadow: 12px 0 40px rgba(10, 30, 60, .3); padding: 18px 20px 24px; overflow-y: auto; transform: translateX(-104%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
#journal.open { transform: none; } #journal[hidden] { display: none; }
#journal h2 { margin: 0 0 4px; font-size: 22px; padding-right: 40px; } #journal h2:focus { outline: none; } #journal h3 { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); }
.jr-list, .jr-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .jr-list button, .jr-people button { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--paper2); border-radius: 10px; padding: 9px 12px; font-weight: 700; font-size: 14px; } .jr-list button:hover, .jr-people button:hover { background: var(--sky-xl); }
.jr-people li { } .jr-people small { display: block; color: var(--muted); font-weight: 600; } .jr-people .locked { display: block; border: 1px dashed var(--line); border-radius: 10px; padding: 9px 12px; color: var(--muted); }
.jr-tags { display: flex; flex-wrap: wrap; gap: 6px; } .tag { background: var(--sky-xl); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; } .tag.part { background: #fff0cf; } .tag.ac { background: #ece8ff; }
.empty { color: var(--muted); font-size: 14px; } #journal .fine { margin: 0 0 8px; }
#settings { position: fixed; z-index: 26; right: 12px; top: calc(var(--top-h) + 8px); width: min(380px, calc(100vw - 24px)); background: var(--paper); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; max-height: calc(100dvh - 90px); overflow-y: auto; }
#settings[hidden] { display: none; } #settings h2 { margin: 0 0 12px; font-size: 18px; } #settings h2:focus { outline: none; } #settings h3 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); }
.sw { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; } .sw input { position: absolute; opacity: 0; } .sw .track { width: 44px; height: 26px; border-radius: 13px; background: #c7d3e0; position: relative; flex: none; transition: .2s; } .sw .track i { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); } .sw input:checked + .track { background: var(--teal); } .sw input:checked + .track i { left: 21px; } .sw input:focus-visible + .track { outline: 3px solid var(--amber); outline-offset: 2px; } .sw .lab b { display: block; font-size: 14px; } .sw .lab small { color: var(--muted); font-size: 12px; }
.keys { padding-left: 18px; margin: 4px 0; font-size: 13px; line-height: 1.9; color: var(--ink2); }
#settings .seg { margin-bottom: 8px; }

/* ---------- overlays: explorer + fleet ---------- */
.overlay { position: fixed; inset: 0; z-index: 22; background: linear-gradient(180deg, #cfe8fb 0%, #eaf4fc 55%, #fff 100%); color: var(--ink); display: flex; flex-direction: column; opacity: 0; transform: translateY(14px); transition: .24s ease; }
.overlay.open { opacity: 1; transform: none; } .overlay[hidden] { display: none; }
.ov-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ov-head h2 { margin: 0; font-size: 18px; flex: 1; min-width: 140px; }
.ex-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.ex-stage { position: relative; display: grid; place-items: center; padding: 20px; min-height: 0; overflow: hidden; }
.ex-svgwrap { width: 100%; max-width: 1100px; }
.xsvg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 14px 18px rgba(20, 48, 79, .18)); }
.ex-svgwrap { position: relative; }
.ex-pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; pointer-events: auto; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: var(--ink); color: #fff; box-shadow: 0 4px 12px rgba(10, 30, 60, .4); padding: 0; transition: transform .15s; }
.pin::after { content: "?"; font-weight: 900; font-size: 13px; }
.pin span { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.pin:hover, .pin:focus-visible, .pin.on { transform: translate(-50%, -50%) scale(1.2); z-index: 3; } .pin:hover span, .pin:focus-visible span, .pin.on span { opacity: 1; }
.pin.on { background: var(--amber); color: #3a2200; border-color: #fff; }
.ex-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; font-size: 13px; color: var(--ink2); background: rgba(255, 255, 255, .8); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.ac-part { cursor: pointer; transition: opacity .2s, filter .2s; }
.ac-part:hover { filter: drop-shadow(0 0 6px rgba(245, 169, 74, .95)); }
.xsvg.has-sel .ac-part:not(.sel) { opacity: .5; } .xsvg.has-sel .ac-part.sel { filter: drop-shadow(0 0 8px #f5a94a) drop-shadow(0 0 2px #f5a94a); }
.ex-card { background: #fff; border-left: 1px solid var(--line); padding: 20px 22px; overflow-y: auto; box-shadow: -8px 0 30px rgba(20, 48, 79, .08); }
.ex-card:focus { outline: none; } .ex-card h3 { margin: 0 0 6px; font-size: 24px; } .lead { font-size: 16px !important; font-weight: 700; color: var(--ink2); }
.fact { background: #fff7e0; border-radius: 12px; padding: 10px 12px; }
.ex-nav { display: flex; justify-content: space-between; margin-top: 16px; gap: 8px; }
.ex-intro h3 { font-size: 22px; }
.fl-body { flex: 1; overflow-y: auto; padding: 18px; }
.fl-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.ac-list { display: grid; gap: 10px; }
.ac-card { text-align: left; border: 2px solid transparent; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 4px 14px rgba(20, 48, 79, .1); display: grid; gap: 2px; }
.ac-card svg.thumb { height: 52px; width: 100%; margin-bottom: 4px; }
.ac-card span { font-size: 13px; color: var(--ink2); line-height: 1.35; }
.ac-card.on { border-color: var(--ink); } .ac-card:hover { border-color: var(--sky); }
.ac-detail { background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 6px 24px rgba(20, 48, 79, .1); }
.sil { background: linear-gradient(180deg, var(--sky-xl), #fff); border-radius: 14px; margin: 14px 0; padding: 8px; display: grid; place-items: center; }
.sil svg { height: 230px; max-width: 100%; width: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.stat { background: var(--paper2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 800; color: var(--ink2); } .stat-h b { font-size: 20px; color: var(--ink); } .stat-h small { font-size: 11px; color: var(--muted); font-weight: 700; }
.bar { height: 9px; background: #e2eaf3; border-radius: 5px; overflow: hidden; margin: 8px 0 4px; } .bar i { display: block; height: 100%; border-radius: 5px; transition: width .5s; }
.stat details summary { cursor: pointer; font-size: 12.5px; color: var(--sky); font-weight: 800; } .stat details p, .stat .sub { font-size: 13px !important; color: var(--ink2); margin: 6px 0 0 !important; }
ul.links { list-style: none; padding: 0; } ul.links li { margin: 8px 0; }
.refs { font-size: 12.5px !important; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px !important; }
.cmp { max-width: 1100px; margin: 0 auto; } .cmp-opts { display: flex; gap: 8px; flex-wrap: wrap; } .cmp-opt { display: inline-flex; gap: 8px; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 14px; cursor: pointer; } .cmp-opt span { border-left: 6px solid var(--c); padding-left: 8px; } .cmp-opt:has(input:checked) { border-color: var(--ink); } .cmp-opt input { accent-color: var(--ink); }
.cmp-sils { background: #fff; border-radius: 16px; padding: 14px; margin: 14px 0; display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 14px; align-items: center; } .cmp-overlay { width: 100%; max-height: 420px; } .cmp-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .cmp-key li { font-size: 13px; line-height: 1.35; } .cmp-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; } .cmp-key span { display: block; color: var(--muted); }
.cmp-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; } .cmp-stat { background: #fff; border-radius: 16px; padding: 14px 16px; } .cmp-stat h4 { margin: 0 0 8px !important; } .cmp-bar { display: grid; grid-template-columns: 110px 1fr 74px; gap: 8px; align-items: center; font-size: 12.5px; } .cmp-bar span { font-weight: 700; } .cmp-bar b { text-align: right; } .cmp-stat details { margin-top: 6px; font-size: 13px; } .cmp-stat summary { cursor: pointer; color: var(--sky); font-weight: 800; }
.face { }

/* ---------- intro ---------- */
#intro { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
#intro[hidden] { display: none; }
.intro-sky { position: absolute; inset: 0; } .intro-sky svg { width: 100%; height: 100%; }
.intro-plane { animation: fly 30s linear infinite -9s; } .ic.c1 { animation: drift 120s linear infinite; } .ic.c2 { animation: drift 80s linear infinite reverse; } .ic.c3 { animation: drift 55s linear infinite; }
@keyframes fly { from { transform: translate(-700px, 230px) rotate(-3deg); } to { transform: translate(1700px, 170px) rotate(-3deg); } } @keyframes drift { from { transform: translateX(-120px); } to { transform: translateX(120px); } }
.intro-card { position: relative; width: min(680px, 100%); background: rgba(255, 255, 255, .95); border-radius: 28px; padding: clamp(22px, 4vw, 40px); box-shadow: 0 30px 80px rgba(8, 24, 48, .45); animation: rise .8s ease both; }
.intro-card h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.05; margin: 4px 0 14px; }
.intro-card .lead { font-size: clamp(15px, 2.4vw, 18px) !important; font-weight: 400; color: var(--ink2); line-height: 1.6; }
.intro-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 14px; }
.btn.big { padding: 16px 18px; font-size: 17px; flex-direction: column; align-items: flex-start; gap: 4px; border-radius: 16px; } .btn.big small { font-size: 12.5px; font-weight: 600; opacity: .8; }
.btn.big.ghost { background: var(--paper2); color: var(--ink); border: 2px solid var(--line); }
.intro-opts { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; font-weight: 700; } .intro-opts label { display: flex; gap: 8px; align-items: center; cursor: pointer; } .intro-opts input { width: 18px; height: 18px; accent-color: var(--ink); }
.intro-card .fine { font-size: 12.5px; color: var(--muted); margin: 16px 0 0; line-height: 1.5; }
#app:not(.intro-on) #intro { display: none; }
#app.intro-on #topbar, #app.intro-on #stage, #app.intro-on #flightbar { visibility: hidden; }

/* ---------- reduced motion ---------- */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .tool b { display: none; } .tool { padding: 9px 11px; } .brand b { font-size: 13px; } }
@media (max-width: 900px) {
  :root { --top-h: 52px; }
  .brand b { display: none; }
  #panel { top: auto; height: 60dvh; width: 100%; border-radius: 22px 22px 0 0; transform: translateY(104%); box-shadow: 0 -12px 40px rgba(10, 30, 60, .35); }
  #app.panel-open #stage { margin-right: 0; margin-bottom: 60dvh; }
  #app.panel-open #flightbar { display: none; }
  #journal { width: 100%; }
  .ex-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; display: block; }
  .ex-card { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .ex-stage { display: block; overflow-x: auto; padding: 12px 8px 4px; } .ex-svgwrap { min-width: 680px; } .ex-hint { display: none; }
  .fl-grid { grid-template-columns: 1fr; } .ac-list { grid-template-columns: repeat(2, 1fr); }
  .banner { top: auto; bottom: 74px; right: auto; left: 14px; max-width: calc(100% - 28px); }
  .stage-tools { bottom: 70px; }
  .is-flight .stage-tools { bottom: 14px; }
}
@media (max-width: 720px) {
  .stop span { display: none; } .stop.here span { display: inline; } .stop { padding: 8px 10px; }
  #fb-phases { gap: 3px; } .ph .nm { display: none; } .ph.on .nm { display: block; position: absolute; left: 0; right: 0; bottom: 3px; font-size: 9px; } .ph { min-height: 40px; }
  .fb-read { display: none; } .fb-note { display: none; } .fb-ctl { justify-content: space-between; }
  .btn.play { min-width: 0; } .intro-actions { grid-template-columns: 1fr; }
  #scene-card { max-width: 70%; } #scene-card p { display: none; } .guide { font-size: 13px; bottom: 74px; border-radius: 20px; } .is-flight .guide { bottom: 62px; }
  .back { padding: 8px 12px; } .walkhint { display: none; }
  .cmp-sils { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .tools { gap: 2px; } .tool { padding: 8px 9px; } .fb-ctl .grp.seg button { padding: 7px 8px; } }
@media (max-height: 520px) and (orientation: landscape) { .fb-note, .fb-read { display: none; } #fb-phases { margin: 4px 0; } .ph { min-height: 34px; padding: 3px; } #scene-card { display: none; } }

/* ---------- seat belt sign badge, captions, guide swap ---------- */
.beltsign { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 10px; background: #1a222e; color: #fff; border: 2px solid #ffc15a; border-radius: 14px; padding: 7px 16px 7px 12px; box-shadow: 0 0 0 4px rgba(255, 193, 90, .28), var(--shadow); pointer-events: none; }
.beltsign[hidden] { display: none; }
.beltsign b { display: block; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: #ffe2a8; }
.beltsign span { font-size: 12px; color: #d3dded; }
.beltsign.pop { animation: beltpop .7s cubic-bezier(.3, 1.5, .5, 1) both; }
.beltsign.rough { border-color: #ff8a5b; box-shadow: 0 0 0 4px rgba(255, 138, 91, .35), var(--shadow); animation: beltrough .5s linear infinite alternate; }
@keyframes beltpop { 0% { opacity: 0; scale: .7; translate: 0 -14px; } 100% { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes beltrough { from { translate: -2px 0; } to { translate: 2px 0; } }
.caption { position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); z-index: 7; max-width: min(640px, calc(100% - 28px)); background: rgba(15, 25, 40, .92); color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 14.5px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .35s; display: grid; gap: 2px; }
.caption.on { opacity: 1; }
.caption b { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #ffc15a; }
.caption.on { animation: capin .45s ease both; }
@keyframes capin { from { translate: 0 10px; } to { translate: 0 0; } }
.panel-open .caption { display: none; }
.guide.swap { animation: guideSwap .9s cubic-bezier(.3, 1.4, .5, 1) both; }
.guide.swap p { animation: guideText .6s ease both; }
.guide.swap .g-ico { animation: icoSpin .8s ease both; }
@keyframes guideSwap { 0% { scale: .92; translate: 0 12px; background-color: #ffd98a; box-shadow: 0 0 0 0 rgba(245, 169, 74, .9), var(--shadow); } 45% { scale: 1.05; translate: 0 -5px; background-color: #fff0cc; box-shadow: 0 0 0 14px rgba(245, 169, 74, 0), var(--shadow); } 100% { scale: 1; translate: 0 0; background-color: #fff; box-shadow: var(--shadow); } }
@keyframes guideText { 0% { opacity: 0; translate: 0 10px; } 100% { opacity: 1; translate: 0 0; } }
@keyframes icoSpin { from { rotate: -120deg; scale: .4; } to { rotate: 0deg; scale: 1; } }
.reduce-motion .guide.swap { outline: 3px solid var(--amber); outline-offset: 2px; }
@media (max-width: 720px) { .beltsign { top: 8px; padding: 5px 12px 5px 8px; } .caption { bottom: 130px; font-size: 13.5px; } #toast { top: 64px; } }

.caption { bottom: 74px; } .is-flight .caption { bottom: 70px; }

/* coffee bar */
.steam path { animation: steam 3.2s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: -1.1s; } .steam path:nth-child(3) { animation-delay: -2.1s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: .75; } 100% { opacity: 0; transform: translateY(-14px); } }
.handoff { animation: handoff 9s ease-in-out infinite; }
@keyframes handoff { 0%, 6% { opacity: 0; transform: translateX(0); } 10% { opacity: 1; transform: translateX(0); } 44% { opacity: 1; transform: translateX(-120px); } 70% { opacity: 1; transform: translateX(-120px); } 78%, 100% { opacity: 0; transform: translateX(-120px); } }

/* icons drawn as shapes */
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.btn .ico { width: 16px; height: 16px; } .tool .ico { width: 18px; height: 18px; }
.back { display: inline-flex; align-items: center; gap: 8px; } .back .ico { width: 16px; height: 16px; }
.walkhint kbd { display: inline-grid; place-items: center; width: 24px; height: 22px; padding: 0; } .walkhint kbd .ico { width: 14px; height: 14px; }
.glyph-p { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.glyph-d { fill: var(--ink); pointer-events: none; }
.hs.tier2 .glyph-q, .hs.tier2 .glyph-p:not(.glyph-q .glyph-p) { transform: scale(.85); }
.hs.invite .glyph-p { stroke: #3a2200; } .hs.invite .glyph-d { fill: #3a2200; }
#panel .x, #journal .x, .guide .x { display: grid; place-items: center; padding: 0; line-height: 0; font-size: 0; }
#panel .x, #journal .x { position: absolute; }
.g-ico { display: inline-grid; place-items: center; } .g-ico .ico { width: 16px; height: 16px; }
#panel .x .ico, #journal .x .ico, .guide .x .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.guide .x { position: static; width: 28px; height: 28px; }
.led { animation: blink 2.4s ease-in-out infinite; } @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* stronger warm callouts */
.joke { background: #fde7b0; border-left: 4px solid var(--amber); color: #4a3510; }
.fact { background: #fde7b0; border-left: 4px solid var(--amber); color: #4a3510; }
.btn.play { background: #f2a03a; }

/* distant aircraft seen through the terminal and gate windows */
.far { transform-box: fill-box; }
.far-land { animation: farland 96s linear infinite; animation-delay: -30s; }
.far-off { animation: faroff 120s linear infinite; animation-delay: -88s; }
@keyframes farland { 0% { transform: translate(1900px, 118px); } 100% { transform: translate(-120px, 258px); } }
@keyframes faroff { 0% { transform: translate(-120px, 262px); } 55% { transform: translate(1000px, 210px); } 100% { transform: translate(1900px, 112px); } }

/* game area: smaller overlays */
#scene-card, .back, .stage-tools, .guide, .walkhint, #invites, .caption, .beltsign, #toast { zoom: .82; }
.bub { font-size: 11px; padding: 5px 10px; border-radius: 12px; }
.bub::after { width: 10px; height: 10px; bottom: -5px; }
@media (max-width: 720px) { #scene-card, .back, .stage-tools, .guide, .walkhint, #invites, .caption, .beltsign, #toast { zoom: .9; } }

/* seat question at the cabin door */
.seatask { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); z-index: 9; width: min(400px, calc(100% - 28px)); background: #fff; color: var(--ink); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; zoom: .9; }
.sa-head { display: flex; gap: 10px; align-items: flex-start; } .sa-head .face { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--paper2); }
.sa-head b { font-size: 16px; } .sa-head p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink2); } .sa-head > div { flex: 1; min-width: 0; }
.seatask .x { border: 0; background: var(--paper2); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; padding: 0; color: var(--muted); }
.sa-pass { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: #fde7b0; border-radius: 10px; padding: 8px 12px; font-size: 12.5px; color: #4a3510; border-left: 4px solid var(--amber); }
.sa-pass b { grid-column: 1 / -1; font-size: 20px; }
.sa-opts { display: flex; gap: 8px; } .sa-opts .btn { flex: 1; font-size: 16px; }
.sa-opts .btn:disabled { opacity: .45; }
.sa-msg { margin: 0; font-size: 13px; color: var(--ink2); min-height: 1.2em; }

/* icon-only tools and the About dialog */
.tool.icon-only { padding: 8px 10px; } .tool.icon-only b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#btn-sound .mute { display: none; } #btn-sound[aria-pressed="false"] .mute { display: block; }
.about { position: fixed; inset: 0; z-index: 40; background: rgba(10, 22, 40, .55); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.about[hidden] { display: none; }
.about-card { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); color: var(--ink); border-radius: 20px; padding: 26px 28px 24px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.about-card h2 { margin: 0; font-size: 28px; } .about-card h2 em { color: var(--amber-d); font-style: normal; } .about-card h2:focus { outline: none; }
.about-card h3 { margin: 8px 0 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.about-card p { margin: 0; color: var(--ink2); line-height: 1.55; } .about-card ul { margin: 0; padding-left: 18px; color: var(--ink2); line-height: 1.55; display: grid; gap: 6px; }
.about-card .eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.about-card .x { position: absolute; top: 12px; right: 12px; border: 0; background: var(--paper2); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; padding: 0; color: var(--ink2); }
.about-card .btn.big { justify-self: start; margin-top: 8px; }

/* related links as one card of full width accordions */
.acc-card { margin: 16px 0 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper2); overflow: hidden; }
.acc { border-top: 1px solid var(--line); } .acc:first-child { border-top: 0; }
.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 800; font-size: 13.5px; color: var(--ink); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary > span { flex: 1; min-width: 0; }
.acc summary .n { font-style: normal; font-size: 12px; font-weight: 800; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; min-width: 24px; text-align: center; padding: 1px 8px; color: var(--ink2); }
.acc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink2); border-bottom: 2px solid var(--ink2); transform: rotate(45deg) translateY(-2px); transition: transform .2s; flex: none; }
.acc[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.acc summary:hover { background: rgba(31, 111, 208, .06); }
.acc .chips { margin: 0; padding: 2px 14px 14px; }
.acc .chips .chip { background: var(--paper); }
.reduce-motion .acc summary::after { transition: none; }
.about-note { background: #fde7b0; border-left: 4px solid var(--amber); border-radius: 10px; padding: 10px 12px; color: #4a3510 !important; font-size: 13.5px; }

/* larger text balloons */
.bub { font-size: 14.5px; padding: 8px 14px; border-radius: 14px; } .bub::after { width: 12px; height: 12px; bottom: -6px; }
.guide, #invites, .caption { zoom: 1; }
.invite-chip { font-size: 14px; }

/* flight map */
.flightmap { position: absolute; right: 14px; top: 12px; z-index: 4; width: 270px; background: rgba(12, 28, 48, .88); color: #fff; border-radius: 14px; padding: 8px 10px 9px; box-shadow: var(--shadow); backdrop-filter: blur(4px); pointer-events: none; }
.flightmap[hidden] { display: none; }
.scene-cockpit .flightmap { top: 96px; }
.flightmap svg { width: 100%; height: auto; display: block; border-radius: 8px; background: #0f2a45; }
.fm-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; margin-top: 6px; }
.fm-row b { font-size: 13px; } .fm-row span { color: #9fb7d0; }
.fm-land { fill: #2b4d73; stroke: #3d6896; stroke-width: .6; vector-effect: non-scaling-stroke; }
.fm-done { fill: none; stroke: #5fd3c0; stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.fm-todo { fill: none; stroke: #8fb0d0; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; stroke-linecap: round; }
.fm-stop { fill: #0f2a45; stroke: #cfe3f6; stroke-width: .8; }
.fm-end { fill: #f5a94a; }
.fm-plane { fill: #fff; }
.fm-lab { fill: #cfe3f6; font-size: 5px; font-weight: 700; }
@media (max-width: 900px) { .flightmap { display: none; } }

.p-tools { display: flex; margin: 0 0 8px; padding-right: 44px; }
.listen { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line) !important; }
.listen[aria-pressed="true"] { background: var(--ink); color: #fff; }
.listen .ico { width: 16px; height: 16px; }

/* flight map across the whole cabin ceiling */
.flightmap.wide { left: 0; right: 0; top: 0; width: auto; height: clamp(110px, 26%, 210px); padding: 0; border-radius: 0; box-shadow: none; background: #0f2a45; }
.flightmap.wide svg { height: 100%; border-radius: 0; }
.flightmap.wide .fm-info { position: absolute; left: 14px; bottom: 10px; background: rgba(12, 28, 48, .82); border-radius: 10px; padding: 6px 10px 7px; min-width: 210px; }
.flightmap.wide .fm-row { margin-top: 0; }
.flightmap.wide ~ #scene-card { z-index: 5; }
.fm-lab { paint-order: stroke; stroke: #0f2a45; stroke-width: 3px; stroke-linejoin: round; }
@media (max-width: 900px) { .flightmap.wide { display: block; height: clamp(90px, 22%, 150px); } }

[hidden] { display: none !important; }
.intro-links a, .about-links a { color: inherit; font-weight: 700; } .intro-links { margin-top: 4px; }
