@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');
:root{color-scheme:dark;--bg:#101e1c;--ink:#f5edce;--muted:#9fac9b;--line:#34433a;--pink:#f1a6b0;--gold:#e8c984}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px 'DM Sans',sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:2px solid var(--gold);outline-offset:5px}button{border:0}button:hover{color:#fff}button:disabled{opacity:.5}a{color:inherit;text-decoration:none}.masthead{max-width:1360px;margin:auto;padding:27px 42px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:13px;font:700 18px 'Space Mono',monospace;letter-spacing:2px}.brand-icon{font-size:35px;color:var(--gold)}.brand small{display:block;font:10px 'Space Mono',monospace;letter-spacing:2.6px;color:var(--muted);margin-top:3px}.masthead nav{display:flex;gap:24px}.masthead button{background:none;padding:8px 0;font-size:14px;color:#bdc7b6}.masthead button span{color:var(--gold);margin-left:7px}main{max-width:1276px;padding:0 24px;margin:0 auto}.game-topline{display:flex;justify-content:space-between;margin:12px 0 15px;font:10px 'Space Mono',monospace;letter-spacing:2px;color:#bac4aa}.edition span{color:var(--gold);margin-left:14px}.cabinet{position:relative;width:100%;aspect-ratio:16/9;border:1px solid #68715b;box-shadow:0 18px 70px #0004;overflow:hidden;background:#668b92}.cabinet canvas{width:100%;height:100%;display:block;image-rendering:pixelated;touch-action:none;outline-offset:-4px}.title-screen{position:absolute;inset:0;display:flex;align-items:center;flex-direction:column;justify-content:center;background:linear-gradient(#17231d15,#15231b14 50%,#0c252360);text-align:center;text-shadow:0 3px 0 #273c39}.title-kicker{font:10px 'Space Mono',monospace;letter-spacing:2.4px;margin-bottom:20px;color:#f8f2d6}h1{font:700 clamp(44px,6.3vw,83px)/.91 'Space Mono',monospace;letter-spacing:-5px;margin:0;color:#fff4cf;text-shadow:4px 5px 0 #38524c,7px 8px 0 #254038}h1 span{letter-spacing:-6px}.title-screen p{font-size:17px;margin:22px 0 26px;color:#fff1d1}.primary{background:var(--ink);color:#293a30;border:1px solid #fffae0;box-shadow:4px 4px 0 #233b31;padding:14px 24px;font-size:14px;font-weight:700;transition:transform .15s}.primary:hover{background:#fff9e6;color:#14221b;transform:translateY(-2px)}.primary span{margin-left:20px}.start-hint{font:9px 'Space Mono',monospace;letter-spacing:1.7px;margin-top:22px;color:#e8ecd2}.hud{position:absolute;inset:0 0 auto;display:flex;justify-content:space-between;padding:19px 23px;pointer-events:none;background:linear-gradient(#14252288,transparent)}.hud-left{display:flex;flex-direction:column;gap:3px}.hud-label{font:10px 'Space Mono',monospace;letter-spacing:2px;color:#fff1cc}#composure{color:var(--gold);font-size:22px;letter-spacing:3px}#pauseButton{pointer-events:auto;background:#15272188;border:1px solid #ecedbf50;width:33px;height:32px}.compass{position:absolute;left:50%;top:13px;transform:translateX(-50%);width:65px;height:64px;font:10px 'Space Mono',monospace}.compass span,.compass b{position:absolute;color:#ecedcc77}.compass b{left:27px;top:22px;color:#ece3b3;font-size:20px}.compass [data-dir=N]{left:29px;top:0}.compass [data-dir=S]{left:29px;bottom:0}.compass [data-dir=W]{left:3px;top:27px}.compass [data-dir=E]{right:3px;top:27px}.compass span.active{color:#fff2b1;text-shadow:0 0 10px #fddc90;font-weight:700}.guide{position:absolute;bottom:8%;left:50%;transform:translateX(-50%);text-align:center;width:80%;pointer-events:none;text-shadow:0 2px 2px #14231e}.guide span{font:10px 'Space Mono',monospace;letter-spacing:2.4px;color:var(--gold)}.guide p{margin:9px 0 0;font-size:clamp(13px,1.7vw,21px);color:#fffbe4}.interaction{position:absolute;bottom:21%;left:50%;transform:translateX(-50%);background:#132a25eb;border:1px solid #99b6a1;padding:9px 15px;font-size:13px;white-space:nowrap;color:#f3efd2}.screen-panel,.reunion{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#112921bd;text-align:center;padding:24px}.screen-panel h2,.reunion h2{font:500 clamp(28px,4vw,50px)/1.1 Georgia,serif;margin:12px 0}.screen-panel p,.reunion p{max-width:440px;line-height:1.6;color:#d9e4cb;margin-bottom:25px}.eyebrow{font:10px 'Space Mono',monospace;letter-spacing:2px;color:var(--gold)}.reunion{background:linear-gradient(#102d2440,#112d24ed);top:28%}.reunion h2{font-size:36px}.reunion p{margin:6px 0 18px}.text-button{background:none;font-size:13px;margin-top:17px;text-decoration:underline;text-underline-offset:4px;color:#c7d9ba}.under-game{display:flex;justify-content:space-between;align-items:center;margin:16px 0;color:#b8c8b3;font-size:14px}.under-game p{margin:0}#progressText{font:12px 'Space Mono',monospace;color:var(--gold)}.controls{display:flex;justify-content:center;gap:27px;flex-wrap:wrap;padding:15px 0 29px;color:#9bab9c;font-size:12px}.controls span{display:flex;align-items:center;gap:7px}kbd{font:10px 'Space Mono',monospace;background:#22332d;border:1px solid #465245;border-bottom-width:2px;border-radius:3px;padding:3px 6px;color:#d5ddc6}.chapters{border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:grid;grid-template-columns:repeat(3,1fr)}.chapters button{background:none;display:flex;align-items:center;text-align:left;padding:24px 18px;gap:17px;color:#c5cfb9;position:relative}.chapters button+button{border-left:1px solid var(--line)}.chapters button.selected{background:#1a2c25}.chapters button.selected:before{content:'';position:absolute;height:2px;background:var(--gold);top:-1px;left:0;right:0}.chapter-number{font:20px Georgia,serif;color:#80917c}.selected .chapter-number{color:var(--gold)}.chapters small{display:block;font:9px 'Space Mono',monospace;letter-spacing:1.1px;color:#8fa289;margin-bottom:7px}.chapters button>span:nth-child(2){font:18px Georgia,serif}.chapter-arrow{margin-left:auto;color:#869d82;font-size:18px}footer{display:flex;justify-content:space-between;padding:23px 0 30px;color:#738a79;font-size:12px}footer>span:first-child{font:9px 'Space Mono',monospace;letter-spacing:1.4px}.footer-star{margin:0 11px;color:var(--gold)}.toast{position:absolute;left:50%;transform:translateX(-50%);top:21%;font-size:14px;color:#fff2ce;text-shadow:0 2px #20332b;text-align:center;width:90%;pointer-events:none}.touch-controls{display:none;justify-content:space-between;gap:12px;margin:16px 0}.touch-controls>div{display:flex;gap:10px}.touch-controls button{background:#283f33;border:1px solid #617a5c;width:49px;height:43px;border-radius:6px;font-size:23px;touch-action:none;user-select:none}dialog{max-width:900px;width:calc(100% - 36px);background:#182c24;color:var(--ink);border:1px solid #708166;padding:32px;box-shadow:0 20px 100px #0008}dialog::backdrop{background:#0a1814ce;backdrop-filter:blur(5px)}.dialog-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.dialog-heading h2{font:36px Georgia,serif;margin:12px 0}.close-dialog{background:none;font-size:28px;padding:0 8px;color:#aabd9b}.dialog-intro{line-height:1.6;color:#becbb1;max-width:700px}.family-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:30px 0}.family-grid article{background:#223a2d;border:1px solid #425440;text-align:center;padding:12px 5px 18px}.family-grid canvas{width:100%;height:auto;image-rendering:pixelated}.family-grid h3{font:24px Georgia,serif;margin:10px 0}.family-grid p{font-size:13px;line-height:1.6;color:#bdcbb0;margin:0}.gallery-note,.settings-note{font-size:13px;color:#9fb394;line-height:1.7}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:25px 0;border-bottom:1px solid #40523d}.setting-row small{display:block;font-size:14px;color:#a9bd9e;margin-top:7px}.setting-row input{width:21px;height:21px;accent-color:#dcbf86}#settings{max-width:540px}[hidden]{display:none!important}@media(max-width:750px){.masthead{padding:20px}.masthead nav{gap:16px}.brand{font-size:14px}.brand small{font-size:8px}.brand-icon{font-size:27px}.masthead button{font-size:12px}main{padding:0 16px}.title-kicker{font-size:7px;letter-spacing:1px;margin-bottom:12px}h1{font-size:48px;letter-spacing:-4px}h1 span{letter-spacing:-4px}.title-screen p{font-size:12px;margin:14px 0}.primary{padding:10px 18px;font-size:12px}.start-hint{font-size:7px;margin-top:15px}.game-topline{font-size:8px;letter-spacing:1px}.edition{display:none}.controls{gap:13px}.chapters{grid-template-columns:1fr}.chapters button{padding:18px}.chapters button+button{border-left:0;border-top:1px solid var(--line)}footer{font-size:10px;gap:12px;flex-wrap:wrap}.hud{padding:10px 13px}.compass{top:5px;transform:translateX(-50%) scale(.8)}.guide{bottom:6%}.guide p{margin-top:4px}.guide span{font-size:8px}.interaction{font-size:10px;padding:5px 9px}.under-game{font-size:12px}.reunion{top:0}.reunion h2{font-size:26px}.reunion p{font-size:12px;margin:4px 0 10px}.text-button{margin-top:12px}.family-grid{grid-template-columns:repeat(2,1fr)}dialog{padding:22px}.dialog-heading h2{font-size:29px}.touch-controls{display:flex}.controls{display:none}.toast{font-size:12px}}@media(max-width:480px){.masthead nav{gap:12px}#galleryButton span{display:none}.brand small{letter-spacing:1px}.title-kicker{display:none}h1{font-size:36px}.title-screen p{margin:10px 0;font-size:11px}.start-hint{font-size:6px;letter-spacing:.7px;margin-top:10px}.title-screen .primary{padding:8px 13px}.cabinet{aspect-ratio:16/9}.cabinet canvas{object-fit:contain}.compass{display:none}.guide p{font-size:12px}.hud-label{font-size:8px}#composure{font-size:16px}.interaction{bottom:25%}.reunion p{max-width:270px}.edition{display:none}}

/* Guidance is a passing whisper, not a persistent panel over the action. */
.under-game{gap:18px;align-items:flex-start}#statusText{flex:1;min-width:0;line-height:1.5}#progressText{flex-shrink:0;white-space:nowrap}
.guide{bottom:auto;top:19%;transition:opacity .2s linear}.guide p{font-size:clamp(12px,1.4vw,18px)}
.interaction{bottom:auto;top:32%;transition:opacity .2s linear;pointer-events:none}
.toast{top:26%;transition:opacity .2s linear}.power-name{font:9px 'Space Mono',monospace;letter-spacing:1px;color:#f3ddaf;margin-top:3px}.spark-count{font:10px 'Space Mono',monospace;color:#e6c991;margin-top:4px}
.reunion{top:auto;bottom:0;padding:18px;background:linear-gradient(transparent,#10281bf2 30%)}.reunion h2{font-size:28px;margin:5px 0}.reunion p{font-size:14px;max-width:540px;line-height:1.4;margin:4px 0 12px}.reunion .text-button{margin-top:9px}
@media(max-width:750px){.power-name{font-size:7px}.spark-count{font-size:8px}.reunion{padding:8px}.reunion .eyebrow{display:none}.reunion h2{font-size:19px}.reunion p{display:none}.reunion .primary{padding:7px 12px;margin-top:6px}.reunion .text-button{font-size:10px;margin-top:8px}.guide{top:15%}.guide p{font-size:11px}.interaction,.toast{font-size:10px;top:30%}}

/* One ordered message stream outside the playfield; new messages append below. */
#guide,#toast,#prompt{display:none!important}
.message-stack{display:flex;flex-direction:column;gap:7px;pointer-events:none}
.message-stack:empty{display:none}
.journey-message{margin:0;padding:8px 12px;background:#1d302a;border-left:2px solid #9fbfa6;font-size:13px;line-height:1.45;color:#e6e7cc;overflow-wrap:anywhere;transition:opacity .15s linear}
.journey-message:first-child{margin-top:10px}.journey-message.guidance{border-color:#e8c984;color:#f5dfab}.journey-message.action{border-color:#dfb4d8}
@media(max-width:750px){.journey-message{font-size:11px;padding:6px 9px}}

/* Signature credit: transparent ivory mark over a softly moving spectrum. */
.creator-credit{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:16px;color:#fff0d5;text-shadow:0 1px 8px #142c26;background:none;padding:0}
.creator-emblem{position:relative;isolation:isolate;width:66px;height:66px;flex:none;display:grid;place-items:center}
.creator-emblem:before,.creator-emblem:after{content:'';position:absolute;pointer-events:none;inset:-7px;border-radius:46% 54% 61% 39%;filter:blur(12px);z-index:-1;animation:signature-wind 19s ease-in-out infinite}
.creator-emblem:before{background:conic-gradient(#efb1cb,#dfbf87,#a7d4ac,#8fc7d4,#bea8dd,#efb1cb);opacity:.5}
.creator-emblem:after{inset:4px -13px;background:radial-gradient(ellipse,#cdb4ed90,#91d5ce70 38%,#edb79a00 74%);filter:blur(9px);opacity:.65;animation:signature-wind 27s ease-in-out -11s infinite reverse}
.creator-emblem img{width:100%;height:100%;object-fit:contain;filter:brightness(0) invert(94%) sepia(17%) saturate(452%) hue-rotate(347deg);background:none}
.creator-copy{text-align:left;display:flex;flex-direction:column;gap:5px}.creator-copy>span{font:italic 12px Georgia,serif;letter-spacing:.15px}.creator-copy strong{font:400 12px 'Space Mono',monospace;letter-spacing:2.4px;text-transform:uppercase}

@keyframes signature-wind{
 0%,100%{transform:translate(-8%,3%) rotate(-12deg) scale(1.05,.9) skewX(-8deg)}
 22%{transform:translate(27%,-13%) rotate(18deg) scale(1.5,.72) skewX(18deg)}
 43%{transform:translate(7%,-23%) rotate(53deg) scale(.85,1.25) skewX(4deg)}
 68%{transform:translate(-30%,9%) rotate(-27deg) scale(1.55,.8) skewX(-22deg)}
 84%{transform:translate(-13%,20%) rotate(-48deg) scale(.95,1.15) skewX(-5deg)}
}
@media(prefers-reduced-motion:reduce){.creator-emblem:before,.creator-emblem:after{animation:none}}
body.gentle-visuals .creator-emblem:before,body.gentle-visuals .creator-emblem:after{animation:none}
.effect-status{min-height:18px;font:11px 'Space Mono',monospace;color:#e6b7f4;line-height:18px}.title-screen .start-hint{margin-top:8px}
@media(max-width:750px){.creator-credit{margin-top:8px;gap:8px}.creator-emblem{width:37px;height:37px}.creator-copy{gap:3px}.creator-copy>span{font-size:9px}.creator-copy strong{font-size:9px;letter-spacing:1.4px}.title-screen .start-hint{display:none}.title-screen h1{font-size:34px}.title-screen p{margin:7px 0}.title-kicker{display:none}}
@media(max-width:480px){.title-screen h1{font-size:25px;line-height:.95}.title-screen .primary{padding:6px 10px}.title-screen p{margin:4px 0;font-size:10px}.creator-emblem{width:32px;height:32px}.creator-copy>span{font-size:8px}.creator-copy strong{font-size:8px}.creator-credit{margin-top:6px}}

.title-screen{background:linear-gradient(180deg,#13291e05 15%,#15291f30 50%,#0b211fa6 100%)}

/* Portrait controls sit below the picture; landscape controls overlay it. */
.mobile-tip{display:none}
@media (pointer:coarse),(max-width:750px){
 body{overscroll-behavior-y:contain}
 .masthead{padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));gap:8px}
 .brand{font-size:12px}.brand small{display:none}.masthead nav{gap:12px}
 main{padding:0 max(8px,env(safe-area-inset-left)) 0 max(8px,env(safe-area-inset-right))}
 .touch-controls{display:flex;position:sticky;bottom:0;z-index:5;background:#101e1cf5;padding:10px 4px max(10px,env(safe-area-inset-bottom));margin:8px 0;touch-action:none}
 .touch-controls button{width:clamp(58px,12vw,78px);height:60px;border-radius:16px;font-size:28px;-webkit-user-select:none;-webkit-touch-callout:none}
 .touch-controls button.is-held{background:#607754;box-shadow:inset 0 0 0 2px #f1ddab;transform:translateY(2px)}
 #touchAction{background:#614762;color:#ffe2f2}
 .mobile-tip{display:block;font-size:11px;line-height:1.5;color:#b8c8b3;text-align:center;margin:8px 4px}
 .controls{display:none}#pauseButton{width:44px;height:44px}
 .under-game{margin:8px 0;font-size:11px}.game-topline{margin:6px 0}
 .screen-panel{padding:10px}.screen-panel h2{font-size:24px;margin:6px}.screen-panel p{font-size:12px;margin:4px 0 10px}
 .screen-panel .eyebrow{display:none}.screen-panel .primary{min-height:44px}.screen-panel .text-button{margin-top:8px;min-height:32px}
 .title-screen .primary{min-height:44px}.creator-credit{margin-top:7px}
}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse), (orientation:landscape) and (max-height:500px) and (max-width:1000px){
 html,body{width:100%;height:100%;overflow:hidden}
 .masthead,.game-topline,.chapters,footer,.mobile-tip,.under-game{display:none}
 main{position:fixed;inset:0;max-width:none;padding:0;touch-action:manipulation}
 .cabinet{width:100%;height:100vh;height:100dvh;aspect-ratio:auto;margin:0;border:0;box-shadow:none}
 .cabinet canvas{object-fit:fill}
 .controls{display:none}.touch-controls{display:flex;position:fixed;bottom:0;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));margin:0;padding:0 0 max(2px,env(safe-area-inset-bottom));background:transparent;pointer-events:none}
 .touch-controls button{height:44px;width:68px;border-radius:14px;background:#283f3380;font-size:28px;pointer-events:auto}
 #touchAction{background:#61476299}
 .touch-controls button.is-held{background:#607754;box-shadow:inset 0 0 0 2px #f1ddab;transform:translateY(2px)}
 .effect-status{position:fixed;bottom:calc(12px + env(safe-area-inset-bottom));left:25%;right:25%;text-align:center;font-size:10px;z-index:6;pointer-events:none}
 .message-stack{position:fixed;top:22%;bottom:auto;left:20%;right:20%;align-items:center;gap:5px;z-index:6}.journey-message{position:relative;isolation:isolate;width:fit-content;max-width:100%;border:0;border-radius:14px;background:#10251ee6;color:#fff8df;text-align:center;font-size:clamp(16px,2vw,19px);font-weight:600;line-height:1.4;padding:7px 16px;text-shadow:0 1px 2px #08140f}.journey-message:before{content:"";position:absolute;inset:-3px;z-index:-1;border-radius:16px;background:#10251e80;filter:blur(5px)}.journey-message:first-child{margin-top:0}.hud{padding:max(7px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 7px max(10px,env(safe-area-inset-left))}#pauseButton{width:44px;height:44px}.compass{display:none}
 .title-screen h1{font-size:34px}.title-screen p{margin:5px 0;font-size:11px}.creator-emblem{width:30px;height:30px}.creator-copy>span,.creator-copy strong{font-size:8px}.creator-copy strong{letter-spacing:1px}.title-screen .start-hint{display:none}
}

/* Finale text stays inside the canvas frame and shares the simulation clock. */
.finale-screen{position:absolute;inset:0;z-index:12;pointer-events:none;overflow:hidden}
.finale-shade{position:absolute;inset:0;background:#080b10;opacity:0}
.finale-line,.credits-text{position:absolute;margin:0;left:8%;width:84%;text-align:center;color:#f0e1c8;font-family:Georgia,serif;font-weight:normal;opacity:0;text-shadow:0 2px 10px #080b10}
.finale-line{top:20%;font-size:clamp(18px,3vw,34px);letter-spacing:.03em}
.credits-text{top:50%;transform:translateY(-50%);font-size:clamp(18px,3vw,34px);line-height:1.65}

/* One notice at a time, with at most two visible lines even on narrow screens. */
.journey-message{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}
