@font-face{font-family:Hand;src:url('assets/handwriting.ttf') format('truetype');font-display:swap}
:root{color-scheme:light;--ink:#102837;--night:#080f15;--muted:#a5b4bd;--gold:#efcf8d;--cream:#fbf5e8}
*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#f8fafb;color:var(--ink)}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible,canvas:focus-visible{outline:3px solid #599bd8;outline-offset:5px}[hidden]{display:none!important}.waiting{min-height:100svh;display:flex;flex-direction:column;padding:32px clamp(22px,5vw,74px)}.school-header{display:flex;align-items:center;justify-content:space-between;gap:24px}.school-header img{width:164px;height:auto}.school-header span,.error-code,.eyebrow,.game-brand,.progress-wrap,.quiet-button{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.12em}.school-header span{font-size:13px;color:#697a88}.error-card{width:min(580px,100%);margin:auto;align-self:center;padding:70px 0 80px}.error-code{font-size:12px;color:#718694}.target-icon{font-size:78px;color:#9aaeba;line-height:1;margin:30px 0 25px}.error-card h1{font-size:clamp(32px,5vw,54px);line-height:1.14;letter-spacing:-.035em;font-weight:650;margin:0 0 23px}.error-card p{font-size:18px;color:#637b8a;line-height:1.6}.primary{background:var(--ink);color:white;border:0;border-radius:8px;padding:15px 30px;font-weight:650;font-size:16px;min-height:48px;transition:transform .15s,background .15s}.primary:hover{background:#245273;transform:translateY(-2px)}.primary:active{transform:translateY(1px)}.error-card .primary{margin-top:10px;min-width:130px}.error-card .small-note{font-size:13px;margin-top:20px}.waiting footer{font-size:13px;color:#7c8c98;padding-top:20px}.game-shell{background:var(--night);color:var(--cream);min-height:100svh}.game-header{height:80px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,58px);border-bottom:1px solid #1b2a32}.game-brand{display:flex;align-items:center;gap:12px;font-size:14px;letter-spacing:.15em}.brand-mark{font-size:30px;color:var(--gold)}.header-controls{display:flex;gap:12px}.quiet-button{background:none;color:#a8b7bf;border:0;padding:10px 7px;font-size:12px;letter-spacing:0}.quiet-button:hover{color:white}.game-content{max-width:1160px;margin:auto;padding:28px 38px 32px}.round-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px}.eyebrow{font-size:12px;color:#9caeb8;line-height:1.5;display:block}.round-bar h1{font-size:26px;font-weight:550;letter-spacing:-.025em;margin:5px 0 0}.progress-wrap{font-size:12px;text-align:right;letter-spacing:.025em}.progress-dots{display:flex;gap:7px;margin-top:11px;justify-content:flex-end}.progress-dots span{height:7px;width:24px;background:#2a3942;border-radius:2px;transition:background .2s,box-shadow .2s}.progress-dots span.filled{background:var(--gold);box-shadow:0 0 12px #efcf8d33}.arena{position:relative;border:1px solid #28363e;border-radius:12px;overflow:hidden;background:#0b151e;box-shadow:0 20px 65px #0005;aspect-ratio:16/9}.arena canvas{display:block;width:100%;height:100%;touch-action:none}.arena-overlay{position:absolute;inset:0;background:#061017a8;backdrop-filter:blur(4px);display:grid;place-items:center;text-align:center;padding:22px}.intro-panel{max-width:460px}.intro-panel h2{font-size:clamp(28px,4vw,44px);line-height:1.14;letter-spacing:-.03em;font-weight:550;margin:14px 0 20px}.intro-panel p{color:#c1ccd2;line-height:1.7;font-size:16px;margin:0 0 25px}.game-shell .primary{background:var(--gold);color:#19232b}.game-shell .primary:hover{background:#ffe6ae}.play-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:18px;color:#a4b7c1;font-size:14px}.play-footer p{margin:0}.keyboard-note{font-size:12px;color:#6f8593;white-space:nowrap}kbd{font-family:inherit;display:inline-block;border:1px solid #33454f;border-radius:4px;padding:3px 5px;font-size:11px;color:#aabac3;margin:0 3px}.transition{position:absolute;inset:0;background:#071721b3;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;pointer-events:none}.transition h2{font-family:Hand,cursive;font-size:clamp(32px,5vw,66px);font-weight:400;margin:12px}.transition .eyebrow{color:var(--gold)}.reveal{background:linear-gradient(#080e17a0,#061016e8)}.reveal-panel{max-width:620px}.reveal .eyebrow{color:#ecd19a;font-size:11px}.reveal h2{font:400 clamp(38px,5vw,68px) Hand,cursive;margin:12px 0}.secret{font:400 clamp(22px,3vw,34px)/1.35 Hand,cursive;color:var(--cream);margin:0 0 18px}.secret-small{font-size:14px;color:#b0bec8;margin-bottom:22px}.reveal .primary{padding:12px 25px}.mobile-controls{display:none}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.game-shell.stage{--gold:#edc080}.game-shell.stage .arena{border-color:#76613e}.game-shell.stage .round-bar h1{color:#ffe4aa}
@media(max-width:760px){.waiting{padding:25px 24px}.school-header img{width:138px}.school-header span{font-size:11px}.game-header{height:66px;padding:0 16px}.game-brand{font-size:11px;gap:7px;letter-spacing:.08em}.header-controls{gap:3px}.quiet-button{font-size:12px;padding:9px 6px}.game-content{padding:22px 14px}.round-bar{margin-bottom:15px}.round-bar h1{font-size:23px}.progress-wrap{font-size:11px}.progress-dots span{width:17px}.arena{aspect-ratio:4/3;border-radius:9px}.play-footer{display:block;font-size:14px;line-height:1.5}.keyboard-note{display:none}.mobile-controls{display:flex;gap:8px;justify-content:center;margin-top:18px}.mobile-controls button{background:#192b35;border:1px solid #344651;color:#d4e2e9;padding:12px 16px;border-radius:7px;font-size:14px;min-height:48px}.mobile-controls #fire{background:var(--gold);border-color:var(--gold);color:#182732;font-weight:650;min-width:100px}.intro-panel h2{font-size:30px;margin:9px 0 14px}.intro-panel p{font-size:14px;line-height:1.5;margin-bottom:18px}.intro-panel .eyebrow{font-size:10px}.reveal .eyebrow{font-size:9px}.reveal h2{font-size:42px;margin:7px 0}.secret{font-size:24px;margin-bottom:10px}.secret-small{margin:8px 0 15px;font-size:12px}.error-card{padding:60px 0}.progress-dots{gap:5px}.game-shell .primary{padding:12px 22px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}.primary:hover{transform:none}}

/* A quiet browser error first; the theatrical colour comes later. */
body{font-family:Arial,Helvetica,sans-serif;background:#fff;color:#202124}.waiting{min-height:100svh;padding:0 24px}.error-card{width:min(600px,100%);margin:clamp(90px,20vh,180px) auto 70px;padding:0}.target-icon{font-family:monospace;font-size:62px;color:#5f6368;margin:0 0 26px}.error-card h1{font-size:26px;font-weight:500;letter-spacing:0;line-height:1.3;margin:0 0 18px}.error-card p{font-size:15px;line-height:1.6;color:#5f6368;margin:0 0 14px}.error-card .browser-help{margin-bottom:18px}.error-code{display:block;letter-spacing:0;font-size:12px;color:#5f6368;margin-bottom:30px}.error-card .primary{min-width:0;margin:0;background:#1a73e8;border-radius:4px;padding:11px 19px;font-size:14px;min-height:42px;font-weight:500}.error-card .primary:hover{background:#1765cc;transform:none}.waiting footer{color:#9aa0a6;font-size:12px;padding:0;margin:auto auto 28px;width:min(600px,100%)}
.game-shell{background:#fff;color:#303134;--gold:#5f6368;--cream:#303134;transition:background 2.8s,color 2.8s}.game-header{height:62px;border-bottom:1px solid #eee;padding:0 clamp(18px,4vw,58px);transition:background 2s,border-color 2s}.game-brand{font-family:Arial,sans-serif;letter-spacing:0;font-size:14px;font-weight:500}.brand-mark{color:#5f6368;font-size:26px}.quiet-button{font-family:Arial,sans-serif;color:#5f6368;letter-spacing:0;font-size:13px}.quiet-button:hover{color:#202124}.game-content{max-width:1080px;padding-top:22px}.round-bar h1{font-size:23px;font-weight:500;letter-spacing:0}.eyebrow{font-family:Arial,sans-serif;font-size:12px;letter-spacing:.04em;color:#80868b}.progress-wrap{font-family:monospace;font-size:12px;color:#5f6368}.progress-dots span{background:#e4e6e8}.progress-dots span.filled{background:#5f6368;box-shadow:none}.arena{border:1px solid #e5e7e9;background:#fafafa;box-shadow:none;border-radius:4px;transition:border-color 2s,box-shadow 2s}.play-footer{color:#5f6368}.keyboard-note{color:#80868b}kbd{color:#5f6368;border-color:#dadce0}.mobile-controls button{background:#f1f3f4;border:1px solid #dadce0;color:#303134;border-radius:4px}.mobile-controls #fire{background:#5f6368;border-color:#5f6368;color:#fff}.transition{background:none;justify-content:flex-end;padding-bottom:32px;opacity:0}.transition h2{color:#fff2d5;font-size:38px;text-shadow:0 2px 10px #000;margin:0}.game-shell.stage{background:#131019;color:#faf1e5;--gold:#e7c182;--cream:#faf1e5}.stage .game-header{background:#131019;border-color:#392b31}.stage .game-brand,.stage .quiet-button{color:#d8c6b2}.stage .brand-mark{color:#e7c182}.stage .quiet-button:hover{color:#fff}.stage .eyebrow,.stage .progress-wrap,.stage .play-footer{color:#bba99a}.stage .progress-dots span{background:#463637}.stage .progress-dots span.filled{background:#e7c182}.stage .arena{border-color:#806744;box-shadow:0 15px 60px #0004}.stage .keyboard-note{color:#9e8a80}.stage kbd{border-color:#65524b;color:#c8b3a5}.stage .mobile-controls button{background:#31252b;border-color:#6a534a;color:#f2e4d4}.stage .mobile-controls #fire{background:#e7c182;color:#2a1d1c}.stage .round-bar h1{color:#f5d9a8}
.theatre-curtains{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}.curtain-left,.curtain-right{position:absolute;top:-2%;bottom:-2%;width:52%;background:repeating-linear-gradient(90deg,#280713 0%,#581025 6%,#8a1e38 12%,#5f1027 17%,#250811 24%);box-shadow:inset -18px 0 22px #16050bb0,0 0 32px #0008;border-bottom:10px solid #b08c57}.curtain-left{left:0;transform:translateX(-103%);border-right:4px solid #6c1830}.curtain-right{right:0;transform:translateX(103%);background:repeating-linear-gradient(90deg,#250811 0%,#5f1027 6%,#8a1e38 12%,#581025 18%,#280713 24%);border-left:4px solid #6c1830;box-shadow:inset 18px 0 22px #16050bb0,0 0 32px #0008}.closing .curtain-left{animation:close-left 3.1s cubic-bezier(.22,.68,.24,1) forwards}.closing .curtain-right{animation:close-right 3.25s cubic-bezier(.22,.68,.24,1) forwards}@keyframes close-left{0%{transform:translateX(-103%)}78%{transform:translateX(1.8%)}89%{transform:translateX(-1.3%)}100%{transform:translateX(0)}}@keyframes close-right{0%{transform:translateX(103%)}78%{transform:translateX(-1.8%)}90%{transform:translateX(1%)}100%{transform:translateX(0)}}
.reveal{z-index:3;background:#08050b32;backdrop-filter:none}.reveal-panel{text-align:center;display:flex;flex-direction:column;align-items:center}.paper-drop{position:relative;display:flex;flex-direction:column;align-items:flex-start;width:216px;min-height:264px;padding:28px 26px 20px;text-align:left;background:#f5ead3;color:#342b21;border:0;border-radius:1px;box-shadow:0 16px 30px #0008,3px 3px 0 #d6c3a0;transform:rotate(-5deg);animation:paper-landing 1.4s cubic-bezier(.2,.7,.32,1) both}.paper-drop:hover{box-shadow:0 22px 44px #0009,3px 3px 0 #d6c3a0}.paper-label{font:10px/1.4 ui-monospace,monospace;letter-spacing:.07em;color:#766451}.paper-title{font:38px/1.05 Hand,cursive;margin:20px 0 16px}.paper-rules{display:block;width:100%;height:27px;background:repeating-linear-gradient(0deg,transparent 0,transparent 8px,#b49e7855 8px,#b49e7855 9px)}.paper-open{font-size:12px;color:#6f5a41;margin-top:auto;padding-top:18px}.script-staple{position:absolute;top:14px;left:18px;width:17px;height:4px;border:1px solid #998877;transform:rotate(-20deg)}@keyframes paper-landing{0%{transform:translateY(-480px) rotate(-30deg);opacity:0}12%{opacity:1}60%{transform:translateY(15px) rotate(8deg)}80%{transform:translateY(-7px) rotate(-8deg)}100%{transform:translateY(0) rotate(-5deg)}}.reveal .secret-small{margin:22px 0 4px;color:#edddce;font-size:14px}.reveal .quiet-button{color:#d2beac;padding:8px 15px}.script-dialog{padding:0;width:min(580px,calc(100vw - 32px));max-height:calc(100svh - 40px);overflow:auto;border:0;background:#f5ead3;color:#332d25;box-shadow:0 28px 100px #0009;transform:rotate(-.7deg);border-radius:2px}.script-dialog::backdrop{background:#100a17b8;backdrop-filter:blur(5px)}.script-page{padding:44px 46px;background:linear-gradient(90deg,#dec9a540,transparent 12%,transparent 90%,#dec9a530)}.script-page h2{font:400 42px/1.15 Hand,cursive;margin:26px 0 30px}.riddle{font:400 31px/1.5 Hand,cursive}.riddle p{margin:0 0 28px}.script-footer{border-top:1px solid #bca68166;padding-top:20px;display:flex;align-items:center;justify-content:space-between;gap:18px;font-size:13px;color:#7f6b52}.script-footer button{border:1px solid #b9a485;border-radius:3px;background:transparent;color:#4a3b2e;padding:10px 14px;font-size:14px;min-height:44px}.script-dialog[open]{animation:unfold .35s ease-out}@keyframes unfold{from{opacity:0;transform:translateY(18px) rotate(-3deg) scale(.92)}to{opacity:1;transform:translateY(0) rotate(-.7deg) scale(1)}}
@media(max-width:760px){.game-header{height:55px}.game-brand{font-size:13px}.quiet-button{font-size:12px}.game-content{padding-top:20px}.round-bar h1{font-size:21px}.arena{aspect-ratio:4/3}.transition{padding-bottom:22px}.transition h2{font-size:29px}.paper-drop{width:130px;min-height:161px;padding:19px 15px 12px}.paper-label{font-size:7px}.paper-title{font-size:27px;margin:12px 0 9px}.paper-rules{height:18px}.paper-open{font-size:10px;padding-top:9px}.script-staple{top:9px;left:11px;width:11px;height:3px}.reveal .secret-small{font-size:12px;margin:17px 0 0}.script-page{padding:30px 28px}.script-page .paper-label{font-size:10px}.script-page h2{font-size:36px;margin:22px 0}.riddle{font-size:26px;line-height:1.5}.script-footer{font-size:12px}.error-card{margin-top:115px}.error-card h1{font-size:24px}.target-icon{font-size:56px}.reveal .quiet-button{font-size:12px;min-height:36px}.curtain-left,.curtain-right{border-bottom-width:6px}}
@media(prefers-reduced-motion:reduce){.closing .curtain-left,.closing .curtain-right{animation-duration:.4s}.paper-drop{animation:none}.script-dialog[open]{animation:none}.game-shell,.game-header,.arena{transition:none}}
.game-shell .arena-overlay:not(.reveal){background:#fffffff0;backdrop-filter:blur(3px);color:#303134}.game-shell .intro-panel p{color:#5f6368}.game-shell .intro-panel .primary{background:#1a73e8;color:#fff}.stage .arena-overlay:not(.reveal){background:#130d19d9;color:#faf1e5}.stage .intro-panel p{color:#d0bfae}.stage .intro-panel .primary{background:#e7c182;color:#2a1d1c}

/* Let the game fill the available desktop screen. */
@media(min-width:761px){.game-header{height:50px}.game-content{width:min(calc(100% - 36px),calc((100svh - 160px)*16/9),1680px);max-width:none;padding:12px 0 18px}.round-bar{margin-bottom:12px}.round-bar h1{font-size:22px}.play-footer{margin-top:12px}.game-shell:fullscreen .game-content{width:min(calc(100% - 28px),calc((100svh - 154px)*16/9),1920px)}}
@media(max-width:760px){#fullscreen{display:none}}
@media(min-width:761px){.game-header{height:44px}.game-content{width:min(calc(100% - 28px),calc((100svh - 122px)*16/9),1680px);padding:8px 0 12px}.round-bar{margin-bottom:8px}.round-bar .eyebrow{display:none}.round-bar h1{margin:0;font-size:20px}.progress-wrap{display:flex;align-items:center;gap:12px}.progress-dots{margin:0}.play-footer{margin-top:10px}.game-shell:fullscreen .game-header{height:40px}.game-shell:fullscreen .round-bar{display:none}.game-shell:fullscreen .game-content{width:min(calc(100% - 16px),calc((100svh - 86px)*16/9),1920px);padding:8px 0}}

/* Keep each clue line intact so the word diagonal can be discovered. */
.riddle{font-size:26px;line-height:1.7}.script-dialog{width:min(680px,calc(100vw - 32px))}@media(max-width:600px){.script-page{padding:28px 20px}.riddle{font-size:clamp(17px,4vw,24px);line-height:1.9}}

/* An unmarked diagonal of sentence initials rewards a closer look. */
.clue-line{display:block}.clue-line:nth-child(2){margin-left:7px}.clue-line:nth-child(3){margin-left:14px}.clue-line:nth-child(4){margin-left:21px}.clue-line:nth-child(5){margin-left:28px}.clue-line:nth-child(6){margin-left:35px}
