:root{color-scheme:dark;--bg:#111412;--surface:#191d19;--line:#30372c;--muted:#a1a99a;--text:#edf0e6;--lime:#d4ff63}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",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(--lime);outline-offset:5px}button{border:0}a{color:inherit;text-decoration:none}.shell{max-width:1280px;margin:auto;padding:0 48px}header{height:104px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;font-size:32px;font-weight:650;letter-spacing:-1px}.brand-symbol{color:var(--lime);font-size:42px;line-height:1}.brand-caption{font-size:12px;letter-spacing:2px;color:var(--muted);margin-left:14px;align-self:end;margin-bottom:8px}.header-actions{display:flex;align-items:center;gap:24px}.quiet{background:none;color:#bec4b8;font-size:14px}.icon-button{height:40px;width:40px;background:#20251f;border:1px solid var(--line);border-radius:50%;font-size:20px}.icon-button[aria-pressed=true]{color:var(--lime);border-color:#697c38}.title-row{display:flex;align-items:end;justify-content:space-between;margin:45px 0 36px}.eyebrow{color:var(--muted);font-size:12px;letter-spacing:2px;margin:0 0 18px}h1{font-size:clamp(36px,4.6vw,62px);font-weight:500;letter-spacing:-2.8px;line-height:1.08;margin:0}h1 span{color:var(--lime)}.title-note{font-size:14px;color:var(--muted);padding-bottom:5px}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:54px;align-items:start}.game-panel{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:22px;min-width:0;box-shadow:0 16px 50px #0002}.game-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.levels{display:flex;background:#111510;padding:4px;border-radius:8px;gap:3px}.levels button{font-size:14px;background:none;color:var(--muted);padding:8px 15px;border-radius:5px;transition:background .2s,color .2s}.levels button.active{background:var(--lime);color:#1c2710;font-weight:600}.restart{background:none;color:var(--muted);font-size:24px;padding:6px}.restart span{font-size:14px;margin-left:4px}.restart:hover{color:var(--lime)}.instrument-row{display:flex;justify-content:space-between;align-items:center;padding:23px 4px 24px}.meter span{display:block;font-size:12px;letter-spacing:1.7px;color:var(--muted)}.meter strong{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:30px;font-weight:400;letter-spacing:-1px}.time{text-align:right}.status-badge{color:#afc28e;font-size:12px;text-align:center;background:#252e20;border:1px solid #38452b;border-radius:20px;padding:6px 12px;margin:0 8px}.board-scroll{overflow:auto;border-radius:9px;background:#10140f;padding:12px;scrollbar-width:thin;scrollbar-color:#53613c #10140f}.board-wrap{position:relative;margin:auto;width:max-content;max-width:none}canvas{display:block;touch-action:pan-x pan-y;border-radius:4px;user-select:none}.board-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:19px 2px 0;color:var(--muted);font-size:12px}.key{border:1px solid #42493b;border-radius:4px;padding:2px 5px;margin-right:4px;font-size:11px}.board-footer button{font-size:13px;border:1px solid #434c38;background:#252c21;padding:6px 11px;border-radius:6px}.board-footer button[aria-pressed=true]{background:var(--lime);color:#18210c;border-color:var(--lime)}.flag-icon{font-size:17px;margin-right:3px}aside{padding-top:5px}.aside-number{font-family:ui-monospace,monospace;font-size:12px;letter-spacing:2px;color:var(--lime);margin-bottom:22px}aside h2{font-size:26px;font-weight:450;line-height:1.3;letter-spacing:-.7px;margin:0 0 31px}.rule{display:flex;gap:17px;margin-bottom:26px}.rule>span{font-family:ui-monospace,monospace;font-size:12px;color:#7e896f;padding-top:4px}.rule h3{font-size:16px;font-weight:550;margin:0 0 6px}.rule p{font-size:14px;line-height:1.65;margin:0;color:var(--muted)}.safe-note{border-top:1px solid var(--line);padding-top:22px;display:flex;gap:14px;align-items:center}.safe-note>span{font-size:32px;color:var(--lime)}.safe-note p{font-size:13px;color:var(--muted);margin:0}footer{display:flex;justify-content:space-between;gap:20px;margin-top:50px;padding:25px 0 32px;border-top:1px solid var(--line);font-size:12px;color:#939d88}.footer-dot{color:#536249;margin:0 10px}.result{position:absolute;inset:0;display:grid;place-items:center;background:#111610b8;backdrop-filter:blur(3px);border-radius:6px}.result[hidden]{display:none}.result-card{text-align:center;background:#20271a;border:1px solid #5f713d;border-radius:16px;box-shadow:0 20px 70px #0008;padding:28px;max-width:90%;animation:appear .4s both}.result-card>span{font-size:40px;color:var(--lime)}.result-card h2{font-size:29px;font-weight:500;margin:8px 0}.result-card p{font-size:14px;color:#bbc5b0;max-width:220px;margin:0 auto 23px}.result-card button{padding:11px 25px;background:var(--lime);color:#1b260d;border-radius:7px;font-size:15px;font-weight:600}.result.lost .result-card{border-color:#9a6350}.result.lost .result-card>span{color:#ff997c}dialog{background:#20251f;color:var(--text);border:1px solid #4a553e;border-radius:18px;padding:36px;max-width:540px;width:calc(100% - 32px)}dialog::backdrop{background:#050a06bd;backdrop-filter:blur(5px)}dialog h2{font-size:30px;line-height:1.2;font-weight:500;letter-spacing:-1px;margin:0 0 22px}dialog p{color:#bbc4b0;font-size:16px}.dialog-close{position:absolute;right:12px;top:8px;padding:3px 10px;font-size:28px;background:none;color:var(--muted)}.help-footnote{border-top:1px solid var(--line);padding-top:15px;font-size:14px!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@keyframes appear{from{opacity:0;transform:translateY(8px) scale(.96)}to{opacity:1;transform:none}}@media(min-width:1400px){.shell{max-width:1320px}}@media(max-width:1000px){.shell{padding:0 28px}.game-layout{gap:30px;grid-template-columns:minmax(0,1fr) 220px}.levels button{padding:8px 11px}.restart span{display:none}.game-panel{padding:16px}.desktop-hint{display:none}aside h2{font-size:23px}}@media(max-width:760px){.shell{padding:0 18px}header{height:78px}.brand{font-size:28px}.brand-symbol{font-size:34px}.brand-caption{display:none}.header-actions{gap:12px}.title-row{margin:28px 0 26px}.title-note{display:none}h1{font-size:40px;letter-spacing:-1.7px}.eyebrow{margin-bottom:14px}.game-layout{display:block}.game-panel{padding:14px;border-radius:12px}.instrument-row{padding:20px 1px}.meter strong{font-size:26px}.status-badge{font-size:12px;padding:5px 8px;max-width:145px}.board-scroll{padding:7px}.levels button{padding:8px 12px;font-size:14px}.board-footer{padding-top:15px;flex-wrap:wrap}.board-footer>span{font-size:12px}aside{display:none}footer{margin-top:30px;flex-direction:column;gap:8px;padding:22px 0}.result-card{padding:20px}.result-card h2{font-size:25px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}@media(max-width:360px){.shell{padding:0 10px}.game-panel{padding:10px}.levels button{padding:8px 9px}h1{font-size:35px}.status-badge{max-width:120px}}
/* Theme surfaces and compact controls */
h1 span{color:inherit}h1 .accent{color:var(--lime)}.icon-button{background:var(--surface)}.quiet,.restart{color:var(--muted)}.brand-caption,.title-note,.eyebrow,.meter span,.rule p,.safe-note p,footer{color:var(--muted)}.game-panel{box-shadow:0 18px 60px #0002}.levels,.board-scroll{background:var(--board)}.levels button.active{background:var(--lime);color:var(--bg)}.board-footer button{background:var(--surface);border-color:var(--line)}.board-footer button[aria-pressed=true]{color:var(--bg)}.key{border-color:var(--line)}.status-badge{background:var(--open);border-color:var(--line);color:var(--text);font-size:13px}.result-card{background:var(--surface);border-color:var(--lime)}.result-card button,.primary{background:var(--lime);color:var(--bg)}.result-card p{color:var(--muted)}dialog{background:var(--surface);border-color:var(--line);max-height:calc(100dvh - 32px);overflow:auto}dialog p{color:var(--muted)}.help-footnote{border-color:var(--line)}.header-actions{gap:14px}.language-control{position:relative;min-width:52px;height:40px;flex-shrink:0}.language-control>span{display:flex;justify-content:center;align-items:center;height:100%;border:1px solid var(--line);border-radius:8px;color:var(--text);font-size:13px;font-weight:600}.language-control select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:1;font-size:16px}.language-control select:focus-visible+span{outline:2px solid var(--lime);outline-offset:4px}.language-control option{background:var(--surface);color:var(--text)}.theme-field{padding:0;border:0;margin:26px 0}.theme-field legend{font-size:15px;margin-bottom:12px}.theme-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.theme-grid button{background:var(--board);border:1px solid var(--line);border-radius:10px;padding:7px;font-size:13px;min-width:0;overflow-wrap:anywhere}.theme-grid button[aria-pressed=true]{border-color:var(--lime);box-shadow:0 0 0 1px var(--lime)}.theme-preview{display:grid;place-items:center;height:62px;border-radius:6px;font-size:29px;margin-bottom:8px}.spark-preview{background:#26361c;color:#d4ff63}.light-preview{background:#e5edf9;color:#1458aa}.kittens-preview{background:#5d3a51;color:#ffc0a5}.anime-preview{background:linear-gradient(135deg,#263a68,#453259);color:#86e5ff}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0;font-size:15px}.setting-row select{max-width:60%;min-width:0;padding:9px 10px;background:var(--board);color:var(--text);border:1px solid var(--line);border-radius:7px;font:inherit;font-size:14px}.setting-row input[type=checkbox]{width:22px;height:22px;accent-color:var(--lime);cursor:pointer}.range-label{display:flex;justify-content:space-between;gap:10px;font-size:15px;margin:18px 0 5px}.range-label output{font:14px ui-monospace,monospace;color:var(--muted)}input[type=range]{width:100%;height:26px;accent-color:var(--lime);cursor:pointer;margin:0}.primary{width:100%;padding:11px 20px;border-radius:8px;font-size:16px;font-weight:600}.status-cluster{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0}.mascot{display:none;flex-shrink:0;background-repeat:no-repeat;background-size:300% 200%;width:56px;height:56px}.result-mascot{width:112px;height:112px;margin:-10px auto 2px}body[data-theme=kittens] .mascot,body[data-theme=anime] .mascot{display:block}body[data-theme=kittens] .mascot{background-image:none;background-position:0% 0%}body[data-theme=anime] .mascot{background-image:none;background-position:0% 100%}body[data-theme=kittens][data-mood=win] .mascot{background-position:50% 0%}body[data-theme=kittens][data-mood=lose] .mascot{background-position:100% 0%}body[data-theme=anime][data-mood=win] .mascot{background-position:50% 100%}body[data-theme=anime][data-mood=lose] .mascot{background-position:100% 100%}body[data-theme=kittens] #result-symbol,body[data-theme=anime] #result-symbol{display:none}body[data-theme=light] .result{background:#eef3f9cc}body[data-theme=light] dialog::backdrop{background:#142a4266}body[data-theme=kittens] .brand-symbol{transform:rotate(-12deg)}body[data-theme=anime]{background-image:radial-gradient(ellipse at 15% 0%,#20477044,transparent 50%)}body[data-theme=kittens]{background-image:radial-gradient(ellipse at 95% 0%,#783b6140,transparent 48%)}body[data-effects=off] *{animation:none!important;transition:none!important}html[lang=de] h1,html[lang=en] h1,html[lang=es] h1{font-size:clamp(32px,4vw,54px)}html[lang=zh] .eyebrow,html[lang=ja] .eyebrow{letter-spacing:1px}html[lang=ja] .brand-caption{display:none}@media(max-width:760px){.header-actions{gap:6px}.icon-button{width:36px;height:36px}.language-control{min-width:44px;height:36px}.brand{font-size:25px;gap:8px}.brand-symbol{font-size:31px}#help{font-size:0;width:30px;height:36px;padding:0}#help::before{content:'?';font-size:19px}.theme-grid{gap:7px}.theme-grid button{font-size:13px;padding:6px}.theme-preview{height:53px}dialog{padding:27px 21px}.status-badge{font-size:12px;margin:0 4px}.mascot{width:48px;height:48px}.result-mascot{width:96px;height:96px}.instrument-row{gap:6px}.meter strong{font-size:25px}html[lang=en] h1,html[lang=de] h1,html[lang=es] h1{font-size:clamp(28px,6.8vw,40px)}.board-footer{font-size:12px;gap:6px}.board-footer button{font-size:12px;padding:7px 8px}.levels button{padding:8px 10px;font-size:13px}}@media(max-width:380px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.status-badge{max-width:120px}.brand{font-size:23px;gap:6px}.brand-symbol{font-size:29px}.meter strong{font-size:22px}}@media(min-width:761px){.header-actions #settings{margin-left:8px}}@media(min-width:761px) and (max-width:1000px){.game-layout{grid-template-columns:minmax(0,1fr) 190px;gap:24px}.levels button{font-size:13px;padding:8px 9px}}
.dos-preview{background:#cfd3d4;color:#234f78;font:30px ui-monospace,monospace;border:3px outset #e8eeee}.halloween-preview{background:#3f214d;color:#ffac57}.newyear-preview{background:#194a54;color:#a4f2ed}.season-mark{display:none;font-size:33px;line-height:1.2;color:var(--lime)}body[data-theme=halloween] .season-mark{display:block}body[data-theme=halloween] .season-mark::before{content:'🎃'}body[data-theme=newyear] .season-mark{display:block}body[data-theme=newyear] .season-mark::before{content:'🎄'}body[data-theme=halloween]{background-image:radial-gradient(ellipse at 85% 0%,#773a654d,transparent 52%)}body[data-theme=newyear]{background-image:radial-gradient(ellipse at 50% 0%,#245e724d,transparent 55%)}body[data-theme=newyear] .brand-symbol{color:#ffb5ac}body[data-theme=halloween] .brand-symbol{color:#ffac57}@media(min-width:381px){.theme-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.theme-grid button:nth-child(n+5) .theme-preview{height:48px}}
/* A complete theme changes the tiles, hazards, companion and atmosphere together. */
#atmosphere{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}.shell{position:relative;z-index:1}.mode-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;padding-top:15px;border-top:1px solid var(--line);font-size:14px}.mode-row label{display:flex;align-items:center;gap:8px;white-space:nowrap;cursor:pointer}.mode-row input{width:18px;height:18px;accent-color:var(--lime);margin:0}.mode-row>span{font-size:12px;color:var(--muted);text-align:right;max-width:240px}.logic-note{font-size:14px;color:var(--text);background:var(--board);border:1px solid var(--line);padding:12px;border-radius:7px}.logic-note[hidden]{display:none}.theme-sample{background:var(--board);border:1px solid var(--line);border-radius:10px;padding:14px;margin:15px 0 23px}.preview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;margin-bottom:12px}.preview-heading strong{font-size:13px;color:var(--lime);font-weight:500}.theme-sample canvas{width:240px;height:60px;max-width:100%;margin:0 auto}.theme-sample p{font-size:12px;text-align:center;margin:8px 0 0}.music-settings{border-top:1px solid var(--line);margin-top:24px;padding-top:5px}.music-settings p{font-size:13px;line-height:1.55}.mascot{width:92px;height:92px}.large-mascot{width:180px;height:180px;margin:-14px auto 24px}.result-mascot{width:130px;height:130px;margin:-12px auto 0}.season-mark{display:none!important}body[data-theme=halloween] .mascot{display:block;background-image:none;background-position:0% 0%}body[data-theme=halloween][data-mood=win] .mascot{background-position:50% 0%}body[data-theme=halloween][data-mood=lose] .mascot{background-position:100% 0%}body[data-theme=newyear] .mascot{display:block;background-image:none;background-position:0% 100%}body[data-theme=newyear][data-mood=win] .mascot{background-position:50% 100%}body[data-theme=newyear][data-mood=lose] .mascot{background-position:100% 100%}body[data-theme=halloween] #result-symbol,body[data-theme=newyear] #result-symbol{display:none}body[data-theme=kittens] .game-panel{border-radius:24px;border-color:#896074;box-shadow:0 18px 55px #0002,0 0 35px #c87d9912}body[data-theme=anime] .game-panel{border-radius:8px;border-color:#607cad;box-shadow:0 20px 65px #0003,0 0 30px #54b7eb12}body[data-theme=halloween] .game-panel{border-color:#986084;box-shadow:0 20px 70px #10061966,0 0 34px #ff9d4410}body[data-theme=newyear] .game-panel{border-color:#699ca5;box-shadow:0 20px 65px #00131a55,0 0 35px #a4f2ed12}body[data-reaction=flag] .mascot{animation:companion-flag .4s ease}body[data-reaction=open] .mascot{animation:companion-open .35s ease}@keyframes companion-flag{0%,100%{transform:none}35%{transform:rotate(-6deg) translateY(-4px)}70%{transform:rotate(4deg)}}@keyframes companion-open{0%,100%{transform:none}45%{transform:translateY(-5px)}}.settings-group{border-top:1px solid var(--line);margin-top:17px}.settings-group summary{cursor:pointer;list-style-position:inside;font-size:16px;padding:17px 0;color:var(--text)}.settings-group[open] summary{color:var(--lime)}.settings-group .setting-row:first-of-type{margin-top:5px}.settings-group .music-settings{margin-top:16px}.training-step{font:13px ui-monospace,monospace;color:var(--lime)!important;margin:0 0 15px!important}.training-grid{display:grid;grid-template-columns:repeat(3,60px);gap:5px;justify-content:center;margin:24px 0}.training-cell{width:60px;height:60px;display:grid;place-items:center;background:var(--open);border:1px solid var(--line);border-radius:6px;font:600 25px ui-monospace,monospace;color:var(--lime);padding:4px}.training-cell:disabled{opacity:1;cursor:default}.training-cell.closed{background:var(--surface);border-color:var(--lime);box-shadow:inset 0 1px 0 #ffffff17;cursor:pointer}.training-cell.lesson-target{outline:2px solid var(--lime);outline-offset:1px}.training-sprite{width:100%;height:100%;background-image:url('theme-icons.webp');background-repeat:no-repeat;background-size:400% 200%}.training-answers{display:flex;gap:10px;justify-content:center;margin:18px 0}.training-answers[hidden]{display:none}.training-answers button{width:50px;height:44px;background:var(--board);border:1px solid var(--line);border-radius:6px;font-size:19px}.training-answers button[aria-pressed=true]{background:var(--lime);color:var(--bg)}.training-feedback{min-height:24px;font-size:14px!important;text-align:center}.primary:disabled{opacity:.4;cursor:default}#training-dialog h2{margin-bottom:14px;font-size:27px}#lesson-copy{min-height:72px}.settings-group select{max-width:55%}body[data-theme=dos] .mode-row{font-size:13px}body[data-theme=dos] .theme-sample{border-radius:0}@media(max-width:760px){.mode-row{margin-top:14px;padding-top:12px;align-items:flex-start;gap:8px;font-size:13px}.mode-row>span{font-size:12px;max-width:130px}.mascot{width:76px;height:76px}.result-mascot{width:120px;height:120px}.instrument-row{padding:14px 0}.game-panel{padding:13px}.theme-sample{padding:11px}.setting-row{font-size:14px}.settings-group select{font-size:13px;padding:8px 7px}.large-mascot{display:none!important}.training-cell{width:55px;height:55px}.training-grid{grid-template-columns:repeat(3,55px)}body[data-theme=kittens] .game-panel{border-radius:17px}}@media(prefers-reduced-motion:reduce){#atmosphere{display:none}}
/* Personal scores stay close to the board; records open only on request. */
.score-strip{display:flex;align-items:center;gap:24px;padding:0 4px 17px}.score-strip>div,.records-totals>div{display:flex;flex-direction:column;gap:3px}.score-strip span,.records-totals span{font-size:12px;color:var(--muted)}.score-strip strong{font:500 19px ui-monospace,monospace;color:var(--text)}.score-strip button{margin-left:auto;background:var(--board);border:1px solid var(--line);border-radius:7px;padding:8px 12px;font-size:14px;color:var(--lime)}.records-totals{display:flex;gap:35px;background:var(--board);padding:18px;border:1px solid var(--line);border-radius:9px;margin:0 0 23px}.records-totals strong{font:500 27px ui-monospace,monospace}.records-filters{display:grid;grid-template-columns:1fr 1fr;gap:13px}.records-filters label{display:flex;flex-direction:column;gap:8px;font-size:14px;color:var(--muted)}.records-filters select{width:100%;min-width:0;padding:9px;background:var(--board);color:var(--text);border:1px solid var(--line);border-radius:6px;font:inherit}.records-table{width:100%;border-collapse:collapse;font-size:15px;margin:16px 0}.records-table th{font-size:13px;font-weight:500;color:var(--muted)}.records-table th,.records-table td{padding:10px 5px;border-bottom:1px solid var(--line);text-align:right;font-variant-numeric:tabular-nums}.records-table th:first-child,.records-table td:first-child{text-align:left}.records-table tr:first-child td{color:var(--lime)}.records-table[hidden],#records-empty[hidden],.records-warning[hidden]{display:none}.records-best-time{font-size:14px!important;color:var(--lime)!important;margin:18px 0 0}#records-dialog{max-height:calc(100dvh - 32px);overflow-y:auto}#records-dialog .help-footnote,#records-dialog details p{font-size:14px;line-height:1.65}.records-warning{color:var(--text)!important;border:1px solid var(--line);padding:12px;font-size:14px!important}.result-card .result-score{color:var(--lime);font-size:15px;font-weight:600;margin:-7px auto 16px}
/* An original 1990s desktop-inspired theme, without brand assets. */
body[data-theme=dos]{font-family:Arial,Helvetica,sans-serif;background-image:linear-gradient(130deg,#ffffff08,transparent 60%)}body[data-theme=dos] .brand,body[data-theme=dos] header,body[data-theme=dos] .title-row,body[data-theme=dos] footer{color:#f7ffff}body[data-theme=dos] .brand-symbol{color:#f2d58b}body[data-theme=dos] .eyebrow,body[data-theme=dos] .title-note,body[data-theme=dos] footer,body[data-theme=dos] .quiet{color:#e0f1ef}body[data-theme=dos] .game-panel{border:3px solid;border-color:#eef2f2 #71797c #71797c #eef2f2;border-radius:0;padding:18px;box-shadow:5px 5px 0 #143b4144}body[data-theme=dos] .game-top{background:linear-gradient(100deg,#234f78,#437b94);margin:-15px -15px 0;padding:8px}body[data-theme=dos] .levels{background:transparent;padding:0;gap:6px}body[data-theme=dos] button,body[data-theme=dos] select,body[data-theme=dos] .language-control>span,body[data-theme=dos] .result-card{border-radius:0}body[data-theme=dos] .levels button,body[data-theme=dos] .score-strip button,body[data-theme=dos] .board-footer button,body[data-theme=dos] .icon-button,body[data-theme=dos] .primary,body[data-theme=dos] .result-card button{background:#d1d2d2;color:#172c34;border:2px solid;border-color:#fbffff #767e81 #767e81 #fbffff;box-shadow:none}body[data-theme=dos] .levels button.active,body[data-theme=dos] .board-footer button[aria-pressed=true],body[data-theme=dos] button:active{border-color:#767e81 #fbffff #fbffff #767e81;background:#bcc5c9}body[data-theme=dos] .restart{color:#ffffff}body[data-theme=dos] .board-scroll{border-radius:0;border:2px solid;border-color:#767e81 #f7ffff #f7ffff #767e81;padding:8px;background:#aeb2b3}body[data-theme=dos] .board-wrap,body[data-theme=dos] canvas{border-radius:0}body[data-theme=dos] .meter strong{background:#25313b;color:#f7ae92;padding:2px 7px;border:2px inset #bfc9cd;font-weight:600;font-size:27px}body[data-theme=dos] .status-badge{background:#d1d2d2;border:1px solid #939c9f;border-radius:0;color:#263f50;font-size:12px}body[data-theme=dos] dialog{border-radius:0;border:3px solid;border-color:#f7ffff #71797c #71797c #f7ffff;box-shadow:5px 5px 0 #143b4166}body[data-theme=dos] dialog .eyebrow{color:#234f78}body[data-theme=dos] dialog::backdrop,body[data-theme=dos] .result{backdrop-filter:none}body[data-theme=dos] .theme-preview,body[data-theme=dos] .theme-sample,body[data-theme=dos] .records-totals{border-radius:0}body[data-theme=dos] .result-card{background:#d1d2d2;border:3px outset #eef2f2;box-shadow:5px 5px 0 #143b4166}body[data-theme=dos] .result{background:#26797955}body[data-theme=dos] .result-card p{color:#444b4b}body[data-theme=dos] .result-card .result-score{color:#234f78}body[data-theme=dos] aside{color:#efffff}body[data-theme=dos] aside p,body[data-theme=dos] .safe-note p{color:#dbefed}body[data-theme=dos] aside .aside-number,body[data-theme=dos] .rule>span,body[data-theme=dos] .safe-note>span{color:#f2d58b}body[data-theme=dos] .brand-caption{color:#dcf0ee}body[data-theme=dos] .theme-grid button[aria-pressed=true]{border:2px solid #234f78;box-shadow:inset 0 0 0 2px #ffffff77}body[data-theme=dos] .training-cell{border-radius:0}body[data-theme=dos] .instrument-row{padding-top:20px}body[data-theme=dos] .game-top .levels button{font-size:13px;padding:6px 11px}
@media(max-width:760px){.score-strip{gap:14px;padding:0 0 14px}.score-strip strong{font-size:17px}.score-strip button{font-size:12px;padding:7px 8px}.score-strip span{font-size:12px}.records-totals{gap:25px;padding:14px}.records-filters{gap:10px}.records-filters select{font-size:13px}body[data-theme=dos] .game-panel{padding:12px}body[data-theme=dos] .game-top{margin:-9px -9px 0;padding:7px}body[data-theme=dos] .game-top .levels button{font-size:12px;padding:6px 8px}body[data-theme=dos] .meter strong{font-size:23px}}@media(max-width:360px){.score-strip{gap:10px}.score-strip button{max-width:100px;line-height:1.25}.records-totals strong{font-size:23px}}

body[data-theme=dos] .language-control>span{background:#d1d2d2;color:#172c34;border:2px solid;border-color:#fbffff #767e81 #767e81 #fbffff}body[data-theme=dos] h1 .accent{color:#f2d58b}
.audio-test{padding:9px 14px;background:var(--board);color:var(--lime);border:1px solid var(--line);border-radius:6px;font-size:14px}.audio-help,.audio-status{font-size:13px;line-height:1.6}.audio-status{border:1px solid var(--line);padding:11px;color:var(--text)}.audio-status[hidden]{display:none}
body[data-theme=anime]{background-color:#14152d;background-image:linear-gradient(180deg,#11152a15,#11152a66 65%,#11152aef),url('anime-scene.webp');background-size:cover;background-position:center top;background-attachment:fixed}body[data-theme=anime] .game-panel{background:#20223deF;border-radius:22px 6px 22px 6px;border:1px solid #a18abd;box-shadow:0 20px 55px #080a2366,inset 0 1px 0 #e3b5e633}body[data-theme=anime] header{border-color:#d7b4e344}body[data-theme=anime] h1{font-weight:600;text-shadow:0 3px 20px #11132688}body[data-theme=anime] .brand-symbol{color:#ffbfdc}body[data-theme=anime] .game-top{background:linear-gradient(100deg,#71518355,#33487155);padding:10px;border:1px solid #a18abd55;border-radius:14px 3px 14px 3px}body[data-theme=anime] .levels{background:#171b3388}body[data-theme=anime] .levels button.active{background:linear-gradient(125deg,#ffc1dc,#d9caff);color:#292344}body[data-theme=anime] .status-badge{background:#433553;border-color:#ac80af}body[data-theme=anime] .board-scroll{background:#11182a;border:1px solid #8d83b088;box-shadow:inset 0 0 18px #060a2044;border-radius:12px 3px 12px 3px}body[data-theme=anime] aside{background:#191d37db;border:1px solid #bc97c244;border-radius:20px 4px 20px 4px;padding:24px 20px;box-shadow:0 16px 45px #090b2944}body[data-theme=anime] .large-mascot{width:200px;height:200px;margin:-5px auto 20px;filter:drop-shadow(0 6px 18px #e4b8ed44)}body[data-theme=anime] .theme-preview.anime-preview{background:linear-gradient(130deg,#78598e,#303e6e);color:#ffc1dc;font-size:30px}body[data-theme=anime] .theme-sample{border-color:#aa85b3;background:#1e243e}body[data-theme=anime] .icon-button{border-color:#c7a2dd66;background:#262a46d9}body[data-theme=anime] .language-control>span{background:#262a46d9;border-color:#c7a2dd66}body[data-theme=anime] .title-note,body[data-theme=anime] .eyebrow,body[data-theme=anime] footer{color:#f2daee}body[data-theme=anime] .score-strip button{border-color:#c7a2dd66;background:#403654}body[data-theme=anime] .result-card{background:linear-gradient(145deg,#38304e,#222a45);border-color:#cf9ccc}body[data-theme=anime] .title-row{margin-top:38px}body[data-theme=anime] .mode-row{border-color:#a689ba44}body[data-theme=anime] .rule>span{color:#ffc1dc}body[data-theme=anime] .safe-note{border-color:#a689ba44}
@media(max-width:760px){body[data-theme=anime]{background-position:64% top;background-attachment:scroll;background-size:auto 100vh}body[data-theme=anime] .game-panel{border-radius:18px 4px 18px 4px}body[data-theme=anime] .game-top{padding:7px;border-radius:10px 3px 10px 3px;gap:5px}body[data-theme=anime] .game-top .levels button{font-size:12px;padding:7px 8px}body[data-theme=anime] .title-row{margin-top:28px}}
/* Hero collections use a single, lazily loaded sprite strip per theme. */
.hero-trigger{display:block;background:none;padding:0;border-radius:12px}.mascot.hero-portrait{display:block!important;background:none!important;position:relative;margin:0;overflow:visible}.hero-sprite{display:block;width:100%;height:100%;background-size:400% 100%;background-repeat:no-repeat;filter:drop-shadow(0 5px 7px #0003)}.hero-card{display:flex;flex-direction:column;align-items:center;width:100%;background:var(--board);border:1px solid var(--line);border-radius:16px;padding:14px 12px 16px;margin:0 0 26px;transition:border-color .2s}.hero-card:hover,.hero-trigger:hover{outline:1px solid var(--lime);outline-offset:3px}.hero-card .large-mascot{width:180px;height:180px;margin:0 auto 5px;filter:none}.hero-card>strong{font-size:16px;line-height:1.4;overflow-wrap:anywhere}.hero-rank{font-size:14px;color:var(--lime);margin-top:5px}.hero-card-hint{font-size:14px;color:var(--muted);margin-top:9px}.hero-portrait[data-rank="1"] .hero-sprite{filter:drop-shadow(0 4px 8px #ffffff33)}.hero-portrait[data-rank="2"] .hero-sprite{filter:drop-shadow(0 4px 12px #ffe19466)}body[data-mood=win] .hero-portrait .hero-sprite{animation:hero-cheer .65s ease 2}body[data-mood=lose] .hero-portrait .hero-sprite{transform:rotate(-4deg);filter:saturate(.75) drop-shadow(0 4px 7px #0003)}@keyframes hero-cheer{50%{transform:translateY(-5px) rotate(3deg)}}#result-symbol{display:none!important}.result-card .hero-portrait{margin:-10px auto 0}.result-card .result-sparks{font-size:14px;color:var(--lime);margin:-8px auto 16px}.score-strip .sparks-button{display:flex;align-items:center;gap:6px;white-space:nowrap;margin-left:auto}.sparks-button>span{color:var(--lime);font-size:20px}.sparks-button strong{font-size:16px}.score-strip #records-open{margin-left:0}.hero-dialog{max-width:760px;padding:30px}.hero-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-right:14px;margin-bottom:18px}.hero-dialog-heading h2{margin:0}.sparks-wallet{display:flex;flex-direction:column;align-items:flex-end;white-space:nowrap}.sparks-wallet>span{font-size:14px;color:var(--muted)}.sparks-wallet strong{font:600 26px ui-monospace,monospace;color:var(--lime)}.hero-progress-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px}.hero-progress-heading strong{font-weight:600;color:var(--lime)}.hero-progress-heading>span{color:var(--muted)}.hero-next-rank{font-size:14px!important;margin:6px 0 20px!important}.hero-tabs{display:flex;border-bottom:1px solid var(--line);gap:20px;margin-bottom:22px}.hero-tabs button{font-size:16px;background:none;color:var(--muted);padding:11px 0;border-bottom:2px solid transparent;min-width:0}.hero-tabs button[aria-selected=true]{color:var(--text);border-color:var(--lime)}.hero-collection-label{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:14px;margin:0 0 17px}.hero-collection-label select{font:inherit;background:var(--board);color:var(--text);border:1px solid var(--line);border-radius:7px;min-width:150px;max-width:70%;padding:9px 12px}.outfit-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.outfit-card{min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center;background:var(--board);border:1px solid var(--line);border-radius:12px;padding:10px 8px}.outfit-card.equipped{border-color:var(--lime);box-shadow:inset 0 0 0 1px var(--lime)}.outfit-art{width:100%;aspect-ratio:1;max-width:155px;margin-bottom:8px}.outfit-card h3{font-size:14px;line-height:1.35;font-weight:600;margin:0;min-height:38px;overflow-wrap:anywhere}.outfit-card p{font-size:13px;margin:8px 0 12px}.outfit-card button{width:100%;margin-top:auto;font-size:14px;line-height:1.3;padding:9px 5px;min-height:40px;background:var(--lime);color:var(--bg);border:1px solid var(--lime);border-radius:6px}.outfit-card button:disabled{cursor:default;background:var(--surface);color:var(--muted);border-color:var(--line)}.outfit-card.equipped button{background:var(--surface);color:var(--lime);border-color:transparent}.wardrobe-message{font-size:14px!important;line-height:1.5;margin:14px 0 0;min-height:0;color:var(--lime)!important}.wardrobe-message:empty{display:none}.hero-small-copy{font-size:14px!important;line-height:1.6;margin:18px 0 8px}.hero-dialog .settings-group p{font-size:14px;line-height:1.65}.hero-dialog .help-footnote{margin-bottom:0;line-height:1.65}.achievement-list{list-style:none;margin:14px 0 0;padding:0}.achievement-item{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:start;gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}.achievement-icon{display:grid;place-items:center;width:32px;height:32px;border:1px solid var(--line);border-radius:50%;font:14px ui-monospace,monospace;color:var(--muted)}.achievement-item.completed .achievement-icon{color:var(--lime);border-color:var(--lime);font-size:24px}.achievement-item h3{font-size:16px;margin:0 0 4px;font-weight:550}.achievement-item p{font-size:14px;line-height:1.5;margin:0 0 8px}.achievement-item progress{display:block;width:100%;height:5px;accent-color:var(--lime);margin:0 0 4px}.achievement-tally{font-size:12px;color:var(--muted)}.achievement-prize{font:14px ui-monospace,monospace;color:var(--lime);white-space:nowrap;padding-top:4px}.hero-notice{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:700px;width:calc(100% - 32px);background:var(--surface);border:1px solid var(--lime);box-shadow:0 8px 30px #0005;border-radius:12px;z-index:20;padding:8px 8px 8px 16px}.hero-notice>button{background:none;font-size:14px;text-align:left;line-height:1.5;padding:6px 0}.hero-notice>button:first-child{flex:1;color:var(--text)}.hero-notice #hero-notice-close{font-size:24px;color:var(--muted);padding:2px 10px;margin-left:8px}.hero-notice[hidden],#wardrobe-pane[hidden],#achievements-pane[hidden],#hero-migration-note[hidden],#hero-storage-note[hidden],#result-sparks[hidden]{display:none}body[data-theme=dos] .hero-card{background:#d1d2d2;color:#172c34;border:3px outset #eef2f2;border-radius:0}body[data-theme=dos] .hero-card-hint{color:#444b4b}body[data-theme=dos] .hero-card .hero-rank{color:#234f78}body[data-theme=dos] .outfit-card,body[data-theme=dos] .hero-notice,body[data-theme=dos] .achievement-icon{border-radius:0}body[data-theme=dos] .outfit-card button{background:#d1d2d2;color:#172c34;border:2px outset #eef2f2}body[data-theme=dos] .outfit-card button:disabled{color:#57656a;border:1px solid #939c9f}body[data-theme=dos] .outfit-card.equipped button{color:#234f78}body[data-theme=dos] .hero-dialog{border-radius:0}
@media(max-width:1000px){.score-strip{gap:12px}.hero-card .large-mascot{width:150px;height:150px}.score-strip button{font-size:13px;padding:8px}.score-strip strong{font-size:17px}}
@media(max-width:760px){.hero-dialog{padding:24px 18px}.hero-dialog-heading{padding-right:16px;margin-bottom:16px}.hero-dialog-heading h2{font-size:27px}.sparks-wallet strong{font-size:23px}.hero-tabs{gap:18px}.outfit-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.outfit-art{max-width:150px}.outfit-card{padding:8px}.outfit-card h3{min-height:0}.hero-progress-heading{align-items:flex-start;flex-wrap:wrap;gap:5px}.achievement-item{grid-template-columns:28px minmax(0,1fr) auto;gap:8px}.achievement-icon{width:27px;height:27px;font-size:12px}.achievement-item h3{font-size:15px}.achievement-prize{font-size:13px}.score-strip{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding-bottom:14px}.score-strip .sparks-button{margin:0;justify-content:center}.score-strip #records-open{margin:0}.hero-trigger{min-width:76px;min-height:76px}.hero-notice{bottom:12px}}

body[data-finish-fx=false][data-mood=win] .hero-portrait .hero-sprite{animation:none}
/* Layered equipment is independent; each theme loads just its own two atlases. */
.hero-stage{display:block;width:100%;height:100%;position:relative;isolation:isolate}.hero-layer{display:block;position:absolute;z-index:3;transform:translate(-50%,-50%);pointer-events:none;--x:50%;--y:50%;--size:40%;left:var(--x);top:var(--y);width:var(--size);height:var(--size)}.hero-layer[data-slot=hand]{--x:78%;--y:71%;--size:35%;z-index:5}.hero-layer[data-slot=badge]{--y:58%;--size:15%;z-index:6}.gear-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-size:400% 400%}.hero-stage[data-species=kittens] [data-slot=badge]{--y:62%}.hero-stage[data-species=halloween] [data-slot=badge]{--y:65%}.hero-stage[data-species=pond] [data-slot=hand]{--x:72%;--y:69%;--size:32%}.hero-stage[data-species=pond] [data-slot=badge]{--y:53%;--size:12%}.hero-stage[data-species=dos]{image-rendering:pixelated}.hero-aura{position:absolute;z-index:0;inset:17% 8%;border-radius:50%;pointer-events:none}.hero-aura[data-aura="0"]{display:none}.hero-aura[data-aura="1"]{background:radial-gradient(ellipse,color-mix(in srgb,var(--lime) 25%,transparent),transparent 70%)}.hero-aura[data-aura="2"]{border:1px solid var(--lime);box-shadow:0 0 0 8px color-mix(in srgb,var(--lime) 14%,transparent)}.hero-aura[data-aura="3"]{border:2px dashed var(--lime);animation:aura-turn 18s linear infinite}.hero-aura[data-aura="4"]{border:2px dotted var(--lime);border-radius:12%;animation:aura-pulse 2.4s ease-in-out infinite}.hero-aura[data-aura="5"]{background:conic-gradient(from 40deg,#65dce622,#efa9da44,#dbde7855,#65dce622);filter:blur(8px);animation:aura-turn 14s linear infinite}.hero-aura[data-aura="6"]{border:2px solid #f0d38f;box-shadow:0 0 15px #f0d38f55,inset 0 0 15px #fff5;background:radial-gradient(ellipse,#e9d7a133,transparent 65%);animation:aura-pulse 3s ease-in-out infinite}@keyframes aura-turn{to{transform:rotate(360deg)}}@keyframes aura-pulse{50%{opacity:.45;transform:scale(.95)}}.hero-dialog{max-width:940px}.hero-xp{display:block;width:100%;height:7px;margin:-8px 0 22px;accent-color:var(--lime)}.wardrobe-workspace{display:grid;grid-template-columns:210px minmax(0,1fr);gap:22px;align-items:start}.wardrobe-preview{background:var(--board);border:1px solid var(--line);border-radius:12px;padding:12px;text-align:center}.wardrobe-portrait{width:180px;height:180px;max-width:100%;margin:auto}.wardrobe-preview>strong{font-size:16px}.wardrobe-preview>p{font-size:13px;line-height:1.4;margin:6px 0 14px;color:var(--muted)}.gear-slots{display:grid;grid-template-columns:1fr 1fr;gap:7px}.gear-slots button{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:8px 5px;font-size:14px;line-height:1.3;min-height:45px;overflow-wrap:anywhere}.gear-slots button[aria-pressed=true]{border-color:var(--lime);color:var(--lime)}.gear-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:38px;margin-bottom:12px;font-size:14px}.gear-toolbar button,.journey-intro button{padding:8px 12px;background:var(--board);border:1px solid var(--line);border-radius:6px;font-size:14px}.gear-toolbar button:disabled,.journey-intro button:disabled{opacity:.5;cursor:default}.wardrobe-inventory .outfit-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gear-preview-button{border:0;background:none;padding:0;cursor:pointer;max-width:110px}.outfit-card .gear-preview-button{margin:0 0 6px;min-height:0;background:none;border:0;color:inherit;aspect-ratio:1;width:100%}.outfit-card p{font-size:12px;margin:7px 0 12px}.outfit-card.locked{border-style:dashed}.hero-tabs{gap:22px}.hero-tabs button{font-size:15px}.hero-journey{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0;margin:18px 0}.journey-level{border:1px solid var(--line);background:var(--board);border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:6px;min-width:0}.journey-level>strong{font-size:15px}.journey-level>span{font:13px ui-monospace,monospace;color:var(--muted)}.journey-level.current{border-color:var(--lime);box-shadow:inset 0 0 0 1px var(--lime)}.journey-level.reached>strong{color:var(--lime)}.journey-level p{font-size:13px;line-height:1.5;margin:3px 0}.journey-level button{background:var(--lime);color:var(--bg);border-radius:6px;padding:8px;font-size:14px;margin-top:auto}.journey-level button:disabled{cursor:default;background:var(--surface);color:var(--muted)}.journey-intro{display:flex;align-items:center;justify-content:space-between;gap:18px}.journey-intro p{font-size:14px;margin:0}.journey-intro button{flex-shrink:0;max-width:180px}.pond-preview{background:#3c5542;color:#d4e2b0}.hero-dialog #journey-pane[hidden]{display:none}body[data-theme=pond]{background-image:radial-gradient(ellipse at 18% 14%,#8a9c5914,transparent 55%),linear-gradient(160deg,#102c28,#152820 65%,#112421)}body[data-theme=pond] .game-panel{border-color:#748b61;border-radius:14px;box-shadow:0 18px 50px #0003,inset 0 1px 0 #d1dfae22}body[data-theme=pond] .status-badge{background:#2e4535;border-color:#748b61}body[data-theme=pond] .hero-card{background:#172b25;border-color:#748b61}body[data-theme=pond] .board-scroll{border:1px solid #4b6551}body[data-theme=pond] .brand-symbol{color:#c3df84}body[data-theme=dos] .wardrobe-preview,body[data-theme=dos] .journey-level{border-radius:0}body[data-effects=off] .hero-aura{animation:none}body[data-finish-fx=false] .hero-stage{animation:none!important}
@media(max-width:760px){.hero-dialog{padding:24px 18px}.wardrobe-workspace{grid-template-columns:1fr;gap:16px}.wardrobe-preview{display:grid;grid-template-columns:105px minmax(0,1fr);align-items:center;gap:6px 10px;text-align:left;padding:10px}.wardrobe-portrait{grid-column:1;grid-row:1 / 4;width:105px;height:105px}.wardrobe-preview>strong,.wardrobe-preview>p,.gear-slots{grid-column:2}.wardrobe-preview>p{font-size:12px;margin:0}.gear-slots{gap:5px}.gear-slots button{font-size:12px;min-height:33px;padding:6px 4px}.wardrobe-inventory .outfit-grid{gap:10px}.hero-tabs{gap:16px}.hero-tabs button{font-size:14px}.hero-journey{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.journey-level{padding:11px}.journey-level>strong{font-size:14px}.journey-intro{align-items:flex-start;flex-direction:column;gap:12px}.journey-intro button{max-width:100%}.hero-rank{font-size:12px}.wardrobe-inventory .outfit-card h3{min-height:38px}.gear-toolbar{margin-bottom:8px}.hero-xp{margin-bottom:17px}}
@media(max-width:360px){.hero-tabs{gap:12px}.hero-tabs button{font-size:13px}.wardrobe-preview{grid-template-columns:85px minmax(0,1fr);gap:5px}.wardrobe-portrait{width:85px;height:100px}.gear-slots button{font-size:12px;padding:5px 3px;min-height:36px}.hero-dialog .hero-progress-heading{font-size:13px}.hero-journey{grid-template-columns:1fr 1fr}.journey-level button{font-size:12px;padding:8px 4px}}

@media(max-width:430px){.wardrobe-portrait{grid-row:1 / 3}.wardrobe-preview .gear-slots{grid-column:1 / -1;grid-row:3;margin-top:6px}.gear-slots button{overflow-wrap:normal;hyphens:auto}.gear-toolbar strong{min-width:0;overflow-wrap:anywhere}}

/* Registration applies to the entire sprite frame, never to the item's thumbnail bounds. */
.hero-layer{left:calc(var(--x) + var(--pose-x,0%));top:calc(var(--y) + var(--pose-y,0%))}
body[data-mood=win] .hero-stage[data-species=light]{--pose-x:6%}
body[data-mood=lose] .hero-stage[data-species=light]{--pose-x:4%}
body[data-reaction=flag] .hero-stage[data-species=light]{--pose-x:5%}
body[data-mood=win] .hero-stage[data-species=newyear]{--pose-x:1%}
body[data-reaction=flag] .hero-stage[data-species=newyear]{--pose-x:2%}
body[data-mood=win] .hero-stage[data-species=anime] .hero-layer[data-slot=hand]{--pose-x:0%;--pose-y:-28%}
body[data-mood=lose] .hero-stage[data-species=anime] .hero-layer[data-slot=hand]{--pose-x:-17%;--pose-y:-19%}
@media(max-width:360px){.wardrobe-portrait{height:85px}}

body[data-reaction=flag] .hero-stage[data-species=anime] .hero-layer[data-slot=hand]{--pose-x:0%;--pose-y:0%}

/* A wardrobe sprite is a complete dressed character, not a stack of body/head cutouts. */
.hero-skin,.hero-grip{display:block;position:absolute;inset:0;z-index:1;background-repeat:no-repeat;background-size:500% 500%;filter:drop-shadow(0 4px 6px #0003)}
.hero-grip{z-index:7;pointer-events:none;filter:none}
.wardrobe-portrait{height:auto;aspect-ratio:1}
.hero-stage{--pose-x:0%!important;--pose-y:0%!important}
.hero-stage .hero-layer[data-slot=hand]{--pose-x:0%!important;--pose-y:0%!important}

body[data-mood=win] .hero-portrait .hero-stage{animation:hero-cheer .65s ease 2}
body[data-mood=lose] .hero-portrait .hero-stage{transform:rotate(-4deg);filter:saturate(.75)}
@media(prefers-reduced-motion:reduce){.hero-stage{animation:none!important}}

/* Shared Iskra navigation stays outside the play surface. */
header{height:auto;min-height:96px;gap:18px}.family-menu{position:relative;margin-left:auto;z-index:20;flex-shrink:0}.family-menu>summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;font-size:14px;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text)}.family-menu>summary::-webkit-details-marker{display:none}.family-menu>summary:focus-visible,.family-data>summary:focus-visible{outline:2px solid var(--lime);outline-offset:4px}.family-menu-panel{position:absolute;top:calc(100% + 8px);right:0;width:280px;max-width:calc(100vw - 40px);padding:8px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px #0003;display:grid;gap:3px}.family-menu-panel>a,.family-menu-panel>[aria-current]{display:block;padding:11px 12px;font-size:14px;border-radius:6px}.family-menu-panel>a:hover{background:var(--board)}.family-menu-panel>[aria-current]{color:var(--lime);background:var(--board)}.family-menu-panel small{font-size:12px;line-height:1.5;color:var(--muted);padding:8px 12px}.family-footer{display:grid;grid-template-columns:minmax(0,1fr);gap:22px;font-size:14px;line-height:1.6}.family-footer-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}.family-footer-heading strong{color:var(--text);font-size:20px;letter-spacing:-.5px}.family-footer-links{display:flex;gap:12px 24px;flex-wrap:wrap}.family-footer a{color:inherit;text-decoration:underline;text-underline-offset:4px}.family-footer [aria-current]{color:inherit}.family-footer a:hover{color:var(--lime)}.family-footer-bottom{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border-top:1px solid var(--line);padding-top:18px;font-size:13px}.family-data{max-width:65ch}.family-data>summary{cursor:pointer;font-size:14px}.family-data p{margin:12px 0 0;line-height:1.65}.family-footer-bottom>span{flex-shrink:0}.family-footer-heading strong{color:inherit}body[data-theme=dos] .family-menu>summary,body[data-theme=dos] .family-menu-panel{border-radius:0}body[data-theme=dos] .family-menu-panel>[aria-current]{color:var(--text)}
@media(max-width:1000px){header{flex-wrap:wrap;gap:10px 12px;padding:16px 0}.family-menu{order:3;flex-basis:100%;margin:0}.family-menu>summary{display:inline-flex;padding:5px 0;border:0;background:none;color:inherit}.family-menu-panel{left:0;right:auto}.header-actions{margin-left:auto}.family-footer-bottom{flex-direction:column}.family-footer-bottom>span{flex-shrink:1}}
@media(max-width:760px){header{min-height:96px}.title-row{margin-top:20px}.family-footer-heading{display:grid;gap:6px}.family-footer{gap:18px}.family-footer-links{gap:10px 20px}}

.family-game-heading{align-items:center;margin:26px 0 24px;gap:16px}.family-game-heading h1{font-size:32px!important;letter-spacing:-1px;line-height:1.2}.family-game-heading .eyebrow{margin:0;text-align:right;font-size:12px}
@media(max-width:760px){.family-game-heading{margin:20px 0 18px}.family-game-heading h1{font-size:28px!important}.family-game-heading .eyebrow{max-width:150px;line-height:1.6;letter-spacing:1px}}

/* Preview the purchased item on the same complete character as the game portrait. */
.outfit-card .gear-preview-button{max-width:155px;position:relative;overflow:visible}
.outfit-card .gear-preview-button .hero-stage{width:100%;height:100%;aspect-ratio:1}
.hero-stage .hero-layer{--pose-x:0%!important;--pose-y:0%!important}

/* Durable rounds and pause controls. */
.pause-card button,.logic-retry{padding:9px 14px;border:1px solid var(--line);border-radius:7px;background:var(--board);color:var(--text);font-size:14px}.session-note{font-size:11px;color:var(--muted);line-height:1.5;margin:8px 0 0}.pause-panel{position:absolute;inset:0;z-index:9;display:flex;align-items:flex-start;justify-content:flex-start;padding:20px;background:color-mix(in srgb,var(--board) 88%,transparent)}.pause-panel[hidden]{display:none}.pause-card{position:sticky;left:20px;top:20px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:20px;max-width:min(320px,calc(100vw - 96px));font-size:14px;box-shadow:0 8px 25px #0003}.pause-card strong{font-size:20px}.pause-card p{line-height:1.5;color:var(--muted);margin:8px 0 15px}.pause-card button{background:var(--lime);color:var(--bg);border-color:var(--lime)}body[data-paused=true] #board{visibility:hidden}.next-goal{font-size:12px;color:var(--muted);line-height:1.5;margin:8px 0;max-width:24ch}.goal-note{font-size:14px!important;color:var(--lime)!important;line-height:1.5;margin:0 0 18px}.logic-retry{margin-top:12px}.logic-retry[hidden]{display:none}#board{touch-action:pan-x pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}body[data-theme=dos] .pause-card{border-radius:0}
@media(max-width:760px){.board-footer{flex-wrap:wrap;gap:8px}#flag-mode[aria-pressed=true]{box-shadow:0 0 0 2px var(--lime)}.pause-panel{padding:12px}.pause-card{left:12px;top:12px;padding:14px;max-width:calc(100vw - 80px)}}

.mobile-next-goal{display:none}@media(max-width:760px){.mobile-next-goal{display:block;margin:0 0 12px;color:var(--muted);font-size:11px;line-height:1.5}}
