/* ─────────────────────────────────────────────────────────────
   Бильярдный клуб — стили сайта.
   Сукно — там, где действуют (бронь), бумага — где читают (цены, рейтинг),
   дерево бортов — рамки и турнирная доска.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Alumni Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/alumni-sans-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Alumni Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/alumni-sans-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Alumni Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/alumni-sans-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/onest-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/onest-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/onest-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --felt: #0f5a3e;
  --felt-deep: #0a4430;
  --felt-hi: #17734f;
  --felt-line: rgba(244, 237, 221, 0.16);
  --rail: #3a1e12;
  --rail-hi: #5b3420;
  --rail-deep: #26130b;
  --ivory: #f4eddd;
  --ivory-dim: rgba(244, 237, 221, 0.74);
  --ivory-faint: rgba(244, 237, 221, 0.5);
  --paper: #f7f1e4;
  --paper-2: #ede3cf;
  --line: #dacdb4;
  --ink: #1d140f;
  --ink-2: #4e4037;
  --ink-3: #74655a;
  --chalk: #2f63b8;
  --chalk-deep: #234c8f;
  --chalk-soft: #dce6f5;
  --lamp: #f1c04c;
  --red: #a8382a;
  --win: #1e7a4c;

  --font-display: 'Alumni Sans Variable', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --font-text: 'Onest Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-pill: 999px;
  --r-panel: 14px;
  --r-input: 8px;
  --gutter: 24px;
  --container: 1200px;
  --header-h: 64px;

  --felt-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: 'tnum' 0;
  text-rendering: optimizeLegibility;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--lamp);
  outline-offset: 2px;
}

.paper :focus-visible,
.on-paper :focus-visible {
  outline-color: var(--chalk);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--lamp);
  color: var(--ink);
  border-radius: var(--r-input);
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}

/* ───────────── Типографика ───────────── */

.display {
  font-family: var(--font-display);
  font-weight: 760;
  letter-spacing: -0.005em;
  line-height: 0.9;
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: clamp(46px, 6.2vw, 80px);
  line-height: 0.9;
  margin: 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 24px 48px;
  align-items: end;
  margin-bottom: 40px;
}

.section-head p {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-2);
}

.felt .section-head p,
.wood .section-head p {
  color: var(--ivory-dim);
}

@media (max-width: 820px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 28px;
  }
}

.muted {
  color: var(--ink-3);
}

.felt .muted,
.wood .muted {
  color: var(--ivory-faint);
}

.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

/* ───────────── Поверхности ───────────── */

.section {
  padding: clamp(64px, 9vw, 112px) 0;
  position: relative;
}

.felt {
  background-color: var(--felt);
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(255, 214, 140, 0.13), transparent 70%),
    var(--felt-texture);
  color: var(--ivory);
}

.felt-deep {
  background-color: var(--felt-deep);
}

.paper {
  background: var(--paper);
  color: var(--ink);
}

.wood {
  background-color: var(--rail-deep);
  background-image:
    repeating-linear-gradient(92deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #2f180e, var(--rail-deep));
  color: var(--ivory);
}

/* ───────────── Кнопки и поля ───────────── */

.btn {
  --btn-bg: var(--chalk);
  --btn-fg: #fff;
  --btn-bd: var(--chalk);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.btn:hover {
  --btn-bg: var(--chalk-deep);
  --btn-bd: var(--chalk-deep);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-ivory {
  --btn-bg: var(--ivory);
  --btn-fg: var(--felt-deep);
  --btn-bd: var(--ivory);
}
.btn-ivory:hover {
  --btn-bg: #fff;
  --btn-bd: #fff;
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  --btn-bd: currentColor;
}
.btn-ghost:hover {
  --btn-bg: rgba(127, 127, 127, 0.12);
  --btn-bd: currentColor;
}

.btn-quiet {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  --btn-bd: transparent;
  padding: 0 12px;
}
.btn-quiet:hover {
  --btn-bg: rgba(127, 127, 127, 0.12);
  --btn-bd: transparent;
}

.btn-danger {
  --btn-bg: var(--red);
  --btn-bd: var(--red);
}
.btn-danger:hover {
  --btn-bg: #8c2c20;
  --btn-bd: #8c2c20;
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.field {
  display: grid;
  align-content: start; /* в сетке из двух полей рядом — подписи и поля на одной линии */
  gap: 6px;
  margin-bottom: 16px;
}

.field > span:first-child,
.field-label {
  font-size: 14px;
  font-weight: 600;
}

.field small,
.field-hint {
  font-size: 13px;
  color: var(--ink-3);
}

.felt .field small,
.felt .field-hint {
  color: var(--ivory-faint);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: var(--r-input);
  border: 1.5px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.45;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--chalk);
  box-shadow: 0 0 0 3px rgba(47, 99, 184, 0.22);
}

.felt .input,
.felt .select,
.felt .textarea {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(244, 237, 221, 0.32);
  color: var(--ivory);
}
.felt .input::placeholder,
.felt .textarea::placeholder {
  color: rgba(244, 237, 221, 0.45);
}
.felt .input:focus,
.felt .select:focus,
.felt .textarea:focus {
  border-color: var(--lamp);
  box-shadow: 0 0 0 3px rgba(241, 192, 76, 0.22);
}

.input[aria-invalid='true'],
.textarea[aria-invalid='true'] {
  border-color: var(--red);
}
.felt .input[aria-invalid='true'] {
  border-color: #ff8f7a;
}

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 12px;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--chalk);
  cursor: pointer;
}

.felt .check input {
  accent-color: var(--lamp);
}

.form-error {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--r-input);
  background: rgba(168, 56, 42, 0.12);
  border: 1px solid rgba(168, 56, 42, 0.4);
  color: var(--red);
  font-size: 15px;
}

.felt .form-error {
  background: rgba(255, 143, 122, 0.12);
  border-color: rgba(255, 143, 122, 0.5);
  color: #ffc2b5;
}

.form-error:empty {
  display: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0.86;
}

.chip:hover {
  opacity: 1;
}

.chip[aria-pressed='true'],
.chip[aria-checked='true'] {
  opacity: 1;
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--felt-deep);
  font-weight: 650;
}

.paper .chip[aria-pressed='true'],
.paper .chip[aria-checked='true'],
dialog.modal .chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  background: var(--paper-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.badge-pending {
  background: #fbefcf;
  color: #8a5a00;
}
.badge-confirmed {
  background: #d9efe2;
  color: var(--win);
}
.badge-rejected,
.badge-cancelled {
  background: #f4dcd6;
  color: var(--red);
}

/* ───────────── Шапка ───────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: linear-gradient(180deg, var(--rail-hi) -40%, var(--rail) 70%);
  color: var(--ivory);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ivory);
  flex-shrink: 0;
}

.logo-ball {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fffdf6 0 18%, #efe4cb 46%, #b9a27b 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.logo-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.01em;
  padding-top: 2px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.nav a {
  padding: 8px 12px;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-size: 15px;
  color: var(--ivory-dim);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav a:hover {
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.07);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions .btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  text-decoration: none;
  color: var(--ivory);
  font-size: 15px;
  font-weight: 500;
  max-width: 180px;
}
.user-chip:hover {
  background: rgba(255, 255, 255, 0.07);
}
.user-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ivory);
  cursor: pointer;
}

.menu-toggle svg {
  margin: auto;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }
  .menu-toggle {
    display: inline-grid;
  }
  .site-header.menu-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px var(--gutter) 20px;
    background: var(--rail);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  }
  .site-header.menu-open .nav a {
    padding: 12px 8px;
    font-size: 18px;
    border-radius: var(--r-input);
  }
  /* «Приложение на телефон» — последним пунктом меню, под чертой */
  .site-header.menu-open .nav .nav-app {
    margin-top: 8px;
    border-top: 1px solid rgba(244, 237, 221, 0.14);
    border-radius: 0;
    padding-top: 18px;
    color: var(--lamp);
  }
}

/* на компьютере меню — строка разделов сайта, приложению там не место (оно есть на первом экране и в подвале) */
@media (min-width: 981px) {
  .nav .nav-app {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 16px;
  }
  .header-actions .btn-book {
    display: none;
  }
  .user-chip {
    max-width: 120px;
  }
  .logo-word {
    font-size: 28px;
  }
}

/* ───────────── Первый экран ───────────── */

.hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 56px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px 56px;
  align-items: center;
}

.hero-text {
  container-type: inline-size;
}

