/* Стили сайта. Перенесены из концепта design/concepts/v3.html (01.12.2026), правила дизайна: docs/design.md.
   Шрифт Google Sans подключает base.html (@font-face с адресами из static). */
/* Раскладка: во всю ширину с полями по краям. Сверху по центру вопрос, под ним дни недели (главный выбор)
   и одна строка фильтров; по краям в глубине матовые кубики. Ниже список: слева прилипает день, справа карточки.
   Без обводок: блоки отделяют заливка и воздух. Отступы только из шкалы --s1…--s9, внутри блока всегда меньше,
   чем между блоками. Тёмная тема по умолчанию, светлая кнопкой в подвале.
   Ради слабых компьютеров: прокрутка родная, кубики двигает только transform, размытие впечено в картинки. */
:root {
  color-scheme: dark;
  --bg: #0d0c10;
  --surface: #18161c;       /* карточки, окна выбора, полоса дней */
  --surface-2: #232028;     /* кнопки и фильтры */
  --surface-3: #2e2a34;     /* наведение */
  --text: #f3f0ec;
  --muted: #a39d98;
  --faint: #867f87;
  --accent: #d93a2b;        /* киноварь: выбранное, «мало мест», логотип. Белый текст на ней читается (4,6:1) */
  --accent-hover: #e8493a;
  --on-accent: #ffffff;
  --accent-text: #ff7a68;   /* тот же красный для текста на тёмном фоне */
  --shadow: 0 24px 60px rgb(0 0 0 / .45);
  --line: rgb(255 255 255 / .08); /* разделители: шапка над списком, герой и список, дни, подвал */
  --grain: .05;
  --font: "Google Sans", "Segoe UI", system-ui, sans-serif;
  /* шкала отступов */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gut: clamp(16px, 3vw, 48px);
  --header: 72px;
  --radius: 20px;
  --ease: cubic-bezier(.23, 1, .32, 1);
}
:root[data-theme="light"] { color-scheme: light; --bg: #f5f3ef; --surface: #ffffff; --surface-2: #ebe8e3; --surface-3: #e0dcd6;
  --text: #17151a; --muted: #625d58; --faint: #726d68; --accent: #c8321f; --accent-hover: #b02a19; --on-accent: #ffffff; --accent-text: #b3301e;
  --shadow: 0 20px 50px rgb(40 30 20 / .14); --grain: .03; --line: rgb(23 21 26 / .1); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html.locked { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.5 var(--font); overflow-x: clip; }
/* Зерно отдельным div, не body::after: псевдоэлемент Safari 26 считает самим body и не доходит до шапки, когда красит свою верхнюю панель. */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: var(--grain);
  background-image: url("img/noise.67841e834a37.png"); background-size: 180px 180px; }
a { color: inherit; text-decoration: none; }
button, output { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 10px; }
.gut { padding-left: max(var(--gut), env(safe-area-inset-left, 0px)); padding-right: max(var(--gut), env(safe-area-inset-right, 0px)); }
.num { display: inline-block; font-variant-numeric: tabular-nums; }
.link { min-height: 40px; padding: 0 var(--s1); border: 0; background: transparent; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--surface-3); text-underline-offset: 4px; }
.link:hover { color: var(--text); }

/* ---------- Шапка: над героем прозрачная; когда дни и фильтры уходят вверх, их короткая копия встаёт в центр ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 30; padding-top: env(safe-area-inset-top, 0px); transition: background-color .3s ease, box-shadow .3s ease; }
.top.scrolled { background: color-mix(in oklab, var(--bg) 92%, transparent); box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
/* Safari 26 на iPhone: панель адреса стеклянная, страница прокручивается под ней, а шапка встаёт ниже панели. Фон шапки продлён вверх,
   под панель: сквозь стекло видна шапка, а не карточки. На компьютере продолжение выше экрана, его не видно. */
.top::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 160px; background: inherit; pointer-events: none; }
.top-in { height: var(--header); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--s4); }
.logo { justify-self: start; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; }
/* Знак «Стол-грань + фишка» B3-1 (05.12.2026). Исходники в design/logo/rebrand/. Без анимации при наведении. */
.logo svg { width: 26px; height: 26px; flex: none; color: var(--accent-text); }  /* viewBox обрезан по кубику: без пустых полей знака */
.center { display: grid; place-items: center; }
.center > * { grid-area: 1 / 1; transition: opacity .3s ease, translate .45s var(--ease), visibility .3s; }
.nav { display: flex; gap: var(--s6); font-size: .9375rem; }
.nav a { padding: var(--s2) 0; color: var(--muted); transition: color .15s ease; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.mini { display: flex; align-items: center; gap: var(--s2); opacity: 0; visibility: hidden; translate: 0 12px; }
.top.compact .nav { opacity: 0; visibility: hidden; translate: 0 -12px; }
.top.compact .mini { opacity: 1; visibility: visible; translate: 0 0; }
.mini .days { box-shadow: none; padding: 3px; border-radius: 999px; }
.mini .days button { min-width: 0; min-height: 34px; padding: 0 10px; border-radius: 999px; display: flex; gap: 5px; align-items: center; }
.mini .days small { font-size: .75rem; }
.mini .days b { font-size: .875rem; }
.actions { justify-self: end; display: flex; align-items: center; gap: var(--s2); }
.bot { display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s4); border: 0; border-radius: 999px; background: var(--surface-2);
  cursor: pointer; font-size: .9375rem; font-weight: 500; transition: background-color .15s ease; }
