.sudoku-board{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));width:100%;max-width:486px;margin:0 auto;border:2px solid var(--ink);border-radius:9px;overflow:hidden;background:var(--line)}
.sudoku-cell{aspect-ratio:1;min-width:0;padding:0;background:var(--surface);border-right:1px solid var(--line);border-bottom:1px solid var(--line);display:grid;place-items:center;font-size:clamp(18px,2.2vw,27px);font-weight:600;color:var(--primary);position:relative;line-height:1;user-select:none}
.sudoku-cell:nth-child(9n){border-right:0}.sudoku-cell:nth-child(n+73){border-bottom:0}.sudoku-cell.box-right{border-right:2px solid var(--ink)}.sudoku-cell.box-bottom{border-bottom:2px solid var(--ink)}.sudoku-cell.given{color:var(--ink);font-weight:750;background:var(--hover)}.sudoku-cell.peer{background:var(--primary-soft)}.sudoku-cell.same-number{background:var(--mint)}.sudoku-cell.selected{background:var(--primary);color:var(--surface);box-shadow:inset 0 0 0 2px var(--ink)}.sudoku-cell.wrong{color:#a43025;background:#f9ded9}.sudoku-cell.wrong:after{content:'!';position:absolute;top:3px;right:4px;font-size:9px;font-weight:700}.sudoku-cell:focus-visible{outline-offset:-4px;z-index:1}.sudoku-notes{display:grid;grid-template-columns:repeat(3,1fr);width:100%;height:100%;padding:4px;font-size:10px;color:var(--muted);font-weight:500}.sudoku-notes>span{display:grid;place-items:center}.selected .sudoku-notes{color:var(--surface)}
.sudoku-selection{font-size:11px;color:var(--muted);text-align:center;margin:14px 0;min-height:18px}.sudoku-keypad{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:6px;max-width:486px;margin:auto}.sudoku-keypad button{min-width:0;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:var(--hover);border:1px solid var(--line);border-radius:9px;color:var(--primary);font-size:21px;font-weight:650}.sudoku-keypad small{font-size:8px;color:var(--muted);font-weight:400;white-space:nowrap}.sudoku-keypad button[aria-pressed=true]{background:var(--primary-soft);border-color:var(--primary)}.sudoku-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:18px 0 14px}.sudoku-actions .button{gap:6px;padding:9px 12px;min-height:44px;font-size:11px}.sudoku-actions button[aria-pressed=true]{background:var(--primary-soft);border-color:var(--primary);color:var(--primary)}.sudoku-actions button:disabled,.sudoku-keypad button:disabled{opacity:.45;cursor:not-allowed}.sudoku-message{min-height:3em;font-size:12px;text-align:center;color:var(--muted);max-width:486px;margin:auto;line-height:1.7}.sudoku-tip{background:var(--mint)}
:root[data-theme=dark] .sudoku-cell.selected,:root[data-theme=dark] .selected .sudoku-notes{color:var(--bg)}:root[data-theme=dark] .sudoku-cell.wrong{color:#ffb5aa;background:#492b2f}
@media(max-width:480px){.sudoku-cell{font-size:21px}.sudoku-notes{font-size:8px;padding:2px}.sudoku-keypad{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.sudoku-keypad button{min-height:48px;font-size:20px}.sudoku-keypad small{font-size:9px}.sudoku-actions{gap:6px}.sudoku-actions .button{font-size:10px;padding:8px 10px}.sudoku-selection{font-size:10px}.sudoku-message{font-size:11px}}
