/* Adenex — токены бренда (docs/brand.md). Тёмная тема по умолчанию, светлая — по системе или переключателю. */
:root {
  --bg: #0D1115; --bg-2: #141A20; --card: #171E25; --line: #253039;
  --text: #EEF1F4; --muted: #8C99A6;
  --gold: #F3BB34; --gold-2: #FDD94C; --gold-text: #FDD94C; --gold-ink: #1A1204;
  --emerald: #1FCB5C; --ruby: #F0506E;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --hero-img: url("/brand/hero/dark-1600x1000.webp"); --hero-img-m: url("/brand/hero/dark-800x1000.webp");
  --hero-fade: linear-gradient(90deg, rgba(13,17,21,.96) 0%, rgba(13,17,21,.82) 38%, rgba(13,17,21,.1) 75%);
  --hero-fade-m: linear-gradient(0deg, rgba(13,17,21,1) 42%, rgba(13,17,21,.55) 62%, rgba(13,17,21,0) 85%);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F7F5F0; --bg-2: #EFEBE2; --card: #FFFFFF; --line: #E3DED3;
    --text: #14181C; --muted: #5E6873;
    --gold-text: #9A6408; --emerald: #0F7A3A; --ruby: #C9304B;
    --shadow: 0 8px 30px rgba(60, 45, 10, .10);
    --hero-img: url("/brand/hero/light-1600x1000.webp"); --hero-img-m: url("/brand/hero/light-800x1000.webp");
    --hero-fade: linear-gradient(90deg, rgba(247,245,240,.95) 0%, rgba(247,245,240,.78) 38%, rgba(247,245,240,0) 72%);
    --hero-fade-m: linear-gradient(0deg, rgba(247,245,240,1) 42%, rgba(247,245,240,.6) 62%, rgba(247,245,240,0) 85%);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F7F5F0; --bg-2: #EFEBE2; --card: #FFFFFF; --line: #E3DED3;
  --text: #14181C; --muted: #5E6873;
  --gold-text: #9A6408; --emerald: #0F7A3A; --ruby: #C9304B;
  --shadow: 0 8px 30px rgba(60, 45, 10, .10);
  --hero-img: url("/brand/hero/light-1600x1000.webp"); --hero-img-m: url("/brand/hero/light-800x1000.webp");
  --hero-fade: linear-gradient(90deg, rgba(247,245,240,.95) 0%, rgba(247,245,240,.78) 38%, rgba(247,245,240,0) 72%);
  --hero-fade-m: linear-gradient(0deg, rgba(247,245,240,1) 42%, rgba(247,245,240,.6) 62%, rgba(247,245,240,0) 85%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--gold-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: Unbounded, Inter, sans-serif; font-weight: 700; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 4vw, 40px); }
h2 { font-size: clamp(20px, 2.6vw, 26px); }
h2.sub { font-size: 18px; margin-top: 1.6em; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.r { text-align: right; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; }
.block { padding-top: 40px; padding-bottom: 40px; }

/* Логотип: свой вариант для каждой темы */
.on-light { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .on-light { display: inline; } :root:not([data-theme="dark"]) .on-dark { display: none; } }
:root[data-theme="light"] .on-light { display: inline; }
:root[data-theme="light"] .on-dark { display: none; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; }
.logo { flex-shrink: 0; }
.logo img { height: 34px; width: auto; }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--text); font-weight: 500; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn .ic { display: none; }
.icon-btn[data-mode="auto"] .ic-auto, .icon-btn[data-mode="light"] .ic-light, .icon-btn[data-mode="dark"] .ic-dark { display: block; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; height: 38px; padding: 0 10px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-weight: 600; font-size: 13px; }
.lang summary::-webkit-details-marker { display: none; }
.lang .menu { position: absolute; right: 0; top: 44px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; min-width: 70px; }
.lang .menu a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); font-weight: 600; font-size: 13px; }
.lang .menu a[aria-current] { color: var(--gold-text); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font: 600 14px/1 Inter, sans-serif; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, #CD8D1F); color: var(--gold-ink); box-shadow: 0 4px 16px rgba(243, 187, 52, .25); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); }

/* Hero */
.hero { position: relative; min-height: 520px; display: flex; align-items: center; background: var(--hero-fade), var(--hero-img) center right / cover no-repeat; border-bottom: 1px solid var(--line); }
.hero-inner { padding-top: 60px; padding-bottom: 60px; width: 100%; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 7px 14px 7px 12px;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold-text);
  font: 700 13px/1 Inter, sans-serif; letter-spacing: .04em; text-transform: uppercase; backdrop-filter: blur(6px); }