.hero-title {
  --hero-em: 4;
  font-family: var(--font-display);
  font-weight: 800;
  /* крупно, но самое длинное слово заголовка (из настроек) всегда помещается в колонку */
  font-size: min(clamp(76px, 10.5vw, 156px), calc(100cqi / var(--hero-em)));
  line-height: 0.84;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

.hero-lead {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--ivory-dim);
  max-width: 34ch;
  margin: 0 0 32px;
}

.hero-lead strong {
  color: var(--ivory);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* «Приложение на телефон» под кнопками первого экрана */
.hero-app {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ivory-dim);
  text-decoration: underline;
  text-decoration-color: rgba(244, 237, 221, 0.35);
  text-underline-offset: 5px;
  cursor: pointer;
}

.hero-app:hover {
  color: var(--ivory);
  text-decoration-color: currentColor;
}

.hero-app svg {
  flex: none;
  color: var(--lamp);
}

.table-stage {
  position: relative;
}

.table-canvas-wrap {
  position: relative;
  aspect-ratio: 1084 / 584; /* стол 1000×500 + борта по 42 — как в table-canvas.js */
  width: 100%;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
}

.table-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: manipulation;
}

.table-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--ivory-faint);
  min-height: 36px;
}

.table-caption .btn {
  color: var(--ivory-dim);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-lead {
    max-width: 46ch;
  }
}

/* В самом верху главной: открыт ли клуб и ближайшие события (1–3: турниры, квизы, афиша) */

.hero-top {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin: calc(-1 * clamp(8px, 2vw, 24px)) 0 clamp(26px, 4vw, 44px);
}

.hero-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 15px;
  color: var(--ivory-dim);
}

.hero-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff8f7a;
  box-shadow: 0 0 0 4px rgba(255, 143, 122, 0.2);
}

.hero-status.is-open i {
  background: #7fe0a8;
  box-shadow: 0 0 0 4px rgba(127, 224, 168, 0.2);
}

.hero-status b {
  color: var(--ivory);
  font-weight: 600;
}

.hero-news {
  width: 100%;
  max-width: 880px;
}

.news-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 18px;
  padding: 12px 14px 12px 12px;
  border-radius: 16px;
  background: var(--ivory);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
}

.news-date {
  display: grid;
  place-content: center;
  justify-items: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--rail);
  color: var(--ivory);
  font-family: var(--font-display);
  line-height: 0.9;
}

.news-date b {
  font-size: 34px;
  font-weight: 800;
}

.news-date span {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--lamp);
}

.news-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.news-body small {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
}

.news-body strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.news-meta {
  font-size: 14px;
  color: var(--ink-3);
}

.news-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  background: var(--chalk);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.news-card:hover .news-cta {
  background: var(--chalk-deep);
}

.news-cta.is-done {
  background: var(--win);
}

.news-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--ivory-dim);
  text-underline-offset: 3px;
}

.news-more:hover {
  color: var(--ivory);
}

.news-list {
  display: grid;
  gap: 12px;
}

/* два-три события — рядом, во всю ширину */
.hero-news.is-many {
  max-width: none;
}

.news-list.is-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-list.is-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* компактная карточка: дата или картинка слева, текст справа, «Записаться →» внизу */
.news-card.is-compact {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 4px 14px;
}

.news-card.is-compact .news-body strong {
  font-size: clamp(24px, 2.4vw, 28px);
}

.news-card.is-compact .news-meta {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.news-go {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 650;
  color: var(--chalk);
}

.news-card:hover .news-go {
  color: var(--chalk-deep);
}

.news-go.is-done {
  color: var(--win);
}

/* афиша в анонсе — уменьшенная картинка вместо даты */
.news-thumb {
  display: block;
  width: 64px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--rail);
}

.news-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card:not(.is-compact) .news-thumb {
  width: 72px;
  height: 90px;
}

@media (max-width: 1000px) {
  .news-list.is-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .news-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 14px;
  }
  .news-date {
    width: 56px;
    height: 56px;
  }
  .news-date b {
    font-size: 30px;
  }
  .news-cta {
    grid-column: 1 / -1;
  }
  /* на телефоне два-три события — друг под другом, покороче */
  .news-list.is-2,
  .news-list.is-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .news-card.is-compact {
    padding: 10px 12px 10px 10px;
    gap: 2px 12px;
    border-radius: 14px;
  }
  .news-card.is-compact .news-date {
    width: 50px;
    height: 50px;
  }
  .news-card.is-compact .news-date b {
    font-size: 26px;
  }
  .news-card.is-compact .news-date span {
    font-size: 13px;
  }
  .news-card.is-compact .news-thumb {
    width: 50px;
    height: 62px;
  }
  .news-card.is-compact .news-body strong {
    font-size: 23px;
  }
  .news-card.is-compact .news-meta {
    -webkit-line-clamp: 1;
    line-clamp: 1;
    font-size: 13px;
  }
  .news-go {
    margin-top: 2px;
    font-size: 13px;
  }
  .news-more {
    font-size: 13px;
  }
}

/* «Сейчас в клубе» */

.live {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--felt-line);
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 16px 32px;
  align-items: center;
}

.live[hidden] {
  display: none;
}

.live-title {
  margin: 0;
  font-size: 15px;
  color: var(--ivory-dim);
}

.live-title strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 34px;
  line-height: 1;
  color: var(--ivory);
  margin-top: 4px;
}

.live-tables {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}

.mini-table {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  min-width: 84px;
}

.mini-table[disabled] {
  cursor: default;
}

.mini-felt {
  position: relative;
  width: 80px;
  height: 44px;
  border-radius: 7px;
  background: var(--felt-hi);
  border: 5px solid #6a3b22;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), 0 3px 6px rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 22px;
  line-height: 1;
  color: var(--ivory);
}

.mini-table.kind-ps .mini-felt {
  background: #1f3f63;
  border-color: #2a2a35;
}

.mini-table.kind-darts .mini-felt {
  background: #2e2420;
  border-color: #6a3b22;
}

.mini-table.is-busy .mini-felt {
  background: #2c3a33;
  color: rgba(244, 237, 221, 0.45);
  border-color: #4a2a19;
}

.mini-table.is-free .mini-felt::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 8px var(--lamp);
}

.mini-table:not([disabled]):hover .mini-felt {
  border-color: #8a5232;
}

.mini-status {
  color: var(--ivory-dim);
  white-space: nowrap;
}

/* временно не работает */
.mini-table.is-off .mini-felt {
  background: repeating-linear-gradient(135deg, #2c3a33 0 6px, #26332d 6px 12px);
  color: rgba(244, 237, 221, 0.4);
  border-color: #4a2a19;
}

.mini-table.is-off .mini-status {
  color: #ffb4a6;
}

.mini-table.is-busy .mini-status {
  color: var(--ivory-faint);
}

@media (max-width: 700px) {
  .live {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ───────────── Столы и цены ───────────── */

.price-list {
  border-top: 2px solid var(--ink);
}

.price-row,
.price-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) repeat(2, minmax(96px, 150px));
  gap: 4px 28px;
  align-items: center;
}

/* компактно: одна строка на услугу, подписи колонок — один раз сверху */
.price-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.price-head {
  padding: 10px 0;
  font-size: 13px;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}

.price-head span:nth-child(n + 3) {
  text-align: right;
}

.price-name {
  min-width: 0;
}

.price-kind {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 28px;
  line-height: 1;
}

.price-meta {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.4;
}

.price-status {
  margin: 4px 0 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
}

.price-row.is-off .top-view,
.price-row.is-off .price-kind,
.price-row.is-off .price-cell {
  opacity: 0.45;
}

/* шаг брони, когда выбранное временно не работает */
.booking-notice {
  max-width: 72ch;
  margin: -6px 0 26px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--ivory-dim);
  font-size: 15px;
  line-height: 1.5;
}

.booking-notice.is-full {
  padding: 16px 18px;
  background: rgba(241, 192, 76, 0.1);
  border: 1px solid rgba(241, 192, 76, 0.45);
  color: var(--ivory);
  font-size: 17px;
}

.chip.is-off {
  border-style: dashed;
  opacity: 0.6;
}

.chip.is-off[aria-pressed='true'] {
  opacity: 1;
}

.price-cell {
  text-align: right;
  line-height: 1;
}

.price-cell.wide {
  grid-column: span 2;
}

.price-cell b {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price-cell.is-free b {
  font-size: 24px;
}

.price-cell span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
}

