/* TOPSPIN — вечерний зал: тёмно-синие нейтрали, синий стол как главный образ, белый мяч. Оранжевый — только в логотипе.
   Шрифт как у Apple: на iPhone и Mac системный SF Pro, на остальных Inter (SF Pro нельзя подключать на сайт по лицензии) */
:root {
  --nav-h: 68px;
  --bg: #070b16;
  --page: #0a1020;
  --card: #0f172b;
  --raised: #162039;
  --raised-2: #1d2a4a;
  --line: rgba(234, 240, 255, 0.08);
  --line-2: rgba(234, 240, 255, 0.14);
  --text: #eef2fb;
  --text-2: #a7b1c7;
  --muted: #7f8aa3;
  --blue: #2563eb;
  --blue-ink: #7aa5ff;
  --table: #1d4fc4;
  --negative: #f2555a;
  --positive: #4cc38a;
  --r-control: 10px;
  --r-card: 16px;
  --r-panel: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: var(--font); /* цифры времени и телефонов — табличные цифры того же шрифта, как в интерфейсах Apple */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 8px 16px; background: var(--text); color: var(--page); border-radius: 8px; text-decoration: none; }
.skip:focus { top: 16px; }
.skip--inline { top: -9999px; }
.skip--inline:focus { top: 8px; left: 8px; }
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; color: var(--blue-ink); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: var(--r-control); border: 1px solid transparent;
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), opacity 160ms var(--ease);
}
.btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--light { background: var(--text); color: var(--page); }
.btn--light:hover { background: #ffffff; }
.btn--ghost { background: var(--raised); border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { background: var(--raised-2); }
.btn--accent { background: var(--blue); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.btn--accent:hover { background: #2f6df2; }
.btn:disabled { cursor: not-allowed; background: var(--raised); color: var(--muted); box-shadow: none; }
.link { color: var(--blue-ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(122, 165, 255, 0.35); transition: border-color 160ms var(--ease); }
.link:hover { border-color: var(--blue-ink); }

/* ---------- шапка ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color 220ms var(--ease), border-color 220ms var(--ease); border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(10, 16, 32, 0.92); border-color: var(--line); backdrop-filter: saturate(1.2) blur(10px); }
.nav__inner { display: flex; align-items: center; gap: 32px; height: var(--nav-h); }
.logo img { height: 34px; width: auto; }
.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__links a, .nav__phone { font-size: 14px; color: var(--text-2); text-decoration: none; transition: color 160ms var(--ease); }
.nav__links a:hover, .nav__phone:hover { color: var(--text); }

/* ---------- первый экран ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; padding: 112px 0 64px; overflow: hidden; background: var(--bg); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 48px; align-items: center; }
.hero__eyebrow { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.hero__title { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.04; font-weight: 600; letter-spacing: -0.035em; max-width: 11ch; }
.hero__lead { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--text-2); max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__scene { position: relative; }
.table3d { width: 100%; height: auto; overflow: visible; }
.ball, .ball-shadow { opacity: 0; }

.status {
  position: absolute; left: 4%; bottom: -8px;
  display: grid; grid-template-columns: 8px auto; column-gap: 10px; row-gap: 2px; align-items: center;
  padding: 16px 20px; min-width: 260px; max-width: 320px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.status__dot, .live__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); }
.status__label { font-size: 13px; color: var(--muted); }
.status__value { grid-column: 2; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.status__note { grid-column: 2; font-size: 13px; color: var(--text-2); }
.status__note:empty { display: none; }
.status.is-closed .status__dot { background: var(--muted); }

/* ---------- цифры ---------- */
.facts { border-block: 1px solid var(--line); background: var(--page); }
.facts__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 32px 24px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact__num { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.fact__num.mono { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; }
.fact__label { font-size: 14px; color: var(--text-2); }

/* ---------- общие секции ---------- */
.h2 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; }
.hall, .book, .train, .reviews, .contacts { padding: 112px 0; }

/* ---------- зал (сцена со скроллом) ---------- */
.hall__inner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.hall__steps { margin-top: 40px; display: grid; gap: 8px; counter-reset: step; }
.hall__step { position: relative; padding: 16px 0 16px 48px; border-top: 1px solid var(--line); color: var(--muted); transition: color 300ms var(--ease); }
.hall__step::before { counter-increment: step; content: "0" counter(step); position: absolute; left: 0; top: 18px; font: 500 13px/1 var(--mono); color: var(--muted); }
.hall__step h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-2); transition: color 300ms var(--ease); }
.hall__step p { margin-top: 6px; font-size: 15px; max-width: 30rem; }
.hall__step.is-active { color: var(--text-2); }
.hall__step.is-active h3 { color: var(--text); }
.hall__step.is-active::before { color: var(--blue-ink); }
.hall__plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; }
.hall__plan svg { width: 100%; height: auto; }
.hall__caption { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.hall__caption span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.plan__table rect.top { fill: var(--raised-2); transition: fill 400ms var(--ease); }
.plan__table.is-free rect.top { fill: var(--table); }
.plan__table text { font: 500 18px var(--mono); fill: var(--text-2); }

/* ---------- бронь ---------- */
.book { background: var(--bg); border-top: 1px solid var(--line); }
.book__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.book__sub { margin-top: 12px; font-size: 17px; color: var(--text-2); }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.live.is-off .live__dot { background: var(--muted); }

.dates-wrap { margin: 32px 0 24px; }
.dates { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--raised-2) transparent; }
.date {
  flex: 0 0 76px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.date:hover { background: var(--raised); }
.date__wd { font-size: 12px; color: var(--muted); }
.date__num { font: 600 22px/1.2 var(--mono); letter-spacing: -0.02em; }
.date__mon { font-size: 12px; color: var(--text-2); }
.date.is-selected { background: var(--text); border-color: var(--text); color: var(--page); }
.date.is-selected .date__wd, .date.is-selected .date__mon { color: #3b4660; }
.date:disabled { opacity: 0.4; cursor: not-allowed; }

.book__body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.board { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; }
.board__grid { display: grid; grid-template-columns: 56px repeat(var(--tables, 6), minmax(0, 1fr)); gap: 4px; }
.board__corner, .th { position: sticky; top: var(--nav-h); z-index: 2; background: var(--card); }
.th { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 10px; font-size: 13px; color: var(--text-2); }
.th svg { width: 16px; height: 26px; }
.th__n { font-family: var(--mono); }
.th__w { display: none; }
.time-label { display: flex; align-items: center; font: 400 13px var(--mono); color: var(--muted); }
.cell {
  height: 40px; border-radius: 8px; border: 1px solid rgba(234, 240, 255, 0.4); background: var(--raised);
  scroll-margin-top: 64px; /* закреплённая строка столов не закрывает клетку в фокусе */
  font: 500 12px var(--mono); color: transparent; cursor: pointer; padding: 0;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.cell:hover { background: var(--raised-2); border-color: rgba(234, 240, 255, 0.6); color: var(--text-2); }
.cell.is-taken, .cell.is-past {
  cursor: not-allowed; background: repeating-linear-gradient(135deg, rgba(234, 240, 255, 0.16) 0 2px, transparent 2px 7px); border-color: transparent;
}
.cell.is-past { opacity: 0.45; }
.cell.is-sel { background: var(--blue); border-color: #4f84f5; color: #fff; }
.cell.is-mine { background: transparent; border: 1px solid var(--blue-ink); color: var(--blue-ink); cursor: default; }

.legend { display: flex; gap: 20px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend__sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: var(--raised-2); border: 1px solid var(--line-2); }
.legend__sw--free { background: var(--table); border-color: transparent; }
.board .legend__sw--free { background: var(--raised); border-color: rgba(234, 240, 255, 0.4); }
.legend__sw--busy { background: repeating-linear-gradient(135deg, rgba(234, 240, 255, 0.16) 0 2px, transparent 2px 7px); border-color: transparent; }
.legend__sw--sel { background: var(--blue); border-color: transparent; }

.panel { position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 24px; }
.sum { display: grid; gap: 12px; }
.sum__row { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.sum__row span { color: var(--muted); }
.sum__row strong { font-weight: 500; text-align: right; }
.dur { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 20px; padding: 4px; background: var(--bg); border-radius: 12px; border: 1px solid var(--line); }
.dur__btn { height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-size: 14px; cursor: pointer; transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.dur__btn:hover:not(:disabled) { color: var(--text); }
.dur__btn.is-selected { background: var(--raised-2); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.dur__btn:disabled { color: var(--muted); opacity: 0.5; cursor: not-allowed; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.total span { color: var(--muted); font-size: 15px; }
.total strong { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }

.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.field em { font-style: normal; color: var(--muted); }
.field input {
  height: 44px; padding: 0 14px; border-radius: var(--r-control); border: 1px solid var(--line-2);
  background: var(--bg); color: var(--text); font: 400 15px var(--font);
  transition: border-color 140ms var(--ease);
}
.field input::placeholder { color: var(--muted); }
.field input:hover { border-color: rgba(234, 240, 255, 0.22); }
.field input:focus { outline: none; border-color: var(--blue-ink); }
.field input[aria-invalid="true"] { border-color: var(--negative); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { margin-top: 4px; }
.form__msg { font-size: 14px; color: var(--negative); }
.form__msg:empty { display: none; }
.form__note { font-size: 13px; color: var(--muted); }
.form__note a { color: var(--text-2); }

.done { display: grid; gap: 12px; justify-items: start; }
.done__table { width: 40px; height: 66px; margin-bottom: 8px; }
.done__kicker { font-size: 14px; color: var(--positive); }
.done__title { font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -0.025em; }
.done__list { width: 100%; display: grid; gap: 10px; margin: 8px 0 12px; padding-block: 16px; border-block: 1px solid var(--line); }
.done__list div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.done__list dt { color: var(--muted); }
.done__list dd { text-align: right; }

.done__note { font-size: 13px; color: var(--muted); }
.link-btn { display: inline; padding: 0; border: 0; background: none; color: var(--blue-ink); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ваши брони */
.mine { margin-top: 24px; padding: 16px 20px; background: var(--card); border: 1px solid rgba(122, 165, 255, 0.28); border-radius: var(--r-card); }
.mine__title { font-size: 15px; font-weight: 600; }
.mine__list { display: grid; gap: 8px; margin-top: 8px; }
.mine__list:empty { display: none; }
.mine__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 15px; }
.mine__item strong { font-weight: 600; }
.mine__msg { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.mine__msg:empty { display: none; }

/* ---------- тренировки ---------- */
.train__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-top: 40px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); }
.card h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.card p { color: var(--text-2); font-size: 15px; flex: 1; }
.card .btn, .card .link { margin-top: 8px; }
.card--wide { background: linear-gradient(180deg, #13306f 0%, #0f2659 100%); border-color: rgba(122, 165, 255, 0.18); }
.card--wide p { color: #c3cfeb; }
.card__art { width: 180px; height: 90px; margin-bottom: 4px; }

/* ---------- отзывы ---------- */
.reviews { background: var(--bg); border-block: 1px solid var(--line); }
.reviews__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.rating { font-size: 15px; color: var(--text-2); text-decoration: none; }
.rating strong { font-size: 20px; color: var(--text); font-weight: 500; margin-right: 4px; }
.rating:hover { color: var(--text); }
.reviews__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.quote { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 28px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); }
.quote blockquote { font-size: 20px; line-height: 1.4; }
.quote figcaption { font-size: 14px; color: var(--muted); }

/* ---------- контакты ---------- */
.contacts__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
.contacts__addr { margin-top: 24px; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; }
.contacts__addr span { color: var(--muted); font-size: 0.6em; font-weight: 400; letter-spacing: 0; }
.contacts__list { display: grid; gap: 20px; }
.contacts__list > div:not(.contacts__actions) { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 16px; }
.contacts__list dt { color: var(--muted); font-size: 14px; padding-top: 2px; }
.contacts__list dd a { text-decoration: none; }
.contacts__list dd a:hover { color: var(--blue-ink); }
.contacts__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 12px; }

.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.footer img { height: 28px; width: auto; opacity: 0.85; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__phone { margin-left: auto; }
  .book__body { grid-template-columns: 1fr; }
  .panel { position: static; }
  .train__grid { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: 1 / -1; }
}
@media (min-width: 1081px) { .th__w { display: inline; } }
@media (max-width: 860px) {
  .hero { min-height: auto; padding-top: 104px; }
  .hero__inner, .hall__inner, .contacts__inner { grid-template-columns: 1fr; }
  .hero__scene { margin-top: 8px; }
  .status { position: relative; left: auto; bottom: auto; margin: -24px auto 0; width: min(100%, 360px); max-width: none; }
  .facts__row { grid-template-columns: 1fr 1fr; }
  .fact { padding: 24px 16px; }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .reviews__grid { grid-template-columns: 1fr; }
  .hall__inner { gap: 32px; }
}
@media (max-width: 600px) {
  :root { --nav-h: 60px; }
  .container { padding: 0 16px; }
  .nav__inner { gap: 16px; }
  .nav .btn { height: 40px; }
  .hide-sm { display: none; }
  .hero { padding: 84px 0 40px; }
  .hero__eyebrow { margin-bottom: 12px; font-size: 13px; }
  .hero__inner { gap: 0; }
  .hero__lead { margin-top: 16px; }
  .hero__actions { margin-top: 24px; flex-wrap: nowrap; }
  .hero__actions .btn { flex: 1 1 auto; padding: 0 16px; }
  .status { margin-top: -16px; padding: 14px 16px; }
  .status__value { font-size: 18px; }
  .date { flex-basis: 64px; padding: 8px 4px; }
  .date__num { font-size: 20px; }
  .dates-wrap { margin: 24px -16px 16px; }
  .dates { padding: 0 16px 8px; scroll-padding-inline: 16px; }
  .th { padding: 8px 0; }
  .logo img { height: 28px; }
  .nav__phone { display: none; }
  .nav .btn { margin-left: auto; }
  .hero__title { font-size: 40px; }
  .hero__lead { font-size: 17px; }
  .hall, .book, .train, .reviews, .contacts { padding: 72px 0; }
  .fact__num { font-size: 32px; }
  .fact__num.mono { font-size: 32px; }
  .board { padding: 12px 8px; margin-inline: -8px; }
  .board__grid { grid-template-columns: 40px repeat(var(--tables, 6), minmax(0, 1fr)); gap: 3px; }
  .cell { height: 44px; font-size: 10px; }
  .time-label { font-size: 12px; }
  .panel { padding: 20px 16px; }
  .train__grid { grid-template-columns: 1fr; }
  .card, .quote { padding: 24px 20px; }
  .contacts__list > div:not(.contacts__actions) { grid-template-columns: 1fr; gap: 4px; }
  .contacts__actions .btn { flex: 1 1 auto; }
}

/* закреплённая полоса выбора на телефоне и планшете */
.sticky {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 16px; background: var(--raised); border: 1px solid var(--line-2); border-radius: var(--r-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.sticky div { display: grid; }
.sticky strong { font-size: 15px; font-weight: 500; }
.sticky span { font-size: 13px; color: var(--text-2); }
@media (max-width: 1080px) { .sticky.is-visible { display: flex; } }
@media (max-width: 860px) {
  .hall__step { color: var(--text-2); }
  .hall__step h3 { color: var(--text); }
}