.bot:hover { background: var(--surface-3); }
.bot svg { width: 16px; height: 16px; }

/* ---------- Герой ---------- */
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center;
  padding-block: calc(var(--header) + env(safe-area-inset-top, 0px) + clamp(32px, 7vh, 72px)) var(--s7); }
/* Мягкая тень под текстом: кубики не спорят с вопросом. */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(48% 46% at 50% 50%, color-mix(in oklab, var(--bg) 92%, transparent) 25%, transparent 100%); }
.sky { position: absolute; inset: 0 0 -14%; z-index: -2; overflow: clip; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); mask-image: linear-gradient(to bottom, #000 72%, transparent); }
/* Кубик: место и размер задаёт разметка. Покачивание считает CSS; глубину при прокрутке и за курсором
   скрипт пишет в transform с инерцией (см. «Небо»). */
.fl { position: absolute; left: var(--x); top: var(--y); width: var(--w); will-change: transform; opacity: calc(.3 + var(--d) * .45);
  animation: arrive 1.6s var(--ease) calc(var(--i) * 70ms + 120ms) both, sway var(--tx) ease-in-out var(--dx) infinite alternate; }
@keyframes arrive { from { opacity: 0; scale: .8; } }
/* Парение: вбок (.fl), вверх-вниз с лёгким приближением и поворот (img). У каждого кубика свои размах и периоды,
   не кратные друг другу (web/views.py SKY), поэтому путь петляет, а не ходит по линии. Только translate, rotate, scale. */
@keyframes sway { from { translate: calc(var(--ax) * -1) 0; } to { translate: var(--ax) 0; } }
.fl img { display: block; width: 100%; height: auto; rotate: var(--r);
  animation: bob var(--ty) ease-in-out var(--dy) infinite alternate, tilt var(--tr) ease-in-out var(--dr) infinite alternate; }
@keyframes bob { from { translate: 0 0; scale: 1; } to { translate: 0 var(--ay); scale: var(--sc); } }
@keyframes tilt { from { rotate: var(--r); } to { rotate: calc(var(--r) + var(--ra)); } }
/* Крупный d20 из глины у заголовка: размытие 2 px впечено в картинку, видимость 75% (решено 01.12.2026 по v4). */
.fl.sharp { opacity: .75; }
/* Фон у заголовка «Ктулху на поле»: размытие 3 px впечено, яркость 30%, низ уходит в фон. */
.photo-bg { position: absolute; inset: 0 0 -14%; z-index: -3; pointer-events: none; opacity: .3;
  background: center / cover no-repeat;  /* картинку ставит шаблон: адрес из {% static %} */
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent); mask-image: linear-gradient(to bottom, #000 50%, transparent); }

.hero-in { min-width: 0; width: min(100%, 1080px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-in > * { animation: rise .9s var(--ease) both; }
.hero-in > :nth-child(2) { animation-delay: .05s; }
.hero-in > :nth-child(n+3) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; translate: 0 18px; } }
.eyebrow { margin: 0; color: var(--muted); font-size: 1rem; }
/* Хвост заголовка отвечает на выбор дней, ширину доводит анимация, строка не прыгает. */
h1 { margin: var(--s3) 0 0; font-weight: 500; font-size: clamp(2.25rem, 1.1rem + 3.5vw, 4.5rem); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
/* На главной строка над заголовком входит в h1 (слова для поиска), а выглядит как прежняя строка над ним. */
.hero h1 { margin-top: 0; }
.hero h1 .eyebrow { display: block; margin: 0 auto var(--s3); font-weight: 400; line-height: 1.5; letter-spacing: normal; }
.tail { display: inline-grid; justify-items: start; vertical-align: top; }
.tail > span { grid-area: 1 / 1; white-space: nowrap; }

.controls { width: 100%; margin-top: var(--s6); display: flex; flex-direction: column; align-items: center; gap: var(--s4); }
/* Дни недели: главный выбор, всё на виду, можно отметить несколько (суббота и воскресенье дают «на выходных»). */
.days { display: flex; gap: var(--s1); padding: var(--s1); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.days button { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 80px; min-height: 80px; padding: var(--s2) var(--s3);
  border: 0; border-radius: 20px; background: transparent; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.days button:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--surface-2); }
.days small { color: var(--muted); font-size: .8125rem; line-height: 1.2; }
.days b { font-weight: 500; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.days i { color: var(--faint); font-style: normal; font-size: .75rem; line-height: 1.2; white-space: nowrap; }
.days .all { min-width: 96px; }
.days .all b { font-size: 1.0625rem; }
/* Другая неделя: стрелка на краю полосы, как в мини-полосе. */
.days .wk { min-width: 44px; padding-inline: var(--s2); }
.days .wk span { display: none; }
.days .wk svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; rotate: -90deg; }
.days .wk[data-wk="0"] svg { rotate: 90deg; }
.days .we small { color: var(--accent-text); }
.days button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.days button[aria-pressed="true"] small, .days button[aria-pressed="true"] i { color: inherit; opacity: .85; }
/* «Все дни» выбраны по умолчанию: это не выбор человека, поэтому без красного. */
.days .all[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.days button:disabled { opacity: .3; cursor: default; }

/* Фильтры: всё, что уточняет выбор, в одной строке одинаковыми кнопками. */
.filters { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s2); }
#days:empty { min-height: 88px; min-width: min(100%, 680px); }
#filters:empty { min-height: 40px; }
.pill { display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s4); border: 0; border-radius: 999px;
  background: var(--surface-2); cursor: pointer; font-size: .9375rem; white-space: nowrap; transition: background-color .15s ease, color .15s ease, scale .15s var(--ease); }
.pill:hover { background: var(--surface-3); }
.pill:active, .btn:active { scale: .97; }
.pill svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; opacity: .7; transition: rotate .25s var(--ease); }
.pill[aria-expanded="true"] svg { rotate: 180deg; }
.pill.set, .pill[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.pill.set:hover, .pill[aria-pressed="true"]:hover { background: var(--accent-hover); }
.filters .link { font-size: .9375rem; }

/* ---------- Окно выбора: под кнопкой на компьютере, листом снизу на телефоне ---------- */
.pop { position: fixed; z-index: 45; width: 380px; max-width: calc(100vw - 32px); overflow: auto; padding: var(--s5); border-radius: 24px;
  background: var(--surface); box-shadow: var(--shadow), 0 2px 8px rgb(0 0 0 / .25); overscroll-behavior: contain; }
.pop[data-field="what"], .pop[data-field="all"] { width: 460px; }
.pop.open { animation: pop-in .24s var(--ease); }
@keyframes pop-in { from { opacity: 0; scale: .97; translate: 0 -6px; } }
.pop-grip { display: none; }
.pop section + section { margin-top: var(--s6); }
.pop h3 { margin: 0 0 var(--s3); color: var(--muted); font-size: .8125rem; font-weight: 500; }
.pop h3:not(:first-child) { margin-top: var(--s5); }
.opts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.opt { display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-2); cursor: pointer;
  font-size: .9375rem; transition: background-color .15s ease, color .15s ease; }
.opt:hover { background: var(--surface-3); }
.opt span { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.opt[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.opt[aria-pressed="true"] span { color: inherit; opacity: .8; }
.opt:disabled { opacity: .35; cursor: default; }
.rows { display: flex; flex-direction: column; margin-inline: calc(-1 * var(--s2)); }
.rows.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3); min-height: 48px; padding: var(--s1) var(--s2);
  border: 0; border-radius: 14px; background: transparent; cursor: pointer; text-align: left; transition: background-color .15s ease; }
.row.plain { grid-template-columns: minmax(0, 1fr) auto auto; }
.row:hover { background: var(--surface-2); }
.row:disabled { opacity: .35; cursor: default; }
.row small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.3; }
.row .n { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.ck { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-3); transition: background-color .15s ease; }
.ck svg { width: 14px; height: 14px; fill: none; stroke: var(--on-accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.row[aria-pressed="true"] .ck { background: var(--accent); }
.row[aria-pressed="true"] .ck svg { opacity: 1; }
.pop .days { box-shadow: none; padding: 0; background: transparent; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s1); }
.pop .days button { min-width: 0; min-height: 68px; padding: var(--s2) var(--s1); background: var(--surface-2); border-radius: 16px; }
.pop .days .all small { display: none; }
.pop .days .all b { font-size: 1rem; white-space: nowrap; }
.pop .days .wk { grid-column: 1 / -1; min-height: 48px; display: flex; justify-content: center; align-items: center; gap: var(--s2); }
.pop .days .wk span { display: inline; font-size: 1rem; }
.hint { margin: var(--s3) 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.45; text-wrap: pretty; }
.pop-foot { position: sticky; bottom: calc(-1 * var(--s5)); margin: var(--s5) calc(-1 * var(--s5)) calc(-1 * var(--s5)); padding: var(--s3) var(--s5) var(--s4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3); background: var(--surface); }
.done { min-height: 44px; padding: 0 var(--s5); border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; }
.done:hover { background: var(--accent-hover); }
.scrim { position: fixed; inset: 0; z-index: 44; background: rgb(0 0 0 / .5); animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Список ---------- */
.results { position: relative; z-index: 1; padding-block: 0 var(--s8); }
.results-in { max-width: 1840px; margin: 0 auto; }
.res-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s7); padding-top: var(--s7); border-top: 1px solid var(--line); }
.res-head .res-title { margin: 0; font-weight: 500; font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); line-height: 1.1; letter-spacing: -.03em; }
.res-meta { margin: var(--s1) 0 0; color: var(--muted); font-size: .9375rem; }
.res-actions { display: flex; gap: var(--s2); }
.btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4) 0 14px; border: 0; border-radius: 999px; background: var(--surface-2);
  cursor: pointer; font-size: .9375rem; font-weight: 500; white-space: nowrap; transition: background-color .15s ease, scale .15s var(--ease); }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); color: var(--on-accent); padding: 0 var(--s5); }