.top-view {
  width: 64px;
}

.price-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 32px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 15px;
}

.price-notes li {
  padding-left: 18px;
  position: relative;
}

.price-notes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 15%, #e6d8b8 60%, #b49c74);
}

@media (max-width: 820px) {
  /* на телефоне — та же таблица: значок, название, две цены; подписи колонок — сверху */
  .price-row,
  .price-head {
    grid-template-columns: 38px minmax(0, 1fr) 62px 66px;
    gap: 2px 10px;
  }
  .price-row {
    padding: 11px 0;
  }
  .price-head {
    font-size: 11px;
    line-height: 1.2;
    align-items: end;
  }
  .top-view {
    width: 38px;
  }
  .price-kind {
    font-size: 21px;
  }
  .price-meta {
    font-size: 12.5px;
    line-height: 1.35;
  }
  .price-cell b {
    font-size: 23px;
  }
  .price-cell.is-free b {
    font-size: 17px;
  }
  .price-cell span {
    font-size: 10.5px;
  }
  .price-notes {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 20px;
    font-size: 14px;
  }
}

/* ───────────── Бронь ───────────── */

.booking-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
}

.step-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ivory-dim);
}

.step-title b {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 760;
  line-height: 1;
  color: var(--lamp);
}

.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

.day-chip {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  width: 68px;
  height: 74px;
  border-radius: 12px;
  border: 1.5px solid rgba(244, 237, 221, 0.3);
  background: rgba(0, 0, 0, 0.12);
  color: var(--ivory);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.1;
}

.day-chip b {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 760;
  line-height: 0.95;
}

.day-chip.is-weekend span:first-child {
  color: var(--lamp);
}

.day-chip:hover {
  border-color: rgba(244, 237, 221, 0.65);
}

.day-chip[aria-pressed='true'] {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--felt-deep);
}

.day-chip[aria-pressed='true'].is-weekend span:first-child {
  color: var(--red);
}

.day-chip[disabled] {
  opacity: 0.32;
  cursor: not-allowed;
}

/* Время для записи на квиз и игры: под временем — сколько человек уже записались */

.visit-options {
  margin-bottom: 14px;
}

.time-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

/* на широком экране все варианты времени видны сразу, в несколько рядов */
@media (min-width: 900px) {
  .time-strip {
    flex-wrap: wrap;
    overflow: visible;
  }
}

.time-chip {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-width: 80px;
  height: 66px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1.5px solid rgba(244, 237, 221, 0.3);
  background: rgba(0, 0, 0, 0.12);
  color: var(--ivory);
  cursor: pointer;
}

.time-chip b {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 760;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.time-chip span {
  font-size: 12px;
  color: var(--ivory-faint);
  white-space: nowrap;
}

.time-chip.has-people span {
  color: var(--lamp);
}

.time-chip:hover {
  border-color: rgba(244, 237, 221, 0.65);
}

.time-chip[aria-pressed='true'] {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--felt-deep);
}

.time-chip[aria-pressed='true'] span {
  color: var(--felt-deep);
}

.time-chip[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.time-hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ivory-faint);
  max-width: 64ch;
}

.grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 14px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--ivory-dim);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend i {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

.sw-free {
  background: rgba(244, 237, 221, 0.1);
  box-shadow: inset 0 0 0 1px rgba(244, 237, 221, 0.25);
}

.sw-busy {
  background: repeating-linear-gradient(135deg, #5b3420 0 3px, #3a1e12 3px 6px);
}

.sw-pending {
  background: repeating-linear-gradient(135deg, rgba(241, 192, 76, 0.55) 0 3px, rgba(241, 192, 76, 0.15) 3px 6px);
}

.sw-pick {
  background: var(--ivory);
}

/* Сетка столов × времени */

.slot-grid {
  --label-w: 112px;
  --cell-w: 38px;
  --cell-h: 46px;
  position: relative;
  overflow-x: auto;
  border-radius: var(--r-panel);
  background: rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 0 0 1px var(--felt-line);
  scrollbar-width: thin;
}

.slot-grid-inner {
  position: relative;
  width: max-content;
  min-width: 100%;
  padding-bottom: 6px;
}

.slot-row {
  position: relative;
  display: grid;
  grid-template-columns: var(--label-w) repeat(var(--slots), var(--cell-w));
  align-items: stretch;
}

.slot-row + .slot-row {
  border-top: 1px solid rgba(244, 237, 221, 0.07);
}

.slot-head {
  height: 34px;
  font-size: 13px;
  color: var(--ivory-faint);
}

.slot-head .t {
  grid-row: 1;
  align-self: end;
  padding: 0 0 6px 3px;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid rgba(244, 237, 221, 0.18);
  white-space: nowrap;
}

.slot-label {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #0b3d2b;
  box-shadow: 1px 0 0 var(--felt-line);
  min-height: var(--cell-h);
}

.slot-head .slot-label {
  background: #0b3d2b;
  min-height: 34px;
}

.slot-label b {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 26px;
  line-height: 1;
  min-width: 18px;
}

.slot-label span {
  font-size: 12px;
  line-height: 1.2;
  color: var(--ivory-dim);
}

.cell {
  grid-row: 1;
  height: var(--cell-h);
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border-left: 1px solid rgba(244, 237, 221, 0.06);
  cursor: pointer;
  position: relative;
}

.cell.hour {
  border-left-color: rgba(244, 237, 221, 0.2);
}

.cell::after {
  content: '';
  position: absolute;
  inset: 6px 3px;
  border-radius: 5px;
  background: rgba(244, 237, 221, 0.08);
  transition: background-color 0.1s ease;
}

.cell:hover::after,
.cell.is-preview::after {
  background: rgba(244, 237, 221, 0.32);
}

.cell.is-bad::after {
  background: rgba(255, 143, 122, 0.25);
}

.cell.is-picked::after {
  background: var(--ivory);
}

.cell.is-off {
  cursor: not-allowed;
}

.cell.is-off::after {
  background: transparent;
  inset: 0;
  border-radius: 0;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12));
}

.cell:focus-visible {
  outline-offset: -3px;
  z-index: 2;
}

.busy-block {
  grid-row: 1;
  margin: 6px 3px;
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, #5b3420 0 4px, #3a1e12 4px 8px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.busy-block.is-pending {
  background: repeating-linear-gradient(135deg, rgba(241, 192, 76, 0.5) 0 4px, rgba(241, 192, 76, 0.14) 4px 8px);
}

.now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--lamp);
  box-shadow: 0 0 10px rgba(241, 192, 76, 0.7);
  z-index: 2;
  pointer-events: none;
}

.grid-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--ivory-dim);
}

@media (max-width: 560px) {
  .slot-grid {
    --label-w: 74px;
    --cell-w: 34px;
  }
  .slot-label span {
    display: none;
  }
}

/* Итог выбора и форма */

.booking-bottom {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 32px 56px;
  align-items: start;
}

.pick-summary {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 28px;
  border-radius: var(--r-panel);
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 0 1px var(--felt-line);
}

.pick-summary.is-empty {
  color: var(--ivory-dim);
}

.pick-time {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 6vw, 76px);
  line-height: 0.9;
  margin: 6px 0 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pick-table {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
}

.pick-day {
  margin: 2px 0 0;
  color: var(--ivory-dim);
}

.pick-price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--felt-line);
  color: var(--ivory-dim);
  font-size: 15px;
}

.pick-price b {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 40px;
  line-height: 1;
  color: var(--ivory);
  white-space: nowrap;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 16px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(244, 237, 221, 0.32);
  height: 48px;
  width: max-content;
}

.stepper button {
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  cursor: pointer;
  border-radius: var(--r-pill);
}

.stepper output {
  min-width: 40px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 760;
}

/* бронь — из аккаунта: без входа вместо формы приглашение войти */
.booking-login {
  padding: 22px 24px;
  border-radius: var(--r-panel);
  border: 1.5px dashed rgba(244, 237, 221, 0.32);
}

.booking-login p {
  margin: 0 0 18px;
  max-width: 52ch;
  color: var(--ivory-dim);
  line-height: 1.5;
}

.booking-login .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.booking-as {
  margin: 0 0 18px;
  color: var(--ivory-dim);
}

.booking-as b {
  color: var(--ivory);
}

.booking-done {
  padding: 32px;
  border-radius: var(--r-panel);
  background: var(--ivory);
  color: var(--ink);
}

