:root{--bg: #f6f7f9;--surface: #ffffff;--surface-soft: #eef1f5;--text: #111827;--muted: #6b7280;--line: #d6dce5;--accent: #4068ff;--accent-soft: #e6edff;--danger: #d14343;--success: #1f8d4b;--peer: #f2f5fb;--same: #eaf0ff;--selected: #d7e2ff}:root[data-theme=dark]{--bg: #0b111a;--surface: #131c29;--surface-soft: #1a2737;--text: #eaf0ff;--muted: #9aa7bd;--line: #2a3a51;--accent: #7f9dff;--accent-soft: #21345f;--danger: #ff7d7d;--success: #49d88a;--peer: #1b2b40;--same: #22355a;--selected: #2d4571}:root[data-contrast=true]{--text: #0f172a;--muted: #334155;--line: #9eacbf;--accent: #1f4ae0;--accent-soft: #d8e3ff;--danger: #aa2323;--success: #066b38}:root[data-theme=dark][data-contrast=true]{--text: #f5f8ff;--muted: #ced7eb;--line: #445777;--accent: #9eb4ff;--accent-soft: #2a3f67;--danger: #ff9a9a;--success: #72f2af;--peer: #263a58;--same: #304874;--selected: #395684}*,*:before,*:after{box-sizing:border-box}html,body,#root{margin:0;min-height:100%}html{background:var(--bg)}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:var(--text);background:var(--bg);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color-scheme:light;min-height:100svh}:root[data-theme=dark] body{color-scheme:dark}a{color:inherit;text-decoration:none}button,input{font:inherit}.app-shell{margin:0 auto;max-width:1180px;padding:1rem;padding-bottom:calc(1rem + env(safe-area-inset-bottom))}.app-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.brand{font-weight:700;letter-spacing:-.02em}.main-nav{display:flex;gap:.25rem;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:.25rem}.main-nav a{padding:.5rem .85rem;border-radius:999px;color:var(--muted)}.main-nav a.active{color:var(--text);background:var(--surface-soft)}.app-main{padding-bottom:6.5rem}.panel{background:var(--surface);border:1px solid var(--line);border-radius:1rem;padding:1rem}.stack-lg>*+*{margin-top:1rem}.muted{color:var(--muted)}h1,h2,p{margin:0}h1{font-size:clamp(1.4rem,4vw,1.9rem);line-height:1.25}h2{font-size:.95rem;color:var(--muted);margin-bottom:.35rem}.button{display:inline-flex;align-items:center;justify-content:center;min-height:2.75rem;padding:.65rem 1rem;border-radius:.75rem;border:1px solid transparent;background:var(--accent);color:#fff;font-weight:600}.button-soft{background:var(--surface-soft);color:var(--text);border-color:var(--line)}.compact{min-height:2.35rem;padding:.35rem .75rem}.stats-grid{display:grid;gap:.75rem;grid-template-columns:repeat(2,minmax(0,1fr))}.stats-grid article{border:1px solid var(--line);border-radius:.75rem;padding:.75rem}.cta-row{display:flex;gap:.75rem;flex-wrap:wrap}.archive-list{display:grid;gap:.5rem}.archive-item{display:flex;justify-content:space-between;gap:1rem;padding:.8rem .9rem;border:1px solid var(--line);border-radius:.75rem;background:var(--surface-soft)}.settings-list{display:grid;gap:.5rem}.theme-picker{border:1px solid var(--line);border-radius:.75rem;padding:.7rem;background:var(--surface-soft)}.theme-options{margin-top:.5rem;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem}.difficulty-options{margin-top:.5rem;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.45rem}.theme-options button,.difficulty-options button{min-height:2.4rem;border:1px solid var(--line);border-radius:.65rem;background:var(--surface);color:var(--text)}.theme-options button.active,.difficulty-options button.active{border-color:var(--accent);background:var(--accent-soft)}.setting-row{display:flex;align-items:center;gap:.6rem;min-height:2.75rem;border:1px solid var(--line);border-radius:.75rem;padding:.45rem .7rem;background:var(--surface-soft)}.game-page{display:grid;gap:.85rem}.game-header .row{display:flex;justify-content:space-between;align-items:center;gap:1rem}.game-stats{display:flex;gap:.75rem;flex-wrap:wrap;color:var(--muted);font-size:.92rem}.success{margin-top:.5rem;color:var(--success);font-weight:600}.game-layout{display:grid;gap:.85rem;grid-template-columns:1fr}.controls-panel{width:fit-content;display:none}.board-panel{padding:.6rem}.board-grid{width:min(100%,560px);margin:0 auto;display:grid;grid-template-columns:repeat(9,minmax(0,1fr));border:2px solid var(--line);border-radius:.75rem;overflow:hidden;aspect-ratio:1 / 1;background:var(--surface)}.board-cell{position:relative;border:1px solid var(--line);margin:0;padding:0;background:var(--surface);color:var(--text);transition:background-color .12s ease}.board-cell:nth-child(3n+1){border-left-width:2px}.board-cell:nth-child(-n+9){border-top-width:2px}.board-cell:nth-child(9n){border-right-width:2px}.board-cell:nth-child(n+73){border-bottom-width:2px}.board-cell:nth-child(n+19):nth-child(-n+27),.board-cell:nth-child(n+46):nth-child(-n+54){border-bottom-width:2px}.board-cell.peer{background:var(--peer)}.board-cell.same-value{background:var(--same)}.board-cell.selected{background:var(--selected)}.board-cell.conflict{color:var(--danger)}.board-cell.given .cell-value{font-weight:700}.board-cell.editable .cell-value{font-weight:600;color:var(--accent)}.cell-value{font-size:clamp(1.2rem,4vw,2rem);display:flex;align-items:center;justify-content:center;width:100%;height:100%}.notes-grid{display:grid;grid-template-columns:repeat(3,1fr);width:100%;height:100%;align-items:center;justify-items:center;font-size:clamp(.45rem,1.6vw,.8rem);color:var(--muted)}.game-toolbar{position:sticky;top:.6rem;--toolbar-btn: 2.5rem;--toolbar-icon: 1.1rem;display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem;justify-content:center}.game-toolbar button{min-height:var(--toolbar-btn);width:var(--toolbar-btn);aspect-ratio:1 / 1;border:1px solid var(--line);border-radius:.75rem;background:var(--surface-soft);color:var(--text);display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;transition:background-color .22s ease,border-color .22s ease,box-shadow .22s ease}.game-toolbar svg{width:var(--toolbar-icon);height:var(--toolbar-icon)}.game-toolbar button.active{border-color:var(--accent);background:var(--accent-soft)}.game-toolbar button.attention{border-color:color-mix(in srgb,var(--danger) 45%,var(--line));background:color-mix(in srgb,var(--danger) 12%,var(--surface-soft));box-shadow:0 0 0 2px color-mix(in srgb,var(--danger) 18%,transparent)}.game-toolbar button:disabled{opacity:.5;cursor:not-allowed}.sticky-input{position:sticky;bottom:0;z-index:20;background:linear-gradient(to top,var(--bg) 70%,transparent),var(--bg);padding-top:.6rem;padding-bottom:calc(.6rem + env(safe-area-inset-bottom))}.mobile-toolbar{display:block;max-width:min(100%,560px);margin:0 auto .4rem}.mobile-toolbar .game-toolbar{position:static;top:auto}.number-pad{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:.4rem}.number-key{min-height:3rem;border:1px solid var(--line);border-radius:.75rem;background:var(--surface);font-size:1.05rem;font-weight:650;cursor:pointer}.number-key:disabled{color:var(--muted);background:color-mix(in srgb,var(--surface) 70%,var(--line));border-color:color-mix(in srgb,var(--line) 80%,transparent);opacity:.6;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 65%,#ffffff);outline-offset:1px}@media(max-width:960px){.panel.game-header{padding:.75rem .9rem}.game-header .row{align-items:flex-start;gap:.6rem}.game-header h1{font-size:clamp(1.1rem,3.4vw,1.5rem)}.game-header .muted{font-size:.9rem}.game-stats{font-size:.85rem;row-gap:.35rem}}@media(min-width:960px){.app-shell{padding:1.2rem}.app-main{padding-bottom:1.2rem}.game-layout{grid-template-columns:minmax(0,1fr) auto;align-items:start}.controls-panel{display:block;justify-self:end}.mobile-toolbar{display:none}.sticky-input{position:static;background:transparent;padding:0}.number-pad{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:640px){.controls-panel{width:auto}.game-toolbar{grid-template-columns:repeat(5,var(--toolbar-btn));--toolbar-btn: 2.3rem;--toolbar-icon: 1rem}.number-key{min-height:3.6rem;font-size:1.15rem}}
