/* Нейтральный стиль до фирменного (Этап 4, brand/). Светлая и тёмная тема — по настройке системы. */
:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #17171c;
  --muted: #5d5d69;
  --border: #e2e2e7;
  --primary: #1f5fae;
  --primary-text: #ffffff;
  --warn-bg: #fff7e6;
  --warn-text: #7a4a00;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e12;
    --surface: #17171d;
    --text: #ececf1;
    --muted: #a3a3b0;
    --border: #2c2c36;
    --primary: #7fb0ea;
    --primary-text: #0e0e12;
    --warn-bg: #2d2410;
    --warn-text: #fbd38d;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
a { color: var(--primary); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.site-nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 8px 0; }
.site-nav a:hover { color: var(--text); }

.hero { padding-top: 64px; padding-bottom: 40px; text-align: center; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.15; margin: 0 0 16px; }
.hero p { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 12px; font-weight: 600; text-decoration: none; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-top: 24px; padding-bottom: 56px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.card h2, .card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

.doc { padding-top: 40px; padding-bottom: 64px; }
.doc h1 { font-size: 32px; line-height: 1.2; margin: 0 0 8px; }
.doc h2 { font-size: 21px; margin: 32px 0 8px; }
.doc .meta { color: var(--muted); margin: 0 0 20px; }
.doc li { margin: 4px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.draft {
  background: var(--warn-bg); color: var(--warn-text); border-radius: 12px; padding: 12px 16px; margin: 0 0 24px; font-size: 15px;
}

.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); }
.langs { display: flex; gap: 12px; }
.center { text-align: center; }

/* Пополнение криптовалютой (/topup/) */
.topup .card { margin: 16px 0; }
.topup .row { display: flex; gap: 8px; margin-top: 12px; }
.topup input { flex: 1; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.topup .found { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; }
.topup .found img { border-radius: 50%; object-fit: cover; }
.topup .packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.topup .package { flex-direction: column; min-height: 72px; cursor: pointer; }
.topup .package span { color: var(--muted); font-weight: 400; }
.topup .notice { padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.topup .small { font-size: 13px; }
.muted { color: var(--muted); }

/* Просмотр эфира в браузере (/live/) */
.live .card { margin: 16px 0; }
.live .found { display: flex; align-items: center; gap: 12px; }
.live .found img { border-radius: 50%; object-fit: cover; }
.live .player, .live .cover { width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; margin-top: 12px; border-radius: 16px; background: #000; object-fit: cover; overflow: hidden; }
.live .player video { width: 100%; height: 100%; object-fit: contain; }

/* Приглашение /r/<код> */
.code-box { display: flex; gap: .5rem; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 1.1rem; }
.code-box strong { letter-spacing: .08em; }
