
:root{--paper:#f4f2ec;--ink:#232b26;--muted:#68736b;--line:#d6dbd3;--ball-size:64px;color-scheme:light}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,sans-serif}button,select{font:inherit;cursor:pointer}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #719777;outline-offset:4px}[hidden]{display:none!important}
.sidebar{position:fixed;inset:0 auto 0 0;width:240px;background:#152d25;color:#f4f2ec;padding:42px 24px;display:flex;flex-direction:column;border-right:1px solid #30473b;z-index:5}.brand{color:inherit;text-decoration:none;font-size:25px;font-weight:900;letter-spacing:1px}.brand span{color:#d4e2b0}.brand small{display:block;font-size:8px;letter-spacing:2px;font-weight:500;margin-top:9px;color:#b6c7b6}.sidebar-label{font-size:10px;letter-spacing:2px;color:#9dad9e;margin-top:75px;margin-bottom:14px}.game-menu{display:flex;flex-direction:column;gap:9px}.game-menu [data-game]{display:flex;align-items:center;gap:9px;padding:17px 10px;border:0;border-bottom:1px solid #ffffff18;background:transparent;color:#c5d0c3;text-align:left;font-size:15px;border-radius:3px}.game-menu [data-game][aria-current=page]{background:#d6e6b6;color:#183021}.game-menu [data-game]:hover{background:#ffffff14}.game-menu [data-game][aria-current=page]:hover{background:#e1edca}.menu-number{font-size:10px;opacity:.65}.menu-arrow{margin-left:auto}.sidebar-bottom{margin-top:auto;font-size:11px;color:#cad7c5}.sidebar-bottom p{font-size:10px;color:#96aa99}.live-dot{display:inline-block;width:6px;height:6px;background:#c7dc9d;border-radius:50%;margin-right:6px}
main{margin-left:240px;padding:30px 32px 20px;min-width:0}.page-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:25px;gap:15px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:var(--muted);margin:0 0 9px}h1{font-family:Georgia,serif;font-size:50px;font-weight:500;letter-spacing:-2px;margin:0}.preview{font-size:10px;letter-spacing:1.5px;color:var(--muted);padding:9px 12px;border:1px solid var(--line);border-radius:30px}
.mode-picker{margin-top:60px;max-width:1100px}.picker-intro{font:25px Georgia,serif;color:#48614c;margin-bottom:28px}.mode-picker nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.mode-picker button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-width:0;padding:30px 24px;background:#e5eade;border:1px solid #c9d2c2;border-radius:9px;color:var(--ink)}.mode-picker button:hover{background:#d8e5c9;border-color:#7c9b6d}.mode-number{font-size:11px;color:#6e8561}.mode-picker strong{font:28px Georgia,serif;margin:35px 0 18px}.mode-info{font-size:13px;line-height:1.8;color:#5f705e;min-height:95px}.mode-link{font-size:12px;font-weight:650;margin-top:35px}.mode-picker button:disabled{opacity:.5;cursor:default}
.workspace-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}.workspace-main{min-width:0}.ad-space{display:none}.playground{padding:0;background:transparent}.game-header{display:flex;align-items:center;gap:18px;margin-bottom:18px}.game-header h2{font-size:15px;letter-spacing:.1em;margin:0;font-weight:650}.back-button{border:0;border-right:1px solid #b6c2b0;padding:4px 18px 4px 0;background:none;color:#52654e;font-size:12px}.puzzle{margin-left:auto;font-size:11px;color:var(--muted);white-space:nowrap}.boards{display:grid;grid-template-columns:minmax(0,1fr);gap:18px}.boards.dual{grid-template-columns:repeat(2,minmax(0,1fr));--ball-size:clamp(28px,2.5vw,48px)}.board-card{position:relative;min-width:0;background:radial-gradient(ellipse at 50% 0,#345145,#172c27 75%);border-radius:10px;padding:22px 18px;color:#f3f2e8}.board-heading{display:flex;justify-content:space-between;gap:8px;margin:0 4px 24px;font-size:16px}.board-heading span{font-size:13px;color:#d4ddb7}.lanes{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:clamp(7px,1vw,18px)}.lane{padding:0;border:0;background:none;color:inherit;min-width:0}.tube{height:clamp(370px,calc(100vh - 310px),700px);border:2px solid #8ba38b;border-top:0;border-radius:0 0 26px 26px;padding:12px 5px;display:flex;flex-direction:column-reverse;align-items:center;gap:7px;background:linear-gradient(90deg,#ffffff08,transparent,#ffffff08);transition:box-shadow .2s,border-color .2s}.lane:hover:not(:disabled) .tube{border-color:#dfd8ab}.lane.selected .tube{border-color:#f2d18b;box-shadow:0 0 24px #f2d18b55}.lane.moved .tube{border-color:#bcd5df}.ball{display:block;width:var(--ball-size);height:var(--ball-size);flex-shrink:0;border-radius:50%;position:relative;box-shadow:inset -7px -7px 12px #0006,inset 5px 5px 9px #fff8}.ball span{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:16px;font-weight:750;text-shadow:0 1px 3px #000}.lane-number{display:block;margin-top:13px;font-size:11px;color:#b8c9b6}.lane:disabled{cursor:default}
.controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:16px}.controls button,.controls select,#backToSpeedSort{padding:10px 14px;border:1px solid #b9c5b6;border-radius:5px;background:#f4f5ef;color:#284332;font-size:12px}.controls button:hover{background:#fff}.controls button:disabled{opacity:.4;cursor:default}.controls label{font-size:11px;color:var(--muted)}.controls select{margin-left:5px}#status{color:var(--muted);font-size:12px;margin:13px 0;min-height:18px}.help{margin-top:8px}.help summary{cursor:pointer;font-size:11px;color:#3c5042}.notes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px;margin-top:15px}.notes h3{font-size:12px}.notes p{font-size:12px;line-height:1.7;color:var(--muted)}footer{margin-top:45px;font-size:10px;color:var(--muted)}body.is-playing footer{display:block}
.result{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:16px 0;padding:14px 16px;border:1px solid #a6ba96;background:#dce8cd;border-radius:7px}.result h3{font:23px Georgia,serif;margin:0;color:#23422c}.result>p{order:4;flex-basis:100%;font-size:11px;color:#4c654d;margin:0}.result-scores{display:flex;gap:15px;margin-left:auto}.result-score{display:flex;align-items:baseline;gap:7px}.result-score span{font-size:12px}.result-score strong{font-size:23px;font-weight:650}.result-score small{font-size:9px;color:#5b6f56}.result>button{background:#274d34;color:#fff;border:0;border-radius:5px;padding:9px 12px;font-size:11px}
.coming-soon{min-height:65vh;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:40px}.coming-soon h2{font:50px Georgia,serif;margin:12px 0}.coming-soon p{max-width:500px;color:var(--muted);line-height:1.7}.coming-soon button{margin-top:20px}
.move-trace-layer{position:absolute;inset:0;z-index:3;pointer-events:none}.move-trace-layer svg{position:absolute;inset:0;overflow:visible}.move-trace-path{fill:none;stroke:#f2d18b;stroke-width:3;stroke-dasharray:7 5;stroke-linejoin:round;opacity:.85}.moving-ball{position:absolute;animation:none!important;z-index:2}.trace-source .tube{border-color:#f2d18b;box-shadow:0 0 15px #f2d18b44}.trace-destination .tube{border-color:#b9ded1;box-shadow:0 0 15px #b9ded144}.move-trace-caption{position:absolute;bottom:3px;left:50%;transform:translateX(-50%);background:#122a23;color:#f2d18b;border-radius:5px;padding:4px 9px;font-size:11px;white-space:nowrap;z-index:4}.last-move{font-size:11px;color:#d4ddb7;margin:10px 4px 0}
@media(min-width:1051px){.boards:not(.dual){width:70%;margin-inline:0}.boards.small-puzzle:not(.dual){width:60%}}
@media(min-width:1400px){.workspace-layout{grid-template-columns:minmax(0,1fr) 160px}.ad-space{display:block;min-height:600px}}
@media(max-width:1050px){.sidebar{width:200px;padding:30px 17px}main{margin-left:200px;padding:24px}.boards.dual{grid-template-columns:1fr;--ball-size:48px}.tube{height:380px}.ball{width:min(var(--ball-size),6vw);height:min(var(--ball-size),6vw)}.mode-picker nav{grid-template-columns:1fr}.mode-picker{margin-top:30px}.mode-picker button{padding:24px}.mode-picker strong{margin:12px 0}.mode-info{min-height:0}.mode-link{margin-top:20px}}
@media(max-width:900px){.sidebar{position:static;width:100%;padding:18px 20px}.sidebar-label,.sidebar-bottom,.brand small{display:none}.brand{font-size:21px}.game-menu{flex-direction:row;gap:5px;margin-top:15px}.game-menu [data-game]{flex:1;justify-content:center;padding:10px 7px;font-size:11px;white-space:nowrap}.menu-number,.menu-arrow{display:none}main{margin:0;padding:20px 14px}.page-header{margin-bottom:14px}h1{font-size:37px}.preview{font-size:8px;padding:7px}.page-header .eyebrow{font-size:8px;letter-spacing:1px}.game-header{gap:12px}.game-header h2{font-size:12px}.puzzle{font-size:10px}.board-card{padding:18px 8px}.lanes{gap:6px}.tube{height:280px;padding:8px 2px;gap:6px;border-radius:0 0 17px 17px}.ball,.boards.dual .ball{width:clamp(26px,7vw,38px);height:clamp(26px,7vw,38px)}.ball span{font-size:12px}.notes{grid-template-columns:1fr;gap:0}.controls{gap:8px}.controls button{padding:10px}.controls label{max-width:100%}.board-heading{font-size:14px}.board-heading span{font-size:11px}.coming-soon{padding:25px 10px}.coming-soon h2{font-size:35px}.result-scores{margin-left:0}.result h3{width:100%}.result{padding:12px}.result>button{margin-left:auto}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.size-picker{display:flex;align-items:center;gap:12px;margin:0 0 24px;font-size:14px}.size-picker select{padding:8px 12px;border:1px solid var(--line);border-radius:5px;background:var(--paper)}
/* Fit each tube to its capacity; ball diameter also follows available lane width. */
.board-card{container-type:inline-size;--lane-gap:10px;--ball-limit:64px;--stack-gap:7px;--actual-ball-size:min(var(--ball-limit),calc(480px / var(--capacity)),calc((100cqw - (var(--lane-count) - 1)*var(--lane-gap))/var(--lane-count) - 14px))}
.boards.dual .board-card{--ball-limit:48px;--lane-gap:6px;--actual-ball-size:min(var(--ball-limit),calc(480px / var(--capacity)),calc((100cqw - (var(--lane-count) - 1)*var(--lane-gap))/var(--lane-count) - 10px))}
.board-card .lanes{gap:var(--lane-gap)}
.board-card .ball,.boards.dual .board-card .ball{width:var(--actual-ball-size);height:var(--actual-ball-size)}
.board-card .ball span{font-size:min(16px,calc(var(--actual-ball-size)*.5))}
.board-card .tube{box-sizing:content-box;width:var(--actual-ball-size);padding-left:2px;padding-right:2px;margin-inline:auto;height:calc(var(--capacity)*var(--actual-ball-size) + (var(--capacity) - 1)*var(--stack-gap) + 24px);gap:var(--stack-gap)}
@media(max-width:900px){.board-card,.boards.dual .board-card{--lane-gap:4px;--ball-limit:38px;--stack-gap:5px;--actual-ball-size:min(var(--ball-limit),calc((100cqw - (var(--lane-count) - 1)*var(--lane-gap))/var(--lane-count) - 8px))}.board-card .lane-number{font-size:9px}.board-card .ball span{font-size:clamp(8px,2.6vw,12px)}}

.secondary-controls{display:contents}.settings-toggle,.board-zoom,.scroll-hint{display:none}.lane,button,select{touch-action:manipulation}
@media(max-width:900px){
  body.is-playing .brand{display:none}body.is-playing .sidebar{padding:8px 14px}body.is-playing .game-menu{margin-top:0}
  .game-menu [data-game],.back-button,.controls button,.controls select,.size-picker select{min-height:44px}
  .game-header{flex-wrap:wrap;margin-bottom:12px}.game-header .puzzle{font-size:10px}
  .playground{display:flex;flex-direction:column}.game-header{order:0}.controls{order:1}#status{order:2}.boards{order:3}.result{order:4}
  .controls{position:sticky;top:0;z-index:6;margin-top:0;padding:8px 0;background:var(--paper);gap:6px;border-bottom:1px solid var(--line)}
  .controls button{font-size:12px;padding:9px 10px}.settings-toggle{display:inline-block;margin-left:auto}
  .secondary-controls{display:none;flex-basis:100%;flex-wrap:wrap;gap:10px;padding:10px 0 2px}.secondary-controls.is-open{display:flex}
  .controls select{font-size:16px;max-width:190px}.controls label{display:flex;align-items:center;gap:4px}
  .board-zoom{display:inline-block}.board-zoom[aria-pressed="true"]{background:#dce8cd}
  .boards.is-zoomed .board-card.playable-board{--actual-ball-size:32px;--stack-gap:5px}
  .boards.is-zoomed .board-card.playable-board .lanes{grid-template-columns:repeat(var(--lane-count),minmax(44px,1fr))!important;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding-bottom:8px}
  .board-card .lane{min-height:44px}.board-card .tube{border-radius:0 0 19px 19px}
  .boards.is-zoomed .board-card.playable-board .ball span{font-size:14px}
  .scroll-hint:not([hidden]){display:block;font-size:11px;color:#d4ddb7;margin:0 4px 6px}
  .move-trace-layer{overflow:hidden}.move-trace-caption{max-width:calc(100% - 16px);white-space:normal;text-align:center}
  .result{scroll-margin-top:80px}.result-scores{flex-wrap:wrap}.help summary{padding:14px 0}
}

@media(max-width:900px) and (max-height:500px){body.is-playing .sidebar{display:none}body.is-playing main{padding-top:8px}.game-header{margin-bottom:4px}.controls{padding:4px 0}#status{margin:6px 0;font-size:11px}}

.lane-number.empty-lane::after{content:' · empty'}
@media(max-width:900px){.boards:not(.is-zoomed) .lane-number.empty-lane::after{content:''}}

.game-menu a{text-decoration:none;cursor:pointer}.result-ad{order:5}.ad-slot:empty{pointer-events:none}

.selection-ad,.result-ad{display:none;min-height:100px;margin-top:24px}
@media(max-width:900px){.selection-ad,.result-ad{display:block}}

.cards-game{max-width:700px}.cards-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;color:var(--muted)}#cardsPuzzleId{font-size:11px;white-space:nowrap}.cards-hand{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;background:radial-gradient(ellipse at top,#345145,#172c27);padding:28px;border-radius:10px;margin:14px 0 20px}.number-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-width:0;aspect-ratio:5/7;border:2px solid #dbded3;border-radius:9px;background:#faf9f4;color:#243b30;box-shadow:0 6px 12px #0002}.number-card strong{font:55px Georgia,serif}.number-card>span{font-size:30px}.number-card small{font-size:10px;color:#657365}.number-card.red-suit{color:#b54242}.number-card:disabled{opacity:.45;cursor:default}.number-card:hover:not(:disabled){border-color:#d4e2b0;transform:translateY(-2px)}.cards-expression{display:flex;align-items:center;justify-content:center;min-height:80px;padding:14px;border:1px solid var(--line);border-radius:8px;background:#fffdf8;font-size:23px;overflow-wrap:anywhere;text-align:center}.cards-operators{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:14px 0}.cards-operators button,.cards-actions button{min-height:46px;border:1px solid #b9c5b6;border-radius:5px;background:#f4f5ef;color:#284332;font-size:21px}.cards-actions{display:flex;flex-wrap:wrap;gap:8px}.cards-actions button{font-size:13px;padding:10px 16px}.cards-actions .primary-action{background:#274d34;color:#fff}.cards-game button:disabled{cursor:default;opacity:.45}#cardsStatus{font-size:13px;color:#52634f;min-height:22px;line-height:1.6}.cards-hint{padding:13px 16px;background:#e5eade;border-radius:6px;font-size:14px;line-height:1.7}.cards-stats{font-size:12px;color:var(--muted)}.cards-game .help p{font-size:13px;line-height:1.8;color:var(--muted)}
@media(max-width:900px){.cards-hand{gap:8px;padding:16px 10px}.number-card strong{font-size:clamp(30px,8vw,48px)}.number-card>span{font-size:23px}.number-card{gap:4px}.number-card small{font-size:9px}.cards-intro{align-items:flex-start;font-size:12px}.cards-expression{font-size:19px;min-height:72px}.cards-actions button{padding:10px 12px;flex-grow:1}.cards-operators button{min-height:48px}.cards-game{max-width:700px}.cards-hand .number-card{min-height:110px}}

.cards-expression{position:relative;padding-right:52px}.cards-expression.answer-correct{border-color:#4d8759;background:#f1f8eb}.cards-expression.answer-wrong{border-color:#ba4a45;background:#fff4f1}.cards-expression.answer-correct::after,.cards-expression.answer-wrong::after{position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:28px;font-weight:800}.cards-expression.answer-correct::after{content:'✓';color:#2e7d32}.cards-expression.answer-wrong::after{content:'✕';color:#b63832}

.cards-expression{flex-direction:column;gap:10px}.cards-expression output{display:block;width:100%}.cards-expression .cards-hint{width:100%;margin:0;padding:10px 0 0;border-top:1px solid var(--line);background:transparent;font-size:clamp(20px,2vw,24px);font-weight:500;text-align:left}.cards-operators{grid-template-columns:repeat(6,minmax(0,1fr)) minmax(105px,1.5fr)}.cards-operators #cardsNew{font-size:13px;background:#dce8cd}
@media(max-width:900px){.cards-operators{grid-template-columns:repeat(4,minmax(0,1fr))}.cards-operators #cardsNew{grid-column:span 2}}

.cards-operators button[data-card-op]{min-height:64px;font-size:30px;font-weight:750}.cards-operators #cardsNew{min-height:64px;font-weight:650}

.sudoku-game{max-width:580px}.sudoku-settings,.sudoku-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.sudoku-settings label{font-size:13px;color:var(--muted)}.sudoku-settings select,.sudoku-settings button,.sudoku-controls button{min-height:44px;padding:9px 13px;border:1px solid #b9c5b6;border-radius:5px;background:#f4f5ef;color:#284332;font-size:13px}.sudoku-meta{font-size:11px;color:var(--muted);margin:15px 0}.sudoku-grid{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));width:min(100%,450px);border:2px solid #284332;background:#284332}.sudoku-cell{aspect-ratio:1;padding:0;min-width:0;border:0;border-right:1px solid #c8d1c3;border-bottom:1px solid #c8d1c3;border-radius:0;background:#fffdf8;font-size:25px;font-weight:500;color:#28629a;position:relative;display:grid;place-items:center}.sudoku-cell.given{font-weight:800;color:#243b30}.sudoku-cell.block-right{border-right:2px solid #284332}.sudoku-cell.block-bottom{border-bottom:2px solid #284332}.sudoku-cell.peer{background:#e7eee0}.sudoku-cell.matching{background:#f0e7be}.sudoku-cell.selected{background:#c2d7ad;box-shadow:inset 0 0 0 2px #537843}.sudoku-cell.hovered{box-shadow:inset 0 0 0 2px #789369}.sudoku-cell.conflict{color:#ad302b;background:#fce0db}.sudoku-cell:focus-visible{outline:2px solid #254a35;outline-offset:-3px;z-index:1}.sudoku-notes{display:grid;grid-template-columns:repeat(3,1fr);width:100%;height:100%;padding:3px;color:#637359;font-size:10px;font-weight:400}.sudoku-notes span{display:grid;place-items:center}.sudoku-pad{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;max-width:450px;margin:14px 0}.sudoku-pad button{min-height:46px;border:1px solid #b9c5b6;background:#f4f5ef;color:#284332;font-size:23px;border-radius:5px;padding:4px}.sudoku-pad #sudokuErase{font-size:12px}.sudoku-controls [aria-pressed=true]{background:#c2d7ad;border-color:#719777}.sudoku-game button:disabled{opacity:.45;cursor:default}#sudokuStatus{font-size:13px;color:#52634f;line-height:1.65;min-height:42px;max-width:450px}.sudoku-game .help p{font-size:13px;line-height:1.8;color:var(--muted)}
@media(max-width:900px){.game-menu{flex-wrap:wrap}.game-menu [data-game]{flex:1 1 40%}.sudoku-grid{width:min(100%,450px)}.sudoku-settings{gap:7px}.sudoku-settings select{font-size:16px}.sudoku-cell{font-size:clamp(19px,6vw,25px)}.sudoku-notes{font-size:clamp(8px,2.5vw,10px);padding:2px}.sudoku-pad{grid-template-columns:repeat(5,minmax(0,1fr))}.sudoku-pad button{min-height:48px}.sudoku-controls button{flex:1}.sudoku-controls{max-width:450px}}

@media(min-width:480px) and (max-width:900px){.game-menu [data-game]{flex:1 1 0}}

@media(max-width:480px){.sudoku-settings{display:grid;grid-template-columns:minmax(0,1fr) auto auto}.sudoku-settings label{font-size:0}.sudoku-settings select{width:100%;min-width:0;padding:9px}.sudoku-settings button{font-size:12px;padding:9px 10px}}

.sudoku-grid.is-solved{border-color:#54813e;outline:3px solid #a7c890;outline-offset:3px}.sudoku-grid.celebrating{animation:sudoku-celebrate 650ms ease-in-out 3}@keyframes sudoku-celebrate{0%,100%{box-shadow:0 0 0 0 #84ba6455;filter:brightness(1)}50%{box-shadow:0 0 0 10px #84ba6433,0 0 28px #84ba6455;filter:brightness(1.08)}}
@media(prefers-reduced-motion:reduce){.sudoku-grid.celebrating{animation:none;box-shadow:0 0 0 5px #84ba6433;filter:none}}

body.sudoku-dialog-open{overflow:hidden}.sudoku-celebration{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px;background:#10291fc9}.sudoku-victory-card{position:relative;z-index:2;text-align:center;background:#f4f2ec;color:#23432d;border:2px solid #bfd5a5;border-radius:16px;box-shadow:0 18px 70px #0004;padding:40px 30px;max-width:440px;width:100%;animation:sudoku-banner-in 350ms ease-out}.sudoku-victory-card h2{font:48px Georgia,serif;margin:14px 0}.sudoku-victory-card>p:not(.eyebrow){font-size:16px;line-height:1.6}.sudoku-victory-card #sudokuVictoryContinue{border:0;border-radius:6px;background:#274d34;color:#fff;min-height:48px;padding:12px 20px;font-size:15px;margin-top:16px}.victory-close{position:absolute;right:8px;top:6px;background:transparent;color:#52634f;border:0;width:44px;height:44px;font-size:28px}.sudoku-fireworks{position:absolute;inset:0;overflow:hidden;pointer-events:none}.firework-burst{position:absolute;left:24%;top:22%}.firework-burst:nth-child(2){left:76%;top:30%}.firework-burst:nth-child(3){left:50%;top:12%}.firework-spark{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--spark-color);box-shadow:0 0 10px var(--spark-color);opacity:0;animation:sudoku-firework 1500ms ease-out var(--spark-delay) 2}@keyframes sudoku-firework{0%{opacity:0;transform:translate(0,0) scale(.3)}15%{opacity:1}75%{opacity:.8}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.3)}}@keyframes sudoku-banner-in{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.sudoku-fireworks{display:none}.sudoku-victory-card{animation:none}}

/* Keep the compact victory banner centered on the Sudoku board. */
.sudoku-celebration{display:block;padding:0;background:#10291f80}
.sudoku-victory-card{position:absolute;left:var(--board-x,50%);top:var(--board-y,50%);transform:translate(-50%,-50%);width:var(--banner-width,300px);max-width:calc(100vw - 24px);box-sizing:border-box;padding:24px 18px;animation:sudoku-compact-in 350ms ease-out}
.sudoku-victory-card h2{font-size:34px;margin:10px 0}.sudoku-victory-card>p:not(.eyebrow){font-size:14px;line-height:1.4}.sudoku-victory-card #sudokuVictoryContinue{margin-top:10px;min-height:44px;padding:10px 16px;font-size:14px}
.sudoku-fireworks{inset:auto;left:var(--board-x,50%);top:var(--board-y,50%);width:420px;height:360px;transform:translate(-50%,-50%);overflow:visible}
@keyframes sudoku-compact-in{from{opacity:0;transform:translate(-50%,-50%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%)}}
@media(prefers-reduced-motion:reduce){.sudoku-victory-card{animation:none}}

.sudoku-victory-card #speedVictoryContinue{border:0;border-radius:6px;background:#274d34;color:#fff;min-height:44px;padding:10px 16px;font-size:14px;margin-top:10px}


/* Cards, operators, answer, then checking controls. */
.cards-operators{margin-top:0;margin-bottom:20px}.cards-expression{margin-bottom:14px}

.sound-toggle{align-self:flex-start;margin-top:22px;min-height:44px;padding:8px 12px;border:1px solid #8aa18b;border-radius:6px;background:transparent;color:#dce8cd;font-size:12px}.sound-toggle[aria-pressed=true]{background:#d6e6b6;color:#183021}@media(max-width:900px){.sidebar{position:relative}.sound-toggle{position:absolute;right:20px;top:8px;margin:0}}

@media(max-width:900px){.game-menu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.game-menu [data-game]{min-width:0}.game-menu [data-game]:last-child{grid-column:span 2}}
@media(max-width:900px){body.is-playing .game-menu [data-game]:last-child{grid-column:auto}body.is-playing .sound-toggle{top:auto;bottom:8px;right:14px;width:calc((100% - 38px)/3);min-height:44px}}

/* Shared top navigation replaces the desktop sidebar and phone menu grid. */
.topbar{background:#152d25;color:#f4f2ec;border-bottom:1px solid #30473b}
.topbar-inner{max-width:1380px;margin:auto;padding:10px 28px;display:flex;align-items:center;gap:24px;min-height:64px}
body .topbar .brand{display:block;flex-shrink:0;font-size:22px;white-space:nowrap}
body .topbar .game-menu{display:flex;flex-direction:row;gap:5px;flex:1;margin:0}
body .topbar .game-menu [data-game]{flex:none;padding:10px 14px;min-height:44px;border:0;border-radius:6px;font-size:13px;white-space:nowrap;text-decoration:none}
body .topbar .sound-toggle{position:static;inset:auto;margin:0 0 0 auto;width:auto;min-height:44px;align-self:auto;font-size:12px;white-space:nowrap;flex-shrink:0}
.mobile-game-picker{display:none}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body main{margin:0 auto;max-width:1320px;padding:24px 28px 20px}
.workspace-layout{grid-template-columns:minmax(0,1fr)}
.ad-space,.ad-slot[data-ad-enabled="false"]{display:none}
@media(min-width:1400px){.workspace-layout:has(>.ad-space[data-ad-enabled="true"]){grid-template-columns:minmax(0,1fr) 300px}.ad-space[data-ad-enabled="true"]{display:block}}
@media(max-width:900px){.topbar-inner{padding:6px 12px;gap:10px;min-height:56px}body .topbar .brand{font-size:18px}body .topbar .game-menu{display:none}.mobile-game-picker{display:flex;flex:1;min-width:0;justify-content:center}.mobile-game-picker select{min-width:0;width:100%;max-width:180px;min-height:44px;padding:8px 22px 8px 10px;border:1px solid #8aa18b;border-radius:6px;color:#f4f2ec;background:#203e31;font-size:14px}body .topbar .sound-toggle{font-size:11px;padding:8px 10px}body main{padding:16px 14px 20px}}
@media(max-width:350px){.topbar-inner{gap:6px;padding-inline:8px}body .topbar .brand{font-size:16px}.mobile-game-picker select{font-size:12px;padding-left:7px}body .topbar .sound-toggle{padding-inline:7px}}

#usagePreferences{max-width:680px;padding:14px;margin-top:10px;border:1px solid #b9c5b6;border-radius:6px;background:#f4f5ef;font-size:13px;line-height:1.5}#usagePreferences button,#usageSettings{font:inherit;cursor:pointer}#usagePreferences button{padding:8px 12px;margin:3px 0}#usageReportStatus{font-weight:600}

/* Sorting games: expose everyday mobile controls without an Options drawer. */
@media(max-width:900px){
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) .controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) #settingsToggle{display:none}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) #puzzleSettings{display:contents}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) .controls #undo{order:0}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) .controls #restart{order:1}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) .board-size-control{order:2;min-width:0}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) .board-size-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) #gameSize{width:100%;min-width:0;margin:0;padding:8px 2px}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) #newPuzzle{order:3}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) .controls button{min-width:0;padding:8px 3px;white-space:nowrap}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) #step{order:4}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) #autoplay{order:5;grid-column:span 2}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) #speedControl{order:6;grid-column:span 2;font-size:0;min-width:0}
 body:has(:is([data-game="calmsort"],[data-game="speedsort"])[aria-current="page"]) #speedControl select{max-width:100%;margin:0}
 .game-header>#boardZoom{margin-left:auto;min-height:44px;padding:8px 12px;border:1px solid #b9c5b6;border-radius:5px;background:#f4f5ef;color:#284332;font-size:12px}
}

@media(max-width:900px){body:has([data-game="speedsort"][aria-current="page"]) #packControl{display:none!important}}

/* Browser-local records; compact entry point, no sign-in or new landing page. */
.progress-toggle{flex-shrink:0;min-height:44px;padding:8px 10px;border:1px solid #8aa18b;border-radius:6px;background:transparent;color:#f4f2ec;font-size:12px;white-space:nowrap;cursor:pointer}
.personal-progress{font-size:12px;color:#52634f;margin:8px 0;line-height:1.5}.playground>.personal-progress{order:2}
.progress-dialog{width:min(620px,calc(100% - 24px));max-height:85dvh;box-sizing:border-box;overflow:auto;padding:20px;border:1px solid #8aa18b;border-radius:12px;background:#f8f7ef;color:#284332}
.progress-dialog::backdrop{background:rgba(12,31,24,.55)}.progress-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px}.progress-dialog h2{margin:0;font-size:23px}.progress-dialog header button{width:44px;min-height:44px;font-size:25px;border:1px solid #b9c5b6;border-radius:6px;background:#fffdf8;color:#284332;cursor:pointer}
#progressStorage,.progress-note{font-size:12px;line-height:1.6;color:#52634f}#progressNotice{font-size:13px;font-weight:700;color:#356036}#progressGames{display:grid;grid-template-columns:1fr 1fr;gap:12px}.progress-game{padding:13px;background:#fffdf8;border:1px solid #d4dbce;border-radius:8px}.progress-game h3{font-size:15px;margin:0 0 8px}.progress-game p,.progress-game li,.progress-game summary{font-size:12px;line-height:1.6}.progress-game p{margin:6px 0}.progress-game details{margin-top:10px}.progress-game summary{cursor:pointer}.progress-game ul{padding-left:16px;max-height:220px;overflow:auto}.progress-game li{overflow-wrap:anywhere}
@media(min-width:901px) and (max-width:1150px){.topbar-inner{gap:10px;padding-inline:16px}body .topbar .game-menu [data-game]{padding-inline:8px;font-size:12px}}
@media(max-width:900px){.topbar-inner{gap:6px}.progress-toggle{font-size:11px;padding:8px 6px}body .topbar .sound-toggle{margin-left:0;padding-inline:6px}body .topbar .brand{font-size:16px}.mobile-game-picker{flex:1}.mobile-game-picker select{font-size:12px;padding-inline:5px}.personal-progress{font-size:11px}}
@media(max-width:450px){#progressGames{grid-template-columns:1fr}.progress-dialog{padding:15px}.progress-dialog h2{font-size:21px}}

@media(max-width:600px){body .topbar .brand{display:none}.mobile-game-picker select{max-width:none;font-size:13px}}

/* Feedback stays below the game rather than covering any board controls. */
.feedback-toggle,#usageSettings{box-sizing:border-box;height:36px;min-height:36px;padding:6px 10px;font:inherit;line-height:normal;vertical-align:middle;cursor:pointer}
.feedback-dialog{width:min(480px,calc(100% - 24px));max-height:85dvh;overflow:auto;box-sizing:border-box;padding:20px;border:1px solid #8aa18b;border-radius:12px;background:#f8f7ef;color:#284332}
.feedback-dialog::backdrop{background:rgba(12,31,24,.55)}.feedback-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px}.feedback-dialog h2{font-size:23px;margin:0}.feedback-dialog header button{width:44px;min-height:44px;border:1px solid #b9c5b6;border-radius:6px;font-size:25px;background:#fffdf8;color:#284332;cursor:pointer}
.feedback-dialog p{font-size:13px;line-height:1.6}.feedback-dialog form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.feedback-dialog label{display:flex;flex-direction:column;gap:6px;font-size:13px;min-width:0}.feedback-dialog select,.feedback-dialog textarea{box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:10px;border:1px solid #aabda7;border-radius:6px;font:inherit;background:#fffdf8;color:#284332}.feedback-dialog textarea{resize:vertical;min-height:130px}.feedback-dialog .feedback-message-label,.feedback-privacy,#feedbackStatus{grid-column:1 / -1}.feedback-dialog .feedback-privacy{font-size:12px;margin:0}#feedbackSend{grid-column:1 / -1;min-height:44px;border:0;border-radius:6px;background:#284332;color:#fffdf8;font-size:14px;cursor:pointer}#feedbackSend:disabled{opacity:.6;cursor:wait}#feedbackStatus{margin:0;min-height:21px}
@media(max-width:600px){.feedback-dialog{padding:15px}.feedback-dialog select,.feedback-dialog textarea{font-size:16px}}

.sudoku-library-info{font-size:12px;line-height:1.6;color:#52634f;max-width:580px}.sudoku-share-box{max-width:580px;margin-top:12px}.sudoku-share-box label{font-size:12px;display:block;margin-bottom:5px}.sudoku-share-box input{width:100%;box-sizing:border-box;min-height:44px;padding:9px;border:1px solid #aabda7;border-radius:5px;font-size:14px;color:#284332;background:#fffdf8}
.sudoku-hint-panel{max-width:450px;padding:12px 14px;margin:12px 0;border:1px solid #aabda7;border-radius:6px;background:#eef3e5}.sudoku-hint-panel h3{font-size:14px;margin:0 0 7px}.sudoku-hint-panel p{font-size:13px;line-height:1.7;margin:0;white-space:pre-line}.sudoku-about{max-width:580px;margin-top:24px}.sudoku-about h2{font-size:19px}.sudoku-about p{font-size:13px;line-height:1.8;color:#52634f}
@media(max-width:900px){.sudoku-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:450px;gap:7px}.sudoku-settings label{display:flex;align-items:center;gap:5px;min-width:0}.sudoku-settings select{min-width:0;flex:1;padding-inline:5px}.sudoku-settings button{padding-inline:6px}.sudoku-share-box input{font-size:16px}}

/* Block Garden: a single compact table, with a stable board and three-piece tray. */
.block-game{max-width:450px}.block-scorebar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.block-scorebar>div{display:flex;flex-direction:column;gap:3px}.block-scorebar span{font-size:11px;color:#52634f}.block-scorebar strong{font-size:25px;color:#284332}.block-scorebar button{min-height:44px;padding:8px 13px;border:1px solid #8aa18b;border-radius:6px;background:#f4f5ef;color:#284332;font-size:13px;cursor:pointer}
.block-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;padding:6px;background:#19372e;border:1px solid #345445;border-radius:10px;box-shadow:0 3px 0 #112a21;width:100%;box-sizing:border-box;touch-action:pan-y}
.block-cell{width:100%;aspect-ratio:1;min-width:0;min-height:0;padding:0;border:0;border-radius:4px;background:#2b493d;box-shadow:inset 0 1px 1px #ffffff08;cursor:pointer;touch-action:manipulation}.block-cell.filled{box-shadow:inset 0 2px 0 #ffffff30,inset 0 -2px 0 #00000018}.block-cell.preview-valid{box-shadow:inset 0 0 0 3px #d6eeb8!important;background:#739268!important}.block-cell.preview-invalid{box-shadow:inset 0 0 0 3px #e7a694!important}.block-cell:focus-visible{outline:3px solid #f2d798;outline-offset:-3px}.block-cell:disabled{cursor:default}.block-cell.line-cleared{animation:block-line-clear .45s ease-out}
.block-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}.block-piece{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-width:0;height:148px;padding:8px 2px;border:2px solid transparent;border-radius:8px;background:#e9eee0;color:#284332;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.block-piece.selected{border-color:#537843;background:#dce8cb}.block-piece:focus-visible{outline:2px solid #284332;outline-offset:2px}.block-piece:disabled{opacity:.5;cursor:default}.block-piece-grid{--piece-unit:20px;flex-shrink:0;display:grid;grid-template-columns:repeat(var(--piece-columns),var(--piece-unit));grid-template-rows:repeat(var(--piece-rows),var(--piece-unit));gap:2px;pointer-events:none}.block-piece-grid i{display:block;width:var(--piece-unit);height:var(--piece-unit)}.block-piece-square{border-radius:2px;box-shadow:inset 0 1px #ffffff45,inset 0 -1px #00000020}.block-piece-label{flex-shrink:0;font-size:10px;pointer-events:none}.block-ghost{position:fixed;z-index:30;pointer-events:none;opacity:.7}
.block-status{font-size:12px;line-height:1.6;min-height:38px;margin:10px 0;color:#52634f}.block-result{padding:12px 14px;border:1px solid #a1b78b;border-radius:7px;background:#e7efdb;color:#284332}.block-result strong{font-size:18px}.block-result p{font-size:13px;line-height:1.6;margin:6px 0 0}.block-help summary{font-size:12px;padding:12px 0;cursor:pointer}.block-help p,.block-about p{font-size:13px;line-height:1.8;color:#52634f}.block-about{margin-top:20px}.block-about h2{font-size:18px}
@keyframes block-line-clear{from{box-shadow:inset 0 0 0 3px #dfcc8c;background:#726c3a}to{box-shadow:inset 0 0 0 0 transparent;background:#2b493d}}
@media(prefers-reduced-motion:reduce){.block-cell.line-cleared{animation:none}}
@media(max-width:600px){.block-piece{height:clamp(120px,36vw,148px)}.block-piece-grid{--piece-unit:clamp(14px,4.5vw,20px)}.block-scorebar strong{font-size:23px}.block-board{gap:3px;padding:5px}}
@media(min-width:901px) and (max-width:1150px){body .topbar .game-menu{display:none}.mobile-game-picker{display:flex;flex:1;min-width:0;justify-content:center}.mobile-game-picker select{max-width:260px;width:100%;min-height:44px;padding:8px 12px;border:1px solid #8aa18b;border-radius:6px;background:#203e31;color:#f4f2ec;font-size:14px}}

.block-game-over{position:fixed;inset:auto;margin:0;transform:translate(-50%,-50%);box-sizing:border-box;width:min(320px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:24px;border:1px solid #95b39c;border-radius:18px;background:#fbfcf7;color:#243e32;box-shadow:0 14px 48px #13291e44;text-align:center}
.block-game-over::backdrop{background:#12251c66}
.block-game-over h2{margin:0 0 8px;font-size:26px}
.block-game-over p{font-size:14px;line-height:1.5;margin:8px 0 18px}
.block-final-scores{display:flex;justify-content:space-around;gap:16px;font-size:13px}
.block-final-scores strong{display:block;margin-top:4px;font-size:30px}
.block-game-over .block-final-record{color:#386744;font-weight:700;margin:12px 0}
.block-final-actions{display:flex;gap:8px;margin-top:20px}
.block-final-actions button{flex:1;min-height:42px;border:1px solid #b3c5b7;border-radius:9px;background:#fff;color:#243e32;font:inherit;cursor:pointer}
.block-final-actions #blocksPlayAgain{background:#315d45;border-color:#315d45;color:white;font-weight:700}
.block-final-actions button:focus-visible{outline:3px solid #bd8d34;outline-offset:3px}
/* 2048: a calm, compact board, with scrolling available outside the swipe surface. */
.twenty-game{max-width:450px;width:100%}.twenty-board{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:10px;padding:10px;border-radius:14px;background:#97a28c;touch-action:none;user-select:none;outline-offset:4px;aspect-ratio:1;box-sizing:border-box}
.twenty-cell{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;border-radius:8px;background:#b6bfab;color:#354432;font-size:clamp(30px,7vw,46px);font-weight:800;font-variant-numeric:tabular-nums;transition:transform 120ms ease;will-change:transform}
.twenty-cell[data-value="2"]{background:#edf0df}.twenty-cell[data-value="4"]{background:#dce6bc}.twenty-cell[data-value="8"]{background:#b7d393}.twenty-cell[data-value="16"]{background:#83b88e}.twenty-cell[data-value="32"]{background:#5a9f89;color:#fff}.twenty-cell[data-value="64"]{background:#347c70;color:#fff}.twenty-cell[data-value="128"]{background:#d7b15f;color:#263b31;font-size:clamp(26px,6vw,39px)}.twenty-cell[data-value="256"]{background:#cc9649;color:#fff;font-size:clamp(26px,6vw,39px)}.twenty-cell[data-value="512"]{background:#bc763b;color:#fff;font-size:clamp(26px,6vw,39px)}.twenty-cell[data-value="1024"],.twenty-cell[data-value="2048"]{background:#8e5936;color:#fff;font-size:clamp(22px,5vw,34px)}.twenty-cell.occupied:not([data-value="2"]):not([data-value="4"]):not([data-value="8"]):not([data-value="16"]):not([data-value="32"]):not([data-value="64"]):not([data-value="128"]):not([data-value="256"]):not([data-value="512"]):not([data-value="1024"]):not([data-value="2048"]){background:#334e40;color:white;font-size:clamp(17px,4vw,28px)}
.twenty-controls{display:flex;gap:8px;margin-top:12px}.twenty-controls button{flex:1;min-height:46px;border:1px solid #b7c5ad;border-radius:8px;background:#f3f5ec;color:#294834;font-size:26px;font-weight:bold;cursor:pointer;touch-action:manipulation}.twenty-board:focus-visible,.twenty-controls button:focus-visible{outline:3px solid #b58732}
#twentyAgain,#twentyContinue{background:#315d45;color:white;border-color:#315d45}.twenty-spawned{animation:twenty-appear 160ms ease-out}.twenty-merged{animation:twenty-merge 180ms ease-out}
@keyframes twenty-appear{from{scale:.6;opacity:.4}to{scale:1;opacity:1}}@keyframes twenty-merge{50%{scale:1.1}}
@media(max-width:450px){.twenty-board{gap:7px;padding:7px}.twenty-game .block-scorebar{gap:16px}.twenty-cell{border-radius:6px}}
@media(prefers-reduced-motion:reduce){.twenty-cell{transition:none}.twenty-spawned,.twenty-merged{animation:none}}
@media(min-width:1151px){.topbar-inner{gap:12px;padding-inline:20px}body .topbar .game-menu [data-game]{padding-inline:10px}}
/* Solitaire cards remain vector-free native text/CSS; no image downloads. */
.sol-game{max-width:850px;width:100%}.sol-toolbar{display:flex;align-items:center;gap:28px;margin-bottom:12px}.sol-toolbar span{display:block;font-size:12px;color:#536551}.sol-toolbar strong{font-size:24px}.sol-toolbar button{margin-left:auto}.sol-toolbar button,.sol-controls button{min-height:44px;padding:9px 16px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;cursor:pointer}.sol-toolbar button:disabled,.sol-controls button:disabled{opacity:.45;cursor:default}
.sol-board{--sol-gap:12px;--sol-card-height:calc((min(850px,100vw - 56px) - 32px - 6 * var(--sol-gap))/7 * 1.43);--sol-hidden-step:10px;--sol-step:24px;padding:16px;background:#285542;border:1px solid #214a38;border-radius:14px;color:#e6eddf;box-sizing:border-box;container-type:inline-size;user-select:none}.sol-top-row,.sol-tableau{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--sol-gap)}.sol-top-row{margin-bottom:20px}.sol-tableau{min-height:0}.sol-pile,.sol-column{position:relative;min-width:0}.sol-pile,.sol-stock{aspect-ratio: .7}.sol-stock-wrap,.sol-waste-wrap{position:relative;min-width:0;text-align:center}.sol-stock-wrap>span,.sol-waste-wrap>span{display:block;font-size:11px;white-space:nowrap;margin-top:5px}.sol-card,.sol-empty,.sol-stock{box-sizing:border-box;display:block;width:100%;aspect-ratio:.7;border:1px solid #b8c2af;border-radius:6px;background:#fffdf5;color:#182b22;padding:0;position:relative;box-shadow:0 1px 2px #00180f66;cursor:pointer;font-family:Georgia,'Times New Roman',serif;font-weight:700;touch-action:none}.sol-card{position:absolute;inset:0 0 auto}.sol-column .sol-card{top:0}.sol-red{color:#b42336}.sol-corner{position:absolute;top:5%;left:7%;font-size:clamp(16px,2vw,24px);line-height:1.05;white-space:nowrap}.sol-pip{position:absolute;left:0;right:0;top:34%;text-align:center;font-size:clamp(24px,4vw,52px);line-height:1}.sol-back{background:repeating-linear-gradient(45deg,#47765b 0 4px,#38674d 4px 8px);border:2px solid #cad9ba;box-shadow:inset 0 0 0 3px #366047,0 1px 2px #00180f66}.sol-back:disabled{opacity:1;cursor:default}.sol-empty{background:#173e2b66;border:1px dashed #c5d6ae77;box-shadow:none;color:#c8d8b1;font-size:clamp(18px,3vw,32px)}.sol-empty.sol-red{color:#f0bec2}.sol-column-empty{height:auto}.sol-card.sol-selected{outline:3px solid #f0c35c;outline-offset:-2px;background:#fff4cb}.sol-valid-target,.sol-hint{outline:3px solid #f0c35c!important;outline-offset:2px;border-radius:6px}.sol-card:focus-visible,.sol-empty:focus-visible,.sol-stock:focus-visible,.sol-controls button:focus-visible,.sol-toolbar button:focus-visible{outline:3px solid #f0c35c;outline-offset:1px}.sol-controls{display:flex;gap:8px;margin-top:12px}.sol-controls button{flex:1}.sol-ghost{position:fixed;z-index:100;pointer-events:none;max-height:90vh;overflow:clip;width:120px;height:90vh}.sol-ghost .sol-card{pointer-events:none}.sol-win-sparks{font-size:32px;color:#b78726;animation:sol-spark 700ms ease-in-out 4 alternate}.sol-win #solWinNew{background:#315d45;color:white}@keyframes sol-spark{from{opacity:.4;scale:.85}to{opacity:1;scale:1.08}}
@media(max-width:600px){.sol-board{--sol-gap:4px;--sol-card-height:calc((100vw - 28px - 12px - 24px)/7 * 1.43);padding:6px;border-radius:9px}.sol-corner{top:4px;left:2px;font-size:clamp(13px,3.8vw,20px);letter-spacing:-.8px}.sol-pip{font-size:clamp(22px,5.7vw,32px);top:40%}.sol-card,.sol-empty,.sol-stock{border-radius:4px}.sol-back{box-shadow:inset 0 0 0 1px #366047}.sol-stock-wrap>span,.sol-waste-wrap>span{font-size:9px;margin-top:4px}.sol-toolbar{gap:18px}.sol-toolbar strong{font-size:20px}.sol-controls button{padding-inline:8px;font-size:13px}.sol-top-row{margin-bottom:16px}}
@media(min-width:1151px) and (max-width:1280px){body .topbar .game-menu{display:none}.mobile-game-picker{display:flex;flex:1;min-width:0;justify-content:center}.mobile-game-picker select{max-width:260px;width:100%;min-height:44px;padding:8px 12px;border:1px solid #8aa18b;border-radius:6px;background:#203e31;color:#f4f2ec;font-size:14px}}
@media(prefers-reduced-motion:reduce){.sol-win-sparks{animation:none}}
.ms-game{max-width:600px;width:100%}.ms-toolbar{display:flex;align-items:center;gap:25px;margin-bottom:12px}.ms-toolbar span{display:block;font-size:12px;color:#536551}.ms-toolbar strong{font-size:24px}.ms-toolbar button{margin-left:auto}.ms-toolbar button,.ms-controls button,.ms-controls select{min-height:44px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;padding:8px 13px;font:inherit;cursor:pointer}.ms-controls{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.ms-controls label{display:flex;flex-direction:column;gap:4px;font-size:12px}.ms-controls button:disabled{opacity:.45;cursor:default}.ms-board{--ms-cols:6;--ms-rows:6;position:relative;width:min(100%,460px);aspect-ratio:calc(var(--ms-cols) / (var(--ms-rows) * 1.4));margin-top:15px;border:1px solid #214a38;border-radius:12px;background:#285542;box-sizing:border-box;isolation:isolate}.ms-tile{position:absolute;width:calc((100% - 16px) / var(--ms-cols) - 3px);height:calc((100% - 16px) / var(--ms-rows) - 3px);margin:0;padding:2px;border:1px solid #bec8b2;border-radius:5px;background:#e7e8d9;box-shadow:1px 3px 0 #98ad87,2px 4px 3px #09281766;cursor:pointer;touch-action:manipulation}.ms-tile img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}.ms-tile:not(.ms-free){filter:brightness(.82);cursor:default}.ms-tile.ms-free{background:#fffef2}.ms-tile.ms-selected{outline:3px solid #efbc48;outline-offset:-1px;background:#fff1bc}.ms-tile.ms-hint{outline:3px solid #efbc48;outline-offset:1px;animation:ms-hint 600ms ease-in-out 3 alternate}.ms-tile:focus-visible{outline:3px solid #bce8ff;outline-offset:-1px}.ms-controls select:focus-visible,.ms-controls button:focus-visible{outline:3px solid #b58732;outline-offset:2px}#msWinNew{background:#315d45;color:white}@keyframes ms-hint{to{background:#ffdb78}}
@media(max-width:600px){.ms-controls{gap:6px;flex-wrap:nowrap}.ms-controls label{flex:1;min-width:0}.ms-controls select{width:100%;min-width:0;font-size:12px;padding-inline:5px}.ms-controls button{font-size:12px;padding-inline:7px}.ms-tile{padding:1px;border-radius:4px}.ms-toolbar{gap:20px}}
@media(min-width:1281px) and (max-width:1450px){body .topbar .game-menu{display:none}.mobile-game-picker{display:flex;flex:1;min-width:0;justify-content:center}.mobile-game-picker select{max-width:260px;width:100%;min-height:44px;padding:8px 12px;border:1px solid #8aa18b;border-radius:6px;background:#203e31;color:#f4f2ec;font-size:14px}}
@media(prefers-reduced-motion:reduce){.ms-tile.ms-hint{animation:none}}
.ws-game{width:100%;max-width:460px}.ws-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:12px}.ws-toolbar>div{margin-right:auto}.ws-toolbar span{display:block;font-size:12px;color:#536551}.ws-toolbar strong{font-size:24px}.ws-toolbar button,.ws-settings select{min-height:44px;padding:9px 13px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;cursor:pointer}.ws-toolbar button:disabled{opacity:.45;cursor:default}.ws-settings{display:flex;gap:10px;margin-bottom:14px}.ws-settings label{display:flex;flex-direction:column;gap:4px;font-size:12px;flex:1;min-width:0}.ws-settings select{width:100%;min-width:0}.ws-board{--ws-size:8;display:grid;grid-template-columns:repeat(var(--ws-size),minmax(0,1fr));grid-template-rows:repeat(var(--ws-size),minmax(0,1fr));aspect-ratio:1;width:100%;padding:0;border:2px solid #78906c;border-radius:9px;overflow:hidden;background:#e2e9d8;box-sizing:border-box;touch-action:none;user-select:none}.ws-cell{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:#fafbf4;color:#254530;font-family:inherit;font-size:clamp(14px,4.5vw,24px);font-weight:700;line-height:1;cursor:pointer;touch-action:none;box-shadow:inset 0 0 0 .5px #d8e1ce}.ws-cell.ws-found{background:#cae0b4;color:#234229}.ws-cell.ws-preview{background:#f7d98c;color:#3e361e}.ws-cell.ws-hint{box-shadow:inset 0 0 0 3px #ba8424;background:#ffebbc}.ws-cell:focus-visible{outline:3px solid #276990;outline-offset:-3px;z-index:1}.ws-words{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:14px 0 0;padding:0;list-style:none}.ws-words li{padding:7px 4px;border:1px solid #d1dcc7;border-radius:6px;text-align:center;font-size:13px;font-weight:600;letter-spacing:.4px;background:#f7f9f0;overflow-wrap:anywhere}.ws-words li.ws-word-found{text-decoration:line-through;background:#e1ecd5;color:#53704b}#wsWinNew{background:#315d45;color:white}
@media(max-width:400px){.ws-toolbar button{font-size:12px;padding-inline:10px}.ws-settings select{font-size:13px;padding-inline:7px}.ws-words li{font-size:11px;letter-spacing:.2px}.ws-board[data-size="12"] .ws-cell{font-size:14px}}
@media(min-width:1451px) and (max-width:1600px){body .topbar .game-menu{display:none}.mobile-game-picker{display:flex;flex:1;min-width:0;justify-content:center}.mobile-game-picker select{max-width:260px;width:100%;min-height:44px;padding:8px 12px;border:1px solid #8aa18b;border-radius:6px;background:#203e31;color:#f4f2ec;font-size:14px}}
.m3-game{width:100%;max-width:460px}.m3-toolbar{display:flex;gap:25px;align-items:center;margin-bottom:12px}.m3-toolbar span{display:block;font-size:12px;color:#536551}.m3-toolbar strong{font-size:24px}.m3-toolbar button{margin-left:auto}.m3-toolbar button,.m3-settings button,.m3-settings select{min-height:44px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;padding:9px 13px;font:inherit;cursor:pointer}.m3-settings{display:flex;gap:8px;align-items:end}.m3-settings label{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;font-size:12px}.m3-settings select{width:100%;min-width:0}.m3-settings button:disabled{opacity:.45;cursor:default}.m3-goal{margin:14px 0 10px;font-size:13px}.m3-goal progress{display:block;width:100%;height:10px;margin-top:6px;accent-color:#58804e}.m3-board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(7,minmax(0,1fr));gap:4px;aspect-ratio:1;width:100%;padding:7px;border:1px solid #71866a;border-radius:12px;background:#c7d5bc;box-sizing:border-box;touch-action:none;user-select:none;overflow:hidden}.m3-cell{display:flex;align-items:center;justify-content:center;position:relative;min-width:0;min-height:0;margin:0;padding:0;border:1px solid #d7dfcc;border-radius:8px;background:#f8faf2;cursor:pointer;touch-action:none}.m3-piece{display:block;width:65%;height:65%;position:relative;transition:transform 100ms ease;filter:drop-shadow(0 2px 1px #203c2222);pointer-events:none}.m3-piece-0{background:#ce736b;border-radius:50%;box-shadow:inset 2px 3px 0 #ffffff40}.m3-piece-1{background:#448c7a;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}.m3-piece-2{background:#c79d3c;clip-path:polygon(50% 0,100% 100%,0 100%)}.m3-piece-3{background:#618cae;border-radius:18%;box-shadow:inset 2px 3px 0 #ffffff40}.m3-piece-4{background:#9676ae;clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 94%,50% 72%,21% 94%,32% 57%,2% 35%,39% 35%);width:75%;height:75%}.m3-cell.m3-selected{background:#ffedb7;border-color:#b99232;z-index:3}.m3-cell.m3-hint{outline:3px solid #b99232;outline-offset:-2px;background:#ffedb7}.m3-cell:focus-visible{outline:3px solid #276990;outline-offset:-3px;z-index:2}.m3-clear .m3-piece{animation:m3-clear 90ms ease-in forwards}.m3-falling{animation:m3-fall 130ms ease-out}.m3-result-actions{flex-wrap:wrap}.block-final-actions #m3Next{background:#315d45;color:white}@keyframes m3-clear{to{scale:.2;opacity:0}}@keyframes m3-fall{from{transform:translateY(var(--m3-fall));opacity:.5}to{transform:translateY(0);opacity:1}}
@media(max-width:400px){.m3-toolbar{gap:20px}.m3-settings select{font-size:13px;padding-inline:7px}.m3-board{gap:3px;padding:5px}.m3-cell{border-radius:6px}.m3-toolbar button,.m3-settings button{font-size:12px;padding-inline:10px}}
@media(min-width:1601px){.topbar-inner{max-width:1600px;gap:10px}body .topbar .game-menu [data-game]{padding-inline:8px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.m3-piece{transition:none}.m3-clear .m3-piece,.m3-falling{animation:none}}
.ng-game{max-width:460px;width:100%}.ng-toolbar{display:flex;align-items:center;gap:20px;margin-bottom:12px}.ng-toolbar span{display:block;font-size:12px;color:#536551}.ng-toolbar strong{font-size:24px}.ng-toolbar button{margin-left:auto}.ng-toolbar button,.ng-settings select,.ng-controls button{min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;cursor:pointer}.ng-settings{display:flex;gap:10px;margin-bottom:12px}.ng-settings label{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;font-size:12px}.ng-settings select{width:100%;min-width:0}.ng-controls{display:flex;gap:6px;margin-bottom:12px}.ng-controls button{flex:1;min-width:0;padding-inline:6px;font-size:13px}.ng-controls button[aria-pressed="true"]{background:#315d45;color:white;border-color:#315d45}.ng-controls button:disabled{opacity:.45;cursor:default}.ng-frame{--ng-size:5;--ng-side:72px;--ng-head:64px;display:grid;grid-template-columns:var(--ng-side) minmax(0,1fr);grid-template-rows:var(--ng-head) auto;width:100%}.ng-corner{display:flex;align-items:end;justify-content:end;padding:6px;font-size:11px;color:#61725a}.ng-columns{display:grid;grid-template-columns:repeat(var(--ng-size),minmax(0,1fr));padding-inline:2px}.ng-rows{display:grid;grid-template-rows:repeat(var(--ng-size),minmax(0,1fr));padding-block:2px}.ng-clue{display:flex;align-items:center;font-size:12px;font-variant-numeric:tabular-nums;color:#274733;background:#eef2e7}.ng-column{flex-direction:column;justify-content:end;gap:2px;padding-bottom:5px;line-height:12px}.ng-row{justify-content:end;gap:4px;padding-right:6px;padding-left:2px}.ng-clue.ng-complete{color:#6f8664;background:#e3edd8}.ng-clue.ng-conflict{color:#a23838;background:#fae8e4}.ng-grid{display:grid;grid-template-columns:repeat(var(--ng-size),minmax(0,1fr));grid-template-rows:repeat(var(--ng-size),minmax(0,1fr));aspect-ratio:1;width:100%;border:2px solid #54724c;box-sizing:border-box;touch-action:none;user-select:none}.ng-cell{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;margin:0;padding:0;border:.5px solid #b9c8af;border-radius:0;background:#fffef6;color:#64805a;font:inherit;font-size:clamp(14px,4vw,24px);line-height:1;cursor:pointer;touch-action:none}.ng-cell.ng-filled{background:#315d45;color:#fff;border-color:#315d45}.ng-cell.ng-group-right{border-right:2px solid #64805a}.ng-cell.ng-group-bottom{border-bottom:2px solid #64805a}.ng-cell.ng-hint{outline:3px solid #d0a02e;outline-offset:-3px}.ng-cell.ng-mistake{outline-color:#c24c47}.ng-cell:focus-visible{outline:3px solid #2b85b0;outline-offset:-3px;z-index:1}.ng-cell:disabled{opacity:1;cursor:default}.ng-reveal{font-size:22px;font-weight:700;color:#315d45;margin:14px 0 0}#ngWinNext{background:#315d45;color:white}
@media(max-width:500px){.ng-frame{--ng-side:54px}.ng-clue{font-size:10px}.ng-row{gap:3px;padding-right:5px}.ng-column{line-height:12px}.ng-controls{gap:4px}.ng-controls button{font-size:12px;padding-inline:4px}.ng-settings select{font-size:13px;padding-inline:7px}}
@media(min-width:1601px) and (max-width:1800px){body .topbar .game-menu{display:none}.mobile-game-picker{display:flex;flex:1;min-width:0;justify-content:center}.mobile-game-picker select{max-width:260px;width:100%;min-height:44px;padding:8px 12px;border:1px solid #8aa18b;border-radius:6px;background:#203e31;color:#f4f2ec;font-size:14px}}
@media(min-width:1801px){.topbar-inner{max-width:1800px}}

.ng-clue{font-size:14px}.ng-column{line-height:14px}.ng-frame[data-size="5"] .ng-clue{font-size:18px}.ng-frame[data-size="5"] .ng-column{line-height:18px}
@media(max-width:500px){.ng-clue{font-size:12px}.ng-row{gap:2px;padding-right:4px;padding-left:1px}.ng-frame[data-size="5"] .ng-clue{font-size:16px}}

/* Game pages keep a compact switcher and a clear route back to the collection. */
body.game-page .topbar .game-menu{display:none!important}body.game-page .mobile-game-picker{display:flex;flex:1;min-width:0;justify-content:center}body.game-page .mobile-game-picker select{max-width:300px;width:100%;min-height:44px;padding:8px 12px;border:1px solid #8aa18b;border-radius:6px;background:#203e31;color:#f4f2ec;font-size:14px}body.game-page .topbar .all-games-link{display:flex!important;align-items:center;gap:8px;min-height:44px;white-space:nowrap;font-size:14px;letter-spacing:0;color:#e6eddd;text-decoration:none}body.game-page .all-games-link span{color:inherit}body.game-page .all-games-link svg{flex:none}
@media(max-width:600px){body.game-page .topbar-inner{padding-inline:8px;gap:5px}body.game-page .all-games-link{justify-content:center;width:30px;flex:none}body.game-page .all-games-link span{display:none}body.game-page .mobile-game-picker select{padding-inline:4px;font-size:12px}body.game-page .progress-toggle{padding-inline:5px;font-size:10px}body.game-page .topbar .sound-toggle{padding-inline:5px;font-size:10px}}

/* Daily Word Search controls retain a full-width board on phones. */
.ws-modes{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.ws-modes button{min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;cursor:pointer}.ws-modes button[aria-pressed="true"]{background:#315d45;color:white;border-color:#315d45}.ws-modes #wsShare{margin-left:auto}.ws-daily-info{margin:0 0 12px;font-size:14px;color:#315d45;line-height:1.5}.ws-share-fallback{display:block;font-size:13px;margin-bottom:12px}.ws-share-fallback input{display:block;width:100%;box-sizing:border-box;padding:10px;font:inherit}.ws-share-fallback[hidden]{display:none}@media(max-width:360px){.ws-modes{gap:6px}.ws-modes button{font-size:12px;padding-inline:9px}}

.ws-modes #ngShare{margin-left:auto}

/* Playroom identity is shared with the collection home. */
body.game-page .topbar .all-games-link{font-size:24px;font-weight:900;letter-spacing:1px}body.game-page .all-games-link .home-wordmark{color:inherit}body.game-page .all-games-link .home-wordmark>span{color:#d4e2b0}body.game-page .all-games-link svg{display:none}@media(max-width:650px){body.game-page .all-games-link{width:30px;justify-content:center;flex:none}body.game-page .all-games-link .home-wordmark{display:none}body.game-page .all-games-link svg{display:block}}

/* Shared specificity prevents legacy header rules shrinking the home logo. */
body.home-page .topbar .brand,body.game-page .topbar .brand{font-size:24px;font-weight:900;letter-spacing:1px}

.ws-modes #msShare{margin-left:auto}

/* Sudoku chooses mode first, then difficulty and puzzle actions. */
.sudoku-game .sudoku-settings{display:flex;flex-direction:column;align-items:stretch;gap:12px;max-width:450px}.sudoku-game .sudoku-settings .ws-modes{display:flex;flex-wrap:wrap;gap:8px;margin:0}.sudoku-game .sudoku-settings .ws-modes button[aria-pressed="true"]{background:#315d45;color:white;border-color:#315d45}.sudoku-game .sudoku-puzzle-controls{display:flex;align-items:flex-end;gap:8px;min-width:0}.sudoku-game .sudoku-puzzle-controls label{display:flex;flex-direction:column;align-items:stretch;gap:4px;flex:1;min-width:0;font-size:12px}.sudoku-game .sudoku-puzzle-controls select{box-sizing:border-box;width:100%;min-width:0;flex:none}.sudoku-game .sudoku-puzzle-controls button{flex:none;white-space:nowrap}@media(max-width:480px){.sudoku-game .sudoku-puzzle-controls{gap:6px}.sudoku-game .sudoku-puzzle-controls button{font-size:12px;padding-inline:8px}.sudoku-game .sudoku-puzzle-controls select{font-size:16px;padding-inline:6px}}

.game-load-status{padding:24px 0;min-height:160px;color:#315d45}.game-load-status button{min-height:44px;padding:9px 14px;background:#315d45;color:white;border:0;border-radius:6px;font:inherit;cursor:pointer}

/* Match-3 piece styles are cosmetic; all keep the same five underlying piece IDs. */
.m3-settings{flex-wrap:wrap}.m3-settings .m3-pieces-setting{flex:0 1 112px}.m3-piece-0{--m3-soft:#fbe8e3;--m3-tone:#943c34}.m3-piece-1{--m3-soft:#e0f1e6;--m3-tone:#24654f}.m3-piece-2{--m3-soft:#fff1ca;--m3-tone:#76540b}.m3-piece-3{--m3-soft:#e2edf8;--m3-tone:#315c88}.m3-piece-4{--m3-soft:#eee4f6;--m3-tone:#68468c}
.m3-board:is([data-skin="fruit"],[data-skin="flowers"],[data-skin="numbers"]) .m3-piece{display:grid;place-items:center;box-sizing:border-box;width:86%;height:86%;background:var(--m3-soft);border:1px solid #274c2814;border-radius:50%;clip-path:none;box-shadow:none;color:var(--m3-tone);font-size:clamp(20px,6vw,36px);line-height:1;filter:none}
.m3-board:is([data-skin="fruit"],[data-skin="flowers"]) .m3-piece{font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;font-weight:400}
.m3-board[data-skin="numbers"] .m3-piece{font-family:inherit;font-weight:800;border:2px solid var(--m3-tone)}
@media(max-width:400px){.m3-settings .m3-pieces-setting{flex-basis:100px}.m3-settings select{padding-inline:7px}}

.m3-settings>label:first-child{min-width:120px}

/* Readable game information is available in the initial HTML, below play. */
.game-description{max-width:760px;margin:32px 0 24px;padding-top:22px;border-top:1px solid var(--line);color:#52634f;font-size:14px;line-height:1.8}.game-description h1{font-size:24px;line-height:1.3;color:#243e32;margin:0 0 12px}.game-description p{margin:10px 0}
/* Optional Nonogram lesson, separate from the real board. */
.ng-lesson{box-sizing:border-box;width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:22px;border:1px solid #a2b39c;border-radius:16px;background:#fbfcf7;color:#294534;line-height:1.65}
.ng-lesson::backdrop{background:#12251c66}.ng-lesson header{display:flex;align-items:center;gap:12px;justify-content:space-between}.ng-lesson h2{font-size:22px;margin:0}.ng-lesson h3{font-size:19px;margin:10px 0}.ng-lesson h3:focus{outline:none}.ng-lesson p{font-size:14px;margin:10px 0}.ng-lesson button,.ng-learn-link{min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:7px;background:#f6f7ef;color:#294534;font:inherit;cursor:pointer}.ng-lesson header button{font-size:22px;padding:4px 12px}.ng-lesson .ng-lesson-step,.ng-lesson .ng-lesson-note{font-size:12px;color:#65765d}.ng-lesson-clue{font-weight:700;font-size:20px!important}.ng-lesson-tool{font-size:13px;display:block;min-height:24px}.ng-lesson-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-width:280px;gap:2px;background:#537149;border:2px solid #537149;margin:8px 0}.ng-lesson-row .ng-cell{min-width:0;min-height:44px;padding:0;border:0;border-radius:0;font-size:26px;aspect-ratio:1;background:#fffdf8;color:#31543c}.ng-lesson-row .ng-filled{background:#315d45}.ng-lesson-row button:disabled{opacity:1;cursor:default}.ng-lesson-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.ng-lesson-actions #ngLessonNext{margin-left:auto;background:#315d45;color:#fff}.ng-lesson #ngLessonStatus{min-height:24px;color:#315d45}.ng-learn-link{font-size:13px}
/* Match-3: a brighter tabletop game inside Playroom's quiet shared shell. */
.m3-game .m3-toolbar{gap:14px;margin-bottom:14px;padding:12px 14px;background:linear-gradient(120deg,#e5efdd,#f0f4e7);border-radius:14px;border:1px solid #d3dfc8}
.m3-toolbar>div{min-width:0}.m3-toolbar .m3-score-value{display:flex;align-items:baseline;gap:5px;white-space:nowrap}.m3-toolbar strong{font-size:30px;line-height:1.15;color:#194e40;font-variant-numeric:tabular-nums}.m3-toolbar .m3-score-value span{font-size:15px;color:#4d665a}.m3-toolbar>div>span{font-size:11px;letter-spacing:.15px;margin-bottom:4px}.m3-toolbar #m3New{font-size:12px;padding:8px 10px;background:#f8faf3;border-color:#b0c2aa}
.m3-game .m3-settings{gap:8px}.m3-settings #m3Hint{background:#315d45;color:#fff;border-color:#315d45;font-weight:650}.m3-settings #m3Results{background:#eaf0df;font-weight:650}
.m3-game .m3-goal{margin:14px 0 12px}.m3-goal-line{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#315543}.m3-goal-line>span{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}.m3-goal progress{height:12px;border:0;border-radius:999px;overflow:hidden;background:#dce6d5;appearance:none}.m3-goal progress::-webkit-progress-bar{background:#dce6d5;border-radius:999px}.m3-goal progress::-webkit-progress-value{background:linear-gradient(90deg,#3b7956,#76a85c);border-radius:999px}.m3-goal progress::-moz-progress-bar{background:#4f8a58;border-radius:999px}
.m3-game .m3-board{background:linear-gradient(145deg,#28594e,#163f38);border:1px solid #174038;padding:8px;gap:4px;border-radius:16px;box-shadow:0 5px 0 #12372f,0 9px 18px #173e2e14;margin-bottom:8px}
.m3-board .m3-cell{background:#396b5e;border:1px solid #518172;border-radius:9px;box-shadow:inset 0 1px 1px #ffffff0b}.m3-board .m3-cell.m3-selected{background:#678348;border-color:#f8d778;box-shadow:inset 0 0 0 2px #f8d778;z-index:3}.m3-board .m3-cell.m3-hint{outline:3px solid #ffe29a;outline-offset:-3px;background:#557952}.m3-board .m3-cell:focus-visible{outline:3px solid #f5f1ce;outline-offset:-3px}
.m3-board[data-skin="shapes"] .m3-piece{width:72%;height:72%;filter:drop-shadow(0 2px 1px #102e3255)}.m3-board[data-skin="shapes"] .m3-piece-0{background:#ef8179}.m3-board[data-skin="shapes"] .m3-piece-1{background:#83d4b6}.m3-board[data-skin="shapes"] .m3-piece-2{background:#f0c551}.m3-board[data-skin="shapes"] .m3-piece-3{background:#86bce6}.m3-board[data-skin="shapes"] .m3-piece-4{background:#c29ee0;width:80%;height:80%}
.m3-board[data-skin="fruit"] .m3-piece{width:92%;height:92%;border:0;border-radius:0;background-color:transparent;background-repeat:no-repeat;background-size:contain;background-position:center;box-shadow:none;clip-path:none;filter:drop-shadow(0 2px 1px #123b3c55)}
.m3-board[data-skin="fruit"] .m3-piece-0{background-image:url('/assets/match3/cherries-v1.svg')}.m3-board[data-skin="fruit"] .m3-piece-1{background-image:url('/assets/match3/pear-v1.svg')}.m3-board[data-skin="fruit"] .m3-piece-2{background-image:url('/assets/match3/lemon-v1.svg')}.m3-board[data-skin="fruit"] .m3-piece-3{background-image:url('/assets/match3/orange-v1.svg')}.m3-board[data-skin="fruit"] .m3-piece-4{background-image:url('/assets/match3/grapes-v1.svg')}
@media(max-width:400px){.m3-game .m3-toolbar{gap:12px;padding:10px}.m3-toolbar strong{font-size:27px}.m3-toolbar .m3-score-value span{font-size:13px}.m3-game .m3-board{padding:6px;gap:3px}.m3-board .m3-cell{border-radius:7px}}
@media(max-width:360px){.m3-game .m3-toolbar{gap:8px}.m3-toolbar strong{font-size:24px}.m3-toolbar #m3New{font-size:11px;padding-inline:8px}}
/* New-round flower collections use the same illustrated treatment as fruit. */
.m3-board[data-skin="flowers"][data-flower-art="vector"] .m3-piece{width:92%;height:92%;border:0;border-radius:0;background-color:transparent;background-repeat:no-repeat;background-size:contain;background-position:center;box-shadow:none;clip-path:none;filter:drop-shadow(0 2px 1px #123b3c55)}

/* Preset dimensions; keep square tiles at every board size. */
.m3-board{grid-template-columns:repeat(var(--m3-size,7),minmax(0,1fr));grid-template-rows:repeat(var(--m3-size,7),minmax(0,1fr))}
.m3-piece-5{background:#f0a353;--m3-soft:#fff0de;--m3-tone:#8b4e14;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%)}
.m3-piece-6{background:#f4a5c2;--m3-soft:#ffe6ef;--m3-tone:#913e60;clip-path:polygon(35% 0,65% 0,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%,0 35%,35% 35%)}
@media(max-width:400px){.m3-board[data-skin="numbers"] .m3-piece{font-size:clamp(16px,5vw,24px)}}

/* Stripes remain visible across fruit, flowers, shapes and numbers. */
.m3-stripe-mark{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;transition:transform 100ms ease;z-index:1}
.m3-stripe-mark::after{content:"";width:78%;height:18%;min-height:5px;border-block:2px solid #fff6d5;border-radius:2px;background:#e9b742;box-shadow:0 0 0 1px #254b40,0 1px 3px #102e32bb}
.m3-stripe-mark[data-axis="column"]::after{width:18%;height:78%;min-width:5px;min-height:0;border-block:0;border-inline:2px solid #fff6d5}
.m3-clear .m3-stripe-mark{animation:m3-clear 130ms ease-in forwards}
.m3-cell:is(.m3-blast-row,.m3-blast-column)::after{content:"";position:absolute;inset:-3px;z-index:4;pointer-events:none;animation:m3-beam 260ms ease-out both;background:linear-gradient(transparent 32%,#f8d66a 43%,#fffbea 50%,#f8d66a 57%,transparent 68%)}
.m3-cell.m3-blast-column::after{background:linear-gradient(90deg,transparent 32%,#f8d66a 43%,#fffbea 50%,#f8d66a 57%,transparent 68%)}
.m3-cell.m3-blast-row.m3-blast-column::after{background:linear-gradient(90deg,transparent 35%,#fff0b1 48%,transparent 65%),linear-gradient(transparent 35%,#fff0b1 48%,transparent 65%)}
.m3-stripe-tip{margin:12px 0;padding:12px;border:1px solid #bda45b;border-radius:10px;background:#fff7dc;color:#344c37;font-size:13px;line-height:1.5}
.m3-stripe-tip p{margin:0 0 8px}.m3-stripe-tip button{min-height:36px;border:1px solid #8b9f7e;border-radius:7px;background:#f8faf2;color:#294534;padding:6px 12px;font:inherit;cursor:pointer}
@keyframes m3-beam{0%{opacity:0;scale:.8}35%{opacity:1;scale:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.m3-stripe-mark,.m3-cell:is(.m3-blast-row,.m3-blast-column)::after{transition:none;animation:none}}
/* Number specials keep the digit clear: gold rails sit along the tile edges. */
.m3-board[data-skin="numbers"] .m3-stripe-mark::after{width:78%;height:calc(100% - 4px);min-height:0;border:0;border-block:2px solid #f7d578;border-radius:3px;background:none;box-shadow:none}
.m3-board[data-skin="numbers"] .m3-stripe-mark[data-axis="column"]::after{width:calc(100% - 4px);height:78%;min-width:0;border:0;border-inline:2px solid #f7d578}

/* Rainbow specials replace the type completely; no digit or fruit is concealed. */
.m3-board[data-skin] .m3-piece.m3-rainbow{display:grid;place-items:center;width:82%;height:82%;background:conic-gradient(#f17c80,#f6ca59,#8bce80,#6ecbc4,#85b7ef,#b796e7,#f17c80);background-size:auto;border:2px solid #fff4c9;border-radius:50%;clip-path:none;box-shadow:0 0 0 1px #244c40,inset 0 0 5px #fff9;color:white;font-family:system-ui,sans-serif;font-size:clamp(17px,5vw,30px);font-weight:800;text-shadow:0 1px 3px #183f38;filter:none;line-height:1}
.m3-cell.m3-rainbow-clear::after{content:"";position:absolute;inset:-2px;z-index:4;pointer-events:none;border-radius:8px;background:radial-gradient(circle,#fff8d8 5%,#f6ce6a99 45%,transparent 75%);animation:m3-beam 260ms ease-out both}
@media(prefers-reduced-motion:reduce){.m3-cell.m3-rainbow-clear::after{animation:none}}

/* Optional daily routine; controls stay in flow, above the board. */
.routine-home,.routine-bar{border:1px solid #c9d8bc;border-radius:14px;background:linear-gradient(120deg,#eef3e5,#f8f7ee);padding:16px;color:#294534}
.routine-home{margin:0 0 24px}.routine-home h2{font-size:24px;margin:4px 0 8px}.routine-home p{font-size:14px;line-height:1.6;margin:6px 0}.routine-home .home-eyebrow{font-size:10px}.routine-home #routineHomeStatus:empty{display:none}
.routine-bar{width:min(100%,640px);margin:0 0 16px;padding:12px}.routine-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}.routine-heading strong{font-weight:650}.routine-heading>span{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:18px;color:#245d48}
.routine-steps{list-style:none;display:flex;flex-wrap:wrap;gap:5px;margin:9px 0;padding:0;font-size:10px;color:#697665}.routine-steps li{padding:3px 6px;border-radius:5px;background:#e4eadb}.routine-steps [aria-current="step"]{background:#315d45;color:white;font-weight:700}
.routine-bar p{font-size:12px;line-height:1.5;margin:8px 0}.routine-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.routine-actions button,.routine-dialog button,[data-routine-next]{min-height:44px;border:1px solid #a0b294;border-radius:8px;padding:8px 11px;background:#fbfcf6;color:#294534;font:inherit;font-size:12px;cursor:pointer}
#routineNext,#routineHomeResume,#routineBegin{background:#315d45;color:white;border-color:#315d45}#routineHomeStart{font-size:14px}#routineHomeResume[hidden]+#routineHomeStart{background:#315d45;color:white}.routine-actions button:disabled{opacity:.55;cursor:default}.routine-dialog{width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 30px);overflow:auto;padding:22px;border:1px solid #a4b597;border-radius:15px;background:#fbfcf6;color:#294534}.routine-dialog::backdrop{background:#132b1c66}.routine-dialog h2{font-size:22px;margin:0 0 12px}.routine-dialog p,.routine-dialog li{font-size:14px;line-height:1.65}.routine-dialog button{margin:4px 8px 0 0}.routine-dialog a{display:inline-block;margin:12px 0;font-size:14px;color:#315d45}.routine-dialog ol{padding-left:22px}.routine-bar [role="status"]{min-height:18px}
@media(max-width:400px){.routine-home{padding:14px}.routine-home h2{font-size:21px}.routine-heading{font-size:12px}.routine-actions{gap:5px}.routine-actions button{font-size:11px;padding-inline:8px}.routine-steps{font-size:9px;gap:4px}}

/* Mind Exercise is a separate workspace, not an extra panel in free play. */
.routine-deck{display:none}
body.routine-active{background:#f1f4ed}
.routine-active #gameDescription,.routine-active .ad-space,.routine-active .language-notice{display:none!important}
.routine-active .routine-bar{display:block;width:100%;max-width:none;margin:0;padding:18px max(16px,calc((100vw - 1080px)/2));border:0;border-bottom:1px solid #bdcdb5;border-radius:0;background:#e1ebd8;box-sizing:border-box}
.routine-active .routine-heading{gap:16px;font-size:20px}
.routine-active .routine-heading strong{flex:1;font-family:Georgia,serif;font-weight:500}
.routine-active .routine-heading>span{font-size:22px}
#routineExit{min-height:44px;padding:8px 12px;border:1px solid #a0b294;border-radius:8px;background:transparent;color:#294534;font:inherit;font-size:12px;cursor:pointer}
.routine-active .routine-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;font-size:12px;margin:16px 0 0}
.routine-active .routine-steps li{padding:9px 10px;border-radius:6px;border-bottom:3px solid #bacbb0;background:#f2f6ec}
.routine-active .routine-steps [aria-current="step"]{background:#315d45;border-color:#315d45;color:#fff}
.routine-active .routine-steps [data-outcome="completed"]:not([aria-current="step"]){border-color:#47825b}
.routine-active main{max-width:1080px;margin:0 auto;padding-top:12px}
.routine-active .routine-deck{display:block;margin-top:20px;padding:14px 0;border-top:1px solid #c2d0ba}
.routine-deck p{font-size:13px;color:#4c6346;line-height:1.5;margin:0 0 10px}
.routine-active .language-bar{max-width:1080px;margin:auto}
@media(max-width:600px){.routine-active .routine-bar{padding:12px 14px}.routine-active .routine-heading{flex-wrap:wrap;gap:8px;font-size:18px}.routine-active .routine-heading strong{flex-basis:calc(100% - 80px)}.routine-active .routine-heading>span{font-size:20px}#routineExit{padding:6px 9px;font-size:11px}.routine-active .routine-steps{gap:4px;font-size:10px;margin-top:10px}.routine-active .routine-steps li{padding:7px 5px}.routine-active main{padding-top:8px}.routine-active .routine-deck{margin-top:12px}}

/* Routine-only play surface: normal free-play controls remain intact on exit. */
.routine-active .topbar .game-menu,.routine-active .topbar .mobile-game-picker,.routine-active #progressToggle{display:none!important}

.routine-active .routine-deck{margin:0 0 14px;padding:0 0 12px;border-top:0;border-bottom:1px solid #c2d0ba}
.routine-active .routine-deck p{margin:8px 0 0}
.routine-active .routine-actions{flex-wrap:wrap}
.routine-active #routineHelpOpen{margin-left:auto}
.routine-active .sudoku-settings,.routine-active #sudokuShareBox,.routine-active #sudokuLibraryInfo,.routine-active #sudokuProgress,.routine-active #sudokuPuzzleId,.routine-active .sudoku-about,
.routine-active .m3-settings>label,.routine-active #m3New,.routine-active #m3Progress,
.routine-active #msPage .ws-modes,.routine-active #msDailyInfo,.routine-active #msShareFallback,.routine-active #msNew,.routine-active .ms-controls>label,.routine-active #msProgress,
.routine-active .cards-intro,.routine-active #cardsStats,
.routine-active #m3Page details.block-help,.routine-active #msPage details.block-help,.routine-active #sudokuPage details.help,.routine-active #cardsPage details.help,
.routine-active #m3Next,.routine-active #msWinNew{display:none!important}
.routine-active .m3-settings{display:flex;justify-content:flex-start;margin:12px 0}
.routine-active .ms-controls{flex-wrap:wrap}
@media(max-width:600px){.routine-active .routine-deck{margin:0 0 10px}.routine-active .routine-actions{gap:5px}.routine-active .routine-actions button{padding:8px;font-size:11px}}

body.routine-active .topbar.playroom-header .topbar-inner{grid-template-columns:auto minmax(0,1fr) auto}
body.routine-active .topbar.playroom-header .brand .home-wordmark{display:inline!important}

body.routine-active .topbar.playroom-header .brand{width:auto;gap:10px}

body.routine-active .topbar.playroom-header .mobile-game-picker{display:flex!important;visibility:hidden;pointer-events:none}
#routineHomeStart{background:#315d45;color:white;border-color:#315d45}

/* Routine navigation above the board; activity actions below it. */
.routine-only{display:none!important}
.routine-active .routine-only{display:inline-flex!important;align-items:center;justify-content:center}
.routine-active :is(.m3-settings,.ms-controls,.sudoku-controls,.cards-actions){display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:8px;margin:12px 0}
.routine-active :is(.m3-settings,.ms-controls,.sudoku-controls,.cards-actions) button{min-height:44px}
@media(max-width:400px){.routine-active .sudoku-controls{gap:6px}.routine-active .sudoku-controls button{padding:8px 10px;font-size:12px}}

/* Compact 24 Points console: reference cards and answer beside a four-row keypad. */
.cards-game{max-width:680px}
.cards-console{display:grid;grid-template-columns:minmax(0,280px) minmax(0,320px);gap:20px;align-items:start;margin:16px 0}
.cards-display,.cards-calculator{min-width:0}
.cards-console .cards-hand{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px;margin:0 0 14px}
.cards-console .number-card{aspect-ratio:5/7;min-height:0;gap:2px;padding:6px}
.cards-console .number-card strong{font-size:36px;line-height:1.1}
.cards-console .number-card>span{font-size:19px}
.cards-console .number-card small{font-size:9px}
.cards-console .cards-expression{box-sizing:border-box;min-height:76px;margin-bottom:10px;font-size:22px}
.cards-console .cards-hint{font-size:20px;line-height:1.5}
.cards-console #cardsStatus{margin:8px 0}
#cardsKeypad{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;min-width:0;padding:12px;border:1px solid #bdcbb4;border-radius:12px;background:#e6eddf}
#cardsKeypad button{box-sizing:border-box;min-width:0;min-height:62px;margin:0;padding:8px 4px;border:1px solid #aebfa5;border-radius:8px;background:#fafcf5;color:#294534;font:inherit;font-size:13px;font-weight:650;cursor:pointer;box-shadow:0 2px 0 #acbca1}
#cardsKeypad button:active:not(:disabled){translate:0 1px;box-shadow:0 1px 0 #acbca1}
#cardsKeypad button:focus-visible{outline:3px solid #b58d35;outline-offset:2px}
#cardsKeypad [data-card-number]{display:flex;align-items:center;justify-content:center;gap:4px;background:#fffef8;border-color:#97ad8d}
#cardsKeypad [data-card-number] strong{font-size:27px;line-height:1}
#cardsKeypad [data-card-number] small{font-size:12px}
#cardsKeypad .red-suit{color:#b54242}
#cardsKeypad [data-card-op]{font-size:28px;background:#dce7d1}
#cardsKeypad #cardsCheck{background:#315d45;border-color:#315d45;color:#fff}
#cardsKeypad #cardsNew{grid-column:span 2;background:#edf1e5}

@media(max-width:600px){.cards-console{grid-template-columns:minmax(0,1fr);gap:10px;max-width:360px;margin:12px 0}.cards-console .cards-hand{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:8px;margin-bottom:10px}.cards-console .number-card{aspect-ratio:5/7;min-height:0;padding:4px}.cards-console .number-card strong{font-size:27px}.cards-console .number-card>span{font-size:16px}.cards-console .number-card small{display:none}.cards-console .cards-expression{min-height:76px;font-size:21px}#cardsKeypad{padding:10px;gap:8px}#cardsKeypad button{min-height:58px}.cards-console #cardsStatus{min-height:0;margin:6px 0}}

/* Align both play panels; status starts at the full play area's left edge. */
.cards-console{align-items:stretch}
.cards-display{display:flex}
.cards-console .cards-hand{flex:1;margin:0;grid-template-rows:repeat(2,max-content);align-content:space-between}
.cards-calculator{display:flex;flex-direction:column;gap:10px}
.cards-console .cards-expression{flex:1;margin:0}
.cards-game>#cardsStatus{margin:10px 0;max-width:620px}
@media(max-width:600px){.cards-display{display:block}.cards-console .cards-hand{grid-template-rows:none;align-content:normal;margin:0}.cards-calculator{gap:10px}}

/* Persistent, quiet 24 Points completion; the next action stays visible. */
#cardsSuccess{color:#315d45;font-size:16px;font-weight:700;line-height:1.4}
#cardsKeypad #cardsNew.cards-next-ready{background:#315d45;color:#fff;border-color:#315d45;box-shadow:0 0 0 3px #d9bd6d}
#routineNext.routine-ready{box-shadow:0 0 0 3px #d9bd6d}

/* Shared finish on game utilities: settings above, actions below, readable supporting copy. */
.game-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0;max-width:460px}
.game-actions button{min-height:44px;min-width:44px;padding:9px 13px;border:1px solid #b9c5b6;border-radius:8px;background:#f4f5ef;color:#284332;font:inherit;font-size:13px;cursor:pointer}
.game-actions button:disabled{opacity:.45;cursor:default}
:is(.sudoku-controls,.sol-controls,.ms-controls,.m3-actions,.ws-actions,.ng-controls,.controls) :is(button,select){min-height:44px;min-width:44px;border-radius:8px}
.ms-settings{max-width:460px;margin:12px 0}
.ms-settings label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#52634f}
.ms-settings select{min-height:44px;max-width:240px;border:1px solid #b9c5b6;border-radius:8px;padding:9px 12px;background:#f4f5ef;color:#284332;font:inherit;font-size:13px}
.ws-toolbar #wsNew{margin-left:auto}
.game-page :is(details.help,details.block-help,details.mahjong-help,details.sudoku-details)>summary{box-sizing:border-box;min-height:44px;padding:12px 0;font-size:12px;line-height:20px;color:#3c5042;cursor:pointer}
.sudoku-details{max-width:450px;margin:8px 0;color:#52634f}
.sudoku-details p{font-size:12px;line-height:1.6;margin:6px 0}
.sudoku-game>#sudokuProgress{margin:8px 0;max-width:450px}
.game-description h1{letter-spacing:-.25px}
footer :is(#feedbackToggle,#usageSettings,#usageAllow,#usageDecline){min-height:44px;padding:8px 12px;margin:4px 0;border:1px solid #b9c5b6;border-radius:8px;background:#f4f5ef;color:#284332;font:inherit;font-size:12px;line-height:20px;vertical-align:middle;cursor:pointer}
footer>a{display:inline-flex;align-items:center;min-height:44px;vertical-align:middle;color:#3c5042}
.routine-active .ms-settings,.routine-active .sudoku-details{display:none!important}
.routine-active .m3-settings{margin:0}
@media(max-width:600px){.game-actions{gap:8px}.game-actions button{min-width:44px}.ms-settings select{width:100%;max-width:none}.sudoku-details{margin-top:6px}}
.game-page:not(.routine-active) .sudoku-game>#sudokuGrid{margin-top:14px}

/* Sudoku finishes in place; the completed board remains available to inspect. */
.sudoku-completion{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;max-width:450px;margin:14px 0;padding:14px;border:1px solid #98b58b;border-radius:10px;background:#edf5e6;color:#294b36}
.sudoku-completion h2{font-size:20px;line-height:1.3;margin:0 0 6px}
.sudoku-completion h2>span:first-child{color:#387441}
.sudoku-completion p{font-size:12px;line-height:1.5;margin:0}
.sudoku-completion-actions{display:flex;gap:8px;flex-wrap:wrap}
.sudoku-completion-actions button{min-height:44px;padding:9px 13px;border:1px solid #315d45;border-radius:8px;background:#315d45;color:white;font:inherit;font-size:13px;cursor:pointer;box-shadow:0 0 0 2px #d9bd6d}
.sudoku-complete .sudoku-pad{display:none}

/* Mahjong Solitaire: lasting completion, with a compact cleared table. */
.ms-completion{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;max-width:460px;box-sizing:border-box;margin:14px 0;padding:14px;border:1px solid #98b58b;border-radius:10px;background:#edf5e6;color:#294b36}
.ms-completion h2{font-size:20px;line-height:1.3;margin:0 0 6px}
.ms-completion p{font-size:12px;line-height:1.5;margin:3px 0}
.ms-completion .block-final-actions{display:flex;gap:8px;flex-wrap:wrap;margin:0}
.ms-completion button{min-height:44px;padding:9px 13px;border:1px solid #315d45;border-radius:8px;background:#315d45;color:white;font:inherit;font-size:13px;cursor:pointer;box-shadow:0 0 0 2px #d9bd6d}
.ms-board.ms-cleared{aspect-ratio:auto;height:120px;display:grid;place-items:center}
.ms-board.ms-cleared::after{content:'✓';font-size:54px;color:#d5e8b8}

/* Nonogram keeps the completed picture and result in view. */
.ng-completion{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;max-width:500px;box-sizing:border-box;margin:14px 0;padding:14px;border:1px solid #98b58b;border-radius:10px;background:#edf5e6;color:#294b36}
.ng-completion h2{font-size:20px;line-height:1.3;margin:0 0 6px}
.ng-completion h2::before{content:'✓ ';color:#387441}
.ng-completion p{flex-basis:100%;font-size:13px;line-height:1.5;margin:0}
.ng-completion .block-final-actions{display:flex;gap:8px;margin:0}
.ng-completion button{min-height:44px;padding:9px 13px;border:1px solid #315d45;border-radius:8px;background:#315d45;color:white;font:inherit;font-size:13px;cursor:pointer;box-shadow:0 0 0 2px #d9bd6d}

/* Word Search: persistent result, with the found words still visible. */
.ws-completion{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;max-width:500px;box-sizing:border-box;margin:14px 0;padding:14px;border:1px solid #98b58b;border-radius:10px;background:#edf5e6;color:#294b36}
.ws-completion h2{font-size:20px;line-height:1.3;margin:0 0 6px}
.ws-completion p{font-size:12px;line-height:1.5;margin:3px 0}
.ws-completion .block-final-actions{display:flex;gap:8px;margin:0}
.ws-completion button{min-height:44px;padding:9px 13px;border:1px solid #315d45;border-radius:8px;background:#315d45;color:white;font:inherit;font-size:13px;cursor:pointer;box-shadow:0 0 0 2px #d9bd6d}

/* Keep Word Search setup and Hint together, including narrow phones. */
#wsPage .ws-settings{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr) auto;align-items:end;gap:8px}
#wsPage .ws-settings button{min-height:44px;min-width:44px;padding:9px 10px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;font-size:13px;cursor:pointer}
#wsPage .ws-settings button:disabled{opacity:.45;cursor:default}
#wsPage .ws-settings button:focus-visible{outline:3px solid #b58732;outline-offset:2px}
@media(max-width:400px){#wsPage .ws-settings select{font-size:12px;padding-inline:4px}}

/* Sudoku: choose a puzzle directly, without Daily/Practice mode tabs. */
.sudoku-game .sudoku-puzzle-controls{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center;gap:8px;width:100%}
.sudoku-game .sudoku-puzzle-controls :is(select,button){box-sizing:border-box;min-height:44px;margin:0;font:inherit;font-size:13px;padding:9px 10px;border-radius:8px}
.sudoku-game .sudoku-puzzle-controls select{min-width:0;width:100%}
.sudoku-game .sudoku-settings #sudokuDaily[aria-pressed=true]{background:#315d45;color:#fff;border-color:#315d45}
@media(max-width:480px){.sudoku-game .sudoku-puzzle-controls{gap:6px}.sudoku-game .sudoku-puzzle-controls :is(select,button){font-size:12px;padding-inline:6px}}
@media(max-width:360px){.sudoku-game .sudoku-puzzle-controls :is(select,button){font-size:11px;padding-inline:4px}}

.sudoku-share-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.sudoku-share-header label{margin:0}
.sudoku-share-header button{min-height:44px;padding:8px 12px;border:1px solid #aabda7;border-radius:8px;background:#f4f5ef;color:#284332;font:inherit;font-size:13px;cursor:pointer}
.sudoku-share-header button:focus-visible{outline:3px solid #b58732;outline-offset:2px}

/* Nonogram: direct puzzle actions, tools, then the board and quiet progress. */
.ng-game .ng-puzzle-actions{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:8px;align-items:center}
.ng-game .ng-puzzle-actions :is(button,select),.ng-board-status button{box-sizing:border-box;min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;font-size:13px;cursor:pointer}
.ng-game .ng-puzzle-actions select{min-width:0;width:100%}
.ng-game .ng-puzzle-actions #ngDaily[aria-pressed=true]{background:#315d45;color:#fff;border-color:#315d45}
.ng-board-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;color:#52634f}
.ng-board-status p{font-size:13px;line-height:1.5;margin:0}
.ng-board-status strong{font-weight:600}

.ng-game .ng-puzzle-actions{grid-template-columns:auto auto 112px auto;justify-content:start}
.ng-share-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.ng-share-header label{font-size:12px}
.ng-share-header button{min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;font-size:13px;cursor:pointer}
@media(max-width:480px){.ng-game .ng-puzzle-actions{grid-template-columns:auto auto 84px auto;gap:6px}.ng-game .ng-puzzle-actions :is(button,select){font-size:12px;padding-inline:6px}}

@media(max-width:480px){.ng-game .ng-puzzle-actions{grid-template-columns:auto auto 78px auto}}
@media(max-width:360px){.ng-game .ng-puzzle-actions{grid-template-columns:auto auto 68px auto;gap:5px}.ng-game .ng-puzzle-actions :is(button,select){font-size:11px;padding-inline:4px}}

/* Match the board width; give spare row space to New Puzzle. */
.ng-game .ng-puzzle-actions{width:100%;box-sizing:border-box;grid-template-columns:auto minmax(0,1fr) 112px auto}
.ng-game .ng-puzzle-actions #ngNew{width:100%;white-space:nowrap}
@media(max-width:480px){.ng-game .ng-puzzle-actions{grid-template-columns:auto minmax(0,1fr) 78px auto}}
@media(max-width:360px){.ng-game .ng-puzzle-actions{grid-template-columns:auto minmax(0,1fr) 68px auto}}

.ng-game .ng-puzzle-actions #ngDaily{grid-column:1}
.ng-game .ng-puzzle-actions #ngNew{grid-column:2}
.ng-game .ng-puzzle-actions #ngSize{grid-column:3}
.ng-game .ng-puzzle-actions #ngShare{grid-column:4}

.ng-completion #ngWinDetail{font-size:16px;line-height:26px;font-weight:400}

/* Sudoku: a larger desktop board with an adjacent number console. */
.sudoku-game{max-width:764px;width:100%}
.sudoku-game .sudoku-settings,.sudoku-game .sudoku-share-box{max-width:500px}
.sudoku-play-area{display:grid;grid-template-columns:minmax(0,500px) minmax(0,240px);gap:24px;align-items:start;margin-top:14px}
.sudoku-board-column,.sudoku-side{min-width:0}
.sudoku-play-area .sudoku-grid{width:100%;max-width:500px;box-sizing:border-box}
.sudoku-play-area .sudoku-completion{max-width:500px}
.sudoku-side .sudoku-pad{width:100%;max-width:none;margin:0 0 14px}
.sudoku-side .sudoku-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-width:none;margin:0}
.sudoku-side .sudoku-controls button{min-width:0;min-height:44px;padding:8px 6px;font-size:13px}
.sudoku-side .sudoku-hint-panel{box-sizing:border-box;max-width:none;margin-top:14px}
.routine-active .sudoku-side .sudoku-controls{grid-template-columns:repeat(2,minmax(0,1fr));margin:0}
@media(min-width:901px){
 .sudoku-side .sudoku-pad{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .sudoku-side .sudoku-pad button{aspect-ratio:1;font-size:36px;min-height:64px;padding:6px}
 .sudoku-side .sudoku-pad #sudokuErase{grid-column:1/-1;aspect-ratio:auto;min-height:44px;font-size:14px}
 .sudoku-play-area .sudoku-cell{font-size:30px}
 .sudoku-play-area .sudoku-notes{font-size:11px}
}
@media(max-width:900px){
 .sudoku-game{max-width:500px}
 .sudoku-play-area{grid-template-columns:minmax(0,1fr);gap:14px}
 .sudoku-side .sudoku-pad{grid-template-columns:repeat(5,minmax(0,1fr));margin-top:0}
}

/* Quiet digit completion marker; does not disable number entry or Notes. */
.sudoku-pad button.digit-complete{color:#71816e;background:#edf1e9;text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:#71816e}

/* Word Search: direct puzzle controls, then compact theme/level and Hint. */
#wsPage .ws-puzzle-actions{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px}
#wsPage .ws-puzzle-actions button{white-space:nowrap}
#wsPage .ws-puzzle-actions #wsShare{margin:0}
#wsPage .ws-settings label{font-size:0;gap:0}
#wsPage .ws-settings select{font-size:14px}
#wsPage .ws-found-progress{margin:10px 0 0;font-size:14px;color:#536551}
#wsPage .ws-found-progress strong{margin-left:5px;color:#294534}
#wsPage .ws-share-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
#wsShareClose{min-height:36px;padding:5px 9px;border:1px solid #a2b39c;border-radius:7px;background:#f6f7ef;color:#294534;font:inherit;cursor:pointer}
@media(max-width:400px){#wsPage .ws-puzzle-actions{gap:6px}#wsPage .ws-puzzle-actions button{font-size:13px;padding-inline:8px}#wsPage .ws-settings select{font-size:12px}}

/* Word Search desktop word panel; balanced controls at every width. */
#wsPage .ws-game{max-width:724px}
#wsPage .ws-puzzle-actions,#wsPage .ws-settings,#wsDailyInfo,#wsShareFallback{max-width:460px;box-sizing:border-box}
#wsPage .ws-puzzle-actions{grid-template-columns:120px minmax(0,1fr) 96px}
#wsPage .ws-settings{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) 96px}
#wsPage .ws-settings button{font-size:14px}
.ws-play-area{display:grid;grid-template-columns:minmax(0,460px) minmax(0,240px);gap:24px;align-items:start}
.ws-board-column,.ws-word-panel{min-width:0}
#wsPage .ws-word-panel .ws-found-progress{margin:0 0 12px;font-size:16px}
#wsPage .ws-word-panel .ws-words{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}
#wsPage .ws-word-panel .ws-words li{padding:10px 8px;font-size:14px;letter-spacing:.5px}
@media(max-width:900px){
 #wsPage .ws-game{max-width:460px}
 .ws-play-area{grid-template-columns:minmax(0,1fr);gap:12px}
 #wsPage .ws-word-panel .ws-found-progress{margin:0 0 12px;font-size:14px}
 #wsPage .ws-word-panel .ws-words{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 #wsPage .ws-word-panel .ws-words li{padding:7px 4px;font-size:13px;letter-spacing:.4px}
}
@media(max-width:480px){
 #wsPage .ws-puzzle-actions{grid-template-columns:104px minmax(0,1fr) 76px}
 #wsPage .ws-settings{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) 76px}
}
@media(max-width:360px){
 #wsPage .ws-puzzle-actions{grid-template-columns:92px minmax(0,1fr) 68px}
 #wsPage .ws-settings{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) 68px}
 #wsPage .ws-puzzle-actions button{font-size:12px;padding-inline:5px}
 #wsPage .ws-settings select{font-size:11px;padding-inline:4px}
 #wsPage .ws-word-panel .ws-words li{font-size:11px;letter-spacing:.2px}
}

/* Match-3: difficulty, piece style and Hint share one compact row. */
#m3Page .m3-settings{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 96px;gap:8px;align-items:end}
#m3Page .m3-settings>label{min-width:0;gap:0}
#m3Page .m3-settings select{box-sizing:border-box;font-size:14px}
#m3Page .m3-settings #m3Hint{min-width:0;min-height:44px;font-size:14px}
#m3Page .m3-result-actions:has(#m3Results[hidden]){display:none}
.routine-active #m3Page .m3-settings{display:flex;margin:12px 0 0}
.routine-active #m3Page .m3-settings #m3Hint{min-width:96px}
@media(max-width:480px){#m3Page .m3-settings{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 76px}#m3Page .m3-settings select{font-size:13px;padding-inline:7px}}
@media(max-width:360px){#m3Page .m3-settings{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 68px;gap:6px}#m3Page .m3-settings select{font-size:12px;padding-inline:5px}}

/* Mahjong Solitaire: direct deal controls aligned to its table. */
#msPage .ms-game{max-width:460px}
#msPage .ms-puzzle-actions{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;gap:8px;align-items:end}
#msPage .ms-puzzle-actions button{font-size:14px;padding-inline:10px;white-space:nowrap}
#msPage .ms-puzzle-actions #msShare{margin:0}
#msPage .ms-puzzle-actions label{min-width:0}
#msPage .ms-puzzle-actions select{width:100%;box-sizing:border-box;min-width:0;min-height:44px;border:1px solid #a2b39c;border-radius:8px;padding:9px 6px;background:#f6f7ef;color:#294534;font:inherit;font-size:13px}
#msPage .ms-toolbar{margin:14px 0 0;gap:28px}
#msPage .ms-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#msPage .ms-controls button{font-size:14px}
#msPage .ms-share-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
#msShareClose{min-height:36px;padding:5px 9px;border:1px solid #a2b39c;border-radius:7px;background:#f6f7ef;color:#294534;font:inherit;cursor:pointer}
@media(max-width:600px){#msPage .ms-puzzle-actions{grid-template-columns:repeat(2,minmax(0,1fr))}#msPage .ms-puzzle-actions button,#msPage .ms-puzzle-actions select{font-size:14px}#msPage .ms-controls button{padding-inline:7px}}
.routine-active #msPage .ms-puzzle-actions{display:none}

/* Mahjong Solitaire actions share the counter row above the table. */
#msPage .ms-toolbar{gap:12px;align-items:center}
#msPage .ms-toolbar>.ms-controls{flex:1;min-width:0;margin:0 0 0 auto;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.4fr);gap:6px}
#msPage .ms-toolbar .ms-controls button{width:100%;min-width:0;margin:0;padding-inline:8px}
@media(max-width:480px){
 #msPage .ms-toolbar{gap:8px}
 #msPage .ms-toolbar>div:not(.ms-controls) span{font-size:11px;white-space:nowrap}
 #msPage .ms-toolbar strong{font-size:21px}
 #msPage .ms-toolbar>.ms-controls{gap:5px}
 #msPage .ms-toolbar .ms-controls button{font-size:12px;padding-inline:4px}
}
@media(max-width:360px){#msPage .ms-toolbar{gap:6px}#msPage .ms-toolbar>div:not(.ms-controls) span{font-size:10px}#msPage .ms-toolbar .ms-controls button{font-size:11px}}

/* Solitaire: controls stay within reach above the card table. */
#solPage .sol-toolbar{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;gap:16px;align-items:center}
#solPage .sol-toolbar>.sol-controls{display:grid;grid-template-columns:1fr 1fr 1.4fr;gap:8px;margin:0 0 0 12px;min-width:0}
#solPage .sol-toolbar button{margin:0;font-size:14px;white-space:nowrap}
#solPage .sol-controls button{min-width:0;padding-inline:10px}
@media(max-width:650px){
 #solPage .sol-toolbar{grid-template-columns:auto minmax(0,1fr) auto;gap:10px 18px}
 #solPage .sol-toolbar>.sol-controls{grid-row:2;grid-column:1/-1;margin:0}
 #solPage #solNew{grid-row:1;grid-column:3}
 #solPage .sol-toolbar button{font-size:13px}
}

/* Optional result sharing lives inside the finish dialog. */
.result-share{margin-top:10px}
.result-share>button{width:100%;min-height:44px;padding:8px 12px;border:1px solid #b3c5b7;border-radius:9px;background:#fff;color:#243e32;font:inherit;font-size:14px;cursor:pointer}
.result-share>button:disabled{opacity:.6;cursor:default}
.result-share>button:focus-visible{outline:3px solid #bd8d34;outline-offset:3px}
.block-game-over .result-share p{margin:10px 0 0;font-size:13px;line-height:1.5}
.result-share-fallback{display:block;margin-top:10px;text-align:left;font-size:13px}
.result-share-fallback[hidden]{display:none}
.result-share-fallback textarea{display:block;width:100%;box-sizing:border-box;margin-top:6px;padding:8px;border:1px solid #b3c5b7;border-radius:6px;background:#fff;color:#243e32;font:inherit;font-size:13px;resize:vertical}

/* Share the game at any time; result sharing remains in the finish dialog. */
.block-scorebar>.game-share-actions{display:flex;flex-direction:row;gap:8px;min-width:0}
.game-share-actions button{white-space:nowrap;font:inherit;font-size:13px}
.game-share-panel{margin:0 0 12px;padding:10px;border:1px solid #b3c5b7;border-radius:8px;background:#f6f7ef;color:#294534}
.game-share-panel[hidden]{display:none}
.game-share-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.game-share-heading p{margin:0;font-size:13px;line-height:1.5}
.game-share-heading button{min-height:36px;flex:none;padding:5px 8px;border:1px solid #b3c5b7;border-radius:7px;background:#fff;color:#294534;font:inherit;font-size:13px;cursor:pointer}
.game-share-panel textarea{display:block;box-sizing:border-box;width:100%;margin-top:8px;padding:8px;border:1px solid #b3c5b7;border-radius:6px;background:#fff;color:#294534;font:inherit;font-size:13px;resize:vertical}
.game-share-panel textarea[hidden]{display:none}
@media(max-width:480px){
 #twentyPage .block-scorebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #blocksPage .block-scorebar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .block-scorebar>.game-share-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
}

/* Share verified puzzles without changing the calculator keypad. */
.cards-intro{flex-wrap:wrap}
.cards-intro>p{flex:1 1 260px;margin:0}
.cards-puzzle-tools{display:flex;align-items:center;gap:10px;margin-left:auto}
#cardsShare{min-height:44px;padding:8px 12px;border:1px solid #a2b39c;border-radius:8px;background:#f6f7ef;color:#294534;font:inherit;font-size:14px;white-space:nowrap;cursor:pointer}
.routine-active #cardsShare,.routine-active #cardsPage .game-share-panel{display:none!important}
#speedsortPage .game-share-panel{max-width:700px}
#cardsPage .game-share-panel{max-width:620px;box-sizing:border-box;margin-top:10px}
#sortShare{white-space:nowrap}
@media(max-width:900px){#puzzleSettings #sortShare{flex:0 0 auto}#sortShare{padding-inline:8px}}
@media(max-width:900px){
 #speedsortPage .controls{grid-template-columns:repeat(6,minmax(0,1fr))}
 #speedsortPage .controls #undo,#speedsortPage .controls #restart,#speedsortPage .board-size-control{grid-column:span 2}
 #speedsortPage #newPuzzle{grid-column:span 3}
 #speedsortPage #sortShare{order:4;grid-column:span 3}
 #speedsortPage #step{order:5;grid-column:span 2}
 #speedsortPage #autoplay{order:6;grid-column:span 2}
 #speedsortPage #speedControl{order:7;grid-column:span 2}
}

/* Sudoku design sample: white surfaces and a readable desktop type scale. */
@font-face{font-family:'Playroom Nunito Sans';font-style:normal;font-weight:400 700;font-display:swap;src:url('/assets/fonts/nunito-sans/latin-v19.woff2') format('woff2')}
#sudokuPage .sudoku-game{max-width:812px}
#sudokuPage .sudoku-surface,#sudokuPage .sudoku-game>.help{box-sizing:border-box;background:#fff;border:0;border-radius:12px;box-shadow:0 2px 12px #19372a06}
#sudokuPage .sudoku-surface{padding:24px}
#sudokuPage .sudoku-game>.help{margin:20px 0 0;padding:20px 24px}
#sudokuPage .sudoku-game>.help>summary{padding:0;min-height:28px;line-height:28px}
#sudokuPage .sudoku-surface #sudokuProgress{margin:8px 0;max-width:500px}
@media(min-width:901px){
 #sudokuPage .sudoku-game{font-family:'Playroom Nunito Sans',Arial,Helvetica,sans-serif;font-size:16px;color:#263e2e}
 #sudokuPage .sudoku-puzzle-controls :is(button,select),#sudokuPage .sudoku-side .sudoku-controls button,#sudokuPage #sudokuErase{font-family:inherit;font-size:16px;font-weight:600;min-height:46px}
 #sudokuPage .sudoku-puzzle-controls :is(button,select){padding:10px 12px}
 #sudokuPage #sudokuStatus{font-size:16px;line-height:26px;color:#344d3b;max-width:764px;min-height:0;margin:18px 0 8px}
 #sudokuPage #sudokuProgress{font-size:14px;line-height:24px;color:#52634f;margin:8px 0}
 #sudokuPage .sudoku-details{max-width:764px;margin:8px 0 0}
 #sudokuPage .sudoku-details>summary{font-size:14px;line-height:24px;color:#52634f}
 #sudokuPage .sudoku-details p{font-size:14px;line-height:24px;color:#52634f}
 #sudokuPage .sudoku-game>.help>summary{font-size:18px;font-weight:650;color:#263e2e}
 #sudokuPage .sudoku-game>.help p{font-size:16px;line-height:28px;color:#3e5144;margin:16px 0 0}
 #sudokuPage .sudoku-hint-panel h3{font-size:17px;line-height:25px}
 #sudokuPage .sudoku-hint-panel p{font-size:16px;line-height:26px}
 #sudokuPage .sudoku-share-box,#sudokuPage .sudoku-share-box input,#sudokuPage #sudokuShareClose{font-family:inherit;font-size:16px}
 #sudokuPage .sudoku-completion p,#sudokuPage .sudoku-completion-actions button{font-size:16px;line-height:26px}
 body:has(#sudokuPage:not([hidden])) .game-description{font-family:'Playroom Nunito Sans',Arial,Helvetica,sans-serif;font-size:16px;line-height:28px;color:#3e5144}
}
@media(max-width:900px){
 #sudokuPage .sudoku-game{max-width:532px}
 #sudokuPage .sudoku-surface{padding:16px}
 #sudokuPage .sudoku-game>.help{padding:16px}
}
@media(max-width:600px){
 #sudokuPage .sudoku-game{max-width:500px}
 #sudokuPage .sudoku-surface,#sudokuPage .sudoku-game>.help{width:calc(100% + 24px);margin-left:-12px;margin-right:-12px;padding:16px 12px}
 #sudokuPage .sudoku-game>.help{margin-top:16px}
}

/* Sudoku comparison: distinct board and keypad surfaces on desktop. */
@media(min-width:901px){
 #sudokuPage .sudoku-surface{background:transparent;padding:0;border-radius:0;box-shadow:none}
 #sudokuPage .sudoku-settings,#sudokuPage .sudoku-share-box{width:calc(100% - 24px);margin-left:12px}
 #sudokuPage .sudoku-play-area{grid-template-columns:minmax(0,524px) minmax(0,264px);gap:24px}
 #sudokuPage .sudoku-board-column,#sudokuPage .sudoku-side{background:#fff;padding:12px;border-radius:12px;box-shadow:0 2px 12px #19372a06}
}
@media(max-width:900px){
 #sudokuPage .sudoku-board-column{display:contents}
 #sudokuPage .sudoku-play-area{row-gap:0}
 #sudokuPage #sudokuGrid{order:0}
 #sudokuPage #sudokuResult{order:1}
 #sudokuPage .sudoku-side{order:2;margin-top:14px}
 #sudokuPage #sudokuStatus{order:3}
 #sudokuPage #sudokuProgress{order:4}
 #sudokuPage .sudoku-details{order:5}
}

/* Nonogram: a control panel above a separate white picture panel. */
#ngPage .ng-game{max-width:508px}
#ngPage .ng-action-panel,#ngPage .ng-board-panel{box-sizing:border-box;background:#fff;padding:24px;border-radius:12px;box-shadow:0 2px 12px #19372a06}
#ngPage .ng-board-panel{margin-top:20px}
#ngPage .ng-action-panel .ng-controls{margin-bottom:0}
#ngPage .ng-action-panel #ngShareFallback{margin:14px 0 0}
#ngPage .ng-board-panel>.block-help{margin-bottom:0}
@media(min-width:901px){
 #ngPage .ng-game{font-family:'Playroom Nunito Sans',Arial,Helvetica,sans-serif;font-size:16px;color:#263e2e}
 #ngPage .ng-puzzle-actions :is(button,select),#ngPage .ng-controls button{font-family:inherit;font-size:16px;font-weight:600;min-height:46px}
 #ngPage .ng-puzzle-actions :is(button,select){padding:9px 10px}
 #ngPage .ng-clue{font-size:14px;line-height:14px;font-weight:600}
 #ngPage .ng-corner{font-size:13px;color:#52634f}
 #ngPage .ng-board-status p,#ngPage #ngStatus{font-size:16px;line-height:26px;color:#344d3b}
 #ngPage #ngProgress,#ngPage #ngStorage,#ngPage #ngDailyInfo{font-size:14px;line-height:24px;color:#52634f}
 #ngPage #ngShareFallback,#ngPage #ngShareLink,#ngPage #ngShareClose{font-family:inherit;font-size:16px}
 #ngPage .block-help>summary{font-size:18px;font-weight:650;color:#263e2e}
 #ngPage .block-help p{font-size:16px;line-height:28px;color:#3e5144}
 #ngPage #ngLearnHelp{font-size:16px;min-height:44px}
 body:has(#ngPage:not([hidden])) .game-description{font-family:'Playroom Nunito Sans',Arial,Helvetica,sans-serif;font-size:16px;line-height:28px;color:#3e5144}
}
@media(max-width:900px){
 #ngPage .ng-game{max-width:492px}
 #ngPage .ng-action-panel,#ngPage .ng-board-panel{padding:16px}
}
@media(max-width:600px){
 #ngPage .ng-game{max-width:460px}
 #ngPage .ng-action-panel,#ngPage .ng-board-panel{width:calc(100% + 24px);margin-left:-12px;margin-right:-12px;padding:16px 12px}
 #ngPage .ng-board-panel{margin-top:16px}
}

/* Word Search: actions and board on the left, target words on the right. */
#wsPage .ws-game{display:grid;max-width:820px;grid-template-columns:minmax(0,508px) minmax(0,288px);grid-template-areas:"actions ." "board words" "information information";gap:24px;align-items:start}
#wsPage .ws-play-area{display:contents}
#wsPage .ws-action-panel,#wsPage .ws-board-column,#wsPage .ws-word-panel{box-sizing:border-box;background:#fff;padding:24px;border-radius:12px;box-shadow:0 2px 12px #19372a06}
#wsPage .ws-action-panel{grid-area:actions;min-width:0}
#wsPage .ws-board-column{grid-area:board}
#wsPage .ws-word-panel{grid-area:words}
#wsPage .ws-action-panel .ws-settings{margin-bottom:0}
#wsPage .ws-information{grid-area:information;min-width:0;max-width:508px;padding:0 24px}
#wsPage .ws-information #wsStatus{margin-top:0}
@media(min-width:901px){
 #wsPage .ws-game{font-family:'Playroom Nunito Sans',Arial,Helvetica,sans-serif;font-size:16px;color:#263e2e}
 #wsPage .ws-puzzle-actions button,#wsPage .ws-settings :is(select,button){font-family:inherit;font-size:16px;font-weight:600;min-height:46px}
 #wsPage .ws-word-panel .ws-words li{font-size:16px;font-weight:600;letter-spacing:.3px;padding:10px 6px;white-space:nowrap}
 #wsPage .ws-word-panel .ws-found-progress{font-size:16px;line-height:26px;color:#344d3b}
 #wsPage #wsStatus{font-size:16px;line-height:26px;color:#344d3b}
 #wsPage #wsProgress,#wsPage #wsStorage,#wsPage #wsDailyInfo{font-size:14px;line-height:24px;color:#52634f}
 #wsPage .block-help>summary{font-size:18px;font-weight:650;color:#263e2e}
 #wsPage .block-help p{font-size:16px;line-height:28px;color:#3e5144}
 #wsPage #wsShareFallback,#wsPage #wsShareLink,#wsPage #wsShareClose{font-family:inherit;font-size:16px}
 #wsPage .ws-completion p,#wsPage .ws-completion button{font-size:16px;line-height:26px}
 body:has(#wsPage:not([hidden])) .game-description{font-family:'Playroom Nunito Sans',Arial,Helvetica,sans-serif;font-size:16px;line-height:28px;color:#3e5144}
}
@media(max-width:900px){
 #wsPage .ws-game{max-width:492px;grid-template-columns:minmax(0,1fr);grid-template-areas:"actions" "board" "words" "information";gap:16px}
 #wsPage .ws-action-panel,#wsPage .ws-board-column,#wsPage .ws-word-panel{padding:16px}
 #wsPage .ws-information{padding:0 16px}
}
@media(max-width:600px){
 #wsPage .ws-game{max-width:460px}
 #wsPage .ws-action-panel,#wsPage .ws-board-column,#wsPage .ws-word-panel{width:calc(100% + 24px);margin-left:-12px;margin-right:-12px;padding:16px 12px}
 #wsPage .ws-information{padding:0}
}

/* Match-3, 2048 and Block Garden follow the white-panel game style. */
.framed-game{--play-width:450px;max-width:calc(var(--play-width) + 48px);width:100%}
.m3-game.framed-game{--play-width:460px}
.framed-game>.game-action-panel,.framed-game>.game-board-panel{box-sizing:border-box;background:#fff;padding:24px;border-radius:12px;box-shadow:0 2px 12px #19372a06}
.framed-game>.game-board-panel{margin-top:20px}
#m3Page .game-action-panel .m3-toolbar{padding:0;background:transparent;border:0;border-radius:0}
#m3Page .game-action-panel .m3-goal{margin-bottom:0}
:is(#twentyPage,#blocksPage) .game-action-panel .block-scorebar{display:grid;gap:12px;margin-bottom:0;grid-template-columns:repeat(2,minmax(0,1fr))}
#blocksPage .game-action-panel .block-scorebar{grid-template-columns:repeat(3,minmax(0,1fr))}
:is(#twentyPage,#blocksPage) .game-action-panel .game-share-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.framed-game .game-action-panel .game-share-panel{margin:12px 0 0}
@media(min-width:901px){
 .framed-game{font-family:'Playroom Nunito Sans',Arial,Helvetica,sans-serif;font-size:16px;color:#263e2e}
 #m3Page .m3-toolbar #m3New,#m3Page .m3-settings :is(button,select),.framed-game .block-scorebar button{font-family:inherit;font-size:16px;font-weight:600;min-height:46px}
 #m3Page .m3-toolbar>div>span,.framed-game .block-scorebar span{font-size:14px;line-height:22px;color:#52634f}
 #m3Page .m3-goal,#m3Page .m3-goal-line>span{font-size:16px;line-height:26px}
 .framed-game .block-scorebar strong{font-size:30px;line-height:36px}
 .framed-game .block-status,.framed-game .block-help p,.framed-game .block-result p,.framed-game .game-share-panel p,.framed-game .game-share-panel textarea{font-size:16px;line-height:26px;color:#344d3b}
 .framed-game .personal-progress,.framed-game .block-piece-label{font-size:14px;line-height:24px;color:#52634f}
 .framed-game .block-help>summary{font-size:18px;font-weight:650;color:#263e2e}
 #m3Page .m3-stripe-tip p,#m3Page .m3-stripe-tip button,#m3Results{font-size:16px;line-height:26px}
 body:has(:is(#m3Page,#twentyPage,#blocksPage):not([hidden])) .game-description{font-family:'Playroom Nunito Sans',Arial,Helvetica,sans-serif;font-size:16px;line-height:28px;color:#3e5144}
 :is(#m3Result,#twentyResult,#blocksGameOver){font-family:'Playroom Nunito Sans',Arial,Helvetica,sans-serif}
 :is(#m3Result,#twentyResult,#blocksGameOver) p,:is(#m3Result,#twentyResult,#blocksGameOver) button{font-size:16px;line-height:26px}
}
@media(max-width:900px){
 .framed-game{max-width:calc(var(--play-width) + 32px)}
 .framed-game>.game-action-panel,.framed-game>.game-board-panel{padding:16px}
}
@media(max-width:600px){
 .framed-game{max-width:var(--play-width)}
 .framed-game>.game-action-panel,.framed-game>.game-board-panel{width:calc(100% + 24px);margin-left:-12px;margin-right:-12px;padding:16px 12px}
 .framed-game>.game-board-panel{margin-top:16px}
}
@media(min-width:901px){#m3Page .m3-settings #m3Hint{min-height:46px;font-size:16px}.framed-game .block-help>summary{font-size:18px;font-weight:650}}

/* Share Match-3 beside New board, including compact phone layouts. */
#m3Page .m3-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.8fr) auto auto;gap:12px}
#m3Page .m3-toolbar button{margin-left:0}
#m3Page .m3-toolbar #m3ShareGame{font-size:12px;padding:8px 10px;background:#f8faf3;border-color:#b0c2aa}
@media(min-width:901px){#m3Page .m3-toolbar #m3ShareGame{font-family:inherit;font-size:16px;font-weight:600;min-height:46px}}
@media(max-width:600px){#m3Page .m3-toolbar{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr) repeat(2,minmax(0,1fr));gap:6px}#m3Page .m3-toolbar :is(#m3New,#m3ShareGame){font-size:12px;padding:8px 5px;white-space:normal;min-height:44px}#m3Page .m3-score-value{gap:3px}#m3Page .m3-toolbar strong{font-size:24px}#m3Page .m3-score-value span{font-size:11px}}
.routine-active #m3ShareGame,.routine-active #m3Page .game-share-panel{display:none!important}
.routine-active #m3Page .m3-toolbar{display:flex}
