@import url("./kit/styles.css");
:root { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--background); font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; text-underline-offset: .25em; }
:focus-visible { outline: 3px solid var(--selection); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, .brand-name { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1080px; margin: auto; display: flex; align-items: center; gap: 28px; height: 86px; padding: 0 32px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-name { font-size: 34px; letter-spacing: -1.5px; }
.brand-mark { display: block; width: 32px; height: 32px; }
.family { color: var(--muted); font-size: 12px; border-left: 1px solid var(--line); padding-left: 28px; }
.header-actions { display: flex; gap: 8px; margin-left: auto; }
.icon-button { border: 0; border-radius: 9px; background: transparent; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px; }
.header-actions .icon-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.icon-button:hover { background: var(--hover); }
.ui-icon { width: 21px; height: 21px; flex-shrink: 0; }
.shell { width: min(100% - 64px, 850px); margin: 0 auto; }
.page-title { margin: 38px 0 24px; display: flex; align-items: baseline; gap: 24px; }
h1 { font-size: 54px; line-height: 1; letter-spacing: -2px; margin: 0; }
.tagline { margin: 0; color: var(--muted); font-size: 14px; }
.game-layout { display: grid; grid-template-columns: minmax(0, 480px) minmax(220px, 1fr); gap: 54px; align-items: start; }
.play-area { min-width: 0; user-select: none; -webkit-user-select: none; }
.game-meta { display: flex; align-items: center; justify-content: space-between; height: 40px; margin-bottom: 10px; }
.difficulty { font-size: 12px; color: var(--green); background: var(--selected); border: 1px solid var(--line); border-radius: 20px; padding: 5px 13px; }
.timer { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.timer .ui-icon { width: 15px; height: 15px; }
.board-wrap { position: relative; }
.board { display: grid; border: 2px solid var(--board-edge); background: var(--surface); border-radius: 5px; overflow: hidden; aspect-ratio: 1; }
.board-row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); min-height: 0; }
.board-row:nth-child(3n):not(:last-child) { border-bottom: 2px solid var(--board-edge); }
.cell { display: flex; align-items: center; justify-content: center; position: relative; background: var(--surface); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--green); padding: 0; font-size: clamp(22px, 3vw, 29px); font-weight: 400; min-width: 0; min-height: 0; font-variant-numeric: tabular-nums; }
.cell:nth-child(3n):not(:last-child) { border-right: 2px solid var(--board-edge); }
.cell:last-child { border-right: 0; }
.board-row:last-child .cell { border-bottom: 0; }
.cell.given { color: var(--text); font-weight: 600; }
.cell.related { background: color-mix(in srgb, var(--hover) 55%, var(--surface)); }
.cell.same { background: var(--selected); }
.cell.selected { background: var(--selected); box-shadow: inset 0 0 0 2px var(--green); z-index: 1; }
.cell.conflict { color: var(--danger); background: var(--danger-bg); text-decoration: underline; text-underline-offset: 5px; }
.cell:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px var(--selection); z-index: 2; }
.cell:disabled { opacity: 1; }
.pencil-marks { display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: 100%; height: 100%; padding: 3px; color: var(--muted); font-size: 11px; line-height: 1; }
.pencil-marks span { display: grid; place-items: center; }
.board.paused .cell { color: transparent; }
.board.paused .pencil-marks { visibility: hidden; }
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 15px 0; }
.tool { display: flex; align-items: center; justify-content: center; gap: 7px; background: transparent; border: 1px solid transparent; border-radius: 9px; min-height: 44px; font-size: 12px; padding: 8px 3px; color: var(--muted); }
.tool:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.tool[aria-pressed="true"] { color: var(--green); background: var(--selected); border-color: var(--green); }
.tool .ui-icon { width: 19px; height: 19px; }
.numbers { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
.number { background: var(--surface); color: var(--green); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; align-items: center; padding: 8px 0 5px; gap: 3px; min-height: 62px; }
.number:hover:not(:disabled) { background: var(--selected); border-color: var(--green); }
.digit { font-size: 26px; line-height: 1.15; }
.remaining { color: var(--muted); font-size: 9px; }
.number.exhausted { opacity: .4; }
.mode-note { text-align: center; font-size: 11px; color: var(--muted); margin: 12px 0 0; min-height: 16px; }
.sidebar { padding-top: 52px; }
.progress-label { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
progress { appearance: none; border: 0; width: 100%; height: 3px; background: var(--line); border-radius: 3px; display: block; }
progress::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
progress::-webkit-progress-value { background: var(--green); border-radius: 3px; }
progress::-moz-progress-bar { background: var(--green); }
.new-game { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-top: 23px; min-height: 48px; }
.rules { margin-top: 37px; padding-top: 30px; border-top: 1px solid var(--line); }
.mini-grid { display: block; white-space: pre; color: var(--green); font-size: 13px; letter-spacing: 6px; line-height: 1.8; margin-bottom: 21px; opacity: .8; }
.rules h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.5px; margin: 0 0 14px; }
.rules p { font-size: 13px; line-height: 1.8; color: var(--muted); margin: 0; }
.save-status { font-size: 11px; line-height: 1.7; color: var(--muted); margin: 30px 0 5px; }
.save-status::before { content: "✓ "; color: var(--green); }
.save-status.error { color: var(--danger); }
.save-status.error::before { content: "! "; }
.offline-status { font-size: 10px; color: var(--muted); line-height: 1.6; margin: 0; }
.sidebar #install, .sidebar #update { font-size: 11px; padding: 8px 0; display: block; margin-top: 5px; border: 0; color: var(--muted); }
.site-footer { text-align: center; font-size: 11px; color: var(--muted); margin: 35px auto 24px; padding: 0 20px; }
.site-footer a { text-decoration: none; }
dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100svh - 32px); overflow-y: auto; background: var(--background); color: var(--text); border: 1px solid var(--line); border-radius: 18px; padding: 36px; box-shadow: 0 20px 80px #0004; }
dialog::backdrop { background: var(--overlay); backdrop-filter: blur(4px); }
dialog h2 { font-size: 32px; line-height: 1.15; letter-spacing: -.7px; margin: 0 25px 16px 0; }
.dialog-close { position: absolute; right: 10px; top: 10px; font-size: 25px; }
.dialog-copy, .help-copy, .install-instructions { color: var(--muted); font-size: 13px; line-height: 1.8; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.difficulty-options { display: grid; gap: 10px; margin-top: 20px; }
.difficulty-option { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.difficulty-option:has(input:checked) { border-color: var(--green); background: var(--selected); }
input[type="radio"] { accent-color: var(--green); }
.difficulty-option strong { display: block; font-weight: 600; font-size: 14px; }
.difficulty-option small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; line-height: 1.6; }
.settings { display: grid; gap: 22px; margin-top: 25px; }
.settings label { display: flex; align-items: center; justify-content: space-between; font-size: 13px; gap: 15px; }
select { font: inherit; color: inherit; min-height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px; }
#toast { position: fixed; z-index: 20; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 13px 20px; font-size: 13px; box-shadow: 0 8px 25px #0003; opacity: 0; pointer-events: none; }
#toast.visible { opacity: 1; }
@media (min-width: 760px) and (max-height: 840px) { .header-inner { height: 68px; } .page-title { margin-top: 25px; margin-bottom: 15px; } .game-layout { grid-template-columns: minmax(0, min(410px, calc(100svh - 400px))) minmax(220px, 1fr); } .shell { width: min(100% - 64px, 780px); } h1 { font-size: 46px; } .site-footer { margin-top: 20px; } }
@media (max-width: 759px) { .header-inner { height: 68px; padding: 0 20px; } .family { display: none; } .brand-name { font-size: 29px; } .shell { width: min(100% - 32px, 480px); } .page-title { margin: 26px 0 16px; gap: 10px; align-items: start; flex-direction: column; } h1 { font-size: 43px; } .tagline { font-size: 12px; } .game-layout { display: flex; flex-direction: column; gap: 22px; } .play-area { width: 100%; } .sidebar { padding: 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 0 20px; } .new-game { margin: 0; min-height: 44px; padding-inline: 8px; } .rules { display: none; } .progress-label { font-size: 11px; } .save-status { grid-column: 1 / -1; margin: 20px 0 5px; } .sidebar #install { text-align: right; } .sidebar #update { grid-column: 1 / -1; text-align: left; } .cell { font-size: clamp(21px, 6vw, 29px); } .site-footer { margin-top: 24px; } .tools { margin: 11px 0; gap: 2px; } .tool { font-size: 11px; gap: 5px; } .number { min-height: 56px; } .digit { font-size: 24px; } .pencil-marks { font-size: 9px; padding: 2px; } dialog { padding: 30px 24px; } }
@media (max-width: 340px) { .shell { width: calc(100% - 20px); } .tool { flex-direction: column; gap: 3px; } .numbers { gap: 3px; } .digit { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