.hero h1 { font-size: clamp(30px, 5vw, 56px); max-width: 640px; }
.lead { font-size: 18px; max-width: 520px; color: var(--muted); margin: 0 0 28px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .hero { min-height: 560px; align-items: flex-end; background: var(--hero-fade-m), var(--hero-img-m) center top / cover no-repeat; }
  .hide-sm { display: none; }
  .hero { min-height: 640px; }
}
@media (max-width: 480px) {
  .nav { display: none; }
  #install-btn { display: none !important; }  /* на телефоне установка — через шторку */
  .logo img { height: 28px; }
}

/* Карточки и сетки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
a.card { color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--gold); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.game { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.game-mark { grid-row: span 2; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font: 700 22px Unbounded, sans-serif; color: var(--gold-ink); background: linear-gradient(135deg, var(--gold-2), #CD8D1F); }
.game-name { font-weight: 700; }
.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.section { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.section-name { font-weight: 700; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.step { position: relative; }
.step img { display: block; margin-bottom: 8px; }
.step-n { position: absolute; top: 16px; right: 18px; font: 700 28px Unbounded, sans-serif; color: var(--line); }
.step p { margin: 0; }

/* Каталог */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.h1-sub { font-size: .5em; font-family: Inter, sans-serif; font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin: 10px 0 14px; }
.tabs { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tabs a { padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.tabs a[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 14px; background: var(--card); text-decoration: none !important; }
.chip b { color: var(--muted); font-weight: 600; margin-left: 4px; }
.chip[aria-current="true"], .chip:hover { border-color: var(--gold); color: var(--gold-text); }
.lots { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.lots-head, .lot-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.2fr); gap: 14px; padding: 12px 18px; align-items: center; }
.lots-head { font-size: 13px; color: var(--muted); background: var(--bg-2); }
.lot-row { color: var(--text); border-top: 1px solid var(--line); text-decoration: none !important; }
.lot-row:hover { background: var(--bg-2); }
.lot-title, .lot-price { display: flex; flex-direction: column; min-width: 0; }
.lot-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-price b { color: var(--gold-text); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); margin-right: 6px; vertical-align: middle; }
@media (max-width: 720px) {
  .lots-head { display: none; }
  .lot-row { grid-template-columns: 1fr auto; row-gap: 2px; }
  .lot-seller, .lot-qty { font-size: 13px; }
  .lot-price { grid-row: 1 / span 2; grid-column: 2; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.empty { text-align: center; padding: 30px 10px; }
.empty img { display: block; margin: 0 auto 14px; }
.small-empty { padding: 10px; }
.small-empty p { margin: 0; }

/* Лот */
.lot-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 860px) { .lot-page { grid-template-columns: 1fr; } }
.badge { display: inline-block; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.desc { white-space: pre-line; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 16px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.buy-box { position: sticky; top: 84px; display: grid; gap: 16px; }
.price b { font: 700 28px Unbounded, sans-serif; color: var(--gold-text); }
.safe { display: flex; gap: 12px; align-items: flex-start; padding-top: 14px; border-top: 1px solid var(--line); }
.safe p { margin: 2px 0 0; font-size: 14px; }

/* Вход и кабинет */
.login { text-align: center; display: grid; gap: 14px; justify-items: center; }
.login h1 { font-size: 24px; margin: 0; }
.code-form { width: 100%; text-align: left; display: grid; gap: 6px; }
.code-form label { font-weight: 600; font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 600 16px Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.row input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.code-form .row .btn { height: 44px; }
.alert { width: 100%; margin: 0; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--ruby) 14%, transparent); color: var(--ruby); font-weight: 600; font-size: 14px; }
.me-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.me-grid h2.sub { margin-top: 0; }
.mini-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text); font-size: 14px; }
.mini-row:first-of-type { border-top: 0; }
.me-grid form { margin-top: 14px; }

