[hidden] { display: none !important; }
:root {
  --ink: #0d1b2a;
  --ink-2: #1b2d42;
  --court: #1f4e8c;
  --ball: #d8f45a;
  --ball-ink: #2b3300;
  --paper: #f4f2ec;
  --card: #ffffff;
  --line: #e2ded3;
  --muted: #6b7380;
  --danger: #c2412d;
  --ok: #2e7d4f;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .06), 0 8px 24px rgba(13, 27, 42, .06);
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ball { background: var(--ball); color: var(--ball-ink); }
.btn-ball:hover:not(:disabled) { background: #cdeb3f; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover:not(:disabled) { background: var(--ink-2); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover:not(:disabled) { background: rgba(127,127,127,.08); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--court); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btn-block { width: 100%; }

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

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 27, 42, .92);
  backdrop-filter: blur(10px);
  color: #fff;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 15px; text-decoration: none; letter-spacing: -.01em; }
.brand-ball { width: 22px; height: 22px; flex: none; }
.topbar nav { display: flex; gap: 22px; font-size: 14px; }
.topbar nav a { text-decoration: none; opacity: .75; }
.topbar nav a:hover { opacity: 1; }
.top-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) { .topbar nav { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff;
  padding: 72px 0 88px;
}
.hero::before {
  /* разметка корта */
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.07) calc(50% - 1px), rgba(255,255,255,.07) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(62% - 1px), rgba(255,255,255,.07) calc(62% - 1px), rgba(255,255,255,.07) calc(62% + 1px), transparent calc(62% + 1px));
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ball); }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(36px, 6vw, 68px); line-height: 1.02; letter-spacing: -.03em;
  margin: 14px 0 18px;
}
.hero p.lead { font-size: 18px; max-width: 520px; color: rgba(255,255,255,.78); margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 22px;
}
.price-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); gap: 12px; }
.price-row:last-of-type { border-bottom: 0; }
.price-row span { color: rgba(255,255,255,.7); font-size: 15px; }
.price-row b { font-family: var(--font-display); font-size: 22px; font-weight: 600; white-space: nowrap; }
.price-row small { font-size: 13px; color: rgba(255,255,255,.55); font-weight: 400; }
.hero-card .loc { font-size: 14px; color: rgba(255,255,255,.65); margin-top: 8px; display: flex; gap: 8px; }
@media (max-width: 860px) {
  .hero { padding: 48px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Секции ---------- */
section.block { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3.5vw, 38px); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); }