.btn.primary:hover { background: var(--accent-hover); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
#roll svg { stroke-width: 7; }
.btn.rolling svg { animation: roll .8s var(--ease); }
@keyframes roll { from { rotate: -540deg; scale: .6; } }
.tip { margin: calc(-1 * var(--s5)) 0 var(--s7); padding: var(--s4) var(--s5); border-radius: 16px; background: var(--surface); color: var(--muted); max-width: 46rem; text-wrap: pretty; }
.tip b { color: var(--text); font-weight: 500; }
.tip a { color: var(--text); text-decoration: underline; text-decoration-color: var(--surface-3); text-underline-offset: 4px; }

.list { display: flex; flex-direction: column; gap: var(--s6); }
.day:not([hidden]) ~ .day { padding-top: var(--s6); border-top: 1px solid var(--line); }
.day { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.day-h { display: flex; flex-direction: column; }
.day-h h2 { margin: 0; font-weight: 500; font-size: 1.75rem; line-height: 1.15; letter-spacing: -.025em; }
.day-h span { color: var(--muted); }
.day-h i { margin-top: var(--s2); color: var(--faint); font-style: normal; font-size: .875rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s5); }
@media (min-width: 1024px) {
  .day { grid-template-columns: 200px minmax(0, 1fr); gap: var(--s6); }
  .day-h { position: sticky; top: calc(var(--header) + var(--s5)); align-self: start; }
}
/* Строки карточек одного ряда выровнены (subgrid): название занимает столько строк, сколько самое длинное в ряду
   (не больше двух, дальше троеточие), клуб, метро, система, цена и места у всех на одной высоте. */
.card { position: relative; display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; border-radius: var(--radius); background: var(--surface); overflow: hidden;
  scroll-margin-top: calc(var(--header) + var(--s7));
  transition: transform .45s var(--ease), background-color .2s ease, box-shadow .3s ease, opacity .7s var(--ease) var(--stagger, 0s), translate .9s cubic-bezier(.16, 1, .3, 1) var(--stagger, 0s); }
/* Ещё не доехала до экрана: класс ставит скрипт, снимает IntersectionObserver, дальше мягко по времени, как у labs.google. */
.card.pre { opacity: 0; translate: 0 40px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-4px); background: color-mix(in oklab, var(--surface) 94%, var(--text)); box-shadow: 0 24px 48px rgb(0 0 0 / .3); }
  .card:hover .glyph { scale: 1.08; }
}
.card.picked { box-shadow: 0 0 0 2px var(--accent-text), 0 24px 60px color-mix(in oklab, var(--accent) 30%, transparent); }
.card.full .cover { filter: saturate(.35) brightness(.7); }
.card .cover { aspect-ratio: 16 / 10; }
.body { grid-row: span 5; display: grid; grid-template-rows: subgrid; row-gap: 2px; min-width: 0; padding: var(--s4) 20px 20px; }
.body > * { min-width: 0; }  /* без этого длинная «Система: The Walking Dead Universe RPG» растягивает карточку */
/* Название до двух строк. Цена и места прижаты к низу карточки (.anchors), поэтому в ряду они на одной высоте. */
.body h3 { margin: 0 0 var(--s2); font-weight: 500; font-size: 1.125rem; line-height: 1.3; letter-spacing: -.01em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* Карточка: строки всегда одни и те же (клуб, метро, система), каждая в одну строку. Внизу якоря: цена в левом углу,
   места в правом, без подписей. Так же устроен блок записи на странице игры (.anchors). */
.card .club, .card .line { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .club { font-weight: 500; }
.card .line { color: var(--muted); font-size: .875rem; }
.card .line span { color: var(--text); }
.anchors { margin-top: auto; align-self: end; padding-top: var(--s3); border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.card .line:last-of-type { margin-bottom: var(--s3); }
.anchors .price { white-space: nowrap; }
.anchors .price.unknown, .anchors .seats.unknown { color: var(--muted); font-size: .8125rem; }
.anchors .seats { display: flex; align-items: center; gap: var(--s2); min-width: 0; font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anchors .seats.few { color: var(--accent-text); }

/* Факты строками «подпись → значение» (.kv) на странице игры: Клуб, Система, Формат, Длительность и дальше.
   Нет значения: «Не указан» тише, а не пустое место. */
.kv { --kv: 4.25rem; margin: 0; display: grid; gap: 6px; }
.kv > div { display: grid; grid-template-columns: var(--kv) minmax(0, 1fr); gap: var(--s3); align-items: baseline; }
.kv dt { color: var(--muted); font-size: .8125rem; }
.kv dd { margin: 0; min-width: 0; }
.kv dd.unknown { color: var(--faint); }
.kv b { font-weight: 500; }
.kv small { display: block; margin-top: 2px; color: var(--muted); font-size: .8125rem; }
.kv .few { color: var(--accent-text); }
.kv.lined { gap: 0; }
.kv.lined > div { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.meta { margin: 0; display: flex; flex-wrap: wrap; gap: 2px var(--s3); color: var(--muted); font-size: .875rem; }
.metro { display: inline-flex; align-items: center; gap: 6px; }
.metro i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.price { font-weight: 500; font-variant-numeric: tabular-nums; }
.price.unknown { font-weight: 400; }
.bar { display: flex; gap: 3px; }
.bar b { width: 10px; height: 4px; border-radius: 2px; background: var(--surface-3); }
.bar b.on { background: var(--text); }
.few .bar b.on { background: var(--accent-text); }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); }
.empty p { margin: 0; color: var(--muted); font-size: 1.125rem; }
.empty div { display: flex; flex-wrap: wrap; gap: var(--s2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Подписка в конце списка: для тех, кто не нашёл игру или хочет узнавать о новых первым. */
.subscribe { margin-top: var(--s8); display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding: var(--s6); border-radius: var(--radius); background: var(--surface); }
.subscribe h3 { margin: 0; font-weight: 500; font-size: 1.375rem; letter-spacing: -.02em; }
.subscribe p { margin: var(--s1) 0 0; color: var(--muted); max-width: 36rem; text-wrap: pretty; }
@media (min-width: 1024px) { .subscribe { margin-left: calc(200px + var(--s6)); } }

/* Обложка: два пятна по жанру, знак и время. Положение пятен и поворот знака задаёт название игры. */
.cover { position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background: radial-gradient(70% 80% at var(--x1) var(--y1), color-mix(in oklab, var(--a) 90%, transparent), transparent 70%),
    radial-gradient(60% 70% at var(--x2) var(--y2), color-mix(in oklab, var(--b) 75%, transparent), transparent 72%), var(--g); }
.cover::after { content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: overlay;
  background-image: url("img/noise.67841e834a37.png"); background-size: 160px 160px; }
.glyph { position: absolute; right: -10%; bottom: -24%; z-index: -1; width: 72%; rotate: var(--r); fill: none; stroke: rgb(255 255 255 / .3); stroke-width: 1.4; stroke-linejoin: round;
  transition: scale .6s var(--ease); }
.cover time { position: absolute; left: var(--s4); bottom: var(--s3); font-weight: 500; font-size: 2rem; line-height: 1; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; text-shadow: 0 2px 16px rgb(0 0 0 / .35); }
.cover .tag, .cover .few-tag { position: absolute; top: var(--s3); padding: var(--s1) 10px; border-radius: 999px; font-size: .75rem; font-weight: 500; }
.cover .tag { left: var(--s3); background: rgb(0 0 0 / .5); }
.cover .few-tag { right: var(--s3); background: #d93a2b; color: #fff; }

/* ---------- Подвал: название во всю ширину ---------- */
.foot { position: relative; z-index: 1; overflow: clip; color: var(--muted); font-size: .9375rem; }
.foot-in { max-width: 1840px; margin: 0 auto; padding-top: var(--s8); border-top: 1px solid var(--line); }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: var(--s6); }
.foot-cols p { margin: 0; max-width: 30rem; text-wrap: pretty; }
.foot-cols nav { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); }
.foot-cols b { color: var(--text); font-weight: 500; }
.foot-cols a:hover { color: var(--text); }
.foot-cols .link { min-height: 0; padding: 0; font-size: inherit; }
.wm { margin-top: var(--s8); text-align: center; line-height: .8; white-space: nowrap; user-select: none; }
.wm span { display: inline-block; color: var(--surface); font-weight: 600; letter-spacing: -.05em; font-size: 18vw; translate: 0 .08em; }

/* ---------- Тост ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--s5) + env(safe-area-inset-bottom, 0px)); z-index: 50; translate: -50% 0; display: flex; align-items: center; gap: var(--s3);
  width: max-content; max-width: calc(100% - 32px); padding: 10px 10px 10px 18px; border-radius: 22px; background: var(--text); color: var(--bg); box-shadow: var(--shadow);
  font-size: .9375rem; transition: translate .45s var(--ease), opacity .3s ease; }
.toast[hidden] { display: flex !important; translate: -50% 160%; opacity: 0; pointer-events: none; }
.toast button { flex: none; min-height: 40px; padding: 0 var(--s4); border: 0; border-radius: 999px; background: var(--bg); color: var(--text); font-weight: 500; cursor: pointer; }
.toast button[hidden] { display: none; }

/* ---------- Плашка cookies: до «Принять» внизу каждой страницы, выше тоста и полосы записи ----------
   Цвета наоборот, как у тоста: заметна на фоне карточек в обеих темах. Выезжает снизу через полсекунды, один раз.
   Кнопки «Отказаться» нет (просьба пользователя 02.12.2026): без «Принять» Метрика просто не грузится. */
.cookies { position: fixed; left: 50%; bottom: calc(var(--s4) + env(safe-area-inset-bottom, 0px)); z-index: 60; translate: -50% 0;
  display: flex; align-items: center; gap: var(--s6); width: max-content; max-width: min(700px, calc(100% - 32px)); box-sizing: border-box; padding: var(--s4) var(--s4) var(--s4) var(--s5);
  border-radius: 22px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: .9375rem;
  animation: cookies-in .6s var(--ease) .5s both; }
@keyframes cookies-in { from { opacity: 0; translate: -50% 32px; } }
.cookies[hidden] { display: none; }
.cookies p { margin: 0; color: color-mix(in oklab, var(--bg) 78%, var(--text)); }
.cookies-text { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.cookies-text svg { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.cookies a { color: var(--bg); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--bg) 40%, var(--text)); text-underline-offset: 4px; }
.cookies .btn { flex: none; min-height: 48px; padding: 0 var(--s6); font-weight: 500; }
@media (max-width: 640px) {
  /* Телефон: сверху вниз иконка, текст и кнопка во всю ширину, всё по центру (сравнил три варианта 02.12.2026). */
  .cookies { flex-direction: column; align-items: center; gap: var(--s4); width: calc(100% - 32px); padding: var(--s5); text-align: center; }
  .cookies-text { flex-direction: column; align-items: center; gap: var(--s3); }
  .cookies .btn { align-self: stretch; justify-content: center; }
}

/* ---------- Узкие экраны ---------- */
@media (max-width: 1100px) {
  .mini .days { display: none; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .days button { min-width: 68px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-cols > :first-child { grid-column: 1 / -1; }
  .pop, .pop[data-field] { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none; max-height: 86svh; border-radius: 26px 26px 0 0;
    padding: var(--s2) var(--s5) calc(var(--s5) + env(safe-area-inset-bottom, 0px)); }
  .pop.open { animation: sheet .38s var(--ease); }
  @keyframes sheet { from { translate: 0 100%; } }
  .rows.cols { grid-template-columns: minmax(0, 1fr); }
  .pop-grip { display: block; width: 40px; height: 4px; margin: var(--s1) auto var(--s4); border-radius: 2px; background: var(--surface-3); }
  .pop-foot { bottom: calc(-1 * var(--s5) - env(safe-area-inset-bottom, 0px)); padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom, 0px));
    margin-bottom: calc(-1 * var(--s5) - env(safe-area-inset-bottom, 0px)); }
  .done { flex: 1; min-height: 50px; }
}
@media (max-width: 640px) {
  :root { --header: 60px; }
  .top-in { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s2); }
  .center { justify-items: end; }
  .bot span { display: none; }
  .bot { padding: 0 var(--s3); }
  .hero { padding-block: calc(var(--header) + env(safe-area-inset-top, 0px) + var(--s5)) var(--s6); }
  .fl { left: var(--mx); top: var(--my); width: var(--mw); }
  .fl.m-hide { display: none; }
  .eyebrow { font-size: .9375rem; text-wrap: balance; max-width: 19rem; }  /* узкие строки оставляют место кубику справа */
  h1 { margin-top: var(--s2); }
  .hero h1 { margin-top: 0; }
  .hero h1 .eyebrow { max-width: 15rem; margin-bottom: var(--s2); }  /* две строки, справа место кубику */
  .controls { margin-top: var(--s5); gap: var(--s3); }
  /* На телефоне дни и фильтры листаются вбок, от края до края. */
  .hero-in .days, .filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
    width: calc(100% + 2 * var(--gut)); margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); scroll-padding-inline: var(--gut); }  /* без scroll-padding привязка прижимала первый день к краю */
  .hero-in .days { gap: 6px; padding-block: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .hero-in .days button { flex: none; min-width: 64px; min-height: 72px; background: var(--surface); border-radius: 18px; scroll-snap-align: start; }
  .hero-in .days .all { min-width: 76px; }
  .hero-in .days .wk { min-width: 48px; }
  .pill { flex: none; }
  .res-head { margin-bottom: var(--s5); padding-top: var(--s6); }
  .res-actions, .long { display: none; }
  .tip { margin: calc(-1 * var(--s2)) 0 var(--s5); }
  .list { gap: var(--s5); }
  .day:not([hidden]) ~ .day { padding-top: var(--s2); }
  .day { gap: var(--s1); }
  .day-h { position: sticky; top: calc(var(--header) + env(safe-area-inset-top, 0px)); z-index: 5; flex-direction: row; align-items: baseline; gap: var(--s2);
    padding-block: var(--s3); margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); background: color-mix(in oklab, var(--bg) 96%, transparent); }
  .day-h h2 { font-size: 1.375rem; }
  .day-h i { margin: 0 0 0 auto; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .card { display: flex; flex-direction: row; grid-row: auto; border-radius: 18px; }
  .card .cover { aspect-ratio: auto; width: 96px; flex: none; }
  .card .cover time { left: var(--s3); bottom: 10px; font-size: 1.375rem; }
  .card .cover .tag, .card .cover .few-tag { display: none; }
  .card .glyph { width: 140%; right: -50%; bottom: -30%; }
  .body { flex: 1; display: flex; flex-direction: column; grid-row: auto; padding: 14px var(--s4); gap: 2px; }
  .body h3 { font-size: 1.0625rem; margin-bottom: var(--s1); }
  .card .anchors { align-self: stretch; padding-top: var(--s2); margin-top: var(--s2); }
  .subscribe { flex-direction: column; align-items: flex-start; padding: var(--s5); margin-top: var(--s7); }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-in > *, .fl, .fl img, .btn.rolling svg, .pop.open, .scrim, .cookies { animation: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- Страница «Скоро»: раздела ещё нет (web/coming.html) ---------- */
.soon-page { min-height: 72svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s4); text-align: center;
  padding-block: calc(var(--header) + env(safe-area-inset-top, 0px) + var(--s8)) var(--s8); }
.soon-page h1 { margin: 0; text-wrap: balance; }
.soon-page p:not(.eyebrow) { margin: 0 0 var(--s4); max-width: 34rem; color: var(--muted); font-size: 1.125rem; text-wrap: pretty; }

/* ---------- Текст и формы: правила, политика, «Клубам и мастерам», «Сообщить об ошибке» ---------- */
.page { padding-block: calc(var(--header) + env(safe-area-inset-top, 0px) + var(--s7)) var(--s8); }
.page-in { max-width: 44rem; margin: 0 auto; }
.page h1 { margin: var(--s2) 0 var(--s5); font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.page h2 { margin: var(--s7) 0 var(--s3); font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; }
.page p, .page li { color: var(--muted); text-wrap: pretty; }
.page p { margin: 0 0 var(--s3); }
.page ul { margin: 0 0 var(--s3); padding-left: 1.25em; }
.page li + li { margin-top: var(--s1); }
.page .lead { font-size: 1.125rem; }
.page b { color: var(--text); font-weight: 500; }
.page :is(p, li, .check) a { color: var(--text); text-decoration: underline; text-decoration-color: var(--surface-3); text-underline-offset: 4px; }
.page :is(p, li, .check) a:hover { text-decoration-color: currentColor; }
.form { display: grid; gap: var(--s5); margin-top: var(--s6); }
.form .field, .form label, .form legend { display: grid; gap: var(--s2); padding: 0; color: var(--text); font-weight: 500; }
.form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: var(--s2); }
.form legend { margin-bottom: var(--s2); }
.form .choice { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s4); border-radius: 14px; background: var(--surface); font-weight: 400; cursor: pointer; }
.form .choice:has(input:checked) { box-shadow: inset 0 0 0 1px var(--accent); }
.form input, .form textarea { accent-color: var(--accent); }
.form :is(input[type="text"], textarea) { width: 100%; box-sizing: border-box; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text); font: inherit; font-weight: 400; }
.form textarea { resize: vertical; }
.form :is(input, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.form small { color: var(--faint); font-weight: 400; }
.form .check { display: flex; align-items: flex-start; gap: var(--s3); color: var(--muted); font-weight: 400; }
.form .check input { margin: 4px 0 0; width: 18px; height: 18px; flex: none; }
.form .errorlist { margin: 0; padding: 0; list-style: none; color: var(--accent-text); font-size: .875rem; }
.form .btn.primary { justify-self: start; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { margin-top: var(--s6); padding: var(--s5); border-radius: 22px; background: var(--surface); }
.done p { margin: 0; color: var(--text); }

/* ---------- Страница игры (web/game.html) ----------
   Слева «что за игра», справа прилипает «когда, где, сколько и как записаться», ниже запасные варианты.
   Иерархия: название → клуб → блок записи (время крупно, цена, места, где, одна красная кнопка) → коротко об игре → текст клуба. */
.game { padding-block: calc(var(--header) + env(safe-area-inset-top, 0px) + var(--s4)) var(--s8); }
.game-in { max-width: 1200px; margin: 0 auto; }
.back { display: inline-flex; align-items: center; gap: var(--s1); min-height: 40px; color: var(--muted); font-size: .9375rem; transition: color .15s ease; }
.back:hover { color: var(--text); }
.back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; rotate: 90deg; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); margin-top: var(--s3); }
.game-cover { aspect-ratio: 21 / 9; border-radius: var(--radius); }
.game-cover .glyph { width: 44%; right: -2%; bottom: -34%; }
.game-cover.full { filter: saturate(.35) brightness(.7); }
.game-head h1 { margin: var(--s5) 0 0; font-size: clamp(2rem, 1.3rem + 2.2vw, 3.25rem); line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; overflow-wrap: anywhere; }
.notice { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); border-radius: 14px; background: var(--surface); color: var(--accent-text); }