.booking-done h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  line-height: 0.95;
  margin: 0 0 12px;
}

.booking-done p {
  margin: 0 0 20px;
  color: var(--ink-2);
}

.booking-done .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .booking-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
  .pick-summary {
    position: static;
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ───────────── Рейтинг ───────────── */

.rating-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 18px;
}

.rating-toolbar .input {
  max-width: 320px;
}

.rating-stats {
  font-size: 15px;
  color: var(--ink-3);
}

.rating-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.rating-table th {
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  padding: 10px 12px;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}

.rating-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.rating-table tbody tr {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.rating-table tbody tr:hover,
.rating-table tbody tr:focus-within {
  background: var(--paper-2);
}

.rating-table .r {
  text-align: right;
}

.place-ball {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, #fffef9 0 14%, #f1e7d0 48%, #c4ad86 100%);
  box-shadow: 0 2px 3px rgba(29, 20, 15, 0.28);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1;
  color: var(--ink);
}

.place-ball.is-first {
  width: 40px;
  height: 40px;
  font-size: 22px;
}

.place-plain {
  display: inline-block;
  width: 34px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink-3);
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-cell > div {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}

.player-btn {
  overflow-wrap: anywhere;
}

.player-sub {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.me-tag {
  font-size: 12px;
  font-weight: 600;
  color: #8a5a00;
}

.rating-table tbody tr.is-me {
  background: #fbefcf;
}

.rating-table tbody tr.is-me:hover {
  background: #f6e5b8;
}

.rating-table tbody tr.gap-row {
  cursor: default;
}

.rating-table tbody tr.gap-row:hover {
  background: none;
}

.rating-table .gap-row td {
  padding: 2px 12px;
  color: var(--ink-3);
  text-align: center;
  letter-spacing: 0.3em;
}

/* ещё не играл рейтинговых партий — стоит в таблице со стартовыми 1200 */
.newbie {
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--chalk-soft);
  color: var(--chalk-deep);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.player-btn {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  color: var(--ink);
}

.player-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-dots {
  display: inline-flex;
  gap: 4px;
}

.form-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
}

.form-dots i.w {
  background: var(--win);
  border-color: var(--win);
}

.rating-num {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 30px;
  line-height: 1;
}

.delta {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.delta.up {
  color: var(--win);
}

.delta.down {
  color: var(--red);
}

.delta.zero {
  color: var(--ink-3);
  font-weight: 400;
}

.rating-more {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.rating-join {
  margin-top: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 32px;
  align-items: center;
  padding: 24px 28px;
  border-radius: var(--r-panel);
  background: var(--paper-2);
}

.rating-join p {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-2);
}

.rating-join b {
  color: var(--ink);
}

@media (max-width: 760px) {
  .rating-table .hide-sm {
    display: none;
  }
  .rating-table td,
  .rating-table th {
    padding: 10px 6px;
  }
  .rating-num {
    font-size: 26px;
  }
  .rating-join {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Профиль игрока */

.player-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.player-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  line-height: 0.95;
  margin: 0;
  overflow-wrap: anywhere;
}

.player-head > div {
  min-width: 0;
}

.player-place {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink-3);
}

.player-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.player-stats div {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper-2);
}

.player-stats dt {
  font-size: 12px;
  color: var(--ink-3);
}

.player-stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 30px;
  line-height: 1;
}

.spark {
  width: 100%;
  height: 120px;
  margin-bottom: 18px;
}

.match-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.match-list li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 54px 54px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.match-list .date {
  color: var(--ink-3);
  font-size: 13px;
}

.match-list .score {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 22px;
  text-align: center;
}

.match-list .won .score {
  color: var(--win);
}

.match-list .adjust .score {
  color: var(--chalk);
}


.match-list .lost .score {
  color: var(--red);
}

@media (max-width: 560px) {
  .player-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .match-list li {
    grid-template-columns: 62px minmax(0, 1fr) 44px 44px;
    gap: 8px;
  }
}

/* ───────────── Афиша ───────────── */

.posters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

.poster {
  display: grid;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.poster-pic {
  display: block;
  padding: 0;
  border: 0;
  background: #120c08;
  cursor: zoom-in;
}

.poster-pic img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  transition: opacity 0.15s ease;
}

.poster-pic:hover img {
  opacity: 0.92;
}

.poster-pic:focus-visible {
  outline: 3px solid var(--lamp);
  outline-offset: -3px;
}

.poster-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px 22px 24px;
}

.poster-when {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--lamp);
}

.poster h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 3.4vw, 44px);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.poster-text {
  margin: 0;
  color: var(--ivory-dim);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.poster-entry {
  margin: 0;
  font-weight: 650;
}

.poster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

/* афиша без картинки — заметнее за счёт большой даты */
.poster.no-pic .poster-body {
  padding-top: 26px;
}

/* одна афиша — картинка слева, текст справа */
.posters.is-single {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 760px) {
  .posters.is-single .poster:not(.no-pic) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: stretch;
  }
  .posters.is-single .poster-pic {
    display: grid;
    place-items: center;
  }
  .posters.is-single .poster-body {
    align-content: center;
    padding: 32px clamp(24px, 4vw, 48px);
  }
  .posters.is-single .poster.no-pic {
    max-width: 760px;
  }
}

/* перешли по ссылке из анонса — карточка ненадолго подсвечивается */
.poster:target,
.event:target {
  animation: target-glow 2.4s ease-out 1;
}

@keyframes target-glow {
  0%,
  35% {
    box-shadow: 0 0 0 3px var(--lamp), 0 18px 44px rgba(0, 0, 0, 0.28);
  }
  100% {
    box-shadow: 0 0 0 3px transparent, 0 18px 44px rgba(0, 0, 0, 0.28);
  }
}

/* афиша целиком — картинка во весь экран */
dialog.modal.is-lightbox {
  width: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  background: #120c08;
  overflow: hidden;
}

dialog.modal.is-lightbox .modal-body {
  padding: 0;
}

dialog.modal.is-lightbox .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
  background: rgba(244, 237, 221, 0.9);
}

.lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  cursor: zoom-out;
}

/* ───────────── Турниры ───────────── */

.events {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(244, 237, 221, 0.18);
}

.event {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 210px;
  gap: 16px 32px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid rgba(244, 237, 221, 0.18);
}

.event-date {
  font-family: var(--font-display);
  line-height: 0.9;
}

.event-date b {
  display: block;
  font-size: 72px;
  font-weight: 800;
}

.event-date span {
  display: block;
  font-size: 22px;
  font-weight: 650;
  color: var(--ivory-dim);
}

.event h3 {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 40px;
  line-height: 0.95;
  margin: 0 0 8px;
}

.event p {
  margin: 0 0 10px;
  color: var(--ivory-dim);
  max-width: 62ch;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
  color: var(--ivory-dim);
}

.event-side {
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.seats {
  font-size: 14px;
  color: var(--ivory-dim);
}

.seats b {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 760;
  color: var(--ivory);
}

.seat-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(244, 237, 221, 0.14);
  overflow: hidden;
  margin-top: 6px;
}

.seat-bar i {
  display: block;
  height: 100%;
  background: var(--lamp);
}

.event-players {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ivory-faint);
}

.events-empty {
  padding: 32px 0;
  color: var(--ivory-dim);
}

@media (max-width: 820px) {
  .event {
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .event-date b {
    font-size: 56px;
  }
  .event-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* ───────────── Вопросы ───────────── */

.faq {
  border-top: 2px solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-weight: 600;
  font-size: 19px;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.18s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-3px, -3px);
}

.faq details p {
  margin: -4px 0 22px;
  max-width: 68ch;
  color: var(--ink-2);
}

/* ───────────── Контакты ───────────── */

.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 56px;
  align-items: end;
}

.contacts-grid .map-frame,
.contacts-grid .map-placeholder {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}

.contact-address {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 5.4vw, 68px);
  line-height: 0.92;
  margin: 0 0 12px;
}

.contact-list {
  margin: 0;
  display: grid;
  gap: 18px;
}

.contact-list dt {
  font-size: 13px;
  color: var(--ivory-faint);
}

.contact-list dd {
  margin: 2px 0 0;
  font-size: 20px;
}

.contact-list a {
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 237, 221, 0.35);
}

.contact-list a:hover {
  border-bottom-color: var(--ivory);
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.map-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: var(--r-panel);
  background: var(--felt-deep);
}

