:root{color-scheme:dark;--background:#10191f;--surface:#172229;--ink:#edf1ed;--muted:#a1b1ba;--accent:#98cbd4;--line:#34444d;--hud:#edf2ef;--phase:#e7b976;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Noto Sans TC',sans-serif;font-synthesis:none;-webkit-text-size-adjust:100%}
:root[data-theme=light]{color-scheme:light;--background:#f2f2f7;--surface:#fff;--ink:#25282d;--muted:#666e75;--accent:#356b8e;--line:#e0e4e7}
:root[data-theme=light][data-palette=ocean]{--background:#eef7fb;--surface:#fbfdfe;--ink:#173348;--muted:#5b7486;--accent:#157ba9;--line:#d1e4ee}
:root[data-theme=light][data-palette=berry]{--background:#f6f0fb;--surface:#fffdff;--ink:#392c4d;--muted:#725f7d;--accent:#7a57a4;--line:#e5dcec}
:root[data-theme=light][data-palette=forest]{--background:#eff8f3;--surface:#fcfffd;--ink:#1e4035;--muted:#587365;--accent:#2d8667;--line:#d8e8df}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}body{background:#060d13;color:var(--ink)}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button,a,input{touch-action:manipulation}button{min-width:44px;min-height:44px;border:0;cursor:pointer;color:inherit;background:none;font-weight:500;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.55}button:focus:not(:focus-visible){outline:none}a{color:var(--accent);text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin-top:0}h2{font-size:25px;line-height:1.4;letter-spacing:.01em}p{line-height:1.75}#game-main,#scene-host{position:fixed;inset:0;width:100%;height:100%;height:100dvh;overflow:hidden}#scene-host{touch-action:none;outline:none}#scene-host canvas{display:block;width:100%;height:100%;touch-action:none}.hud{position:absolute;inset:0;pointer-events:none;color:var(--hud);font-size:13px}.hud button,.hud nav,.hud .move-stick{pointer-events:auto}.flight-header{position:absolute;top:calc(20px + var(--safe-top));left:max(24px,env(safe-area-inset-left));right:max(24px,env(safe-area-inset-right));display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.location{text-shadow:0 1px 8px #0008;max-width:400px}.eyebrow{display:block;font-size:10px;line-height:1.5;font-weight:600;letter-spacing:.17em;text-transform:uppercase}.location h1{font-size:19px;letter-spacing:.08em;font-weight:500;margin:5px 0}.location p{font-size:12px;max-width:340px;line-height:1.6;margin:5px 0 0}.hud-nav{display:flex;gap:8px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:color-mix(in srgb,var(--surface) 90%,transparent);font-size:20px;flex-shrink:0}.hud .icon-button{background:#111e29d9;color:#eaf1f5;border:1px solid #adcbd320}.reticle{position:absolute;left:50%;top:50%;width:4px;height:4px;border:1px solid #ffffff9c;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 1px 2px #000a}.tide-warning{position:absolute;top:calc(125px + var(--safe-top));left:50%;transform:translateX(-50%);display:flex;gap:8px;align-items:center;background:#151d24eb;border:1px solid #eccb8870;border-radius:4px;padding:10px 14px;max-width:calc(100% - 32px);font-size:12px;line-height:1.5}.warning-symbol{color:var(--phase);font-size:20px}.transmission{position:absolute;bottom:calc(144px + var(--safe-bottom));left:50%;transform:translateX(-50%);width:min(510px,calc(100% - 40px));padding:12px 18px;background:#09141ee8;border-left:2px solid #82b7c5;box-shadow:0 2px 18px #0001}.transmission .eyebrow{font-size:9px;color:#aac2cb}.transmission p{margin:5px 0 0;font-size:14px;line-height:1.7}.tutorial{position:absolute;left:50%;top:62%;transform:translateX(-50%);max-width:80%;padding:8px 12px;background:#0b1822e8;border-radius:4px;font-size:12px;line-height:1.6;text-align:center}.instrument{position:absolute;bottom:calc(28px + var(--safe-bottom));left:50%;transform:translateX(-50%);display:grid;grid-template-columns:1fr auto;gap:5px 16px;min-width:155px;text-shadow:0 1px 4px #000b;font-size:10px;letter-spacing:.03em}#phase-name{color:var(--phase);font-size:12px;font-weight:600}#anchor-state{text-align:right;color:#d5e5e8}.charge-track{grid-column:1/-1;height:3px;background:#e2edf12b;border-radius:2px;overflow:hidden}.charge-track i{display:block;width:100%;height:100%;background:#d2e5e8;transform-origin:left}#save-status{grid-column:1/-1;color:#c3cfd4;white-space:nowrap;text-align:center;font-size:9px;font-weight:400}.action-controls{position:absolute;right:max(24px,env(safe-area-inset-right));bottom:calc(26px + var(--safe-bottom));display:flex;gap:8px;align-items:flex-end}.action-controls button{width:84px;height:83px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:12px;background:#0d1a24e8;color:#d7e5ec;border:1px solid #bacad82b;user-select:none;touch-action:none}.action-controls svg{width:26px;height:26px}.action-controls span{font-size:10px;line-height:1.3}.action-controls kbd{font-family:inherit;font-size:9px;font-weight:400;opacity:.55}.phase-button{color:var(--phase)!important}.anchor-button[aria-pressed=true]{background:#213f50!important;border-color:#a1dbea!important}.desktop-controls{position:absolute;left:24px;bottom:calc(30px + var(--safe-bottom));display:flex;gap:12px;align-items:center;font-size:10px;text-shadow:0 1px 3px #0008}.desktop-controls button{font-size:10px;border-bottom:1px solid #c3e0f044;padding:0 4px}.move-stick{display:none;position:absolute;left:max(24px,env(safe-area-inset-left));bottom:calc(30px + var(--safe-bottom));width:100px;height:100px;border-radius:50%;touch-action:none;user-select:none;background:#0d1a244d;border:1px solid #d3e1e32e}.stick-outline{position:absolute;inset:17px;border:1px solid #c1d8de26;border-radius:50%}#stick-knob{position:absolute;width:34px;height:34px;left:32px;top:32px;border-radius:50%;background:#d3e3e6d4;box-shadow:0 1px 7px #0002;pointer-events:none}.move-stick button{position:absolute;color:#d0e0e464;font-size:12px;min-width:44px;min-height:44px;width:44px;height:44px;padding:0;touch-action:none}.move-stick [data-move=forward]{top:-9px;left:27px}.move-stick [data-move=back]{bottom:-9px;left:27px}.move-stick [data-move=left]{top:27px;left:-9px}.move-stick [data-move=right]{top:27px;right:-9px}.loading-panel,.fallback-panel{position:fixed;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:32px;text-align:center;background:#101b25;color:#e0e8ed;z-index:8}.loading-panel h2{margin:12px 0}.loading-panel p,.fallback-panel p{font-size:14px;max-width:420px;color:#b3c3cd}.fallback-panel a{color:#c1dce5;padding:16px}.fallback-panel .primary{background:#acc6d0;color:#13232e}.start-dialog{color:#edf1f2;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;inset:0;padding:0;margin:0;border:0;border-radius:0;background:linear-gradient(90deg,#061018ed 0%,#07131cc9 34%,#0a162e15 75%);overflow:auto}.start-dialog::backdrop{background:transparent}.start-copy{position:absolute;top:50%;left:9%;transform:translateY(-50%);width:410px;max-width:calc(100% - 48px);padding-block:36px}.start-copy .eyebrow{font-size:9px;letter-spacing:.16em;color:#a7c0cd;margin-bottom:38px}.series-title{font-size:15px;letter-spacing:.3em;margin-bottom:10px;color:#c5d5dc}.start-copy h2{font-size:46px;font-weight:500;letter-spacing:.06em;margin-bottom:22px}.start-premise{font-size:15px;line-height:1.9;color:#c0d0d9;margin-bottom:26px}.start-actions{display:flex;flex-direction:column;align-items:stretch;gap:10px;max-width:280px}.primary{display:flex;align-items:center;justify-content:center;gap:28px;min-height:48px;padding:12px 20px;border-radius:7px;background:var(--accent);color:var(--surface);font-size:14px;font-weight:600;text-align:center}.start-dialog .primary{background:#b9ced5;color:#132530;justify-content:space-between}.start-dialog #start-button.secondary{background:#10242dbb;color:#c1d0d7;border:1px solid #a0bdcc35}.sound-choice{display:flex;align-items:center;gap:9px;font-size:12px;color:#bfced3;margin:16px 0;min-height:44px}.sound-choice input{width:17px;height:17px;accent-color:#a9c1cd}.start-links{display:flex;align-items:center;gap:26px;font-size:12px;margin-top:15px}.start-links button,.start-links a{font-size:12px;color:#c1d2d9;padding:8px 0}.fine-print{font-size:10px;color:#8a9da8;margin:10px 0 0}.start-coordinate{position:absolute;right:28px;bottom:28px;line-height:1.7;font-size:9px;letter-spacing:.12em;color:#a8c0cb88;text-align:right}.sheet{width:min(540px,calc(100% - 28px));max-height:calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));margin:auto;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);padding:24px;overscroll-behavior:contain;overflow:auto;box-shadow:0 20px 90px #0006}.sheet::backdrop{background:#041018ae}.sheet-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.sheet-header h2{margin:4px 0}.sheet .eyebrow{color:var(--muted)}.sheet p{font-size:14px}.sheet .muted,.muted{color:var(--muted);font-size:12px;line-height:1.7}.wide{width:100%}.sheet .primary{margin:14px 0 8px}.text-button{display:flex;justify-content:center;align-items:center;font-size:13px;padding:12px;min-height:44px;color:var(--accent)}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:66px;border-bottom:1px solid var(--line);font-size:14px;padding-block:12px}.setting-row label{flex:1}.setting-row small{display:block;color:var(--muted);font-size:11px;line-height:1.7;margin-top:4px}.setting-row input[type=checkbox]{appearance:none;width:42px;height:26px;border-radius:20px;background:color-mix(in srgb,var(--muted) 24%,var(--surface));flex-shrink:0;position:relative;cursor:pointer}.setting-row input:before{content:'';display:block;background:var(--surface);width:20px;height:20px;border-radius:50%;position:absolute;top:3px;left:3px;box-shadow:0 1px 3px #0003}.setting-row input:checked{background:var(--accent)}.setting-row input:checked:before{left:19px}.range-row{display:grid;grid-template-columns:1fr auto;font-size:13px;gap:10px;padding-block:17px;border-bottom:1px solid var(--line)}.range-row output{color:var(--muted);font-size:12px}.range-row input{grid-column:1/-1;width:100%;min-height:30px;margin:0;accent-color:var(--accent)}details{border-bottom:1px solid var(--line);padding-block:6px}summary{padding-block:15px;min-height:44px;cursor:pointer;font-size:13px}details p{color:var(--muted);font-size:12px!important;margin-bottom:12px}fieldset{border:0;padding:8px 0;margin:0;display:flex;flex-wrap:wrap;gap:8px 16px;font-size:12px}legend{color:var(--muted);padding:5px 0}fieldset label{display:flex;align-items:center;gap:5px;min-height:40px}input[type=radio]{accent-color:var(--accent)}.menu-links{padding-block:16px}.menu-links button,.menu-links a{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;color:var(--ink);font-size:13px;text-align:left;padding:10px 0}.menu-links span{color:var(--muted)}.compact{max-width:440px}.ending{max-width:500px;padding:32px}.ending h2{font-size:29px;line-height:1.55;margin-top:22px}.ending p{font-size:13px;line-height:1.9}.notice{position:fixed;z-index:40;left:50%;bottom:calc(16px + var(--safe-bottom));transform:translateX(-50%);width:max-content;max-width:calc(100% - 30px);padding:12px 16px;border:1px solid #758c98;background:#13242fee;color:#e5eff3;border-radius:9px;font-size:12px;line-height:1.6;pointer-events:none}.library-group h3{font-size:12px;color:var(--muted);margin:22px 0 8px}.article-open{display:block;text-align:left;width:100%;font-size:14px;line-height:1.6;padding:15px 0;border-bottom:1px solid var(--line)}body[data-mode=paused] .hud{opacity:.2}body[data-mode=loading] .hud{display:none}#asset-credits p{margin:8px 0}#asset-credits a{text-decoration:underline;text-underline-offset:3px}
@media(pointer:coarse),(max-width:700px){.move-stick{display:block}.desktop-controls,.action-controls kbd,#lock-button{display:none}.flight-header{top:calc(12px + var(--safe-top));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));gap:10px}.location{max-width:calc(100% - 100px)}.location h1{font-size:16px;letter-spacing:.03em}.location p{font-size:11px;line-height:1.6}.location .eyebrow{font-size:8px}.hud-nav{gap:6px}.hud-nav .icon-button{width:40px;height:44px;border-radius:10px}.action-controls{right:max(18px,env(safe-area-inset-right));bottom:calc(28px + var(--safe-bottom));gap:8px;flex-direction:column}.action-controls button{width:68px;height:64px;border-radius:12px;gap:3px}.action-controls svg{width:23px;height:23px}.action-controls span{font-size:9px}.move-stick{left:max(18px,env(safe-area-inset-left));bottom:calc(35px + var(--safe-bottom));width:96px;height:96px}#stick-knob{left:30px;top:30px}.instrument{min-width:120px;bottom:calc(22px + var(--safe-bottom));font-size:8px;gap:5px 9px;left:50%}#phase-name{font-size:10px}#save-status{font-size:8px}.tide-warning{top:calc(110px + var(--safe-top));font-size:11px;padding:8px 12px;width:max-content;max-width:calc(100% - 32px)}.transmission{bottom:calc(178px + var(--safe-bottom));padding:10px 13px;width:calc(100% - 32px)}.transmission p{font-size:12px;line-height:1.7}.tutorial{font-size:11px;top:57%;max-width:75%}.start-dialog{background:linear-gradient(90deg,#061018ed,#07131c8f)}.start-copy{left:24px;top:50%;max-width:calc(100% - 48px);width:360px;padding-top:var(--safe-top);padding-bottom:var(--safe-bottom)}.start-copy h2{font-size:36px}.start-copy .eyebrow{font-size:8px;max-width:250px;margin-bottom:28px}.start-premise{font-size:14px;margin-bottom:21px}.start-coordinate{display:none}.sheet{width:calc(100% - 20px);padding:20px;max-height:calc(100dvh - 20px - var(--safe-top) - var(--safe-bottom));border-radius:14px}.sheet h2{font-size:23px}.sheet .icon-button{width:44px}.sheet-header{gap:6px}.game-reader{z-index:20}}
@media(max-width:350px){.location p{font-size:10px;max-width:173px}.hud-nav .icon-button{width:36px;min-width:44px}.hud-nav{gap:0}.flight-header{left:12px;right:12px}.instrument{min-width:88px;left:51%;bottom:calc(19px + var(--safe-bottom));gap:4px 5px}.move-stick{left:12px;bottom:calc(27px + var(--safe-bottom));width:88px;height:88px}#stick-knob{left:26px;top:26px}.move-stick [data-move=forward],.move-stick [data-move=back]{left:21px}.move-stick [data-move=left],.move-stick [data-move=right]{top:21px}.action-controls{right:12px;bottom:calc(20px + var(--safe-bottom))}.action-controls button{width:60px;height:60px}.start-copy{left:22px;max-width:calc(100% - 44px)}.start-copy h2{font-size:32px;margin-bottom:14px}.start-copy .eyebrow{margin-bottom:20px}.start-premise{font-size:13px;margin-bottom:16px}.start-links{margin-top:6px}.sound-choice{margin:8px 0}.fine-print{margin-top:4px}.transmission{bottom:calc(158px + var(--safe-bottom))}}
@media(max-height:540px) and (orientation:landscape){.start-copy{position:relative;top:auto;transform:none;margin-block:24px;padding:0;left:7%;width:480px}.start-copy .eyebrow{margin-bottom:10px}.start-copy h2{font-size:30px;margin-bottom:8px}.start-premise{margin-bottom:10px;font-size:13px}.series-title{font-size:12px;margin-bottom:4px}.start-actions{max-width:250px}.sound-choice{margin-block:4px}.start-links{margin-top:0}.fine-print{display:none}.flight-header{top:calc(8px + var(--safe-top))}.location h1{font-size:15px}.location p{max-width:320px}.transmission{bottom:90px;width:46%;font-size:11px}.transmission p{font-size:11px}.tide-warning{top:28px;max-width:260px}.action-controls{flex-direction:row;bottom:calc(16px + var(--safe-bottom))}.move-stick{bottom:calc(16px + var(--safe-bottom));width:88px;height:88px}#stick-knob{left:26px;top:26px}.instrument{bottom:calc(14px + var(--safe-bottom))}}
.instrument{background:#0b1720e6;padding:9px 12px;border:1px solid #b0c9d524;border-radius:7px;text-shadow:none}
#save-status{color:#c3d0d8;font-size:10px}
.start-dialog .muted{color:#bacbd3}
.setting-row input[type=checkbox]{width:46px;height:44px;background:transparent}
.setting-row input[type=checkbox]:after{content:'';position:absolute;inset:9px 2px;border-radius:20px;background:color-mix(in srgb,var(--muted) 24%,var(--surface));z-index:0}
.setting-row input[type=checkbox]:before{top:12px;left:5px;z-index:1}
.setting-row input[type=checkbox]:checked{background:transparent}
.setting-row input[type=checkbox]:checked:after{background:var(--accent)}
.setting-row input[type=checkbox]:checked:before{left:21px}
.range-row input{min-height:44px}fieldset label{min-height:44px}.start-links a{display:inline-flex;align-items:center;min-height:44px}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Shared flow prevents the contextual hint from covering the transmission. */
.narration-stack{position:absolute;left:50%;bottom:calc(144px + var(--safe-bottom));transform:translateX(-50%);display:grid;justify-items:center;gap:8px;width:min(510px,calc(100% - 40px))}
.narration-stack .tutorial,.narration-stack .transmission{position:static;transform:none;max-width:100%;width:auto}
.narration-stack .transmission{width:100%}
.location{background:#08131dde;padding:8px 10px;border-radius:6px;text-shadow:none}
@media(pointer:coarse),(max-width:700px){.narration-stack{bottom:calc(178px + var(--safe-bottom));width:calc(100% - 32px)}.narration-stack .tutorial{max-width:100%}}
@media(max-width:350px){.narration-stack{bottom:calc(158px + var(--safe-bottom))}}
@media(max-height:540px) and (orientation:landscape){.narration-stack{bottom:calc(100px + var(--safe-bottom));width:46%}}
:root[data-theme=light][data-palette=forest] .sheet .primary{background:color-mix(in srgb,var(--accent) 94%,var(--ink))}
