/* Sudoku · Arcade — стили сайта. Светлая тема по умолчанию, тёмная — по системе или переключателю. */

/* --- Цвета и переменные ----------------------------------------------------- */

:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #efece4;
  --text: #1d1f24;
  --muted: #676b75;
  --line: #d6d2c7;
  --line-soft: #e4e1d8;
  --board-line: #2a2d34;
  --accent: #3451d1;
  --accent-2: #4c68e6;
  --accent-ink: #ffffff;
  --accent-soft: #e4e9ff;
  --given: #1d1f24;
  --user: #2d48c4;
  --peer: #eef0f6;
  --same: #d3dcfb;
  --selected: #b7c6ff;
  --danger: #c92a5b;
  --danger-soft: #fde4ec;
  --ok: #2b8a3e;
  --shadow: 0 1px 2px rgba(20, 22, 30, .06), 0 8px 24px -12px rgba(20, 22, 30, .18);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #13151b;
  --surface: #1c1f27;
  --surface-2: #242833;
  --text: #e7e9ef;
  --muted: #9aa0ad;
  --line: #343946;
  --line-soft: #2a2f3a;
  --board-line: #8d93a3;
  --accent: #7088ff;
  --accent-2: #8499ff;
  --accent-ink: #0f1220;
  --accent-soft: #262f55;
  --given: #e7e9ef;
  --user: #9db0ff;
  --peer: #222734;
  --same: #2e3964;
  --selected: #3c4c90;
  --danger: #ff6f9c;
  --danger-soft: #3d1f2b;
  --ok: #69db7c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13151b;
    --surface: #1c1f27;
    --surface-2: #242833;
    --text: #e7e9ef;
    --muted: #9aa0ad;
    --line: #343946;
    --line-soft: #2a2f3a;
    --board-line: #8d93a3;
    --accent: #7088ff;
    --accent-2: #8499ff;
    --accent-ink: #0f1220;
    --accent-soft: #262f55;
    --given: #e7e9ef;
    --user: #9db0ff;
    --peer: #222734;
    --same: #2e3964;
    --selected: #3c4c90;
    --danger: #ff6f9c;
    --danger-soft: #3d1f2b;
    --ok: #69db7c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* --- Основа ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 1rem/1.55 var(--font); color: var(--text); background: var(--bg);
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; margin: 2rem 0 .8rem; }
h3 { font-size: 1.1rem; margin: 1.4rem 0 .5rem; }
code { font-size: .92em; padding: .1em .35em; border-radius: 6px; background: var(--surface-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: .5rem; }

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- Кнопки ----------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .55rem 1.2rem;
  font: 600 .98rem/1 var(--font); color: var(--accent-ink); text-decoration: none;
  background: var(--accent); border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-small { min-height: 36px; padding: .4rem .9rem; font-size: .9rem; }
.btn-big { min-height: 52px; padding: .7rem 1.6rem; font-size: 1.08rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  color: var(--muted); background: transparent; border: 0; border-radius: 10px; cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }

/* --- Шапка и подвал ----------------------------------------------------------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.header-row { display: flex; align-items: center; gap: 1.2rem; min-height: 60px; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; flex: none; }
.brand:hover { color: var(--text); }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.main-nav { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; flex: 1; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: .45rem .7rem; border-radius: 10px; color: var(--muted); text-decoration: none;
  font-weight: 500; white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current] { color: var(--text); background: var(--surface-2); }
.header-tools { display: flex; align-items: center; gap: .4rem; flex: none; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: .2rem .55rem; font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.lang-switch a[aria-current] { color: var(--accent-ink); background: var(--accent); }
.hub-link {
  padding: .4rem .8rem; border-radius: 999px; font-size: .9rem; font-weight: 600; text-decoration: none;
  color: var(--accent); background: var(--accent-soft);
}

@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; gap: .3rem .8rem; padding-top: .5rem; }
  .main-nav { order: 3; flex-basis: 100%; margin: 0 -8px; padding-bottom: .3rem; }
  .header-tools { margin-left: auto; }
}

.site-footer { margin-top: 3rem; padding: 2rem 0 2.5rem; background: var(--surface); border-top: 1px solid var(--line-soft); }
.footer-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; }
.footer-brand { display: flex; gap: .8rem; align-items: flex-start; color: var(--muted); font-size: .92rem; }
.footer-brand p { margin: 0; }
.footer-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .35rem 1rem; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 700px) { .footer-row { grid-template-columns: 1fr; } }

/* --- Игра ---------------------------------------------------------------------- */

.game { padding-top: 1.2rem; }
.game-head { text-align: center; margin-bottom: .9rem; }
.game-heading { margin: 0; }
.gh-main { display: block; font-size: clamp(1.55rem, 4.2vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; }
.gh-sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gh-sub { display: block; margin-top: .25rem; font-size: clamp(.95rem, 2.4vw, 1.1rem); font-weight: 500; color: var(--muted); }
.game-sub { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }

.level-tabs {
  display: flex; justify-content: center; gap: 4px; margin: 0 auto 1rem; padding: 4px; width: fit-content; max-width: 100%;
  background: var(--surface-2); border-radius: 999px; overflow-x: auto; scrollbar-width: none;
}
.level-tabs a {
  padding: .4rem .9rem; border-radius: 999px; font-size: .92rem; font-weight: 600; white-space: nowrap;
  color: var(--muted); text-decoration: none;
}
.level-tabs a:hover { color: var(--text); }
.level-tabs a[aria-current] { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 480px) {
  .level-tabs { gap: 2px; padding: 3px; }
  .level-tabs a { padding: .35rem .55rem; font-size: .8rem; }
  .game-sub { font-size: .85rem; }
}

.game-layout {
  display: grid; gap: 1.6rem 2.2rem; align-items: start; justify-content: center;
  /* Поле целиком помещается на экране ноутбука: ширина ограничена и высотой окна */
  grid-template-columns: minmax(0, min(540px, 100svh - 290px)) 300px;
}
@media (max-width: 900px) {
  .game-layout { grid-template-columns: minmax(0, 540px); gap: .9rem; }
}

.game-bar {
  display: flex; align-items: center; gap: .9rem; margin-bottom: .5rem; padding: 0 2px;
  font-size: .9rem; color: var(--muted);
}
.gb-level { font-weight: 700; color: var(--text); }
.gb-time { margin-left: auto; display: flex; align-items: center; gap: .2rem; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.gb-mistakes b { color: var(--text); }
.hide-timer [data-timer] { visibility: hidden; }
[hidden] { display: none !important; }

.board-frame { position: relative; }
.board {
  display: grid; grid-template-columns: repeat(9, 1fr);
  aspect-ratio: 1; width: 100%;
  container-type: inline-size;
  background: var(--surface); border: 2.5px solid var(--board-line); border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow);
  user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.board:focus { outline: none; }
.row { display: contents; }
.cell {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; min-width: 0;
  font-size: 6.6cqi; font-weight: 500; line-height: 1; color: var(--user);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background-color .08s;
}
.row > .cell:nth-child(3n):not(:last-child) { border-right: 2px solid var(--board-line); }
.row:nth-child(3n):not(:last-child) > .cell { border-bottom: 2px solid var(--board-line); }
.row > .cell:last-child { border-right: 0; }
.row:last-child > .cell { border-bottom: 0; }
.cell.given { color: var(--given); font-weight: 650; }
.cell.peer { background: var(--peer); }
.cell.same { background: var(--same); }
.cell.selected { background: var(--selected); }
.cell.conflict { color: var(--danger); }
.cell.wrong { color: var(--danger); background: var(--danger-soft); }
.cell.wrong.selected { background: var(--selected); }
@media (hover: hover) { .cell:not(.selected):hover { background: var(--accent-soft); } }

.notes {
  position: absolute; inset: 4%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  font-size: 2.35cqi; font-weight: 500; color: var(--muted);
}
.notes i { display: grid; place-items: center; font-style: normal; border-radius: 4px; }
.notes i.hl { color: var(--accent-ink); background: var(--accent); font-weight: 700; }

.board.is-paused .cell { color: transparent !important; background: var(--surface) !important; }
.board.is-paused .notes { visibility: hidden; }
.pause-cover {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  border-radius: 8px; background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(6px);
}
.pause-cover p { margin: 0; font-size: 1.4rem; font-weight: 700; }
.board.is-solved .cell { animation: solved .7s var(--ease-out) both; }
@keyframes solved { 40% { background: var(--accent-soft); } }

.noscript { padding: .8rem 1rem; border-radius: 10px; background: var(--surface-2); }

/* Панель управления */
.controls { display: flex; flex-direction: column; gap: 1rem; }
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.tool {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .55rem .2rem; font: 500 .8rem/1.1 var(--font); color: var(--muted);
  background: transparent; border: 0; border-radius: 12px; cursor: pointer;
}
.tool svg { width: 26px; height: 26px; color: var(--text); }
.tool:hover { background: var(--surface-2); color: var(--text); }
.tool.on { color: var(--accent); }
.tool.on svg { color: var(--accent); }
.tool-badge {
  position: absolute; top: 2px; right: calc(50% - 30px); padding: 1px 6px; border-radius: 999px;
  font: 700 .66rem/1.3 var(--font); font-style: normal; color: var(--muted); background: var(--surface-2);
}
.tool.on .tool-badge { color: var(--accent-ink); background: var(--accent); }

.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.num {
  position: relative; display: grid; place-items: center; aspect-ratio: 1.35;
  font: 600 1.9rem/1 var(--font); color: var(--user);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  box-shadow: 0 1px 0 var(--line-soft); transition: background .1s, transform .08s;
}
.num:hover { background: var(--accent-soft); }
.num:active { transform: scale(.96); }
.num.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.num.done { opacity: .35; }
.num-left { position: absolute; top: 5px; right: 8px; font-size: .72rem; font-weight: 600; color: var(--muted); }
.notes-mode .num { color: var(--muted); }
.notes-mode .num-d { font-size: 1.35rem; }

.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.actions .btn { flex: 1 1 auto; }
.settings { border: 1px solid var(--line); border-radius: 12px; padding: .2rem .9rem; background: var(--surface); }
.settings summary { padding: .5rem 0; font-weight: 600; cursor: pointer; }
.settings label { display: flex; gap: .55rem; align-items: center; padding: .25rem 0; font-size: .93rem; cursor: pointer; }
.settings input { width: 18px; height: 18px; accent-color: var(--accent); }
.settings .btn { margin: .5rem 0 .7rem; }
.keys-hint { margin: 0; font-size: .82rem; color: var(--muted); }
@media (pointer: coarse) { .keys-hint { display: none; } }

@media (max-width: 900px) {
  .game { padding-top: .8rem; }
  .controls { gap: .7rem; }
  .numpad { grid-template-columns: repeat(9, 1fr); gap: .3rem; }
  .num { aspect-ratio: .8; font-size: 1.55rem; border-radius: 10px; }
  .num-left { top: 3px; right: 0; left: 0; text-align: center; font-size: .62rem; }
  .num-d { margin-top: .5rem; }
  .actions .btn { min-height: 40px; font-size: .9rem; }
}

/* Окно победы */
.win-dialog {
  width: min(420px, calc(100% - 32px)); padding: 1.6rem 1.6rem 1.4rem; text-align: center;
  color: var(--text); background: var(--surface); border: 0; border-radius: 20px; box-shadow: var(--shadow);
}
.win-dialog::backdrop { background: rgba(10, 12, 20, .45); backdrop-filter: blur(2px); }
.win-dialog[open] { animation: pop .35s var(--ease-out); }
.win-dialog h2 { margin: .3rem 0 .4rem; font-size: 1.6rem; }
.win-dialog p { margin: 0 0 1rem; color: var(--muted); }
.win-badge {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto !important; border-radius: 50%;
  font-size: 1.8rem; font-weight: 800; color: var(--accent-ink) !important; background: var(--ok);
}
.win-stats { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0 0 1.3rem; text-align: left; }
.win-stats dt { color: var(--muted); }
.win-stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.win-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }

/* --- Реклама -------------------------------------------------------------------- */

.ad-slot { display: flex; align-items: center; justify-content: center; margin: 1rem auto; overflow: hidden; }
.ad-top { width: min(728px, 100% - 2rem); height: 90px; }
.ad-below { width: min(728px, 100% - 2rem); height: 90px; margin-top: 1.6rem; }
@media (max-width: 760px) { .ad-top, .ad-below { height: 100px; width: min(320px, 100% - 2rem); } }
.ad-preview { border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .8rem; background: var(--surface); }

/* --- Контент ------------------------------------------------------------------- */

.content { padding-bottom: 1rem; }
.page-top { padding-top: 1.6rem; }
.section { margin-top: 2.6rem; }
.section > h2 { margin-top: 0; }
.prose { max-width: 780px; }
.prose h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: .4rem 0 1rem; }
.prose p, .prose li { color: var(--text); }
.prose li { margin: .3rem 0; }
.lead { font-size: 1.12rem; color: var(--muted) !important; }
.intro { margin-top: 2.2rem; }
.page-heading { margin: .4rem 0 1.4rem; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.ph-sub { font-weight: 500; color: var(--muted); }
.link-more { font-weight: 600; text-decoration: none; }
.cta { margin-top: 2rem; display: flex; gap: .6rem; flex-wrap: wrap; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.4rem; font-size: .9rem; color: var(--muted); }
.page-top .breadcrumbs { margin-top: 0; }
.breadcrumbs a { color: var(--muted); }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card a {
  display: block; height: 100%; padding: 1rem 1.1rem; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s var(--ease-out), border-color .15s;
}
.card a:hover { color: var(--text); transform: translateY(-2px); border-color: var(--accent); }
.card h3 { margin: .3rem 0 .3rem; font-size: 1.05rem; }
.card p { margin: 0; font-size: .9rem; color: var(--muted); }
.lc-dots { display: flex; gap: 4px; }
.lc-dots i { width: 18px; height: 6px; border-radius: 3px; background: var(--line); }
.lc-dots i.on { background: var(--accent); }
.pc-icon { font-size: 1.5rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { padding: 1rem 1.1rem; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line-soft); }
.steps h3 { margin: .5rem 0 .3rem; }
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }
.step-num {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font-weight: 800; color: var(--accent-ink); background: var(--accent);
}

.faq { display: grid; gap: .5rem; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 0 1.1rem; }
.faq summary { padding: .85rem 0; font-weight: 600; cursor: pointer; }
.faq p { margin: 0 0 1rem; color: var(--muted); }

.not-found { text-align: center; padding-bottom: 3rem; }
.big-404 { margin: 1rem 0 0; font-size: 6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.not-found .cta { justify-content: center; }

/* --- Печать ---------------------------------------------------------------------- */

.print-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 2rem; align-items: start; }
@media (max-width: 820px) { .print-layout { grid-template-columns: 1fr; } }
.print-form {
  display: flex; flex-direction: column; gap: 1.1rem; padding: 1.3rem;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
}
.print-form fieldset { margin: 0; padding: 0; border: 0; }
.print-form legend { margin-bottom: .5rem; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: .93rem; color: var(--text); background: var(--surface-2); border: 1px solid transparent;
}
.chip input:checked + span { color: var(--accent-ink); background: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pp-icon { display: grid; gap: 2px; width: 16px; height: 20px; }
.pp-icon b { background: currentColor; opacity: .75; border-radius: 1px; }
.pp-1 { grid-template: 1fr / 1fr; }
.pp-2 { grid-template: repeat(2, 1fr) / 1fr; }
.pp-4 { grid-template: repeat(2, 1fr) / repeat(2, 1fr); }
.pp-6 { grid-template: repeat(3, 1fr) / repeat(2, 1fr); }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .93rem; }
.field input, .field select {
  min-width: 120px; padding: .5rem .7rem; font: inherit; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.check { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-note { margin: 0; font-size: .85rem; color: var(--muted); }

.sheet-preview { margin: 0; }
.sheet-preview figcaption { margin-top: .6rem; font-size: .85rem; color: var(--muted); text-align: center; }
.sheet {
  aspect-ratio: 210 / 297; padding: 7% 7% 5%; display: flex; flex-direction: column; gap: 4%;
  background: #fff; color: #1d1f24; border-radius: 4px; box-shadow: var(--shadow); container-type: inline-size;
}
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 4cqi; }
.sheet-head span { color: #888; font-size: 3cqi; }
.sheet-grids { flex: 1; display: grid; gap: 5cqi 7cqi; align-content: start; justify-content: center; }
.sheet[data-per-page="1"] .sheet-grids { grid-template-columns: 82cqi; }
.sheet[data-per-page="2"] .sheet-grids { grid-template-columns: 55cqi; }
.sheet[data-per-page="4"] .sheet-grids { grid-template-columns: repeat(2, 40cqi); }
.sheet[data-per-page="6"] .sheet-grids { grid-template-columns: repeat(2, 37cqi); }
.sheet[data-per-page="1"] .mini:nth-child(n + 2),
.sheet[data-per-page="2"] .mini:nth-child(n + 3),
.sheet[data-per-page="4"] .mini:nth-child(n + 5) { display: none; }
.mini-label { display: block; font-size: 2.2cqi; color: #888; margin-bottom: .6cqi; }
.mini-grid {
  display: grid; grid-template-columns: repeat(9, 1fr); aspect-ratio: 1;
  border: 1.5px solid #222; container-type: inline-size;
}
.mini-grid i {
  display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 6.5cqi;
  border-right: 1px solid #bbb; border-bottom: 1px solid #bbb;
}
.mini-grid i:nth-child(9n) { border-right: 0; }
.mini-grid i:nth-child(3n):not(:nth-child(9n)) { border-right-color: #222; }
.mini-grid i:nth-child(n + 19):nth-child(-n + 27),
.mini-grid i:nth-child(n + 46):nth-child(-n + 54) { border-bottom-color: #222; }
.mini-grid i:nth-child(n + 73) { border-bottom: 0; }

/* --- Уведомление о хранении данных ------------------------------------------ */

.cookie-note {
  position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 1rem; width: min(640px, calc(100% - 24px));
  padding: .8rem .9rem .8rem 1.2rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cookie-note p { margin: 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 560px) {
  .cookie-note { bottom: 8px; gap: .6rem; padding: .55rem .6rem .55rem .9rem; }
  .cookie-note p { font-size: .8rem; line-height: 1.35; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
