/* ============================================================
   Rist — дизайн-система.
   Минимализм: один акцентный цвет, тонкие границы, ровный ритм,
   светлая и тёмная тема через [data-theme] и переменные.
   ============================================================ */

:root {
  --accent: #3355ff;
  --accent-ink: #ffffff;
  --accent-soft: #eef1ff;

  --green: #1f9d55;
  --amber: #b5790a;
  --rose: #d23a4f;
  --cyan: #0f8f96;
  --violet: #6446d1;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --nav-h: 64px;
  --max: 1180px;

  color-scheme: light;
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #14161a;
  --muted: #5b6067;
  --faint: #90959d;
  --shadow-1: 0 1px 2px rgba(20, 22, 26, 0.05);
  --shadow-2: 0 12px 32px -16px rgba(20, 22, 26, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e0f12;
    --bg-subtle: #16171b;
    --surface: #17181c;
    --surface-2: #1d1e23;
    --line: #2a2b30;
    --line-strong: #3a3b42;
    --text: #f1f2f4;
    --muted: #a2a6ad;
    --faint: #6d7178;
    --accent-soft: #1a2140;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 16px 40px -18px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f12;
  --bg-subtle: #16171b;
  --surface: #17181c;
  --surface-2: #1d1e23;
  --line: #2a2b30;
  --line-strong: #3a3b42;
  --text: #f1f2f4;
  --muted: #a2a6ad;
  --faint: #6d7178;
  --accent-soft: #1a2140;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 16px 40px -18px rgba(0, 0, 0, 0.6);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

::selection { background: var(--accent-soft); color: var(--text); }

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; border: 2px solid var(--bg); }

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

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

.display { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.06; font-weight: 700; }
.h2 { font-size: clamp(1.6rem, 2.8vw, 2.15rem); }
.h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

.lead { font-size: 1.02rem; color: var(--muted); max-width: 56ch; }

/* ─────────────── Сетка ─────────────── */

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
section { position: relative; scroll-margin-top: calc(var(--nav-h) + 16px); }
.section-pad { padding: clamp(56px, 7vw, 96px) 0; }

.rule { height: 1px; background: var(--line); border: 0; }

/* ─────────────── Навигация ─────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav.stuck { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }

.nav-inner { width: min(100% - 40px, var(--max)); margin-inline: auto; display: flex; align-items: center; gap: 28px; }

.logo { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; flex-shrink: 0; }
.logo-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.nav-links { display: flex; gap: 2px; margin-left: auto; }

.nav-link {
  position: relative;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 7px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--text); }

.nav-cta { display: flex; gap: 8px; align-items: center; }
.nav-link-mobile { display: none; }

.theme-toggle {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.theme-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }

.burger {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.burger span { position: absolute; left: 10px; right: 10px; height: 1.4px; background: var(--text); transition: transform 0.3s var(--ease), opacity 0.2s; }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 22px; }
.burger.open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.burger.open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

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

.btn {
  --btn-bg: var(--text);
  --btn-fg: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), opacity 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-accent { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); opacity: 1; }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--rose); border-color: color-mix(in srgb, var(--rose) 35%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--rose) 10%, transparent); opacity: 1; }

.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-arrow i { font-style: normal; display: inline-block; transition: transform 0.2s var(--ease); }
.btn-arrow:hover i { transform: translateX(3px); }

/* ─────────────── Появление при скролле (сдержанное) ─────────────── */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ─────────────── Карточки ─────────────── */

.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 22px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--line-strong); }

.course-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 560;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
}
.tag-violet { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 35%, transparent); background: color-mix(in srgb, var(--violet) 10%, transparent); }
.tag-amber { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent); }
.tag-cyan { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 35%, transparent); background: color-mix(in srgb, var(--cyan) 10%, transparent); }
.tag-green { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.tag-rose { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 35%, transparent); background: color-mix(in srgb, var(--rose) 10%, transparent); }

.course-title { font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 8px; }
.course-summary { color: var(--muted); font-size: 13.6px; line-height: 1.55; min-height: 58px; }

.course-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.price { font-size: 1.1rem; font-weight: 650; }
.price small { font-weight: 400; font-size: 11.5px; color: var(--faint); display: block; }
.stack-meta { display: flex; gap: 14px; font-size: 12px; color: var(--faint); margin-top: 12px; }