.map-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-panel);
  background: rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 0 0 1px var(--felt-line);
  text-align: center;
  padding: 24px;
  color: var(--ivory-dim);
}

@media (max-width: 860px) {
  .contacts-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .contacts-grid .map-frame,
  .contacts-grid .map-placeholder {
    aspect-ratio: 4 / 3;
  }
}

/* ───────────── Подвал ───────────── */

.site-footer {
  padding: 40px 0 48px;
  font-size: 14px;
  color: var(--ivory-faint);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-grid p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  color: var(--ivory-dim);
}

/* ───────────── Диалоги и уведомления ───────────── */

dialog.modal {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  overflow: auto;
}

dialog.modal.wide {
  width: min(720px, calc(100vw - 24px));
}

dialog.modal::backdrop {
  background: rgba(20, 12, 8, 0.62);
  backdrop-filter: blur(2px);
}

.modal-body {
  padding: 28px 28px 32px;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 10px 10px 0 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-2);
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background: var(--line);
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 46px;
  line-height: 0.95;
  margin: 0 0 18px;
}

/* ───────────── Приложение на телефон ───────────── */

/* в самом приложении — ни ссылок на админку, ни предложения поставить приложение */
.in-app .admin-only,
.in-app [data-install] {
  display: none !important;
}

.app-lead {
  margin: 0 0 22px;
  color: var(--ink-2);
}

.app-or {
  margin: 12px 0 10px;
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
}

.app-apk .app-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-3);
}

.app-qr {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px;
  margin-bottom: 6px;
  border-radius: var(--r-panel);
  background: var(--paper-2);
}

.app-qr svg {
  flex: none;
  border-radius: 6px;
}

.app-qr p {
  margin: 0;
  color: var(--ink-2);
}

.app-steps {
  margin-top: 18px;
}

.app-steps h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.app-steps ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 22px;
}

.app-share {
  display: inline-block;
  vertical-align: -3px;
}

.app-desktop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

@media (max-width: 480px) {
  .app-qr {
    flex-direction: column;
    text-align: center;
  }
}

.auth-warn {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--r-input);
  background: #f9eeda;
  color: #6b4a12;
  font-size: 14px;
  line-height: 1.45;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 22px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  width: max-content;
}

.tabs button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  color: var(--ink-2);
}

.tabs button[aria-selected='true'] {
  background: var(--ink);
  color: var(--paper);
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: 8px;
  width: min(440px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  animation: toast-in 0.2s ease;
}

.toast.error {
  background: var(--red);
  color: #fff;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.loading {
  color: var(--ink-3);
  padding: 24px 0;
}

.felt .loading,
.wood .loading {
  color: var(--ivory-faint);
}

/* ───────────── Простые страницы (статус брони, документы, 404) ───────────── */

.page-main {
  min-height: calc(100dvh - var(--header-h) - 140px);
  padding: clamp(36px, 6vw, 72px) 0;
}

.narrow {
  max-width: 760px;
}

.doc h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 6vw, 68px);
  line-height: 0.95;
  margin: 0 0 12px;
}

.doc h2 {
  font-size: 21px;
  margin: 36px 0 10px;
}

.doc p,
.doc li {
  color: var(--ink-2);
  max-width: 72ch;
}

.doc .lead {
  color: var(--ink-3);
  margin-bottom: 28px;
}

.status-card {
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--r-panel);
  background: #fffdf8;
  box-shadow: 0 1px 0 var(--line), 0 20px 40px rgba(29, 20, 15, 0.08);
}

.status-time {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 10vw, 104px);
  line-height: 0.88;
  margin: 18px 0 10px;
  font-variant-numeric: tabular-nums;
}

.status-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px 24px;
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-facts dt {
  font-size: 13px;
  color: var(--ink-3);
}

.status-facts dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline {
  display: flex;
  gap: 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.timeline li {
  flex: 1;
  position: relative;
  padding-top: 18px;
  color: var(--ink-3);
}

.timeline li::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--line);
}

.timeline li.done {
  color: var(--ink);
  font-weight: 600;
}

.timeline li.done::before {
  background: var(--win);
}

.timeline li.fail::before {
  background: var(--red);
}

.notfound {
  text-align: left;
}

.notfound .big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(120px, 22vw, 260px);
  line-height: 0.8;
  margin: 0;
  color: var(--felt);
}

/* ───────────── /check: хранит ли телефон вход ───────────── */

.check-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.check-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.check-list dt {
  color: var(--ink-3);
}

.check-list dd {
  margin: 0;
  font-weight: 600;
}

.check-list dd.is-ok {
  color: var(--win);
}

.check-list dd.is-bad {
  color: var(--red);
}

.check-ua {
  margin: 28px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  word-break: break-all;
}

/* ───────────── Нет связи: страница из сервис-воркера, когда пропал интернет ───────────── */

.offline-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
}

.offline {
  max-width: 420px;
  text-align: center;
}

.offline-icon {
  display: block;
  margin: 0 auto 26px;
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.offline-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 16vw, 88px);
  line-height: 0.9;
  margin: 0 0 14px;
}

.offline-text {
  margin: 0 auto 28px;
  max-width: 32ch;
  font-size: 18px;
  color: var(--ivory-dim);
}

.offline-note {
  margin: 16px auto 0;
  max-width: 32ch;
  color: var(--lamp);
}

.offline-call {
  margin: 34px 0 0;
  color: var(--ivory-faint);
  font-size: 15px;
}

.offline-call a {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  color: var(--ivory);
  text-decoration: none;
}

/* ───────────── Партия по QR-коду на столе (/play/pyramid, /play/pool) ─────────────
   Сукно — здесь действуют: выбрать соперника, выставить счёт на табло, отправить.
   Записи и итоги — карточки «на бумаге», как в журнале клуба. */

.play-main {
  padding-top: clamp(24px, 5vw, 48px);
}

.play-wrap {
  max-width: 620px;
}

.play-head {
  margin-bottom: 28px;
}

.play-over {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lamp);
}

.play-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 13vw, 88px);
  line-height: 0.86;
  margin: 0 0 18px;
}

.play-disc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.play-disc .chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  text-decoration: none;
}

.play-disc .chip[aria-current='page'] {
  opacity: 1;
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--felt-deep);
  font-weight: 650;
}

.play-card {
  padding: 22px 24px;
  border-radius: var(--r-panel);
  border: 1.5px dashed rgba(244, 237, 221, 0.32);
}

.play-card h2 {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 36px;
  line-height: 1;
  margin: 0 0 10px;
}

.play-card p {
  margin: 0 0 18px;
  color: var(--ivory-dim);
}

.play-card .play-card-note {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ivory-faint);
}

/* выбор соперника */

.play-form .step-title:not(:first-child) {
  margin-top: 30px;
}

.opp-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ivory);
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.opp-list:empty {
  display: none;
}

.opp-list li + li {
  border-top: 1px solid var(--line);
}

.opp-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  font-size: 17px;
  cursor: pointer;
}

.opp-option:hover {
  background: var(--paper-2);
}

.opp-option:focus-visible {
  outline: 3px solid var(--chalk);
  outline-offset: -3px;
}

.opp-option b {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.opp-option > span:last-child {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 22px;
  color: var(--ink-3);
}

.opp-empty {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}

.opp-recent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ivory-faint);
}

.opp-recent .chip {
  min-height: 36px;
  font-size: 14px;
}

.opp-chosen {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1.5px solid rgba(244, 237, 221, 0.24);
}

.opp-chosen > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.opp-chosen b {
  display: block;
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.opp-chosen small {
  font-size: 13px;
  color: var(--ivory-faint);
}

/* табло: две строки, у победителя счёт горит лампой */

.score-board {
  border-radius: 16px;
  border: 6px solid var(--rail);
  background-color: var(--felt-deep);
  background-image: var(--felt-texture);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 10px 24px rgba(0, 0, 0, 0.28), 0 12px 26px rgba(0, 0, 0, 0.28);
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 10px 12px 16px;
}

.score-row + .score-row {
  border-top: 1px solid var(--felt-line);
}

.score-who {
  display: grid;
  min-width: 0;
}

.score-who small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}

.score-who b {
  font-size: 18px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-who span {
  font-size: 13px;
  color: var(--ivory-faint);
}

.score-stepper {
  flex: none;
  display: flex;
  align-items: center;
}

.score-stepper button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(244, 237, 221, 0.32);
  background: transparent;
  color: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.score-stepper button:hover {
  border-color: var(--ivory);
}

.score-stepper button:active {
  background: rgba(244, 237, 221, 0.14);
}

.score-input {
  width: 1.5em;
  margin: 0 4px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ivory);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 52px;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease;
}