.book { padding: var(--s5); border-radius: var(--radius); background: var(--surface); }
.book-day { margin: 0; color: var(--muted); }
.book-day b { color: var(--text); font-weight: 500; }
.book-time { margin: var(--s1) 0 0; font-weight: 500; font-size: 2.5rem; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.book .anchors { margin-top: var(--s4); padding-top: var(--s4); }
.book .anchors .price:not(.unknown) { font-size: 1.375rem; }
.book .anchors .seats { font-size: .9375rem; }
.checked { margin: var(--s2) 0 0; color: var(--faint); font-size: .8125rem; text-align: right; }
.price-note { margin: var(--s1) 0 0; color: var(--faint); font-size: .8125rem; }
.where { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.where p { margin: 0; }
.where b { font-weight: 500; }
.where .unknown { color: var(--muted); }
.stations { display: flex; flex-wrap: wrap; gap: 2px var(--s3); margin-top: var(--s2) !important; color: var(--muted); font-size: .875rem; }
.stations .metro i + i { margin-left: -3px; }
.map { display: inline-block; margin-top: var(--s2); color: var(--muted); font-size: .875rem; text-decoration: underline; text-decoration-color: var(--surface-3); text-underline-offset: 4px; }
.map:hover { color: var(--text); text-decoration-color: currentColor; }
.btn.wide { width: 100%; justify-content: center; min-height: 52px; margin-top: var(--s4); font-size: 1rem; }
.btn.primary.wide { margin-top: var(--s5); }
.dm, .howto { margin: var(--s3) 0 0; color: var(--muted); font-size: .875rem; text-wrap: pretty; }
.dm p { margin: 0; }
.dm blockquote { margin: var(--s3) 0; padding: var(--s3) var(--s4); border-radius: 14px; background: var(--surface-2); color: var(--text); font-size: .9375rem; }
.dm .btn { min-height: 40px; font-size: .875rem; }
/* Второстепенные действия одной строкой поровну: не спорят с кнопкой записи. */
.book-acts { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s2); }
.book-acts .btn { flex: 1 1 auto; justify-content: center; min-height: 40px; padding: 0 var(--s3); font-size: .875rem; }
.book-acts .btn svg { width: 16px; height: 16px; }

.facts { --kv: 7rem; max-width: 34rem; }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts + .about { margin-top: var(--s7); }
.about h2 { margin: 0; font-weight: 500; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; }
.about .credit { margin: var(--s1) 0 var(--s5); }
.about .text { max-width: 68ch; font-size: 1.0625rem; line-height: 1.65; text-wrap: pretty; overflow-wrap: anywhere; }
.about .text p { margin: 0 0 var(--s4); }
.credit, .muted { margin: 0; color: var(--muted); font-size: .9375rem; }
.about .muted { margin-top: var(--s3); }
.report { margin: var(--s6) 0 0; color: var(--faint); font-size: .875rem; }
.game :is(.dm, .text, .credit, .muted, .report) a { color: var(--text); text-decoration: underline; text-decoration-color: var(--surface-3); text-underline-offset: 4px; }
.game :is(.dm, .text, .credit, .muted, .report) a:hover { text-decoration-color: currentColor; }
.more { margin-top: var(--s8); padding-top: var(--s7); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header) + var(--s4)); }
.more + .more { margin-top: var(--s7); }
.more-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s5); margin-bottom: var(--s5); }
.more h2 { margin: 0; font-weight: 500; font-size: clamp(1.5rem, 1.2rem + .8vw, 2rem); line-height: 1.2; letter-spacing: -.02em; }
.all-link { display: inline-flex; align-items: center; gap: var(--s1); color: var(--muted); font-size: .9375rem; transition: color .15s ease; }
.all-link:hover { color: var(--text); }
.all-link svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; rotate: -90deg; }
.bookbar { display: none; }