/* ─────────────── Статистика ─────────────── */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat { background: var(--surface); padding: 22px; }
.stat-value { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }
.stat-label { color: var(--faint); font-size: 12.5px; margin-top: 6px; }

/* ─────────────── Шаги ─────────────── */

.steps { display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.step-num { font-size: 1.3rem; font-weight: 700; color: var(--faint); }

/* ─────────────── Аватары ─────────────── */

.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 14px;
  color: var(--accent-ink);
  background: var(--accent);
  flex-shrink: 0;
}
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.avatar-muted { background: var(--faint); }

/* ─────────────── Аккордеон ─────────────── */

.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 20px 40px 20px 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.faq-q::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--faint);
  transition: transform 0.3s var(--ease);
}
.faq-item.open .faq-q::after { transform: translateY(-50%) rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { margin: 0 0 20px; color: var(--muted); max-width: 68ch; font-size: 14px; }

/* ─────────────── Формы ─────────────── */

.field { margin-bottom: 14px; }
.label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 550; }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14.3px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%2390959d' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.select option { background: var(--surface); color: var(--text); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.form-error { color: var(--rose); font-size: 13px; min-height: 18px; margin-top: 4px; }

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.checkbox-row input { width: 15px; height: 15px; }

/* ─────────────── Страница входа ─────────────── */

.auth-shell { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: min(100%, 400px); }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 34px; }

.demo-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 12.7px;
  color: var(--muted);
  margin-bottom: 7px;
  transition: border-color 0.2s, background 0.2s;
}
.demo-chip:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

.admin-shell-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ─────────────── Личный кабинет ─────────────── */

.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100svh; }

.side {
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 0;
  height: 100svh;
  background: var(--bg);
}

.side-head { padding: 4px 8px 20px; display: flex; align-items: center; justify-content: space-between; }

.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.side-link:hover { color: var(--text); background: var(--surface-2); }
.side-link.active { color: var(--text); background: var(--accent-soft); font-weight: 560; }

.side-ico { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }

