@font-face{font-family:ComicDisplay;src:url('assets/fonts/bangers.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:Notebook;src:url('assets/fonts/nunito-sans-latin.woff2') format('woff2');font-weight:400 900;font-display:swap}
/* PRINT TOKENS: actual game state colors remain owned by the games. */
:root{--print-ink:#242320;--print-red:#c83b35;--print-yellow:#edc348;--print-cyan:#278c9b;--print-green:#397653;--paper:#f3eddb;--paper-face:#fff9e9;--page:var(--paper);--surface:var(--paper-face);--ink:#242320;--muted:#655f52;--line:#b6ab92;--tile:#e8dfc8;--action:#ad312c;--action-ink:#fff9e9;--comic-accent:#c83b35;--comic-second:#edc348;--hand:ComicDisplay,Impact,sans-serif;--text:Notebook,Arial,sans-serif;--raised:3px 3px 0 var(--print-ink);--raised-small:2px 2px 0 var(--print-ink);--pressed:0 0 0 var(--print-ink);--piece-face:#fff9e9;--piece-ink:#242320;--piece-edge:#242320;--board-white:#fff9e9;--board-edge:#867d68;--board-mint:#d0dec1;--board-blue:#c7dce1;--board-pink:#edc8bf;--board-yellow:#f1dfa0;--board-lilac:#dbd0de;--board-peach:#edc9a5;--board-error:#b12929;--piece-raised:2px 3px 0 #242320;--motion-fast:170ms;--motion-page:320ms;color-scheme:light;font-family:var(--text);letter-spacing:0}
html,body{background-color:var(--paper);color:var(--ink)}
body{background-image:radial-gradient(#403b2818 .6px,transparent .8px);background-size:5px 5px}
body,button,input,select,textarea{font-family:var(--text);letter-spacing:0}
body :is(h1,h2,h3){letter-spacing:0}
button{transition:transform 170ms,opacity 170ms;touch-action:manipulation}
button:focus-visible,[role=button]:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--print-cyan);outline-offset:3px}
button:disabled{opacity:.45}
button svg.lucide{stroke-width:2.4}
.primary-button,.secondary-button,.comic-button{border:2px solid var(--print-ink);border-radius:2px;min-height:46px;box-shadow:3px 3px 0 var(--print-ink);font-weight:850}
.primary-button{background:var(--print-yellow);color:var(--print-ink)}
.secondary-button{background:var(--paper-face);color:var(--ink)}
.icon-button{border:2px solid var(--print-ink);border-radius:3px;background:var(--paper-face);color:var(--ink);box-shadow:2px 2px 0 var(--print-ink);min-width:40px;min-height:40px}
.primary-button:active,.secondary-button:active,.icon-button:active{translate:1px 1px;box-shadow:1px 1px 0 var(--print-ink)}
[data-tip]::after{font-family:var(--text);border-radius:1px}
/* THE COVER: printed masthead, issue strip and individual illustrated panels. */
#home{max-width:760px;padding-inline:max(20px,env(safe-area-inset-left));background:none}
.home-header{border-top:5px solid var(--print-ink);border-bottom:3px solid var(--print-ink);padding:8px 0 14px;margin-bottom:14px}
.home-date-row{height:auto;min-height:42px;margin:0 0 12px;gap:8px}
.home-header .eyebrow{font-size:11px;font-weight:850;color:var(--ink)}
.home-utilities{gap:8px}.home-utilities .icon-button{width:38px;height:38px;min-width:38px;min-height:38px}
.home-header h1{font:400 66px/.95 var(--hand);text-transform:uppercase;color:var(--print-red);text-shadow:2px 2px 0 var(--paper-face),3px 3px 0 var(--print-ink);transform:rotate(-1deg);margin:0;padding-bottom:7px}
.brand-period{color:var(--print-ink)}
.ritual-heading{font-size:12px;font-weight:800;color:var(--ink);margin-top:12px}.ritual-count{font-weight:900}
.ritual-meter{height:8px;gap:4px}.ritual-meter span{border:1px solid var(--print-ink);border-radius:0;background:var(--paper-face)}.ritual-meter .complete{background:var(--print-green)}
.featured-heading h2{font:400 22px/1.2 var(--hand)}.featured-heading>span{display:none}
.ritual-track{padding-top:12px;padding-bottom:20px}
.ritual-card{--tier-bg:#d7e3bd;--tier-ink:#242320;--tier-soft:#454b36;--tier-line:#6a755a;--tier-control:#fff9e9;--ink:var(--tier-ink);--muted:var(--tier-soft);height:445px;padding:16px 17px 12px;border:3px solid var(--print-ink);border-radius:2px 5px 2px 3px;box-shadow:5px 6px 0 var(--print-ink);background:var(--tier-bg);color:var(--tier-ink);animation:none}
.ritual-card::before{content:'';position:absolute;inset:0 0 auto;height:145px;z-index:0;pointer-events:none;background-image:radial-gradient(#24232026 1px,transparent 1.2px);background-size:5px 5px;opacity:.55}
.tier-medium{--tier-bg:#edc348;--tier-ink:#242320;--tier-soft:#514522;--tier-line:#958040;box-shadow:5px 6px 0 var(--print-ink)}
.tier-challenge{--tier-bg:#b83732;--tier-ink:#fff8e6;--tier-soft:#fff0d3;--tier-line:#eaa795;--tier-control:#fff9e9;box-shadow:3px 3px 0 #f3eddb,5px 5px 0 #242320,8px 8px 0 #6b2826;animation:none}
.tier-challenge::after{content:'';position:absolute;inset:0;box-shadow:inset 0 0 18px #ffc27777;opacity:.25;pointer-events:none;animation:comic-edge 3s ease-in-out infinite}
.tier-medium.is-locked{--tier-bg:#ded1a5;--tier-ink:#242320;--tier-soft:#514522;box-shadow:5px 6px 0 var(--print-ink)}
.tier-challenge.is-locked{--tier-bg:#87413b;--tier-ink:#fff9e9;--tier-soft:#fff0d3;box-shadow:5px 6px 0 var(--print-ink);animation:none}
.tier-heading{height:125px}.tier-eyebrow{font-size:12px;font-weight:900;text-transform:uppercase}.tier-eyebrow>span:last-child{font-size:10px;font-weight:800}
.ritual-card h2,.tier-medium h2{font:400 33px/1.04 var(--hand);height:68px;margin:10px 0 8px;color:var(--tier-ink);text-wrap:balance}
.tier-game{height:53px;min-height:53px;border:1.5px solid var(--print-ink);padding:3px 7px;gap:10px;color:#242320;background:#fff9e9;box-shadow:2px 2px 0 #242320;margin-bottom:5px;border-radius:1px}.tier-game:last-child{border-bottom:1.5px solid #242320}.tier-game-copy small{color:#655f52!important}.tier-game:hover{background:#fff2c4}.tier-game.is-complete{background:#d0dec1}.tier-game:focus-visible{outline-color:var(--print-cyan)}
.tier-art{width:43px;flex-basis:43px;height:43px}.tier-game-copy strong{font-weight:900;font-size:14px}.tier-game-copy small{font-size:10px;line-height:13px;color:var(--tier-soft)}
.tier-progress [role=progressbar]{height:6px}.tier-progress i{border:1px solid currentColor;border-radius:0}.tier-progress i.done{background:currentColor}
.tier-game .tier-game-mark{color:#242320}.tier-game .tier-art{background-image:radial-gradient(#24232026 .8px,transparent 1px);background-size:4px 4px}
.tier-footer{display:block;font-size:11px;line-height:15px;min-height:48px;padding-top:10px;color:var(--tier-soft)}
.tier-seal{width:24px;height:24px;flex:none;border:2px solid currentColor;padding:3px;transform:rotate(-5deg)}
.tier-embers{opacity:.7;height:40px}.tier-earned{font-weight:900}
.ritual-navigation{gap:8px}.ritual-navigation>.icon-button{background:var(--paper-face);border:2px solid var(--print-ink);box-shadow:2px 2px 0 var(--print-ink)}
.card-selectors{gap:4px}.card-selectors button{width:auto;min-width:60px;padding:0 5px;font-size:11px;font-weight:900;height:44px}.card-selectors button i{display:none}.card-selectors [aria-pressed=true]{border-bottom:4px solid var(--print-red);color:var(--ink)}
.library-heading{border-top:3px solid var(--print-ink);padding-top:18px}.library-heading h2{font:400 30px/1 var(--hand)}.library-heading>span{font-weight:800}.library-allowance{color:var(--muted)}
.game-grid{gap:12px}.daily-game{min-height:103px;padding:13px 12px;background:var(--paper-face);border:2px solid var(--print-ink);border-radius:2px;box-shadow:3px 3px 0 var(--print-ink);isolation:isolate;overflow:hidden}
.daily-game::before{content:'';position:absolute;inset:0 auto 0 0;width:91px;background-color:var(--comic-second);background-image:radial-gradient(#24232035 .9px,transparent 1px);background-size:5px 5px;border-right:2px solid var(--print-ink);z-index:-1;transform:skewX(-4deg);transform-origin:bottom}
.game-heading{gap:24px;padding-right:28px}.game-art{width:66px;height:64px;flex-basis:66px;filter:none}.game-heading h2{font:400 28px/1.05 var(--hand);color:var(--ink)}.game-heading p{font-size:11px}.game-cadence{font-size:9px;font-weight:850;color:var(--comic-accent)}
.game-dots{right:10px;bottom:18px;gap:4px}.game-dots i{width:7px;height:7px;border:1px solid var(--print-ink);border-radius:0;opacity:1}.game-dots i.complete{background:var(--print-green)}
.game-open>svg{right:9px;top:29px}.game-open{border:0;box-shadow:none}.library-selected{outline:3px solid var(--print-green);outline-offset:3px}
.home-footer{margin-top:20px}.home-footer-row{border-bottom:2px solid var(--print-ink);padding-bottom:12px}
/* GAME CHROME: an inked heading, compact caption HUD, unobscured play area. */
:is(#companion,#second-shift,#domino,#test-room){--ink:#242320;--muted:#655f52;--surface:#fff9e9;--line:#b6ab92;--action:var(--comic-accent);--action-ink:#fff9e9;background:var(--paper);color:var(--ink)}
:is(#companion,#second-shift,#domino,#test-room) .header{border-bottom:3px solid var(--print-ink);padding-bottom:10px;min-height:65px;gap:8px}
:is(#companion,#second-shift,#domino,#test-room) .header h1{font:400 32px/1.05 var(--hand);color:var(--ink)}
.header .brand .eyebrow{font-size:10px;color:var(--muted)}.header .tools{gap:7px}.header .icon-button{color:var(--ink);border:2px solid var(--print-ink);background:var(--paper-face);box-shadow:2px 2px 0 var(--print-ink)}
:is(#companion,#second-shift,#domino,#test-room) .brand h1{border-bottom:5px solid var(--comic-second);padding-bottom:2px}
.puzzle-context{border:0;border-bottom:2px solid var(--print-ink);padding:9px 0;gap:6px;font-size:11px}.puzzle-switch{border:0;box-shadow:none;background:none}.puzzle-context strong{color:var(--comic-accent);font-weight:900}.play-timer{font:900 14px/1 var(--text);color:var(--ink);font-variant-numeric:tabular-nums}
.context-progress{font-size:10px}.puzzle-context .icon-button{width:36px;min-width:36px;min-height:36px;height:36px}
:is(#companion,#second-shift,#test-room) .primary-button{background:var(--print-yellow);color:var(--print-ink);border:2px solid var(--print-ink);border-radius:2px;box-shadow:3px 3px 0 var(--print-ink)}
.lab-status,.comp-status,.dm-status,.ss-status{font-size:12px;line-height:1.5;color:var(--muted)}
.lab-help,.hint-panel,.dm-hint{border:2px solid var(--print-ink);border-radius:2px;background:var(--board-yellow)}
.prototype-meta,.trivia-meta,.tone-meta,.comp-goal{font-size:12px;font-weight:750}
/* DOMINO: ink pips on thick paperboard, unmistakable selected pieces. */
#domino .dm-board{background:var(--paper-face);border:2px solid var(--print-ink);border-radius:2px}
.dm-region-fill{stroke:var(--print-ink);stroke-width:1.5}.dm-grid-seam{stroke:#24232044;stroke-dasharray:2 3}
.dm-bone{fill:#fff9e9;stroke:#242320;stroke-width:2}.dm-bone-base{fill:#242320}.dm-pips{fill:#242320}.dm-pip-shine{display:none}.dm-divider{stroke:#242320;stroke-width:1.4}
.dm-piece.selected .dm-bone{fill:#f7df79;stroke:#242320;stroke-width:3}.dm-ghost .dm-bone{fill:#8dbb9b;opacity:.65}
#domino .dm-bone{fill:#fff5db;stroke:#242320;stroke-width:2}#domino .dm-bone-base{fill:#242320}#domino .dm-pips{fill:#242320}#domino .dm-divider{stroke:#242320;stroke-width:1.5}#domino .dm-piece:not(.dm-ghost) .dm-bone{filter:none}
#domino .dm-piece.selected .dm-bone{fill:#edc348;stroke:#242320;stroke-width:3}#domino .dm-piece.selected .dm-bone-base{fill:#242320}#domino .dm-region-fill{fill:var(--region-fill);stroke:#242320;stroke-width:1.5}#domino .dm-grid-seam{stroke:#24232055;stroke-dasharray:2 3}
#domino .dm-rule{border:2px solid var(--print-ink);border-radius:2px;box-shadow:2px 2px 0 var(--print-ink);background:var(--paper-face)}.dm-rule.complete{background:var(--board-mint)!important}.dm-rule.conflict{background:var(--board-pink)!important}
.dm-rule-letter{border-radius:1px;font-weight:900}.dm-rack button{border-radius:2px;border:2px solid var(--print-ink);background:var(--paper-face)}
/* SHELF LIFE: illustrated collectibles and printed shelf labels. */
#companion[data-game=shelf] :is(.bank-item,.target-slot){border:2px solid var(--print-ink);border-radius:2px;background:var(--piece-face);box-shadow:2px 3px 0 #242320}
#companion[data-game=shelf] .target-slot:not(.occupied){background:#e3dec8;box-shadow:inset 0 -4px 0 #b8a582}
#companion[data-game=shelf] .shelf-position{border-bottom:3px solid var(--print-ink)}
#companion .shelf-clues li{border-bottom:1px dashed var(--line);font-size:13px;line-height:1.6;padding:9px 0}.clue-state{border:2px solid var(--print-ink)!important;border-radius:1px!important}
#companion .comp-bank{padding-block:12px;border-top:2px solid var(--print-ink)}
/* Clues get the whole workspace, rather than competing with a 20-piece tray. */
.shelf-navigation{display:flex;gap:8px;flex:none;padding:4px 4px 10px}
.shelf-navigation button{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-height:44px;border:2px solid var(--print-ink);border-radius:2px;background:var(--surface);color:var(--ink);font-weight:700}
.shelf-navigation button svg{width:18px;height:18px}
.shelf-navigation button[aria-pressed=true]{background:var(--comic-yellow,#f0cb58);color:#242320;box-shadow:2px 2px 0 var(--print-ink)}
.shelf-navigation button span{font-size:12px;font-variant-numeric:tabular-nums}
#companion[data-game=shelf][data-shelf-view=board] .shelf-clues,
#companion[data-game=shelf][data-shelf-view=clues] :is(.shelf-board,.comp-bank,.comp-footer){display:none}
#companion[data-game=shelf][data-shelf-view=clues] .comp-stage{touch-action:pan-y;scrollbar-gutter:stable;padding:4px 10px 24px;scroll-behavior:auto}
#companion[data-game=shelf] .shelf-clues{flex:none;margin:0;padding-bottom:20px}
#companion[data-game=shelf] .shelf-clues li{font-size:14px;padding:14px 0;align-items:flex-start}
#companion[data-game=shelf] .shelf-clues .clue-state{margin-top:3px}
@media(max-height:740px){
 #companion[data-game=shelf] .shelf-position>span{padding:0;line-height:12px}
}
@media(max-height:620px){
 #companion[data-game=shelf] .comp-goal{display:none}
 #companion[data-game=shelf] .header{padding-bottom:4px}
}
#companion[data-game=shelf][data-shelf-view=board] .comp-stage{overflow:hidden;justify-content:center;padding:4px;flex:none;height:var(--shelf-stage-height,260px);order:2}
#companion[data-game=shelf]{padding-bottom:0}
#companion[data-game=shelf] .shelf-navigation{order:1}
#companion[data-game=shelf][data-shelf-view=clues] .comp-stage{order:2}
#companion[data-game=shelf] .comp-goal{display:none}
#companion[data-game=shelf] .shelf-board{width:max-content;max-width:100%;align-self:center;grid-template-columns:repeat(var(--items),var(--shelf-cell,44px));gap:4px;padding:4px;flex:none}
#companion[data-game=shelf] .shelf-position{display:grid;grid-template-rows:var(--shelf-cell,44px) 12px;border-bottom-width:3px}
#companion[data-game=shelf] .shelf-position>.target-slot{height:var(--shelf-cell,44px);width:var(--shelf-cell,44px);min-height:0;aspect-ratio:1;padding:2px}
#companion[data-game=shelf] .shelf-position>span{padding:0;line-height:12px;font-size:10px}
#companion[data-game=shelf] .comp-bank{flex:1;order:4;height:auto;min-height:0;grid-auto-flow:row;grid-template-columns:repeat(var(--bank-columns),minmax(0,1fr));grid-template-rows:none;grid-auto-columns:auto;grid-auto-rows:56px;align-content:start;gap:8px;padding:8px 6px calc(12px + env(safe-area-inset-bottom));overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;scrollbar-gutter:stable}
#companion[data-game=shelf] .comp-bank .bank-item{height:56px;min-height:44px;aspect-ratio:auto;touch-action:pan-y}
#companion[data-game=shelf][data-shelf-view=board] .comp-footer{height:24px;min-height:24px;order:3;display:flex;justify-content:space-between;padding:2px 4px}
#companion[data-game=shelf] .comp-actions{min-height:0}
#companion[data-game=shelf] .shelf-navigation [data-comp-remove]{flex:0 0 44px;width:44px;gap:0}
#companion[data-game=shelf] .shelf-navigation button{gap:5px;font-size:13px;padding-inline:4px}
#companion[data-game=shelf][data-shelf-extreme=true] .shelf-position{position:relative;grid-template-rows:var(--shelf-cell,44px);border:0}
#companion[data-game=shelf][data-shelf-extreme=true] .shelf-position>span{position:absolute;bottom:2px;left:3px;pointer-events:none;font:700 8px/10px system-ui;color:var(--print-ink);background:var(--paper-face);padding-inline:1px}
#companion[data-game=shelf][data-shelf-extreme=true] .target-slot{box-shadow:1px 2px 0 var(--print-ink)}
#companion[data-game=shelf][data-shelf-extreme=true] [data-context-pack]{color:var(--print-red);font-weight:900}
#companion[data-game=shelf] .puzzle-switch{flex-wrap:wrap;row-gap:0}
#companion .bank-item.used{background:transparent;box-shadow:none;opacity:.35;border-style:dashed}
#companion[data-game=shelf] .shelf-position:nth-child(n) .target-slot:not(.occupied){background:#e3dec8}
/* EQUAL: operator plaques remain readable at the smallest supported width. */
#companion[data-game=equal] .equation{grid-template-columns:minmax(0,1fr) 46px minmax(0,1fr) 18px 58px;gap:7px;border-bottom:2px solid var(--print-ink)}
#companion[data-game=equal] .math-operation{width:46px;border-radius:1px;background:var(--print-yellow);transform:rotate(-2deg)}
#companion[data-game=equal] .equation .target-slot,#companion[data-game=equal] .bank-item{border-radius:2px;border:2px solid var(--print-ink);background:var(--piece-face)}
#companion[data-game=equal] .equation-target{font-weight:900;font-size:27px}.math-operation small{font-size:9px}.equation.satisfied{background:#39765312}
/* PATCHWORK: actual patterned paper faces, code-drawn matching symbols. */
#companion[data-game=patchwork] .patch-board .target-slot,#companion[data-game=patchwork] .bank-item{border:2px solid var(--print-ink);border-radius:1px;box-shadow:2px 3px 0 #242320}
#companion[data-game=patchwork] .patch-target>svg{border:3px solid var(--print-ink);border-radius:0;background:#fff9e9;box-shadow:3px 4px 0 var(--print-ink)}
#companion[data-game=patchwork] .patch-target figcaption{font:400 21px var(--hand)}
/* SECOND SHIFT: a shipping-floor adventure, not a dark dashboard. */
#second-shift .ss-stage{background:#d4e2de;border:3px solid var(--print-ink);border-radius:2px;background-image:radial-gradient(#287f9920 1px,transparent 1px);background-size:6px 6px}
#second-shift .ss-studio-tile{fill:#f4efd9;stroke:#242320;stroke-width:1.6}
#second-shift .ss-machine-name{font-size:6px;font-weight:900;fill:#242320}#second-shift .ss-actor-label{font-size:7px;font-weight:900;fill:#242320}
#second-shift .ss-target-outline{fill:transparent;stroke:transparent}#second-shift .ss-station.in-reach .ss-target-outline{stroke:#b44422;stroke-width:2;stroke-dasharray:3 2}
#second-shift .ss-beat{border:1px solid #242320;background:#eee5cb;border-radius:1px}#second-shift .ss-beat.filled{background:#287f99;color:#fff9e9}#second-shift .ss-beat.next{border:2px solid #242320;background:#edc348}
#second-shift .ss-log>span{background:#c7dce1;color:#242320;border:2px solid #242320}#second-shift .ss-log>span.you{background:#d0dec1;border-color:#242320}
#second-shift .ss-pad .icon-button{background:#fff9e9;color:#242320;border:2px solid #242320;box-shadow:2px 3px 0 #242320;border-radius:2px}
#second-shift .ss-command .primary-button{background:#edc348;color:#242320;border:2px solid #242320;border-radius:2px;box-shadow:3px 3px 0 #242320}
#second-shift .ss-next-mark{stroke:#287f99;stroke-width:2}
#second-shift .icon-button,#second-shift .puzzle-context :is(strong,.play-timer){color:#242320}
#second-shift .header h1{font-size:29px}
.tier-seal[hidden]{display:none!important}.tier-footer .tier-seal{display:none}.is-locked .tier-footer{padding-left:32px}.is-locked .tier-footer .tier-seal{display:inline-flex;align-items:center;justify-content:center;position:absolute;left:0;top:10px}
/* COMMON LOGIC GRID: exact boundaries, tangible palettes, flat clear clues. */
#test-room :is(.pk-grid,.pipe-board,.pk-network){border:2px solid var(--print-ink);border-radius:2px;background:var(--paper-face)}
#test-room .pk-cell{color:#242320;box-shadow:inset 0 0 0 .5px #867d6888}
#test-room .pk-cell:disabled{opacity:1;box-shadow:inset 0 0 0 .5px #867d6888!important}
#test-room .pk-cell.conflict{background:#edc8bf;box-shadow:inset 0 0 0 2px #b12929}
#test-room .pk-palette button{border:2px solid #242320;border-radius:2px;box-shadow:2px 3px 0 #242320;background:#fff9e9;color:#242320}
#test-room .pk-palette button[aria-pressed=true]{outline:3px solid var(--comic-accent);outline-offset:2px;background:#f5df92}
#test-room .pk-tools{border-top:2px solid var(--print-ink)}
/* TRIVIA: quiz caption and four printed answer strips. */
#test-room .trivia-question{font:850 23px/1.35 var(--text);margin-block:20px;color:var(--ink)}
#test-room .trivia-answers button{border:2px solid var(--print-ink);border-radius:2px;background:var(--paper-face);box-shadow:3px 3px 0 var(--print-ink);min-height:60px;font-weight:750;padding:12px;gap:12px}
#test-room .trivia-answers button>span{background:var(--print-yellow);color:#242320;border:2px solid #242320;border-radius:1px;font-weight:900}
#test-room .trivia-answers .correct{background:#d0dec1;opacity:1}#test-room .trivia-answers .incorrect{background:#edc8bf;opacity:1;border-style:dashed}
.trivia-explanation{border-left:4px solid var(--print-ink);padding:12px;background:var(--board-yellow)}.question-progress i{border-radius:0;border:1px solid var(--print-ink)}
/* NOTWOF: letterpress, with vowel cost retained. */
#test-room [data-test-game=phrase] .phrase-board span{border:2px solid #242320;border-radius:1px;background:#dfcbd1;color:#242320;box-shadow:1px 2px 0 #242320}
#test-room [data-test-game=phrase] .phrase-board span.revealed{background:#fff9e9}
#test-room [data-test-game=phrase] .lab-keyboard{gap:6px}#test-room [data-test-game=phrase] .lab-keyboard button{background:#fff9e9;color:#242320;border:2px solid #242320;border-radius:2px;font-weight:900;box-shadow:1px 2px 0 #242320}
#test-room [data-test-game=phrase] .lab-keyboard .is-vowel:not(:disabled){background:#edc348}.notwof-score strong{font-family:var(--hand);font-weight:400;font-size:42px}.notwof-category{font-weight:850}
/* TRUE HUE: never tint, texture or filter the color-critical canvas/swatches. */
#test-room .tone-scene{border:3px solid var(--print-ink);border-radius:2px;box-shadow:4px 4px 0 var(--print-ink);background:#fff}
.tone-scene canvas,.tone-compare i{filter:none!important;opacity:1!important;mix-blend-mode:normal!important}
.tone-sliders label{padding:12px 0;border-bottom:1px solid var(--line)}.tone-sliders label>span{font-weight:850;font-size:13px}.tone-sliders output{font-variant-numeric:tabular-nums}
.tone-sliders input{accent-color:var(--print-cyan);min-height:36px}.tone-result strong{font-family:var(--hand);font-weight:400}.tone-photo-tabs button{border-radius:2px;border:2px solid var(--print-ink)}
/* PIPES: inked hardware and moving printed water. */
#test-room .pipe-cell{border-radius:0;background:#e3e7d6;border-color:#9cae9d;box-shadow:inset 0 0 0 .5px #24232033}
#test-room .pipe-rim{stroke:#242320;stroke-width:19}#test-room .pipe-interior{stroke:#f5edd3;stroke-width:12}#test-room .pipe-joint{fill:#f5edd3;stroke:#242320;stroke-width:2}
#test-room .wet .pipe-interior{stroke:#278c9b}#test-room .wet .pipe-joint{fill:#278c9b}#test-room .pipe-current{stroke:#d5eef1;stroke-width:2;stroke-dasharray:3 10;opacity:0;fill:none}#test-room .wet .pipe-current{opacity:.8;animation:comic-water 1.4s linear infinite}
#test-room .pipe-inlet{fill:#edc348;stroke:#242320;stroke-width:2}#test-room .pipe-cell.leaking{box-shadow:inset 0 0 0 2px #b12929}
/* TOWERS: colored printed territories with unmistakable placed/excluded marks. */
#test-room .board-region-face{stroke:#242320;stroke-width:1.5}#test-room .tower-cross{color:#242320;opacity:.7}#test-room .tower-cross::before,#test-room .tower-cross::after{background:#242320}
#test-room .tower-cell .tower-piece{filter:none}.tower-cell:focus-visible{outline-offset:-4px}
/* ORBIT: pale star charts around vivid pulp-science planets. */
#test-room .orbit-board{background:#d5e0df}#test-room .orbit-board .pk-cell{background:#d5e0df}#test-room .orbit-board .orbit-highlight{background:#f2dfa2}#test-room .orbit-board .pk-cell.conflict{background:#edc8bf}
.planet-ledger>div{border-bottom:1px dashed var(--line);padding:5px 0}.planet-ledger strong{font-weight:900}.planet-ledger i{border:1px solid #242320}
/* STACKERZ: dimensional inked numerals, architectural clue plaques. */
#test-room .pk-axis span:not(:empty){background:#edc348;color:#242320;border:2px solid #242320;border-radius:1px;font-weight:900;box-shadow:2px 2px 0 #242320}
#test-room .pk-axis:is(.left,.right) span:not(:empty){background:#c7dce1}.height-piece svg{width:100%;height:100%;overflow:visible}.height-piece{width:100%;height:100%;display:grid;place-items:center}
#test-room [data-test-game=stackerz] .pk-axis .skyline-clue:not(.empty){border:2px solid #242320;border-radius:1px;background:#edc348;color:#242320;box-shadow:2px 2px 0 #242320}
#test-room [data-test-game=stackerz] .pk-grid{border:2px solid #242320;border-radius:1px}.height-piece{max-width:none;max-height:none}
/* BRIDGES: timber spans, inked stone outposts and readable totals. */
#test-room .bridges-board{background:#cddfdc;background-image:radial-gradient(#278c9b33 .8px,transparent 1px);background-size:8px 8px}
.castle-face{fill:#fff0c3;stroke:#242320;stroke-width:2}.castle-depth{fill:#242320}.castle-stone{stroke:#7f7051;stroke-width:1}.bridge-guide{stroke:#537e8099;stroke-width:2}
#test-room .bridge-node text{fill:#242320;font-weight:900}#test-room .bridge-node.complete .castle-face{fill:#b8d49e;stroke:#242320}#test-room .bridge-node.conflict .castle-face{fill:#e9a998;stroke:#242320}
/* SIGNALS: clean coverage fields with full-cell clue walls. */
#test-room .signal-number{background:#fff1c8;color:#b12929;border:3px solid #242320;font-weight:900;border-radius:0}#test-room .signal-wall.satisfied .signal-number{color:#236139}#test-room .signal-number:empty{background:#343e41}
#test-room .pk-cell.signal-covered{background:#d0dec1}.signal-dot{background:#397653;width:7px;height:7px}
/* LOOP: spare ink geometry; selection never moves connection endpoints. */
#test-room .loop-board{background:#fff9e9}.loop-clue-face{fill:#f1dfa0;stroke:#242320;stroke-width:1.5}.loop-clue-base{fill:#242320}.loop-clue text{fill:#242320;font-weight:900}.loop-clue.complete .loop-clue-face{fill:#d0dec1}.loop-line.placed{stroke:#ae332d;stroke-width:6;stroke-dasharray:none}
/* DISTRICTS: animal insignia and colored map regions remain distinguishable. */
#test-room .district-center{border:2px solid #242320!important}.district-owned{background:color-mix(in srgb,var(--district) 30%,#fff9e9)}#test-room [data-test-game=districts] .pk-palette button{border-radius:1px;border:2px solid #242320}
/* LASER: technical comic panel, precise mirrors and blue electrical beam. */
#test-room .laser-board,#test-room .laser-board .pk-cell{background:#d4e1de}#test-room .laser-board .laser-mirror{background:#eae3c9}#test-room .laser-board .pk-cell:disabled{box-shadow:inset 0 0 0 .5px #718f9188!important}
.optic-base{fill:#f8eed3;stroke:#242320;stroke-width:2;rx:2}.laser-target{fill:#fff9e9;stroke:#242320;stroke-width:3}.target-core{fill:#b83732;stroke:#242320;stroke-width:2}#test-room .laser-lit .laser-target{fill:#edc348;stroke:#242320}.laser-lit .target-core{fill:#278c9b}.target-order{fill:#242320}
.beam-halo{stroke:#1977b1;stroke-width:9;opacity:.25;filter:none}.beam-core{stroke:#1489c5;stroke-width:3}.beam-electric{stroke:#eafaff;stroke-width:1.3;filter:none}
#test-room .laser-mirror .optic-base{fill:#f8eed3;stroke:#242320;stroke-width:2;rx:2}#test-room .laser-target{fill:#fff0bc;stroke:#242320;stroke-width:3}#test-room .target-core{fill:#b83732;stroke:#242320;stroke-width:2}#test-room .laser-lit .target-core{fill:#278c9b;stroke:#242320;filter:none}
/* SHARED SHEETS: account, instructions, settings, pause and statistics. */
dialog,#settings-dialog,#puzzle-sheet,#access-dialog,#pause-menu,#test-help,#success-dialog{background:var(--paper-face);color:var(--ink);border:3px solid var(--print-ink);border-radius:3px;box-shadow:6px 7px 0 #242320;max-width:calc(100% - 28px);background-image:none}
dialog::backdrop,#success-dialog::backdrop{background:#24232099;backdrop-filter:none}
dialog h2,#pause-menu h2,.statistics-header h2{font:400 32px/1.1 var(--hand);color:var(--ink)}
dialog[open]{animation:comic-panel-in 220ms ease-out}.access-heading,.sheet-heading{border-bottom:2px solid var(--print-ink);padding-bottom:12px;margin-bottom:12px}
.sheet-choice{border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;padding-block:16px}.choice-copy strong{font-size:18px;font-weight:900}.difficulty-symbol i{border-radius:0;border-color:var(--print-ink)}
.sheet-choice.complete .choice-mark{color:var(--print-green)}.sheet-choice[aria-current=true]{background:#edc34833}
.settings-row{border-bottom:1px solid var(--line)}input[type=checkbox]{accent-color:var(--print-green)}
.stat-metric,.statistics-times,.stats-details{border:2px solid var(--print-ink);border-radius:2px;background:var(--paper-face);box-shadow:none}.stat-metric strong{font:400 35px/1 var(--hand)}
.statistics-filters button,.stats-tabs button{border-radius:1px}.statistics-filters button[aria-pressed=true],.stats-tabs button[aria-selected=true]{background:var(--print-yellow);color:var(--print-ink)}
.stats-game-list article,.stats-history article,.stats-achievements>div{border-radius:1px;box-shadow:none}.stats-game-list h3{font:400 24px/1 var(--hand)}
#pause-menu nav button{border-radius:1px;font-weight:800;color:var(--ink)}
#success-dialog h2{font:400 55px/1 var(--hand);color:#fff9e9;-webkit-text-stroke:1px #242320;text-shadow:3px 3px 0 #242320}
.success-burst::before{background:#edc348}.success-burst{animation:comic-stamp 300ms ease-out}.success-now{background:#242320;color:#fff9e9}.success-now strong{font-family:var(--text)}.success-actions button{border-radius:2px}.success-actions .success-share{background:#edc348}
.tier-celebration{border:3px solid #242320;border-radius:2px;background:#edc348;color:#242320;box-shadow:4px 4px 0 #242320}
.play-mode-picker{display:flex;margin:16px 0;gap:8px}.play-mode-picker button{flex:1;min-height:46px;background:var(--paper-face);color:#242320;border:2px solid #242320;font-weight:800}.play-mode-picker button[aria-pressed=true]{background:#edc348;box-shadow:3px 3px 0 #242320}
.continuous-mode #home :is(#daily-experience,.library-heading,.library-allowance,.game-grid,.ritual-heading,.ritual-meter,.practice-entry,[data-practice-choices],[data-membership],[data-reset-time]){display:none!important}
.continuous-library{display:grid;gap:18px;padding:8px 0 24px}.continuous-library article{border-bottom:2px solid #242320;padding-bottom:18px}
.continuous-title{display:flex;align-items:center;gap:14px}.continuous-title>span{width:56px;height:56px;flex:none}.continuous-title svg{width:100%;height:100%}.continuous-title h2{font:400 30px/1.15 var(--hand);margin:8px 0}
.continuous-packs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}.continuous-packs button{background:#fff6da;color:#242320;border:2px solid #242320;border-radius:2px;min-height:62px;box-shadow:2px 2px 0 #242320;padding:8px 3px}.continuous-packs strong,.continuous-packs small{display:block}.continuous-packs small{font-size:11px;margin-top:5px}.continuous-packs button:nth-child(1){background:#d3e3bc}.continuous-packs button:nth-child(2){background:#f0df9f}.continuous-packs button:nth-child(3){background:#ebc0b4}
.continuous-picker{width:380px;padding:20px}.continuous-picker header{display:flex;align-items:center;justify-content:space-between;gap:12px}.continuous-picker h2{font-size:28px}.continuous-picker button{min-height:44px}.continuous-picker label{display:grid;grid-template-columns:1fr 1fr;align-items:center;margin:16px 0;gap:12px}.continuous-picker select,.continuous-picker input{width:100%;min-height:44px;font:inherit;border:2px solid #242320;padding:6px;background:#fff9e9;color:#242320}.continuous-picker .primary-button{width:100%}
/* Secondary tools stay available in the shared pause sheet. */
.header .tools .legacy-game-tool{display:none!important}
.header .tools{flex-shrink:0;gap:5px}
.header .tools .icon-button{width:38px;min-width:38px;height:40px}
.common-help{width:390px;padding:24px}.common-help p{line-height:1.6}.common-help button{min-height:44px;width:100%;background:#edc348;border:2px solid #242320;font-weight:800}
[data-dm-next],[data-comp-finish]{display:none!important}.ss-finish>div:first-child,.ss-finish>[data-ss-next]{display:none}
.success-actions .success-next-game{background:#c7dce1;color:#242320}
.success-averages small{display:block}.success-actions button{min-height:44px}
.dm-ledger{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)}
.dm-inline-rule rect{fill:#fff6d9;stroke:#242320;stroke-width:1.2}
.dm-inline-rule text{font:800 10px Notebook,sans-serif;fill:#242320}
.dm-inline-rule.complete rect,.dm-inline-rule.satisfied rect{fill:#bed49f}
.dm-inline-rule.conflict rect{fill:#efb2a0}
#companion[data-game=equal] .comp-stage{overflow:hidden;min-height:0;padding:0}
#companion[data-game=equal] .comp-goal{display:none}
#companion[data-game=equal] .equations{width:100%;height:100%;margin:0;padding:6px 0;gap:6px;justify-content:center}
#companion[data-game=equal] .equation{height:var(--equation-height,60px);grid-template-rows:minmax(0,1fr);min-height:0;flex:none;padding:3px 0;box-sizing:border-box}
#companion[data-game=equal] .equation .target-slot{height:100%;min-height:0;padding:0}
#companion[data-game=equal] .math-operation{height:100%;min-height:0;padding:0;font-size:25px}
#companion[data-game=equal] .math-operation small{font-size:8px;line-height:10px}
#companion[data-game=equal] .math-operation b{font-size:25px;line-height:27px}
#companion[data-game=equal] .equation-target{font-size:24px;height:100%;min-height:0}
#companion[data-game=equal] .number-value{line-height:1}
#companion[data-game=equal] .bank-item{height:44px;min-height:44px}
#companion[data-game=equal] .comp-bank{gap:6px}
@media(max-height:650px){#companion[data-game=equal] .math-operation b{font-size:22px;line-height:22px}#companion[data-game=equal] .math-operation small{font-size:8px;line-height:8px}#companion[data-game=equal] .target-slot .number-art{font-size:24px}}
/* Time echo: two heroes, a crystal and a portal. */
#second-shift .ss-stage{background:#e9e7d6;background-image:radial-gradient(#24232020 .7px,transparent 1px);background-size:7px 7px;border:2px solid #242320;border-radius:2px}
#second-shift .ss-studio-tile{fill:#fff7df;stroke:#242320;stroke-width:1.3}
#second-shift .ss-target-outline{fill:#edc34822;stroke:#242320;stroke-width:1;stroke-dasharray:3 3}
#second-shift .ss-station.in-reach .ss-target-outline{fill:#edc34866;stroke:#242320;stroke-width:2;stroke-dasharray:none}
#second-shift .ss-machine-name{font:800 8px Notebook,sans-serif;fill:#242320}
#second-shift .ss-actor-label{font:900 9px Notebook,sans-serif;fill:#242320;paint-order:stroke;stroke:#fff9e9;stroke-width:3px}
#second-shift .ss-next-mark{stroke:#278c9b;stroke-width:2;stroke-dasharray:4 3;fill:#278c9b15}
/* Laser: illustrated optics, readable mirror faces and target lamps. */
#test-room .laser-board{border:3px solid #242320;box-shadow:4px 4px 0 #242320;border-radius:2px}
#test-room .laser-board .pk-cell{background:#fff5db;border-radius:0}
#test-room .laser-board .laser-mirror{background:#e5dcbd;cursor:pointer}
#test-room .laser-mirror:active{background:#edc348}
#test-room .laser-board .pk-cell:disabled{opacity:1;box-shadow:inset 0 0 0 .5px #24232033!important}
#test-room .laser-target{fill:#f5dab7;stroke:#242320;stroke-width:3}
#test-room .target-core{fill:#dfaa91;stroke:#242320;stroke-width:2}
#test-room .laser-lit .laser-target{fill:#edc348}
#test-room .laser-lit .target-core{fill:#86b985}
#test-room .target-check{opacity:0}#test-room .laser-lit .target-check{opacity:1}
#test-room .beam-halo{stroke:#287fa6;stroke-width:10;opacity:.22}
#test-room .beam-core{stroke:#147eb6;stroke-width:4}
#test-room .beam-electric{stroke:#e9fbff;stroke-width:1.5}
#test-room .laser-fire{background:#edc348;color:#242320;border:2px solid #242320;box-shadow:3px 3px 0 #242320}
/* Bounded, pointer-transparent effects; all visual timing is replaceable. */
.comic-effects{position:fixed;inset:0;pointer-events:none;z-index:99;overflow:hidden}.comic-particle{position:absolute;width:9px;height:9px;background:var(--particle);border:1px solid #242320;clip-path:polygon(50% 0,61% 34%,100% 38%,71% 61%,80% 100%,50% 77%,19% 100%,29% 61%,0 38%,39% 34%)}
.comic-victory{position:fixed;left:10%;right:10%;top:36%;z-index:98;text-align:center;pointer-events:none;font:400 65px/1.2 var(--hand);color:#fff9e9;-webkit-text-stroke:1px #242320;text-shadow:4px 4px #242320;background:#edc348;padding:24px 10px;clip-path:polygon(0 20%,20% 24%,13% 0,39% 15%,58% 0,67% 17%,100% 9%,90% 46%,100% 80%,78% 77%,81% 100%,53% 84%,27% 100%,22% 80%,0 94%,8% 53%)}
.bank-item.selected,.pk-palette button[aria-pressed=true]{translate:0 -2px;outline:3px solid var(--comic-accent);outline-offset:2px}.target-slot.drop-target{outline:3px dashed var(--comic-accent);outline-offset:-3px;background:#f1dfa0!important}
.hinted{outline:3px dashed var(--comic-accent);outline-offset:2px}
.paper-confetti{position:fixed;left:50%;top:40%;width:min(500px,90vw);height:240px;pointer-events:none;z-index:98;transform:translateX(-50%);overflow:hidden}.paper-confetti i{position:absolute;left:var(--x);width:8px;height:12px;background:#edc348;border:1px solid #242320;animation:comic-confetti 1300ms calc(var(--n)*25ms) both}.paper-confetti i:nth-child(3n){background:#c83b35}.paper-confetti i:nth-child(3n+1){background:#278c9b}
.page-unsealing .tier-seal{animation:comic-unseal 600ms both}.page-unsealing .tier-games{animation:comic-panel-in 450ms both}
@keyframes comic-panel-in{from{opacity:.2;transform:translateY(10px) rotate(-.4deg)}to{opacity:1;transform:none}}
@keyframes comic-stamp{from{transform:scale(1.2) rotate(-5deg);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes comic-edge{50%{opacity:.8}}
@keyframes comic-water{to{stroke-dashoffset:-26}}
@keyframes comic-confetti{from{opacity:0;transform:translateY(-20px) rotate(0)}15%{opacity:1}to{opacity:0;transform:translateY(220px) rotate(220deg)}}
@keyframes comic-unseal{to{transform:translateY(-12px) rotate(-25deg);opacity:0}}
@media(min-width:900px){#home{max-width:900px}.ritual-card{height:445px}.home-header{max-width:660px}.game-grid{gap:14px}.comic-victory{left:calc(50% - 230px);right:auto;width:460px}}
@media(max-width:390px){.home-header h1{font-size:58px}.ritual-card h2,.tier-medium h2{font-size:30px}.card-selectors button{min-width:56px;padding-inline:3px}.header .tools{gap:5px}:is(#companion,#second-shift,#domino,#test-room) .header h1{font-size:27px}.header .icon-button{width:36px;min-width:36px}.game-heading h2{font-size:26px}#companion[data-game=equal] .equation{gap:5px;grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr) 16px 58px}#companion[data-game=equal] .math-operation{width:42px}}
@media(max-height:750px){.success-burst{height:95px}#success-dialog{padding:16px}.success-now{padding-block:10px}}
@media(prefers-color-scheme:dark){:root{--paper:#292c2b;--paper-face:#f0e5cb;--page:#292c2b;--surface:#f0e5cb;--ink:#f6edd8;--muted:#c5bdaa;--line:#827c6d;--action:#edc348;--action-ink:#242320}body{background-image:radial-gradient(#f0e5cb10 .6px,transparent .8px)}.daily-game,dialog,#settings-dialog,#puzzle-sheet,#access-dialog,#pause-menu,#test-help,#success-dialog{--ink:#242320;--muted:#655f52;color:#242320}.home-header{border-color:#f0e5cb}.home-header .icon-button,.home-header .icon-button svg{color:#242320}.home-header h1{color:#edc348;text-shadow:3px 3px #111}.library-heading{border-color:#f0e5cb}.ritual-navigation>.icon-button{color:#242320}.card-selectors button{color:#f6edd8}:is(#companion,#second-shift,#domino,#test-room){--paper:#e9dfc7;--paper-face:#fff5dc;--ink:#242320;--muted:#655f52;--line:#a2977c;--surface:#fff5dc;background:var(--paper);color:var(--ink)}.daily-game{--paper-face:#f0e5cb}.stats-tabs button{color:#242320}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:0ms!important;scroll-behavior:auto!important}.tier-challenge::after{animation:none;opacity:.35}.comic-effects,.comic-victory,.paper-confetti{display:none}.bank-item.selected,.pk-palette button[aria-pressed=true]{translate:none}.page-unsealing .tier-seal{display:none}}