.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot-row { display: flex; align-items: center; gap: 12px; padding-top: 22px; padding-bottom: 22px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.foot-row .muted { margin-left: auto; }

/* Формы входа и регистрации */
.stack { width: 100%; text-align: left; display: grid; gap: 8px; }
.stack label { font-weight: 600; font-size: 14px; margin-top: 4px; }
.stack input[type=email], .stack input[type=password], .stack input:not([type]), .stack input[type=text] {
  height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text); font: 500 16px Inter, sans-serif; width: 100%; }
.stack input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.code-input { letter-spacing: .12em; text-transform: uppercase; }
.code-input.big { font: 700 26px/1 "Courier New", monospace !important; letter-spacing: .4em; text-align: center; height: 56px !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500 !important; font-size: 14px !important; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex-shrink: 0; }
.row-between { display: flex; justify-content: space-between; gap: 12px; margin: 4px 0 0; }
.divider { display: flex; align-items: center; gap: 12px; width: 100%; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.more { width: 100%; text-align: left; }
.more summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; }
.more[open] summary { margin-bottom: 8px; }
.link-btn { background: none; border: 0; color: var(--gold-text); font: inherit; cursor: pointer; padding: 0; }
.notice { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--emerald) 14%, transparent); color: var(--emerald); font-weight: 600; font-size: 14px; }
.way { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.way:first-of-type { border-top: 0; }
.ok { color: var(--emerald); font-weight: 700; }
.linkbox { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--gold); border-radius: 12px; margin: 6px 0; }
.linkbox code { font-weight: 700; letter-spacing: .1em; }
.me-grid section form { margin-top: 8px; }

/* Предложение установить приложение: на телефоне — шторка снизу, на компьютере — карточка в углу */
.install { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.install-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 9, .55); opacity: 0; transition: opacity .25s; pointer-events: auto; }
.install-card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; pointer-events: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.35);
  padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display: grid; gap: 14px; }
.install.is-open .install-backdrop { opacity: 1; }
.install.is-open .install-card { transform: none; }
.install.is-desktop .install-backdrop { display: none; }
.install.is-desktop .install-card { left: auto; right: 20px; bottom: 20px; width: 380px; border-radius: 18px;
  transform: translateY(20px); opacity: 0; transition: transform .25s, opacity .25s; }
.install.is-desktop.is-open .install-card { transform: none; opacity: 1; }
.install-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: var(--bg-2); color: var(--muted); cursor: pointer; font-size: 14px; }
.install-head { display: flex; gap: 14px; align-items: center; padding-right: 30px; }
.install-head img { border-radius: 14px; box-shadow: var(--shadow); }
.install-head b { display: block; font: 700 18px/1.25 Unbounded, Inter, sans-serif; }
.install-head span { font-size: 13px; }
.install-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.install-benefits li { display: flex; gap: 12px; align-items: flex-start; }
.install-benefits li > span { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 16%, transparent); font-size: 17px; }
.install-benefits b { display: block; font-size: 14px; }
.install-benefits small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.install-mode { display: grid; gap: 10px; justify-items: center; }
.install-mode[hidden] { display: none; }
.install-steps { list-style: none; margin: 0; padding: 12px; width: 100%; display: grid; gap: 10px; background: var(--bg-2);
  border-radius: 14px; }
.install-steps li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.install-steps .n { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--gold-ink); font-weight: 700; font-size: 13px; }
.ios-ic { width: 20px; height: 20px; vertical-align: -4px; margin-left: 4px; color: #0A84FF; }
.install-arrow { margin: 0; text-align: center; }
@media (prefers-reduced-motion: reduce) { .install-card, .install-backdrop { transition: none; } }