/* ---------- Расписание ---------- */
.filters { display: flex; gap: 6px; background: #e9e6dc; padding: 4px; border-radius: 999px; }
.filters button {
  border: 0; background: transparent; border-radius: 999px;
  padding: 8px 16px; font-weight: 600; font-size: 14px; color: var(--muted);
}
.filters button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 8px; scrollbar-width: thin; }
.day {
  flex: none; min-width: 64px; padding: 10px 8px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 14px;
  text-align: center; line-height: 1.2;
}
.day .dow { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.day .dnum { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin-top: 2px; }
.day .dcount { font-size: 11px; color: var(--muted); margin-top: 3px; }
.day[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.day[aria-pressed="true"] .dow, .day[aria-pressed="true"] .dcount { color: rgba(255,255,255,.7); }
.day.empty { opacity: .45; }

.slots { display: grid; gap: 10px; }
.slot {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center;
  background: var(--card); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow);
}
.slot-time { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1; }
.slot-time small { display: block; font-family: var(--font-body); font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 6px; }
.slot-title { font-weight: 700; font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.slot-meta { color: var(--muted); font-size: 14px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .01em; }
.tag-ind { background: #e3ecf8; color: var(--court); }
.tag-grp { background: #eef8c9; color: #4b5a00; }
.tag-mine { background: var(--ink); color: var(--ball); }
.slot-side { display: flex; align-items: center; gap: 16px; }
.slot-price { font-weight: 700; white-space: nowrap; }
.spots { display: flex; gap: 3px; margin-top: 8px; }
.spots i { width: 18px; height: 6px; border-radius: 3px; background: var(--line); }
.spots i.on { background: var(--court); }
.slot.full { opacity: .6; }
@media (max-width: 640px) {
  .slot { grid-template-columns: 1fr auto; gap: 10px 14px; padding: 16px; }
  .slot-time { grid-column: 1; display: flex; align-items: baseline; gap: 8px; }
  .slot-time small { margin: 0; }
  .slot-body { grid-column: 1 / -1; grid-row: 2; }
  .slot-side { grid-column: 2; grid-row: 1; gap: 10px; }
  .slot-side .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
}

.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); background: var(--card); border-radius: var(--radius); border: 1.5px dashed var(--line); }

/* ---------- О тренере / Контакты ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about p { font-size: 18px; margin: 0; white-space: pre-line; }
.steps { display: grid; gap: 14px; counter-reset: step; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ball); color: var(--ball-ink); font-family: var(--font-display); font-weight: 700;
}
.step b { display: block; }
.step span { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 32px; } }

.contacts { background: var(--ink); color: #fff; border-radius: 28px; padding: 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.contacts h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 3vw, 34px); margin: 0 0 10px; letter-spacing: -.02em; }
.contacts p { color: rgba(255,255,255,.7); margin: 0; }
.contact-list { display: grid; gap: 10px; }
.contact-list a, .contact-list div { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: rgba(255,255,255,.06); border-radius: 14px; text-decoration: none; }
.contact-list a:hover { background: rgba(255,255,255,.1); }
@media (max-width: 760px) { .contacts { grid-template-columns: 1fr; padding: 28px 22px; } }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Модальные окна ---------- */
.modal {
  border: 0; padding: 0; border-radius: 24px; width: min(440px, calc(100% - 24px));
  background: var(--card); color: var(--ink);
  box-shadow: 0 24px 64px rgba(13, 27, 42, .3);
}
.modal::backdrop { background: rgba(13, 27, 42, .55); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-inner { padding: 28px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 18px; }
.modal-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 0; letter-spacing: -.02em; line-height: 1.2; }
.modal-close { border: 0; background: #f1efe8; width: 36px; height: 36px; border-radius: 50%; flex: none; font-size: 20px; line-height: 1; }
.modal p.hint { color: var(--muted); margin: 0 0 18px; font-size: 15px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; }
.input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  font-size: 17px; transition: border-color .15s;
}
.input:focus { outline: none; border-color: var(--ink); }
textarea.input { min-height: 80px; resize: vertical; font-size: 15px; }
.code-input { letter-spacing: .5em; text-align: center; font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.error { color: var(--danger); font-size: 14px; margin: -4px 0 12px; min-height: 0; }
.error:empty { display: none; }
.resend { text-align: center; margin-top: 14px; font-size: 14px; color: var(--muted); }

.summary { background: var(--paper); border-radius: 14px; padding: 16px; margin-bottom: 16px; display: grid; gap: 6px; font-size: 15px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary span { color: var(--muted); }
.summary b { text-align: right; }

.booking-item { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.booking-item:last-child { border-bottom: 0; }
.booking-item .when { font-weight: 700; }
.booking-item .what { font-size: 14px; color: var(--muted); }
.booking-item .cancelled { color: var(--danger); font-size: 13px; font-weight: 600; }

.success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--ball); display: grid; place-items: center; margin: 4px auto 16px; }
.center { text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px;
  font-size: 15px; font-weight: 600; z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }

.skeleton { height: 84px; border-radius: var(--radius); background: linear-gradient(90deg, #ebe8df 25%, #f3f1ea 50%, #ebe8df 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.hint { color: var(--muted); }
@media (max-width: 480px) {
  .brand span { display: none; }
  .top-actions .btn-sm { padding: 0 12px; }
}