.score-input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.22);
}

.score-row.is-winner .score-input {
  color: var(--lamp);
}

.play-hint {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ivory-faint);
}

.play-form .form-error {
  margin: 18px 0 0;
}

.play-submit {
  margin-top: 22px;
  min-height: 58px;
  font-size: 18px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.play-submit + .play-hint {
  text-align: center;
}

.play-me {
  display: grid;
  gap: 6px;
  margin: 36px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--felt-line);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ivory-dim);
  text-align: center;
}

.play-me p {
  margin: 0;
}

.play-me p:last-child {
  margin-top: 6px;
}

.play-me b {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 26px;
  color: var(--ivory);
}

/* записи: ждут ответа, итог, отказ */

.claims:empty {
  display: none;
}

.claims {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.claim-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 20px;
  border-radius: var(--r-panel);
  background: var(--ivory);
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* цветная кромка слева: ждёт ответа — лампа, в рейтинге — зелёная, отказ — красная */
.claim-card.is-incoming,
.claim-card.is-result,
.claim-card.is-rejected {
  padding-left: 24px;
}

.claim-card.is-incoming::before,
.claim-card.is-result::before,
.claim-card.is-rejected::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  background: var(--lamp);
}

.claim-card.is-result::before {
  background: var(--win);
}

.claim-card.is-rejected::before {
  background: var(--red);
}

.claim-card p {
  margin: 0 0 12px;
  color: var(--ink-2);
  line-height: 1.45;
}

.claim-card .claim-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 16px;
}

.claim-card.is-result .claim-title {
  color: var(--win);
  font-weight: 700;
}

.claim-card.is-rejected .claim-title {
  color: var(--red);
  font-weight: 700;
}

.claim-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.claim-when {
  font-size: 13px;
  color: var(--ink-3);
}

.claim-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
}

.cb-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cb-name:last-child {
  text-align: right;
}

.cb-score {
  min-width: 0.6em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 58px;
  line-height: 0.9;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.cb-score.win {
  color: var(--ink);
}

.cb-colon {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 0.9;
  color: var(--ink-3);
}

.claim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.claim-card .btn-ghost {
  --btn-fg: var(--ink);
  --btn-bd: var(--line);
}

.claim-pw-row {
  display: flex;
  gap: 8px;
}

.claim-pw-row .pw-wrap {
  flex: 1;
  min-width: 0;
}

.claim-card .input {
  background: #fffdf8;
  border-color: var(--line);
  color: var(--ink);
}

.claim-card .input::placeholder {
  color: var(--ink-3);
}

.claim-card .input:focus {
  border-color: var(--chalk);
  box-shadow: 0 0 0 3px rgba(47, 99, 184, 0.22);
}

.claim-card .input[aria-invalid='true'] {
  border-color: var(--red);
}

.claim-card .form-error {
  background: rgba(168, 56, 42, 0.1);
  border-color: rgba(168, 56, 42, 0.4);
  color: var(--red);
}

.claim-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-3);
}

.claim-foot .link-btn {
  color: var(--ink-2);
}

.result-lines {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.result-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 48px;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--paper-2);
  font-size: 15px;
}

.result-line span:first-child {
  overflow-wrap: anywhere;
}

.result-line b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.result-line .delta {
  text-align: right;
  font-size: 15px;
}

@media (max-width: 380px) {
  .score-row {
    padding-left: 12px;
  }
  .score-stepper button {
    width: 40px;
    height: 40px;
  }
  .score-input {
    font-size: 46px;
  }
  .cb-score {
    font-size: 48px;
  }
}

.nobr {
  white-space: nowrap;
}

/* таблицы рейтинга: пирамида, пул и квиз; у бильярда — общий зачёт или женская лига */

.rating-switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 0 0 22px;
}

.rating-switches .tabs {
  margin: 0;
}

.rating-tabs {
  max-width: 100%;
  overflow-x: auto;
}

.league-switch {
  gap: 6px;
}

/* на телефоне вкладки короче — чтобы «Квиз» не уезжал за край */
.tab-short {
  display: none;
}

@media (max-width: 560px) {
  .rating-tabs .tab-full {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .rating-tabs .tab-short {
    display: inline;
  }
  .rating-tabs button {
    padding: 0 16px;
  }
}

.league-switch .chip {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
}

.league-switch[hidden] {
  display: none;
}

/* в карточке игрока и в кабинете — над вкладками дисциплин */
.player-head + .league-switch,
.panel .league-switch {
  margin: -4px 0 14px;
}

.team-sub {
  font-size: 13px;
}

.card-subtitle {
  margin: 18px 0 8px;
  font-size: 17px;
  font-weight: 650;
}

.team-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.team-members > li.muted {
  align-self: center;
  font-size: 14px;
}

.team-member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 12px 4px 5px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 550;
}

button.team-member {
  cursor: pointer;
}

button.team-member:hover {
  background: var(--line);
}

.cap-tag {
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: #fbefcf;
  color: #6a4500;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* квизы команды: дата, квиз, место, очки */
.quiz-history li {
  grid-template-columns: 80px minmax(0, 1fr) 56px 64px;
}

.quiz-history .score {
  font-size: 20px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .rating-switches {
    gap: 10px;
  }
  .quiz-history li {
    grid-template-columns: 62px minmax(0, 1fr) 46px 56px;
  }
}

.rating-tabs button {
  white-space: nowrap;
}

.player-tabs {
  margin: -6px 0 18px;
}

.player-tabs button span {
  margin-left: 6px;
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 19px;
  opacity: 0.8;
}

.player-empty {
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink-2);
}

/* ───────────── Аватарки ───────────── */

/* картинка игрока или, пока её нет, шар пула с первой буквой логина; размер — --ava */
.ava {
  --ava: 32px;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--ava);
  height: var(--ava);
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 0 0 1.5px rgba(29, 20, 15, 0.12);
  vertical-align: middle;
}

.ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* без картинки — плоский кружок с буквой: шары с номерами на сайте — это места в таблицах */
.ava-ball {
  background: var(--ball, var(--felt));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.ava-ball i {
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--ava) * 0.54);
  line-height: 1;
  color: #fffdf6;
  /* у Alumni Sans буквы сидят чуть ниже середины */
  transform: translateY(-4%);
}

.ava-ball.is-light i {
  color: var(--ink);
}

.ava-ball.is-guest {
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.ava-ball.is-guest i {
  color: var(--ink-3);
}

.user-chip .ava {
  margin: -3px 0;
}

.chip-ava {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 5px;
}

/* ───────────── Пароль с «глазиком» ───────────── */

.pw-wrap {
  position: relative;
  display: block;
}

.pw-wrap .input {
  padding-right: 54px;
}

.pw-eye {
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}

.pw-eye:hover {
  color: var(--ink);
  background: rgba(127, 127, 127, 0.12);
}

.pw-eye[aria-pressed='true'] {
  color: var(--chalk);
}

.pw-eye svg {
  pointer-events: none;
}

/* ───────────── Архив турниров ───────────── */

.events-archive {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 28px 0 0;
  font-size: 15px;
  color: var(--ivory-dim);
}

.archive-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 18px 48px;
  align-items: end;
  margin-bottom: 32px;
}

.archive-head > p {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-2);
}

.archive-back {
  margin: 0 0 14px;
  font-size: 15px;
}

.archive-back a {
  color: var(--ink-3);
  text-decoration: none;
}

.archive-back a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.archive-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 8px;
}

.archive-tools .input {
  max-width: 320px;
}

.arch-year + .arch-year {
  margin-top: 28px;
}

.arch-year-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 24px 0 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 46px;
  line-height: 1;
}

.arch-year-title small {
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
}

.arch-event {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.arch-event.is-target h3 {
  text-decoration: underline;
  text-decoration-color: var(--lamp);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}

.arch-date span {
  color: var(--ink-3);
}

.arch-date span:last-child {
  font-size: 17px;
}

.arch-body h3 {
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 40px;
  line-height: 0.95;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.arch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-3);
}

.arch-desc {
  margin: 0 0 14px;
  max-width: 64ch;
  color: var(--ink-2);
  white-space: pre-line;
}

