:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f5f2ea;--surface:#fffdf8;--ink:#1d2433;--muted:#545d6e;--line:#1d2433;--line-thin:#c8c1b1;--given:#1d2433;--user:#2347ad;--peer:#ece6d7;--same:#c7d6fb;--selected:#a9c0f7;--conflict:#b3261e;--conflict-bg:#fbe1df;--hint:#ffe39a;--hint-pattern:#fff3cf;--accent:#2347ad;--accent-ink:#fff;--btn:#ebe6da;--btn-active:#ddd6c6;--shadow:0 10px 30px #1d24332e;--radius:14px;--font:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;--num-font:ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#141821;--surface:#1b2030;--ink:#e8ebf2;--muted:#a6aec0;--line:#8e98ae;--line-thin:#343b4e;--given:#e8ebf2;--user:#94b3ff;--peer:#222a3c;--same:#2f3f6b;--selected:#3e5590;--conflict:#ff8f86;--conflict-bg:#4a2427;--hint:#6b5414;--hint-pattern:#3b3320;--accent:#94b3ff;--accent-ink:#10162a;--btn:#242b3d;--btn-active:#2f3850;--shadow:0 10px 30px #00000080}}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#141821;--surface:#1b2030;--ink:#e8ebf2;--muted:#a6aec0;--line:#8e98ae;--line-thin:#343b4e;--given:#e8ebf2;--user:#94b3ff;--peer:#222a3c;--same:#2f3f6b;--selected:#3e5590;--conflict:#ff8f86;--conflict-bg:#4a2427;--hint:#6b5414;--hint-pattern:#3b3320;--accent:#94b3ff;--accent-ink:#10162a;--btn:#242b3d;--btn-active:#2f3850;--shadow:0 10px 30px #00000080}*,:before,:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}body{background:var(--bg);color:var(--ink);font-family:var(--font);min-height:100vh;overscroll-behavior:none;min-height:100dvh;margin:0}button,select,input,textarea{font:inherit;color:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{cursor:default}:focus-visible{outline:3px solid var(--accent);outline-offset:2px}[hidden]{display:none!important}.app{--chrome:318px;--safe-x:calc(env(safe-area-inset-left) + env(safe-area-inset-right));--safe-y:calc(env(safe-area-inset-top) + env(safe-area-inset-bottom));--board-h:calc(100dvh - var(--chrome) - var(--safe-y));--board:min(calc(100vw - 24px - var(--safe-x)), 560px, max(var(--board-h), 252px));min-height:100vh;min-height:100dvh;padding:calc(env(safe-area-inset-top) + 4px) calc(env(safe-area-inset-right) + 12px) calc(env(safe-area-inset-bottom) + 10px) calc(env(safe-area-inset-left) + 12px);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;flex-direction:column;align-items:center;gap:8px;display:flex}.topbar,.status,.actions,.numpad{width:var(--board)}.topbar{grid-template-columns:1fr auto 1fr;align-items:center;height:44px;display:grid}.difficulty{font-size:1rem;font-weight:650}.timer-wrap{align-items:center;gap:2px;display:flex}.timer{font-variant-numeric:tabular-nums;color:var(--muted);text-align:right;min-width:3.2em;font-size:1rem}#menu-btn{justify-self:end}.icon-btn{width:44px;height:44px;color:var(--ink);background:0 0;border:0;border-radius:12px;place-items:center;display:inline-grid}.icon-btn:active{background:var(--btn-active)}.status{height:3.9em;color:var(--ink);-webkit-user-select:text;user-select:text;align-items:center;margin:0;font-size:.8125rem;line-height:1.3;display:flex;overflow-y:auto}.board-wrap{width:var(--board);height:var(--board);flex:none;position:relative}.board{--cell:calc((var(--board) - 4px) / 9);border:2px solid var(--line);background:var(--surface);touch-action:manipulation;border-radius:6px;flex-direction:column;width:100%;height:100%;display:flex;overflow:hidden}.board.hidden .cell>*{visibility:hidden}.row{flex:1;display:flex}.cell{border-right:1px solid var(--line-thin);border-bottom:1px solid var(--line-thin);background:var(--surface);font-family:var(--num-font);font-size:calc(var(--cell) * .6);cursor:pointer;outline-offset:-3px;flex:1;place-items:center;line-height:1;transition:background-color .12s;display:grid;position:relative}.row>.cell:last-child{border-right:0}.row:last-child>.cell{border-bottom:0}.cell.br{border-right:2px solid var(--line)}.cell.bb{border-bottom:2px solid var(--line)}.cell>.value,.cell>.notes{grid-area:1/1}.cell.given{color:var(--given);font-weight:600}.cell.user{color:var(--user);font-weight:500}.cell.peer{background:var(--peer)}.cell.hint-pattern{background:var(--hint-pattern)}.cell.same{background:var(--same)}.cell.selected{background:var(--selected)}.cell.hint-target{background:var(--hint);box-shadow:inset 0 0 0 3px var(--accent)}.cell.conflict,.cell.wrong{color:var(--conflict);background-image:repeating-linear-gradient(135deg, var(--conflict-bg) 0 4px, transparent 4px 8px);font-weight:700}.cell.conflict>.value,.cell.wrong>.value{text-underline-offset:3px;text-decoration:underline;text-decoration-thickness:2px}.cell.wrong:after{content:"";border:5px solid #0000;border-top-color:var(--conflict);border-right-color:var(--conflict);position:absolute;top:2px;right:2px}.notes{width:100%;height:100%;font-family:var(--font);font-size:calc(var(--cell) * .27);color:var(--muted);grid-template-rows:repeat(3,1fr);grid-template-columns:repeat(3,1fr);padding:1px;font-weight:500;display:grid}.notes>span{place-items:center;display:grid}.notes>span.hl{color:var(--accent-ink);background:var(--accent);border-radius:999px;font-weight:700}.cell.flash{animation:.7s ease-out flash}@keyframes flash{0%{background:var(--hint)}to{background:var(--selected)}}.board.celebrate .cell{animation:.6s ease-out both wave;animation-delay:calc(var(--wave) * 35ms)}@keyframes wave{0%{background:var(--surface)}40%{background:var(--same)}to{background:var(--surface)}}.overlay{flex-direction:column;justify-content:center;align-items:center;gap:16px;font-size:1.25rem;font-weight:600;display:flex;position:absolute;inset:0}.overlay p{margin:0}.actions{grid-template-columns:repeat(5,1fr);gap:4px;display:grid}.action{min-height:52px;color:var(--ink);background:0 0;border:0;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:2px;font-size:.75rem;display:flex;position:relative}.action:active:not(:disabled){background:var(--btn-active)}.action:disabled{opacity:.4}.action .ico{display:grid}.action[aria-pressed=true]{background:var(--accent);color:var(--accent-ink)}.action .badge{border:2px solid;border-radius:50%;width:8px;height:8px;position:absolute;top:6px;right:calc(50% - 20px)}.action[aria-pressed=true] .badge{background:currentColor}.numpad{grid-template-columns:repeat(5,1fr);gap:6px;display:grid}.num{background:var(--btn);min-width:44px;min-height:50px;color:var(--accent);font-family:var(--num-font);border:0;border-radius:12px;font-size:1.75rem;font-weight:500;line-height:1;position:relative}.num:nth-child(6){grid-column:1}.numpad .num:nth-child(n+6){transform:translate(calc(50% + 3px))}.num:active{background:var(--btn-active)}.num.active{box-shadow:inset 0 0 0 2px var(--accent)}.num .left{font-size:.7rem;font-family:var(--font);color:var(--muted);position:absolute;bottom:4px;right:7px}.num.done{opacity:.35}.numpad.notes-mode .num .d{color:var(--muted);font-size:1.1rem;font-weight:600}@media (min-width:480px) and (min-height:700px){.app{--chrome:270px}.numpad{grid-template-columns:repeat(9,1fr)}.numpad .num:nth-child(n+6){transform:none}.num:nth-child(6){grid-column:auto}.num{min-height:56px}}.btn{background:var(--btn);border:0;border-radius:12px;min-height:44px;padding:10px 18px;font-weight:600}.btn:active{background:var(--btn-active)}.btn.primary{background:var(--accent);color:var(--accent-ink)}.btn.danger{color:var(--conflict);margin-top:12px}dialog.sheet{border-radius:var(--radius);background:var(--surface);width:min(440px,100vw - 24px);max-height:calc(100dvh - 40px);color:var(--ink);box-shadow:var(--shadow);-webkit-user-select:none;user-select:none;border:0;padding:16px 18px 20px}dialog.sheet.small{width:min(360px,100vw - 24px)}dialog::backdrop{background:#0a0e1873}@media (prefers-reduced-motion:no-preference){dialog[open]{animation:.16s ease-out pop}}@keyframes pop{0%{opacity:0;transform:translateY(8px)scale(.98)}}.sheet-head{justify-content:space-between;align-items:center;margin:-6px -8px 6px 0;display:flex}.sheet h2{margin:0;font-size:1.25rem}.sheet h3.sub{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:4px 0 8px;font-size:.8rem}.diff-grid{grid-template-columns:repeat(2,1fr);gap:8px;display:grid}.menu-list{border-top:1px solid var(--line-thin);flex-direction:column;margin-top:14px;display:flex}.menu-item{border:0;border-bottom:1px solid var(--line-thin);text-align:left;background:0 0;min-height:48px;padding:0 4px;font-size:1rem}.menu-item:active{background:var(--peer)}.settings .row{border-bottom:1px solid var(--line-thin);justify-content:space-between;align-items:center;gap:12px;min-height:48px;display:flex}.settings select{border:1px solid var(--line-thin);background:var(--bg);border-radius:8px;min-height:36px;padding:4px 8px}.settings .btn{width:100%}input.switch{-webkit-appearance:none;appearance:none;background:var(--line-thin);cursor:pointer;border-radius:999px;flex:none;width:50px;height:30px;margin:0;transition:background-color .15s;position:relative}input.switch:after{content:"";background:#fff;border-radius:50%;width:24px;height:24px;transition:transform .15s;position:absolute;top:3px;left:3px;box-shadow:0 1px 3px #0000004d}input.switch:checked{background:var(--accent)}input.switch:checked:after{transform:translate(20px)}textarea{border:1px solid var(--line-thin);background:var(--bg);word-break:break-all;resize:vertical;-webkit-user-select:text;user-select:text;border-radius:10px;width:100%;padding:10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:16px}.help{color:var(--muted);margin:0 0 8px;font-size:.9rem}.error{min-height:1.3em;color:var(--conflict);margin:6px 0;font-size:.9rem}#import-form .btn,#copy-btn{width:100%}.btn-row{justify-content:flex-end;gap:8px;display:flex}.summary{grid-template-columns:1fr auto;gap:8px 16px;margin:14px 0;display:grid}.summary dt{color:var(--muted)}.summary dd{font-variant-numeric:tabular-nums;text-align:right;margin:0;font-weight:600}.best{color:var(--accent);margin:0 0 12px;font-weight:700}table.stats{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}table.stats th,table.stats td{border-bottom:1px solid var(--line-thin);text-align:right;padding:8px 4px}table.stats th[scope=row],table.stats thead th:first-child{text-align:left}table.stats thead th{color:var(--muted);font-size:.8rem;font-weight:600}@media (prefers-reduced-motion:reduce){*,:before,:after{transition:none!important;animation:none!important}}
