@font-face{font-family:Onest;src:url('шрифты/onest-латиница-400.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Onest;src:url('шрифты/onest-кириллица-400.woff2') format('woff2');font-weight:400;font-display:swap;unicode-range:U+0400-052F}
@font-face{font-family:Onest;src:url('шрифты/onest-латиница-700.woff2') format('woff2');font-weight:700 900;font-display:swap}
@font-face{font-family:Onest;src:url('шрифты/onest-кириллица-700.woff2') format('woff2');font-weight:700 900;font-display:swap;unicode-range:U+0400-052F}
:root{color-scheme:dark;--gold:#e5c98a;--ink:#f3ecda;--muted:#a6bdb4;--safe-top:max(env(safe-area-inset-top,0px),var(--безопасно-сверху,0px));--safe-bottom:max(env(safe-area-inset-bottom,0px),var(--безопасно-снизу,0px));font-family:Onest,Arial,sans-serif;background:#0c1919;color:var(--ink)}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 20% 0%,#25433580,transparent 55%),#0c1919;min-height:100dvh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #d9b96d;outline-offset:3px}[hidden]{display:none!important}h1,h2,p,figure{margin:0}.sudoku-app{max-width:1100px;margin:auto;padding:calc(var(--safe-top) + 14px) 18px calc(var(--safe-bottom) + 22px)}.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px}.topbar>span{color:var(--muted);font-size:10px;letter-spacing:.2em}.topbar>a,.topbar>button{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#1e302d;border:1px solid #c5af754d;color:var(--gold);font-size:24px;text-decoration:none}.в-телеграме #back{visibility:hidden}.eyebrow{color:#95b9a8;font-size:10px;letter-spacing:.18em}h1{font-size:clamp(54px,11vw,80px);letter-spacing:-.065em;line-height:1.3;font-weight:800;color:#f5dfaa}h1>span{color:#62b89c}.intro p{font-size:26px;line-height:1.3;margin-top:8px;letter-spacing:-.035em}.intro em{font-style:normal;color:#a8c3b6}.cover{position:relative;margin:24px 0;border-radius:24px;overflow:hidden;border:1px solid #bca16a66;aspect-ratio:3/2;box-shadow:0 20px 60px #0004}.cover img{display:block;width:100%;height:100%;object-fit:cover}.cover figcaption{position:absolute;bottom:0;left:0;right:0;padding:28px 18px 14px;background:linear-gradient(transparent,#071a17e8);font-size:8px;letter-spacing:.12em;color:#efdfb6}.section-label{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;gap:8px}.section-label h2{font-size:19px}.section-label>span{color:var(--muted);font-size:11px}.levels{display:grid;grid-template-columns:1fr 1fr;gap:10px}.levels button{text-align:left;display:grid;grid-template-columns:28px 1fr;gap:4px 8px;border:1px solid #b7a37044;border-radius:15px;background:#172c27;padding:15px 12px}.levels button>span{grid-row:1/3;color:#8eb09d;font-size:12px;padding-top:2px}.levels strong{font-size:15px}.levels small{font-size:10px;color:var(--muted)}.levels [aria-pressed=true]{border-color:#efd38d;background:linear-gradient(135deg,#47563a,#213a2c);box-shadow:inset 0 0 0 1px #e5c98a22}.levels [aria-pressed=true]>span{color:var(--gold)}#level-description{font-size:12px;line-height:1.6;color:var(--muted);margin:14px 0;min-height:40px}.primary{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;border:1px solid #ffe7b4;border-radius:15px;padding:16px;background:linear-gradient(115deg,#f4e0ad,#c59b52);color:#282516;font-weight:800;font-size:16px;box-shadow:inset 0 1px #fff5d5,0 5px 24px #c49e3726}.primary>span{margin-left:auto;font-size:22px}.secondary{border:1px solid #c7b68155;border-radius:12px;background:#1b2e28;padding:12px;color:#e8d8b2;font-size:13px;min-height:44px}#continue{width:100%;margin-top:10px}.lobby-record{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted);margin-top:20px}.lobby-record strong{color:var(--gold)}.save-note{text-align:center;font-size:10px;color:#839e94;line-height:1.6;margin-top:14px}
#экран-игры{max-width:520px;margin:auto}.game-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.game-heading h1{font-size:42px}.game-heading>span{font-size:11px;border:1px solid #cdb47b55;border-radius:20px;padding:7px 12px;color:var(--gold)}.status{display:flex;align-items:center;gap:24px;margin-bottom:14px}.status>div{display:grid;gap:3px}.status small{font-size:8px;letter-spacing:.12em;color:var(--muted)}.status strong{font-size:19px;color:var(--gold);font-variant-numeric:tabular-nums}.status>button{margin-left:auto;width:42px;padding:8px;font-size:20px}.progress-track{height:3px;background:#314537;margin-bottom:17px;border-radius:4px;overflow:hidden}.progress-track i{height:100%;display:block;background:linear-gradient(90deg,#56af94,#ebd192);transition:width .25s}.board-wrap{position:relative;border:3px solid #c6a66b;border-radius:14px;background:#c7ad7c;overflow:hidden;box-shadow:0 18px 45px #0005,inset 0 1px #ffefc9}#board{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));aspect-ratio:1;background:#354a3e;gap:0;touch-action:manipulation;user-select:none}#board button{position:relative;min-width:0;border:0;border-right:1px solid #54614e55;border-bottom:1px solid #54614e55;background:#e5decb;color:#215f61;padding:0;font-size:clamp(20px,5.4vw,31px);font-weight:700;line-height:1;aspect-ratio:1;outline-offset:-3px;font-variant-numeric:tabular-nums}#board button[data-col='2'],#board button[data-col='5']{border-right:2px solid #51614c}#board button[data-row='2'],#board button[data-row='5']{border-bottom:2px solid #51614c}#board button.given{color:#27382e;font-weight:800}#board button.peer{background:#d2dccb}#board button.same{background:#b7cfb9;color:#143e31}#board button.selected{background:#f1cc7d;box-shadow:inset 0 0 0 2px #a17631;z-index:1}#board button.error{color:#9b252a;background:#f1c9b8}#board button.selected.error{box-shadow:inset 0 0 0 3px #b14638}#board button.hinted{animation:hint-flash .8s ease-out}.pencil{display:grid;grid-template-columns:repeat(3,1fr);height:100%;width:100%;padding:2px;font-size:clamp(8px,2.1vw,11px);font-weight:600;color:#425d4e}.pencil span{display:grid;place-items:center;line-height:1}#resume{position:absolute;inset:0;width:100%;border:0;background:#102b25;display:flex;flex-direction:column;gap:16px;align-items:center;justify-content:center;z-index:3;color:var(--gold)}#resume strong{font-size:32px}#resume span{font-size:13px;color:var(--muted)}#resume b{font-size:30px}#message{min-height:36px;text-align:center;font-size:12px;color:#c6d1be;padding:10px 0 5px;line-height:1.6}.tools{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:4px 0 15px}.tools button{display:grid;justify-items:center;gap:6px;border:1px solid transparent;border-radius:12px;background:transparent;padding:8px 2px}.tools button>b{font-size:24px;color:var(--gold);font-weight:500}.tools button>span{font-size:10px;color:var(--muted)}.tools button[aria-pressed=true]{background:#3b4930;border-color:#dec07f}.tools button[aria-pressed=true]>span{color:#ffe5a8}#keypad{display:grid;grid-template-columns:repeat(9,1fr);gap:5px}#keypad button{min-width:0;border:1px solid #d7c09366;border-radius:9px;background:linear-gradient(155deg,#2f493c,#182e27);color:#f5dfb0;font-size:clamp(19px,5vw,27px);padding:10px 0 5px;display:grid;gap:5px;box-shadow:inset 0 1px #ffe3a518;touch-action:manipulation}#keypad small{font-size:8px;color:#a9b6a4}#keypad button.done{opacity:.5}.bottom-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:17px}dialog{width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 20px);padding:28px;border:1px solid #b9a47588;border-radius:24px;background:linear-gradient(145deg,#2c3d30,#12231f);color:var(--ink);overflow:auto;box-shadow:0 25px 90px #0009}dialog::backdrop{background:#051410cc;backdrop-filter:blur(6px)}#close-dialog{position:absolute;right:12px;top:10px;width:32px;height:32px;border:0;background:none;color:var(--gold);font-size:27px}dialog h2{margin:5px 20px 18px 0;font-size:25px;letter-spacing:-.04em}dialog p{font-size:14px;line-height:1.7;color:#bdcfbf;margin:12px 0 20px}dialog button.primary,dialog button.secondary{width:100%;margin-top:10px}dialog .win-symbol{font-size:70px;text-align:center;color:var(--gold)}
@keyframes hint-flash{0%{box-shadow:inset 0 0 0 5px #73bfa3}100%{box-shadow:inset 0 0 0 0 transparent}}@keyframes complete{50%{filter:brightness(1.2)}}.complete #board{animation:complete .8s ease-in-out 2}
@media(min-width:800px){#экран-лобби{display:grid;grid-template-columns:1fr 1.15fr;gap:22px 45px;align-items:center;padding:35px 0}.intro{grid-column:1;grid-row:1}.cover{grid-column:2;grid-row:1/3;aspect-ratio:1;margin:0}.lobby-controls{grid-column:1;grid-row:2}#экран-игры{max-width:min(500px,calc(100dvh - var(--safe-top) - 340px));min-width:360px}}
@media(max-width:599px){.sudoku-app{padding-left:10px;padding-right:10px}.sudoku-app:has(#экран-игры:not([hidden])) .topbar{margin-bottom:6px;height:30px}.sudoku-app:has(#экран-игры:not([hidden])) .topbar>a,.sudoku-app:has(#экран-игры:not([hidden])) .topbar>button{width:30px;height:30px;font-size:22px}.game-heading{margin-bottom:8px}.game-heading h1{font-size:34px}.status{margin-bottom:10px}.progress-track{margin-bottom:12px}.tools{margin-bottom:8px}.bottom-actions{margin-top:12px}.save-note{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::after{animation:none!important;transition:none!important}}
@media(max-width:599px){
 .sudoku-app:has(#экран-игры:not([hidden])){padding-top:calc(var(--safe-top) + 6px);padding-bottom:calc(var(--safe-bottom) + 8px)}
 .sudoku-app:has(#экран-игры:not([hidden])) .topbar{height:26px;margin-bottom:4px}.game-heading h1{font-size:30px;line-height:1.15}.game-heading{margin-bottom:6px}.game-heading>span{padding:5px 10px}
 .status{margin-bottom:8px;gap:20px}.status strong{font-size:17px}.status>button{min-height:36px;height:36px;padding:4px}.progress-track{margin-bottom:10px}
 #message{padding:7px 0 3px;min-height:28px;line-height:1.4}.tools{margin:2px 0 8px}.tools button{padding:5px 2px;gap:3px}.tools button>b{font-size:22px}.tools button>span{font-size:9px}
 #keypad button{padding:7px 0 4px;gap:4px}.bottom-actions{margin-top:10px}.bottom-actions .secondary{padding:9px;min-height:40px}#save-status{margin-top:9px;font-size:8px}
}

#message.has-errors{color:#ffd0b7;background:#522c263d;border-radius:10px;padding:10px 12px;margin-top:8px}
/* Ссылка «Рейтинг» в лобби — тот же класс secondary, что у кнопки
   «Продолжить», но это <a>, а не <button>: без этих строк она осталась
   бы строчной, с подчёркиванием и не во всю ширину (та же правка, что
   в style-casual.css и style-2048.css, — .lobby-controls в судоку не
   grid/flex на мобильном, ссылка идёт в обычном потоке, как #continue). */
a.secondary{display:block;width:100%;text-align:center;text-decoration:none}
#рейтинг-ссылка{margin-top:10px}