.main { padding: 30px clamp(18px, 3vw, 40px) 60px; min-width: 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

.view { display: none; }
.view.active { display: block; animation: view-in 0.3s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* ─────────────── Расписание ─────────────── */

.cal-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.cal-nav { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }

.icon-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.cal-range { font-size: 1.05rem; font-weight: 650; min-width: 200px; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }

.day {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 10px 9px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.day.today { border-color: var(--accent); background: var(--accent-soft); }
.day.weekend .day-name { color: var(--rose); }

.day-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.day-name { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.day-num { font-size: 1.15rem; font-weight: 650; }
.day.today .day-num { color: var(--accent); }

.slot {
  border-left: 2.5px solid var(--accent);
  border-radius: 6px;
  padding: 7px 8px;
  background: var(--surface-2);
  cursor: pointer;
  transition: background 0.15s;
}
.slot:hover { background: var(--line); }
.slot-time { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.slot-title { font-size: 12.2px; line-height: 1.3; margin-top: 3px; font-weight: 550; }
.slot-course { font-size: 10.5px; color: var(--faint); margin-top: 3px; }
.slot-done { opacity: 0.55; }

.slot-violet { border-left-color: var(--violet); }
.slot-amber { border-left-color: var(--amber); }
.slot-cyan { border-left-color: var(--cyan); }
.slot-green { border-left-color: var(--green); }

.day-empty { color: var(--faint); font-size: 11.5px; margin: auto; opacity: 0.7; }

.agenda-item {
  display: grid;
  grid-template-columns: 56px 3px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin-bottom: 8px;
}
.agenda-bar { align-self: stretch; border-radius: 3px; background: var(--accent); }
.agenda-time { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.agenda-date { font-size: 10.5px; color: var(--faint); }

/* ─────────────── Таблицы ─────────────── */

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  font-weight: 600;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13.6px; vertical-align: middle; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.t-num { font-family: var(--mono); font-size: 12.5px; }
.t-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ─────────────── Прогресс ─────────────── */

.progress { height: 5px; border-radius: 5px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); width: 0; transition: width 0.6s var(--ease); }

.ring { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.ring .track { stroke: var(--surface-2); }
.ring .bar { stroke: var(--accent); transition: stroke-dashoffset 0.7s var(--ease); }

/* ─────────────── Диаграмма ─────────────── */

.chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 16px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart-bar {
  width: 100%;
  border-radius: 5px 5px 2px 2px;
  background: var(--accent);
  height: 0;
  transition: height 0.6s var(--ease);
  position: relative;
  cursor: pointer;
}
.chart-bar::after {
  content: attr(data-value);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.chart-bar:hover::after { opacity: 1; }
.chart-label { font-size: 10.5px; color: var(--faint); }

/* ─────────────── Кристаллики / бонусы ─────────────── */

.crystal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.crystal-badge b { font-size: 15px; }

.prize-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px;
  text-align: center;
}
.prize-icon { font-size: 34px; margin-bottom: 10px; }
.prize-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.prize-cost { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }

/* ─────────────── Модальные окна ─────────────── */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.modal-root.open { opacity: 1; pointer-events: auto; }
.modal-veil { position: absolute; inset: 0; background: rgba(10, 10, 12, 0.45); }

.modal {
  position: relative;
  width: min(100%, 460px);
  max-height: 88svh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow-2);
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.modal-root.open .modal { transform: none; opacity: 1; }
.modal-wide { width: min(100%, 660px); }

.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.modal-title { font-size: 1.25rem; font-weight: 650; line-height: 1.2; }
.modal-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; }

/* ─────────────── Оплата ─────────────── */

.checkout-sum { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; background: var(--surface-2); margin-bottom: 18px; }
.sum-row { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; padding: 4px 0; color: var(--muted); }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; color: var(--text); font-weight: 650; font-size: 1.1rem; }

.card-visual {
  border-radius: 14px;
  padding: 18px;
  height: 150px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-chip { width: 34px; height: 25px; border-radius: 5px; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.card-number { font-family: var(--mono); font-size: 16px; letter-spacing: 0.1em; }
.card-bottom { display: flex; justify-content: space-between; align-items: flex-end; font-size: 11px; }
.card-holder { text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; }

.pay-note { font-size: 12px; color: var(--faint); line-height: 1.5; margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }

.success-mark {
  width: 60px; height: 60px;
  margin: 4px auto 16px;
  border-radius: 50%;
  border: 2px solid var(--green);
  display: grid;
  place-items: center;
}
.success-mark svg { stroke: var(--green); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ─────────────── Тосты ─────────────── */

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  font-size: 13.5px;
  max-width: 340px;
  animation: toast-in 0.25s var(--ease);
  pointer-events: auto;
}
.toast.out { animation: toast-out 0.2s var(--ease) forwards; }
.toast b { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.toast.err b { background: var(--rose); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ─────────────── Пустое состояние и скелетон ─────────────── */

.empty { text-align: center; padding: 46px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); }
.empty-title { font-weight: 650; font-size: 1.05rem; color: var(--text); margin-bottom: 6px; }

.skeleton { border-radius: var(--radius-md); background: var(--surface-2); position: relative; overflow: hidden; }
.skeleton::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 6%, transparent), transparent);
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ─────────────── Прочее ─────────────── */

.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.gap-16 { gap: 16px; }
.wrapf { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.8px; }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.grow { flex: 1; }

.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12.7px;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--line-strong); color: var(--text); }
.filter-chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Футер */
.footer { border-top: 1px solid var(--line); padding: 44px 0 28px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-col h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 13px; font-weight: 600; }
.footer-col a { display: block; color: var(--muted); font-size: 13.5px; padding: 4px 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12.5px;
}

/* ─────────────── Адаптив ─────────────── */

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }
  .side.open { transform: none; box-shadow: 30px 0 60px -30px rgba(0, 0, 0, 0.3); }
  .main { padding-top: 70px; }
  .week { grid-template-columns: 1fr; }
  .day { min-height: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: 10px 20px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    transition: transform 0.3s var(--ease);
    margin: 0;
  }
  .nav-links.open { transform: none; }
  .nav-link { padding: 12px 4px; font-size: 16px; }
  .nav-link-mobile { display: block; border-top: 1px solid var(--line); }
  .burger { display: block; margin-left: auto; }
  .nav-cta { display: none; }
  .nav-inner { gap: 14px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .step { grid-template-columns: 36px 1fr; }
  .step > .btn { grid-column: 1 / -1; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 600px; }
}
