:root{font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#363a30;background:#e8e9e1;font-synthesis:none;--paper:#f5f0e4;--ink:#363a30;--accent:#657956;--muted:#858577;--line:#dcd8cb}*{box-sizing:border-box}body{margin:0;padding:24px 16px}button,a,input,select{touch-action:manipulation}button,input,select{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none;min-height:44px}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible{outline:2px solid var(--accent);outline-offset:4px}button:active:not(:disabled){transform:scale(.96)}.game{max-width:460px;margin:0 auto;background:var(--paper);padding:28px 28px 20px;min-height:850px;border:1px solid #d7d8cd;border-radius:24px;box-shadow:0 18px 70px #39452d0c}header{display:flex;align-items:center;justify-content:space-between}.wordmark{color:var(--ink);text-decoration:none;font-weight:750;font-size:24px;letter-spacing:3px;display:flex;gap:12px;align-items:center}.wordmark span{font-size:9px;letter-spacing:2px;font-weight:500;border-left:1px solid #c5c6b6;padding-left:12px}.circle{border:1px solid var(--line);border-radius:50%;width:36px;min-height:36px;font-size:19px;color:#797d6a}.heading{display:flex;align-items:end;justify-content:space-between;margin:32px 0 22px;gap:12px}.eyebrow{font-size:11px;letter-spacing:1.2px;color:var(--muted);margin:0 0 7px}h1{font-size:29px;font-weight:650;letter-spacing:-1px;margin:0;white-space:nowrap}.title-dot{color:var(--accent);margin-left:3px}.map-button{font-size:12px;padding:0 0 2px;white-space:nowrap}.map-button span{margin-left:5px;color:var(--accent);font-size:19px}.status{display:flex;align-items:center;justify-content:space-between;padding:0 0 16px;border-bottom:1px solid var(--line);font-size:11px}.lives{display:flex;gap:5px;font-size:18px;color:#7e906c;letter-spacing:2px}.lives .lost{color:#d5d3c7}.level-label{display:flex;align-items:center;gap:6px;color:#767a68}.tiny-dot{height:5px;width:5px;background:var(--accent);border-radius:50%}.timer{font-variant-numeric:tabular-nums;color:#777a6c;letter-spacing:1px}.board-shell{margin-top:12px}.board-viewport{height:460px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c5c9b7 transparent;border-radius:4px}canvas{display:block;touch-action:pan-x pan-y;user-select:none;-webkit-user-select:none}.board-caption{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#777b6a;height:34px}.board-caption strong{font-size:15px;color:var(--ink);font-weight:600}.zoom{display:flex;align-items:center;gap:2px}.zoom button{min-height:30px;min-width:30px;font-size:17px}.zoom #zoom-reset{font-size:10px;font-variant-numeric:tabular-nums;width:40px}.progress-track{height:3px;background:#dfdfd0;overflow:hidden;border-radius:3px;margin:7px 0 16px}.progress-track>div{height:100%;width:0;background:#7e906c;transition:width .3s}.message{text-align:center;font-size:12px;color:#838575;min-height:18px;margin:0 0 20px}.message.error{color:#ae6552}.tools{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:10px}.tools button{font-size:11px;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;min-height:66px;border:1px solid var(--line);border-radius:14px}.tool-icon{font-size:25px;line-height:1;font-weight:400}.tools .hint{background:#e3e8d7;border-color:#d9dfcd;color:#4d6240}footer{display:flex;justify-content:space-between;gap:10px;font-size:9px;letter-spacing:.4px;color:#939584;padding-top:23px}dialog{border:1px solid #d5d7c8;border-radius:22px;padding:24px;background:var(--paper);color:var(--ink);width:min(430px,calc(100vw - 24px));max-height:90dvh;box-shadow:0 24px 100px #20271b30}dialog::backdrop{background:#28302166;backdrop-filter:blur(5px)}.dialog-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.dialog-top .eyebrow{margin:0}h2{font-size:26px;letter-spacing:-.6px;font-weight:650;margin:12px 0 10px}.description{font-size:12px;line-height:1.9;color:#7b7f6e}label.field{display:block;font-size:12px;margin:22px 0 10px}.shape-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.shape-option{border:1px solid var(--line);border-radius:12px;padding:12px 3px;font-size:11px;display:flex;flex-direction:column;align-items:center;gap:10px}.shape-option.selected,.segments .selected{background:#e2e8d6;border-color:#9dab89;color:#4d6240}.shape-preview{display:block;width:28px;height:38px;background:radial-gradient(#7d866a 1px,transparent 1px);background-size:5px 5px;border:1px solid #9ca18a}.shape-preview.oval{border-radius:50%}.shape-preview.diamond{clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}.shape-preview.arch{border-radius:50% 50% 0 0}.segments{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.segments button{border:1px solid var(--line);border-radius:10px;font-size:12px}.seed-row{display:flex;gap:8px}.seed-row input{width:100%;min-width:0;border:1px solid var(--line);border-radius:10px;padding:12px;background:#faf7ee;color:var(--ink);font-size:13px}.seed-row button{border:1px solid var(--line);border-radius:10px;width:50px;font-size:22px}.primary{background:var(--accent);color:#fff;border-radius:12px;width:100%;min-height:48px;font-size:13px;margin-top:24px}.secondary{border:1px solid var(--line);border-radius:12px;width:100%;margin-top:10px;font-size:12px}.text-link{font-size:11px;text-decoration:underline;text-underline-offset:4px;color:#727e61}.file-actions{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px;margin-top:10px}.help-step{display:flex;gap:15px;margin:24px 0}.help-step b{font-size:12px;color:var(--accent);padding-top:3px}.help-step p{margin:0;font-size:13px;line-height:1.8}.help-step small{display:block;color:var(--muted)}.summary{display:grid;grid-template-columns:repeat(3,1fr);text-align:center;margin:25px 0}.summary strong{display:block;font-size:25px;font-weight:500}.summary span{font-size:11px;color:var(--muted)}.celebrate{font-size:52px;color:var(--accent);margin-top:15px}.editor{display:grid;grid-template-columns:repeat(13,1fr);gap:3px;padding:10px;background:#e8e5d9;border-radius:10px;touch-action:none;user-select:none}.editor-cell{aspect-ratio:1;border-radius:2px;background:#f8f5ec;min-height:0;padding:0}.editor-cell.on{background:#8b9a77}.editor-actions{display:flex;justify-content:space-between;margin:8px 0}.form-error{font-size:12px;color:#ad5949;min-height:16px;line-height:1.5}.confetti{position:fixed;width:7px;height:12px;pointer-events:none;z-index:10;animation:fall 1.8s ease-out forwards}@keyframes fall{from{transform:translateY(-20px) rotate(0);opacity:1}to{transform:translateY(80vh) rotate(500deg);opacity:0}}@media(max-width:500px){body{padding:0;background:var(--paper)}.game{border:0;border-radius:0;box-shadow:none;min-height:100dvh;padding:22px 24px max(18px,env(safe-area-inset-bottom))}.heading{margin-top:27px}.board-viewport{height:clamp(220px,calc(100dvh - 438px),650px)}footer{padding-top:20px}}@media(max-width:360px){.game{padding-left:16px;padding-right:16px}h1{font-size:26px}.wordmark{font-size:21px}.heading{gap:5px}.map-button{font-size:11px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.level-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;max-height:48dvh;overflow:auto;margin:20px 0}.level-grid button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;min-height:60px;border:1px solid var(--line);border-radius:10px}.level-grid strong{font-size:18px}.level-grid small{font-size:9px;color:var(--muted)}.level-grid .completed{background:#e3e8d7}.level-grid .current{border:2px solid var(--accent)}.lives{gap:2px;font-size:16px;letter-spacing:0}

.update-notice{margin-top:12px;padding:10px 12px;border:1px solid #c9d2b8;border-radius:10px;background:#e3e8d7;font-size:11px;line-height:1.7}.update-notice button{display:block;text-decoration:underline;text-underline-offset:3px;font-size:12px;padding:3px 0;min-height:36px}.update-notice[hidden]{display:none}

.puzzle-info{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:var(--muted);margin-top:12px}.puzzle-info button{padding:7px 10px;border:1px solid #b9bda7;border-radius:9px;background:transparent;color:#414532;white-space:nowrap}.puzzle-info button[aria-pressed=true]{background:#377986;color:white}.only-one{color:#926b30;font-weight:700}.dependency-detail{font-size:12px;line-height:1.6;margin:7px 0 0;color:#377986}.dependency-detail:empty{display:none}

/* Board-first play layout: controls live in the menu, not around the board. */
body{padding:0;background:var(--paper)}
.game{width:100%;max-width:540px;height:100dvh;min-height:0;margin:0 auto;padding:max(6px,env(safe-area-inset-top)) 8px max(6px,env(safe-area-inset-bottom));border:0;border-radius:0;box-shadow:none;display:flex;flex-direction:column;overflow:hidden;position:relative}
.play-header{display:grid;grid-template-columns:60px 1fr 60px;align-items:center;gap:8px;flex:none;min-height:46px;border-bottom:1px solid var(--line)}
.play-header h1{text-align:center;font-size:23px;letter-spacing:0;font-weight:650}
.play-header button{font-size:14px;min-height:44px;padding:0 8px}
.play-header #open-menu{font-size:20px;letter-spacing:3px}
.play-status{display:flex;align-items:center;padding:4px 12px;min-height:28px;flex:none}
.play-status .lives{font-size:17px;gap:4px}
.board-shell{flex:1;min-height:0;margin:0}
.board-viewport{width:100%;height:100%;border-radius:0;scrollbar-width:none;overscroll-behavior:contain}
.board-viewport::-webkit-scrollbar{display:none}
.game .dependency-detail{flex:none;margin:0 10px 5px;font-size:11px;line-height:1.5}
.game .update-notice{flex:none;margin:0 8px 5px;padding:5px 10px}
.game .message{position:absolute;left:20px;right:20px;bottom:max(12px,env(safe-area-inset-bottom));margin:0;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:#f5f0e4f5;color:var(--ink);font-size:12px;line-height:1.6;pointer-events:none;box-shadow:0 3px 16px #363a3012;z-index:3}
.game .message.error{color:#a34f3f}.message[hidden]{display:none}
#game-menu h2{font-size:22px;margin:0}.menu-meta{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px;margin:16px 0}
#available-count{font-size:13px;color:var(--accent)}
.menu-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:18px 0}.menu-actions button{border:1px solid var(--line);border-radius:10px;font-size:14px;min-height:48px}.menu-actions button[aria-pressed=true]{background:#377986;color:white}
.menu-zoom{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:12px;font-size:13px}.menu-zoom .zoom button{min-width:44px;min-height:44px}.menu-note{font-size:12px;line-height:1.7;color:var(--muted);margin-bottom:0}
@media(max-width:500px){.game{min-height:0;padding:max(6px,env(safe-area-inset-top)) 8px max(6px,env(safe-area-inset-bottom))}.game .board-viewport{height:100%}}
/* Arcade: keep the playing surface large; feedback lives at the edges. */
body{background:#e9e4d7}.game{background:#f5f0e4;box-shadow:0 0 70px #494d3220;gap:0}.play-header{border-bottom:1px solid #424a3120;padding:0 4px}.play-header h1{font-size:23px;letter-spacing:2px}.play-header button{border:1px solid #636f432b;border-radius:12px;background:#faf7ef;box-shadow:0 2px 0 #d4d8c4;min-height:40px}.play-status{display:flex;align-items:center;justify-content:space-between;min-height:32px;padding:0 8px}.lives{color:#829565;font-size:18px;gap:5px}#score-mini{font:700 13px ui-monospace,monospace;color:#7a825f}#combo{font-size:12px;font-weight:850;color:#a36213;letter-spacing:1px}.board-shell{position:relative;border:1px solid #b6bda33b;border-radius:14px;overflow:hidden;background:#faf6ec;box-shadow:inset 0 1px 6px #6e77500b}.board-viewport{touch-action:none;overscroll-behavior:contain}#board{touch-action:none}.edge-effects{position:absolute;inset:0;pointer-events:none;z-index:2;border-radius:inherit;transition:box-shadow 700ms,background 700ms}.frost .edge-effects{box-shadow:inset 0 0 26px 8px #a6d7e177;background:linear-gradient(135deg,#d8f5ff66,transparent 14%,transparent 86%,#d8f5ff66)}.fever .edge-effects{box-shadow:inset 0 0 24px 5px #efb34870;animation:heat 900ms ease-in-out infinite alternate}.fever #combo{color:#b8750a;text-shadow:0 0 12px #f6c56280}.board-controls{display:flex;justify-content:center;flex:none;height:42px;align-items:center}.board-controls .zoom{display:flex;align-items:center;gap:0;background:#faf7ef;border:1px solid #dce0cf;border-radius:12px;overflow:hidden}.board-controls .zoom button{height:36px;min-width:48px;font-size:21px;color:#535f3d}.board-controls #zoom-reset{font:600 12px ui-monospace,monospace;min-width:62px}.message{bottom:58px!important;font-size:12px!important;max-width:88%;pointer-events:none;background:#fdfbf3ee!important;border:1px solid #d7dfcd;box-shadow:0 4px 18px #45523015}.settings{display:flex;gap:28px;margin:22px 0;font-size:14px}.settings label{display:flex;align-items:center;gap:8px}.settings input{width:18px;height:18px;accent-color:#778b56}.result-stars{display:flex;justify-content:center;gap:12px;margin:20px 0 12px;font-size:48px;color:#dedbce}.result-stars .earned{color:#d59a2f;text-shadow:0 3px 0 #ad781d;animation:star-in .55s both;animation-delay:calc(var(--i)*.18s)}.result-stars span:nth-child(2){font-size:60px;margin-top:-12px}.result-title{text-align:center!important}.result-score{text-align:center;font:800 64px/1.1 ui-rounded,system-ui,sans-serif;letter-spacing:-3px;color:#53693d;margin:18px 0 10px}.result-score small{display:block;font:500 12px/2 system-ui;letter-spacing:3px;color:#7b826b}.score-detail{text-align:center;font-size:12px;color:#787d6b}.summary{margin:24px 0!important}.summary strong{font-size:24px!important}.summary span{font-size:12px!important}.result-emblem{text-align:center;font-size:60px;color:#879a69}#player-name{width:100%;padding:16px;border:1px solid #ccd3bc;border-radius:12px;background:#fffdf7;font:inherit;color:#3e4930}.ranking-list{max-height:42dvh;overflow:auto;margin:20px 0}.ranking-row{display:grid;grid-template-columns:32px 1fr auto;gap:8px;align-items:center;padding:15px 8px;border-bottom:1px solid #dfe2d5;font-size:14px}.ranking-row span{overflow-wrap:anywhere}.ranking-row b{color:#9ca28d;font:600 13px ui-monospace,monospace}.ranking-row strong{font-size:12px;color:#8a6b25}.ranking-row.me{background:#e7edd9;border-radius:8px}.ranking-row:nth-child(-n+3) b{color:#bd8b33}.primary{box-shadow:0 3px 0 #4c6238}.primary:active{transform:translateY(2px);box-shadow:none}dialog{border:1px solid #cbd3ba!important;box-shadow:0 24px 90px #25351e40!important}dialog::backdrop{background:#27351c66;backdrop-filter:blur(4px)}
@keyframes star-in{from{opacity:0;transform:scale(.3) rotate(-15deg)}70%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@keyframes heat{to{box-shadow:inset 0 0 35px 9px #efb34880}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
@media(max-height:500px){.play-header{min-height:36px}.play-status{min-height:24px}.board-controls{height:36px}.game{padding-top:4px;padding-bottom:2px}}
/* Forest arcade cabinet: a clear separation between controls and playing field. */
:root{--accent:#1b6557;--ink:#183f36;--muted:#72877a;--line:#ccd8c9}
body{background:#0d2927}.game{background:linear-gradient(155deg,#1d4c43,#102f2d);border:0;box-shadow:0 0 80px #061b1b80;padding-left:10px;padding-right:10px}.play-header{border:0;padding:3px 2px 2px;min-height:59px;grid-template-columns:52px 1fr 52px}.stage-heading{text-align:center}.stage-heading>span{display:block;color:#91b7a4;font-size:8px;letter-spacing:2px;margin-bottom:3px}.play-header h1{color:#faf2d8;font-size:23px;font-weight:800;letter-spacing:1px;line-height:1.15}.play-header button{color:#d4e5c7;border:1px solid #648c7455;background:#28594b;box-shadow:0 3px 0 #0c2923,inset 0 1px 0 #7aa28a40;border-radius:12px;font-size:12px}.play-status{min-height:27px;padding:0 9px 2px}.lives{color:#e9bc69;font-size:16px;text-shadow:0 1px 0 #775b2c}.lives .lost{color:#597b69;text-shadow:none}#score-mini{color:#b6d5bc;font-size:12px}#combo,.fever #combo{color:#ffdc8e;text-shadow:0 0 10px #eac46a55}.board-shell{margin-top:0;border:3px solid #8eae8b;border-radius:17px;background:#f4f2df;box-shadow:0 3px 0 #091e19,inset 0 0 0 2px #ffffffa0}.board-viewport{border-radius:12px;background:radial-gradient(ellipse at 50% 10%,#fffdf0,#f0efdb)}.edge-effects{border-radius:12px}.frost .edge-effects{background:none;box-shadow:inset 0 0 14px 3px #a7dbe15c}.fever .edge-effects{background:none;box-shadow:inset 0 0 20px 3px #e9bd5655}.board-controls{height:48px;min-height:48px;gap:8px;justify-content:space-between;padding:6px 2px 0;flex-direction:row-reverse}.board-controls .zoom{flex:none;background:#254e43;border:1px solid #6b927655;border-radius:11px;box-shadow:0 2px 0 #09271f}.board-controls .zoom button{color:#ebedcf;min-width:39px;height:34px}.board-controls #zoom-reset{min-width:48px;color:#b9d1b9;font-size:11px}.board-controls .message{position:static!important;inset:auto!important;transform:none!important;flex:1;min-width:0;width:auto;max-width:none;min-height:0;margin:0;padding:0 2px!important;line-height:1.4;text-align:left;font-size:11px!important;color:#c9e4d6;background:none!important;border:0;border-radius:0;box-shadow:none;pointer-events:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.board-controls .message[hidden]{display:none}.board-controls .message.error{color:#ffd29b}.dependency-detail{color:#d0dfc9;font-size:11px}.update-notice{background:#e6e8d1}.primary{background:#1b6557;box-shadow:0 3px 0 #103b32;font-weight:650}.result-score{color:#1b6557}.result-stars .earned{color:#e7af45;text-shadow:0 3px 0 #9c6a1d}.result-title{color:#234c3d}.result-stars{margin-top:28px}dialog{background:#f5f3e6;border-radius:22px!important;border:2px solid #abc0a3!important}.dialog-top .eyebrow{color:#4b7d6c;font-size:10px;letter-spacing:1.6px}.menu-actions button{background:#edf0df;border-color:#ced9c5}.ranking-row.me{background:#dce9d2}.level-grid button.current{border-color:#1b6557;background:#dce9d2}.level-grid button.completed{color:#1b6557}.board-controls button:focus-visible,.play-header button:focus-visible{outline-color:#f6d99c}
@media(max-width:500px){.game{padding-left:7px;padding-right:7px}}
@media(max-height:500px){.play-header{min-height:44px}.stage-heading>span{display:none}.play-status{min-height:24px}.board-controls{height:42px;min-height:42px}}
/* Combo heat affects the cabinet, never covers the puzzle or moves its layout. */
body,.game{transition:background-color .35s,box-shadow .35s}.play-status{position:relative}.combo-meter{position:absolute;bottom:0;left:9px;right:9px;height:3px;background:#ffffff14;border-radius:3px;overflow:hidden;pointer-events:none}.combo-meter i{display:block;width:100%;height:100%;background:#c5dec2;transform-origin:left;transition:transform 100ms linear}.game.combo-hot{background:linear-gradient(150deg,#793d29,#42261f);box-shadow:0 0 90px #bf653b36}body.combo-hot{background:#382720}.combo-hot .play-header button{background:#85412c;border-color:#d4a37155;box-shadow:0 3px 0 #452419,inset 0 1px 0 #edb68a33}.combo-hot .stage-heading>span{color:#f4c78d}.combo-hot .board-shell{border-color:#d2a260;box-shadow:0 3px 0 #452419,0 0 20px #e2a04630}.combo-hot .board-controls .zoom{background:#69402b;border-color:#bc8d5c66}.combo-hot .combo-meter i{background:#ffcc70}.combo-hot #combo{color:#ffe4ac;font-size:14px;font-weight:900;letter-spacing:.5px}.combo-hot #score-mini{color:#ffdc9e}.game.fever{background:linear-gradient(145deg,#a32e32,#591d28 65%,#3e1924);box-shadow:0 0 100px #e8393545}body.fever{background:#3e171f}.fever .play-header button{background:#a43c39;border-color:#efb58566;box-shadow:0 3px 0 #541b22,inset 0 1px 0 #ffc58f55}.fever .stage-heading>span{color:#ffdb90;letter-spacing:1.7px}.fever .board-shell{border-color:#f1bd62;box-shadow:0 3px 0 #511c20,0 0 28px #fa993a55}.fever .board-controls .zoom{background:#6b2931;border-color:#e5a27366}.fever .board-controls .message{color:#ffe4be}.fever .lives{color:#ffdf85}.fever .combo-meter{height:4px;background:#ffe2a22b}.fever .combo-meter i{background:#ffda7b;box-shadow:0 0 10px #ffd66c}.fever #combo{color:#ffe5a6;font-size:15px;text-shadow:0 1px 0 #7c201b}.fever .edge-effects{background:none;animation:fever-breathe 1.2s ease-in-out infinite alternate;box-shadow:inset 0 0 12px 2px #f3ac3c35}
@keyframes fever-breathe{to{box-shadow:inset 0 0 18px 3px #f3ac3c55}}
@media(prefers-reduced-motion:reduce){body,.game,.combo-meter i{transition:none!important}.fever .edge-effects{animation:none!important}}
@media(max-width:360px){.combo-hot #combo{font-size:12px}.fever #combo{font-size:13px}}
/* Persistent current/best counters live above the board, not over it. */
.play-status{min-height:34px}.combo-record{display:flex;flex-direction:column;align-items:flex-end;gap:1px;font-size:11px;line-height:1.15;color:#e5d9b6;white-space:nowrap}.combo-record #score-mini{font-size:10px;color:#a8c8b2}#combo{font-size:12px;color:#bbd6c2;font-weight:750;letter-spacing:.3px}.combo-hot .combo-record,.fever .combo-record{color:#ffe4ad}.combo-total{color:#b77a20;font-weight:800!important}.result-combo{text-align:center;font-size:14px;color:#6a7f65}.result-combo strong{color:#aa721c;font-size:20px}@media(max-width:360px){#combo{font-size:11px}.combo-record{font-size:10px}.fever #combo{font-size:12px}}
.star-criteria{margin:12px 0 0;padding:10px 12px;border:1px solid #d7dcc8;border-radius:10px;background:#ecefdc;font-size:11px;color:#687c60;text-align:left}.star-criteria summary{cursor:pointer;font-weight:650}.star-criteria p{line-height:1.9;margin:9px 0 0}.ranking-switch{display:block;margin:12px auto 0}.result-score{font-size:clamp(40px,14vw,64px);overflow-wrap:anywhere}.combo-record #score-mini{font-variant-numeric:tabular-nums}
/* All-stage rankings stay in a separate dialog so browsing never changes a run. */
#rankings-modal{width:min(560px,calc(100vw - 20px));padding:22px;max-height:calc(100dvh - 24px)}
#rankings-modal h2{margin:16px 0}.ranking-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;background:#e5e9d9;border-radius:12px}.ranking-tabs button{min-height:40px;border-radius:9px;font-size:13px;color:#627864}.ranking-tabs button[aria-pressed=true]{background:#1b6557;color:#fff;box-shadow:0 2px 4px #163d3022}.ranking-overview-stats{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:14px 0;font-size:12px;color:#627864}.ranking-overview-stats button{min-height:32px;padding:4px 8px}.ranking-stages{max-height:52dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.ranking-stage{background:#fbfaf0;border:1px solid #d5ddc9;border-radius:12px;margin-bottom:9px;overflow:hidden}.ranking-stage>summary{list-style:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.1fr) 10px;align-items:center;gap:8px;padding:14px 12px;cursor:pointer}.ranking-stage>summary::-webkit-details-marker{display:none}.ranking-stage>summary::after{content:'⌄';font-size:17px;color:#718a71;transition:transform .15s}.ranking-stage[open]>summary{border-bottom:1px solid #d5ddc9;background:#eaf0de}.ranking-stage[open]>summary::after{transform:rotate(180deg)}.ranking-stage-title{font-size:14px;font-weight:750}.ranking-stage-count{font-size:11px;color:#55775f}.ranking-stage-high{text-align:right;font-size:15px;font-weight:800;color:#946a21;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.ranking-stage small{display:block;font-size:10px;line-height:1.8;font-weight:450;color:#7b8a70}.ranking-stage-content{padding:0 10px}.ranking-stage-content .description{padding:8px 4px}.stage-scores-scroll{max-height:34dvh;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.stage-scores{width:100%;border-collapse:collapse;font-size:12px;table-layout:fixed}.stage-scores th{position:sticky;top:0;text-align:left;background:#fbfaf0;color:#7a8c75;padding:10px 3px;font-size:10px;font-weight:500}.stage-scores th:first-child{width:34px}.stage-scores th:last-child{width:46%;text-align:right}.stage-scores td{padding:12px 3px;border-top:1px solid #e1e6d6;vertical-align:middle}.stage-scores td:last-child{text-align:right}.stage-scores strong{font-size:15px;font-variant-numeric:tabular-nums;color:#1b6557}.stage-rank{color:#a17c37;font:600 12px ui-monospace,monospace}.stage-player{overflow-wrap:anywhere}.ranking-note{font-size:10px;line-height:1.7;color:#7b8a70;margin:12px 0 0}
@media(max-width:380px){#rankings-modal{padding:16px}.ranking-stage>summary{padding:12px 9px;gap:5px}.ranking-stage-title{font-size:13px}.ranking-stage-high{font-size:14px}}
/* Gold Combo lettering sits in the existing status strip, clear of the puzzle. */
.game .play-status{min-height:42px;overflow:hidden}
.game #combo{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:112px;height:40px;margin:0 4px;padding:0 10px;font-size:12px;letter-spacing:0;text-shadow:none;isolation:isolate;pointer-events:none}
#combo-lettering{position:relative;z-index:1;display:flex;align-items:center;gap:5px;transform-origin:50% 60%;will-change:transform}
.game #combo-number{font:900 italic 29px/.95 ui-rounded,system-ui,sans-serif;letter-spacing:-1px;color:#b4cfba;font-variant-numeric:tabular-nums}
.combo-copy{display:flex;flex-direction:column;gap:1px;text-align:left}.combo-copy strong{font:850 italic 12px/1 ui-rounded,system-ui,sans-serif;letter-spacing:.2px;color:#aecbb6}.combo-copy small{height:10px;font:650 8px/10px system-ui,sans-serif;letter-spacing:1px;color:#ffdb8e}
.game.combo-hot #combo-number,.game.combo-hot .combo-copy strong{color:#ffda72;background:linear-gradient(180deg,#fffde2 2%,#fff1a8 26%,#f6c24f 46%,#b56b1d 50%,#ffe69b 62%,#eaa530 82%,#fff2b5);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 1px 0 #653416) drop-shadow(0 2px 0 #783a15) drop-shadow(0 0 5px #ffd05d66)}
.game.fever #combo-number{font-size:32px}.game.fever .combo-copy strong{font-size:13px}.game.fever .combo-copy small{color:#fff1b4}
#combo-ring{position:absolute;width:94px;height:26px;border:1px solid #ffe49c;border-radius:50%;background:radial-gradient(ellipse,#ffe29955,transparent 65%);box-shadow:0 0 10px #f6bb5155;opacity:0;z-index:-1}
#combo-sparks{position:absolute;left:50%;top:50%;width:0;height:0;pointer-events:none}#combo-sparks i{position:absolute;left:-2px;top:-2px;width:4px;height:4px;background:#fff0a8;box-shadow:0 0 5px #ffc340;clip-path:polygon(50% 0,65% 35%,100% 50%,65% 65%,50% 100%,35% 65%,0 50%,35% 35%);opacity:0}
#combo-gain{position:absolute;right:-3px;top:15px;z-index:2;font:850 italic 12px/1 ui-rounded,system-ui,sans-serif;color:#ffe899;text-shadow:0 1px 2px #5e2b0b;opacity:0}
@media(max-width:360px){.game #combo{min-width:104px;padding:0 6px;margin:0 2px}.game #combo-number{font-size:26px}.game.fever #combo-number{font-size:29px}.combo-copy strong,.game.fever .combo-copy strong{font-size:11px}}
@media(prefers-reduced-motion:reduce){#combo-lettering{will-change:auto}}
.game #combo{min-width:128px}.game.combo-hot #combo-number{font-size:32px}.game.fever #combo-number{font-size:36px}.game.combo-hot .combo-copy strong{font-size:13px}#combo-gain{right:auto;left:calc(100% + 3px);white-space:nowrap}#combo-sparks i{left:-3px;top:-3px;width:6px;height:6px}
@media(max-width:360px){.game #combo{min-width:110px}.game.combo-hot #combo-number{font-size:29px}.game.fever #combo-number{font-size:32px}.game.combo-hot .combo-copy strong{font-size:11px}#combo-gain{font-size:11px;left:100%}}
/* The lobby is the initial route; a puzzle is mounted only after a choice. */
.game[hidden],.level-lobby[hidden],.level-lobby [hidden]{display:none}
.level-lobby{width:100%;max-width:640px;min-height:100dvh;margin:0 auto;padding:max(24px,env(safe-area-inset-top)) 24px max(24px,env(safe-area-inset-bottom));background:linear-gradient(155deg,#1d4c43,#102f2d);color:#faf2d8}
.lobby-header{gap:12px;min-height:30px}.lobby-header>span{font-size:13px;font-weight:750;letter-spacing:2px}.lobby-header a{font-size:11px;color:#b3c9b2;text-decoration:none;min-height:44px;display:flex;align-items:center}.lobby-intro{margin:28px 0 20px}.lobby-intro .eyebrow{font-size:9px;letter-spacing:2px;color:#a8c6ac}.lobby-intro h1{font-size:34px;letter-spacing:1px;line-height:1.3;margin:10px 0 12px}.lobby-intro>p:last-child{font-size:12px;color:#b3c9b2;line-height:1.7}
.lobby-resume{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:76px;padding:17px 20px;margin:22px 0 26px;text-align:left;color:#ffdf97;background:#2c5b48;border:1px solid #b8a66b99;border-radius:15px;box-shadow:0 3px 0 #092c24}.lobby-resume small{display:block;font-size:11px;color:#c1d5b6;margin-bottom:5px}.lobby-resume strong{font-size:19px;letter-spacing:.5px}.lobby-resume>b{font-size:26px;font-weight:450}
.lobby-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:24px 0 10px}.lobby-section-heading h2{font-size:17px;letter-spacing:1px;margin:0;color:#ecedd1}.lobby-section-heading button{color:#e2c17c;font-size:12px;min-height:44px}.lobby-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.lobby-stage{min-height:106px;border-radius:13px;background:#f4f2df;border:1px solid #b4c4a7;box-shadow:0 3px 0 #071f1c;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#204c40;padding:13px 4px}.lobby-stage-number{font:850 25px/1 ui-rounded,system-ui,sans-serif;letter-spacing:-.5px;font-variant-numeric:tabular-nums}.lobby-stage-size{font-size:10px;color:#6d8067}.lobby-stage small{font-size:10px;color:#7b8d73}.lobby-stage.completed{background:#dce8ce}.lobby-stage.completed small{color:#a46e20}.lobby-stage.in-progress{outline:2px solid #e6bf67;outline-offset:2px}.lobby-stage.in-progress small{color:#8b651e;font-weight:700}.lobby-stage:disabled{opacity:1;background:#284e43;border-color:#486a54;color:#99b29b;box-shadow:0 2px 0 #0b2922}.lobby-stage:disabled .lobby-stage-size,.lobby-stage:disabled small{color:#8ba48d}.lobby-free{color:#c6d7b9;border-color:#638069;background:#234c40;margin-top:28px}.lobby-footnote{margin:18px 0 0;color:#8fae97;font-size:11px;text-align:center;line-height:1.7}.lobby-notice{font-size:12px;line-height:1.6;color:#ffdc93;padding:8px 0}.level-lobby button:focus-visible,.level-lobby a:focus-visible{outline-color:#ffdc93}
@media(max-width:420px){.level-lobby{padding-left:19px;padding-right:19px}.lobby-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.lobby-stage{min-height:92px}.lobby-intro h1{font-size:30px}.lobby-header>span{font-size:11px;letter-spacing:1px}}