@media (min-width: 1024px) {
  /* Блок записи справа на обе строки: лишняя высота уходит в нижнюю строку, а не в отступ под названием. */
  .game-grid { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto 1fr; grid-template-areas: "head side" "body side"; column-gap: var(--s8); row-gap: var(--s6); }
  .game-head { grid-area: head; }
  .game-body { grid-area: body; }
  .game-side { grid-area: side; position: sticky; top: calc(var(--header) + var(--s4)); align-self: start; }
}
@media (max-width: 1023px) {
  /* Блок записи ушёл вверх, пока читают описание: время, цена и кнопка остаются внизу экрана. */
  .bookbar:not([hidden]) { position: fixed; z-index: 20; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom, 0px)); background: color-mix(in oklab, var(--surface) 92%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .bookbar span { display: flex; flex-direction: column; line-height: 1.25; }
  .bookbar b { font-weight: 500; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
  .bookbar small { color: var(--muted); font-size: .8125rem; }
  .bookbar .btn svg { width: 16px; height: 16px; }
  .game { padding-bottom: calc(var(--s8) + 72px); }
}
@media (max-width: 640px) {
  .game-cover { aspect-ratio: 2 / 1; border-radius: 18px; }
  .game-cover .glyph { width: 60%; right: -8%; bottom: -40%; }
  .game-head h1 { margin-top: var(--s4); }
  .book { padding: var(--s4); border-radius: 18px; }
  .book-time { font-size: 2rem; }
  .facts { --kv: 6.5rem; }
  .more { margin-top: var(--s7); padding-top: var(--s6); }
}