/* призёры: место шаром, аватарка, логин, результат */
.podium {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.podium-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: 0 1px 0 var(--line), 0 8px 20px rgba(29, 20, 15, 0.05);
  min-width: 0;
}

.podium-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.podium-item small {
  font-size: 13px;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

.podium-item .arch-name {
  font-size: 17px;
}

.podium-item.is-found {
  box-shadow: 0 0 0 2px var(--lamp), 0 8px 20px rgba(29, 20, 15, 0.05);
}

/* место шаром: первые три — как шары пула 1, 2, 3, остальные — костяные */
.pball {
  --c: #efe5cd;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.6) 0 7%, transparent 26%),
    radial-gradient(circle at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.22) 100%),
    var(--c);
  box-shadow: 0 2px 3px rgba(29, 20, 15, 0.28);
}

.pball b {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 3px;
  border-radius: var(--r-pill);
  background: #fffdf6;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

.pball.p1 {
  --c: #e9b824;
}

.pball.p2 {
  --c: #2256a6;
}

.pball.p3 {
  --c: #c5312a;
}

.pball.is-wide {
  width: auto;
  min-width: 34px;
  padding: 0 6px;
  border-radius: var(--r-pill);
}

.pball-lg {
  width: 46px;
  height: 46px;
  min-width: 46px;
}

.pball-lg b {
  min-width: 26px;
  height: 26px;
  font-size: 19px;
}

.arch-who {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.arch-name {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
}

button.arch-name {
  cursor: pointer;
}

button.arch-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.arch-name.is-guest {
  font-weight: 500;
}

.arch-more {
  margin-top: 14px;
}

.arch-more summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.arch-more summary::-webkit-details-marker {
  display: none;
}

.arch-more summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.arch-more[open] summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.arch-more summary:hover {
  border-color: var(--ink-3);
}

.arch-table {
  width: 100%;
  max-width: 720px;
  margin-top: 12px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.arch-table th {
  padding: 8px 10px;
  border-bottom: 2px solid var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
}

.arch-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.arch-table td:first-child {
  width: 64px;
}

.arch-table .r {
  text-align: right;
  color: var(--ink-2);
}

.arch-table tr.is-found td {
  background: #fbefcf;
}

.arch-empty {
  padding: 28px 0;
  color: var(--ink-2);
}

.arch-empty p {
  margin: 0 0 16px;
}

@media (max-width: 820px) {
  .archive-head {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 24px;
  }
  .arch-event {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px 16px;
  }
  .arch-date b {
    font-size: 52px;
  }
  .arch-date span {
    font-size: 18px;
  }
  .arch-date span:last-child {
    font-size: 14px;
  }
  .arch-body h3 {
    font-size: 32px;
  }
}

@media (max-width: 560px) {
  .arch-event {
    grid-template-columns: minmax(0, 1fr);
  }
  /* дата одной строкой над названием */
  .arch-date {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }
  .arch-date b {
    font-size: 40px;
  }
  .arch-table td,
  .arch-table th {
    padding: 8px 6px;
  }
  .arch-table td:first-child {
    width: 50px;
  }
}

/* ───────────── Турнирная сетка на вылет ───────────── */

/* Позиции считает CSS: --c — столбец (круг), --y — середина пары в «рядах» первого круга */
.bracket-scroll {
  position: relative;
  max-width: 100%;
  margin: 6px 0 14px;
  padding: 4px 2px 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.bracket-scroll:focus-visible {
  outline: 3px solid var(--chalk);
  outline-offset: 2px;
  border-radius: 8px;
}

.bracket-box {
  position: relative;
  margin: 6px 0 14px;
}

.bracket-box .bracket-scroll {
  margin: 0;
}

.bracket-hint {
  display: none;
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  text-align: right;
}

.bracket-box.can-scroll .bracket-hint {
  display: block;
}

/* у правого края — затухание: видно, что сетка продолжается */
.bracket-box.can-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 24px;
  width: 36px;
  background: linear-gradient(to right, rgba(247, 241, 228, 0), var(--paper));
  pointer-events: none;
}

.bracket {
  --bw: 212px; /* ширина пары */
  --bh: 66px; /* высота пары */
  --u: 80px; /* шаг пар первого круга */
  --gap: 44px; /* между кругами */
  --head: 30px; /* названия кругов */
  --cw: 168px; /* победитель */
  position: relative;
  width: calc(var(--cols) * var(--bw) + (var(--cols) - 1) * var(--gap) + var(--champ) * (var(--gap) + var(--cw)));
  height: calc(var(--head) + var(--rows) * var(--u));
}

.bk-round,
.bk-game,
.bk-link,
.bk-line,
.bk-label,
.bk-champ {
  position: absolute;
  left: calc(var(--c) * (var(--bw) + var(--gap)));
}

.bk-round {
  top: 0;
  width: var(--bw);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.bk-game {
  top: calc(var(--head) + var(--y) * var(--u) - var(--bh) / 2);
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr 1fr;
  width: var(--bw);
  height: var(--bh);
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(29, 20, 15, 0.06);
  overflow: hidden;
}

.bk-game.is-final {
  box-shadow: 0 0 0 2px var(--ink), 0 6px 16px rgba(29, 20, 15, 0.12);
}

.bk-game.is-walkover,
.bk-game.is-empty {
  background: transparent;
  box-shadow: 0 0 0 1px var(--line);
  border: 0;
}

.bk-game.is-empty {
  opacity: 0.5;
}

.bk-p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 0 0 0 9px;
  font-size: 14px;
  line-height: 1.2;
}

.bk-p + .bk-p {
  border-top: 1px solid var(--line);
}

.bk-who {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.bk-who .ava {
  flex: none;
}

.bk-name,
.bk-who .arch-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bk-name.is-guest {
  color: var(--ink-2);
}

button.bk-name {
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.bk-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bk-wait {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-3);
}

.bk-s {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 34px;
  padding: 0 6px;
  background: var(--paper-2);
  font-family: var(--font-display);
  font-weight: 760;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.bk-p.is-win {
  font-weight: 650;
}

.bk-p.is-win .bk-s {
  background: var(--felt);
  color: #fffdf6;
}

.bk-p.is-lose .bk-who {
  color: var(--ink-3);
}

.bk-p.is-lose .ava {
  opacity: 0.6;
}

.bk-p.is-found {
  background: #fdf3cf;
}

/* «]» от двух пар к следующей: верх и низ — на серединах пар, хвост — к паре следующего круга */
.bk-link {
  top: calc(var(--head) + var(--y) * var(--u));
  left: calc(var(--c) * (var(--bw) + var(--gap)) + var(--bw));
  width: calc(var(--gap) / 2);
  height: calc(var(--span) * var(--u));
  border: 2px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.bk-link::after,
.bk-line {
  content: '';
  border-top: 2px solid var(--line);
}

.bk-link::after {
  position: absolute;
  left: 100%;
  top: calc(50% - 1px);
  width: calc(var(--gap) / 2);
}

.bk-line {
  top: calc(var(--head) + var(--y) * var(--u) - 1px);
  left: calc(var(--c) * (var(--bw) + var(--gap)) + var(--bw));
  width: var(--gap);
  border-top-color: var(--lamp);
}

.bk-label {
  top: calc(var(--head) + var(--y) * var(--u) - var(--bh) / 2 - 22px);
  width: var(--bw);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.bk-champ {
  top: calc(var(--head) + var(--y) * var(--u) - 34px);
  display: grid;
  gap: 4px;
  width: var(--cw);
  min-height: 68px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #fbefcf;
  box-shadow: 0 0 0 2px var(--lamp);
  font-weight: 700;
}

.bk-champ small {
  font-size: 12px;
  font-weight: 650;
  color: #6a4500;
}

.bk-champ.is-found {
  box-shadow: 0 0 0 2px var(--lamp), 0 0 0 6px #fdf3cf;
}

@media (max-width: 560px) {
  .bracket {
    --bw: 160px;
    --bh: 60px;
    --u: 72px;
    --gap: 26px;
    --cw: 132px;
  }
  .bk-p {
    padding-left: 7px;
    font-size: 13px;
  }
  .bk-who {
    gap: 5px;
  }
  .bk-s {
    min-width: 30px;
    font-size: 20px;
  }
}

/* сетка в архиве — под призёрами */
.arch-bracket {
  margin-top: 18px;
}

.arch-bracket-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

details.arch-bracket > .bracket-scroll {
  margin-top: 14px;
}

.arch-note {
  display: block;
  margin: 2px 0 0 38px;
  font-size: 13px;
}

/* ───────────── Прошлые сезоны рейтинга ───────────── */

.rating-seasons {
  margin: 14px 0 0;
}

.season-chips {
  margin: 0 0 8px;
}

.season-dates {
  margin: 0 0 14px;
  font-size: 14px;
}

.season-boards {
  margin: 0 0 12px;
}

.rating-table tbody tr.is-static {
  cursor: default;
}

.rating-table tbody tr.is-static:hover {
  background: none;
}

.season-name {
  font-weight: 600;
  font-size: 16px;
  overflow-wrap: anywhere;
}

/* ───────────── «Связаться с нами»: кнопка в углу, раскрывает Telegram и телефон ───────────── */

.contact-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 150;
}

.contact-fab summary {
  position: relative;
  display: block;
  list-style: none;
  cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

.contact-fab summary::-webkit-details-marker {
  display: none;
}

.contact-fab summary:focus-visible {
  outline: 3px solid var(--chalk);
  outline-offset: 4px;
}

.contact-fab-btn {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--lamp);
  color: var(--rail);
  box-shadow: 0 0 0 4px rgba(241, 192, 76, 0.22), 0 12px 28px rgba(20, 12, 8, 0.38);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.contact-fab-btn svg {
  width: 30px;
  height: 30px;
}

.contact-fab .i-close {
  display: none;
  width: 24px;
  height: 24px;
}

.contact-fab summary:hover .contact-fab-btn {
  transform: scale(1.05);
}

.contact-fab[open] .contact-fab-btn {
  background: var(--rail);
  color: var(--ivory);
  box-shadow: 0 0 0 4px rgba(244, 237, 221, 0.18), 0 12px 28px rgba(20, 12, 8, 0.38);
}

.contact-fab[open] .i-chat {
  display: none;
}

.contact-fab[open] .i-close {
  display: block;
}

/* подсказка слева от кнопки: при наведении и один раз за визит; место на странице не занимает */
.contact-fab-label {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(29, 20, 15, 0.9);
  color: var(--ivory);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translate(8px, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.contact-fab.is-peek:not([open]) .contact-fab-label,
.contact-fab:not([open]) summary:focus-visible .contact-fab-label {
  opacity: 1;
  transform: translate(0, -50%);
}

@media (hover: hover) {
  .contact-fab:not([open]) summary:hover .contact-fab-label {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

.contact-fab-list {
  position: absolute;
  right: 4px;
  bottom: calc(100% + 14px);
  display: grid;
  justify-items: end;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.contact-fab-text {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(29, 20, 15, 0.9);
  color: var(--ivory);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(20, 12, 8, 0.25);
}

.contact-fab-text b {
  margin-left: 4px;
  color: var(--lamp);
  font-variant-numeric: tabular-nums;
}

.contact-fab-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 10px 24px rgba(20, 12, 8, 0.32);
  transition: transform 0.15s ease;
}

.contact-fab-icon svg {
  width: 26px;
  height: 26px;
}

.contact-fab-item.is-tg .contact-fab-icon {
  background: #2a9fd6;
}

.contact-fab-item.is-tg .contact-fab-icon svg {
  margin-left: -2px;
}

.contact-fab-item.is-phone .contact-fab-icon {
  background: var(--win);
}

.contact-fab-item:hover .contact-fab-icon {
  transform: scale(1.06);
}

.contact-fab-item:focus-visible {
  outline: none;
}

.contact-fab-item:focus-visible .contact-fab-icon {
  outline: 3px solid var(--chalk);
  outline-offset: 3px;
}

/* раскрылись — пункты выезжают снизу по очереди */
.contact-fab[open] .contact-fab-list li {
  animation: fab-in 0.2s ease both;
}

.contact-fab[open] .contact-fab-list li:nth-last-child(2) {
  animation-delay: 0.05s;
}

.contact-fab[open] .contact-fab-list li:nth-last-child(3) {
  animation-delay: 0.1s;
}

@keyframes fab-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .contact-fab {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .contact-fab-btn {
    width: 56px;
    height: 56px;
  }
  .contact-fab-btn svg {
    width: 28px;
    height: 28px;
  }
}

/* на телефоне печатают (открыта клавиатура) — кнопка не мешает */
@media (hover: none) {
  body.is-typing .contact-fab {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-fab-label,
  .contact-fab-btn,
  .contact-fab-icon {
    transition: none;
  }
  .contact-fab[open] .contact-fab-list li {
    animation: none;
  }
}

@media print {
  .contact-fab {
    display: none;
  }
}

/* ───────────── Новогоднее оформление (data-season="newyear" у страницы) ───────────── */

/* гирлянда под шапкой: провод дугами, на каждой дуге — лампочка, мигают вразнобой */
.garland {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 30px;
  overflow: hidden;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='20'%3E%3Cpath d='M0 1 Q32 23 64 1' fill='none' stroke='%231a120c' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x 0 0;
}

.site-header.menu-open .garland {
  display: none;
}

.garland i {
  --bulb: #ffd166;
  position: absolute;
  top: 10px;
  left: calc(var(--i) * 64px + 27px);
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
  background: radial-gradient(circle at 40% 35%, #fff 0 12%, var(--bulb) 45%);
  box-shadow: 0 0 8px 2px var(--bulb);
  box-shadow: 0 0 8px 2px var(--bulb), 0 0 18px 4px color-mix(in srgb, var(--bulb) 45%, transparent);
  animation: twinkle 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.61s);
}

.garland i::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 2.5px;
  width: 5px;
  height: 4px;
  border-radius: 1px;
  background: #2a1d14;
}

.garland i:nth-child(4n + 2) {
  --bulb: #ff5a5f;
  animation-duration: 3.1s;
}

.garland i:nth-child(4n + 3) {
  --bulb: #7ee081;
  animation-duration: 2.2s;
}

.garland i:nth-child(4n + 4) {
  --bulb: #6cc4ff;
  animation-duration: 3.4s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
    box-shadow: 0 0 3px 1px var(--bulb);
  }
}

/* снег на первом экране — позади текста и стола */
[data-season='newyear'] .hero {
  position: relative;
}

[data-season='newyear'] .hero > .container {
  position: relative;
  z-index: 1;
}

.snow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* «До Нового года 56 дней» рядом со «Сейчас открыто» */
.ny-greet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 14px 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(241, 192, 76, 0.5);
  background: rgba(241, 192, 76, 0.14);
  color: var(--lamp);
  font-size: 15px;
  font-weight: 650;
}

.ny-greet span {
  font-size: 17px;
  line-height: 1;
}

/* шапочка Деда Мороза на шаре в логотипе и на кнопке «Связаться с нами» */
[data-season='newyear'] .logo-ball,
[data-season='newyear'] .contact-fab-btn {
  position: relative;
}

[data-season='newyear'] .logo-ball::before,
[data-season='newyear'] .contact-fab-btn::before {
  content: '';
  position: absolute;
  left: -3px;
  top: -14px;
  width: 30px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 26'%3E%3Cpath d='M3 21C7 11 13 4 22 3c4-.5 6 2 5 5-4-1-7 3-6 13z' fill='%23d62828'/%3E%3Cpath d='M15 9c3-3 6-5 9-5-3 2-5 5-5 9z' fill='%23a51c1c'/%3E%3Crect x='1' y='18' width='23' height='6.5' rx='3.2' fill='%23f6f1e6'/%3E%3Ccircle cx='27' cy='7' r='3.8' fill='%23f6f1e6'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: rotate(-16deg);
  pointer-events: none;
}

[data-season='newyear'] .contact-fab-btn::before {
  left: 6px;
  top: -15px;
  width: 36px;
  height: 29px;
}

[data-season='newyear'] .contact-fab[open] .contact-fab-btn::before {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .garland i {
    animation: none;
  }
}

@media print {
  .garland,
  .snow {
    display: none;
  }
}

/* места в рейтинге и архиве — тоже ёлочные шарики: золотой колпачок с петелькой */
[data-season='newyear'] .place-ball,
[data-season='newyear'] .pball {
  position: relative;
}

[data-season='newyear'] .place-ball::before,
[data-season='newyear'] .pball::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  width: 11px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg, #8a6a1c, #ffe7a3 45%, #9c7a26);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

[data-season='newyear'] .place-ball::after,
[data-season='newyear'] .pball::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translateX(-50%);
  border: 1.5px solid #c9a443;
  border-radius: 50%;
}
