/* Donatix — стили сайта и кабинета.
   Спокойная рабочая палитра: нейтральный фон, один цвет бренда, семантические цвета
   для статусов. Все цвета — через переменные; тёмная тема переопределяет только их. */

/* ── Токены ───────────────────────────────────────────── */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --line: #e2e4e9;
  --line-strong: #cfd3db;
  --text: #14161b;
  --muted: #5d6372;
  --accent: #4338ca;
  --accent-hover: #3730a3;
  --accent-ink: #ffffff;
  --accent-soft: #eef0fd;
  --accent-line: #c9cdf6;
  --ok: #157347;
  --ok-soft: #e8f5ee;
  --bad: #c42b2b;
  --bad-soft: #fcecec;
  --warn: #975a00;
  --warn-soft: #fdf4e3;
  --code-bg: #16181d;
  --code-text: #e4e6eb;
  --tg: #2481cc;   --tg-soft: #e7f2fb;
  --steam: #1b2838; --steam-soft: #e9ecf0;
  --game: #c2410c; --game-soft: #fdf0e8;
  --card: #a21caf; --card-soft: #f9ebfa;
  --r: 10px;
  --r-sm: 8px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a20;
  --surface-2: #1e2229;
  --line: #2a2f38;
  --line-strong: #3a404b;
  --text: #eceef2;
  --muted: #9aa1ae;
  --accent: #8b8cf8;
  --accent-hover: #a5a6fa;
  --accent-ink: #11122a;
  --accent-soft: #1f2140;
  --accent-line: #33366b;
  --ok: #4ade80;   --ok-soft: #12261b;
  --bad: #f87171;  --bad-soft: #2b1515;
  --warn: #f5b942; --warn-soft: #2a2110;
  --code-bg: #0b0c10;
  --tg: #5cb3f0;   --tg-soft: #13253a;
  --steam: #aab8c8; --steam-soft: #1c232d;
  --game: #fb923c; --game-soft: #2c1a0e;
  --card: #e879f9; --card-soft: #2a1530;
  color-scheme: dark;
}

/* ── Основа ───────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
code, pre, .mono, .amount, .price, .value, .pill {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}
code, pre { font-size: .86em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; vertical-align: middle; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ── Шапка ────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap, .top .bar { display: flex; align-items: center; gap: 8px; height: 58px; }
.top .bar { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.08rem; color: var(--text); }
.brand:hover { color: var(--text); text-decoration: none; }
.logo { width: 28px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a:not(.btn):not(.icon-btn) { color: var(--muted); padding: 8px 10px; border-radius: var(--r-sm); font-weight: 500; }
.nav > a:not(.btn):not(.icon-btn):hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.icon-btn {
  position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.dot-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}
.only-sm { display: none; }
@media (max-width: 860px) { .hide-sm { display: none !important; } .only-sm { display: inline-grid; } }

/* ── Кнопки и поля ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px;
  border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; touch-action: manipulation;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.soft { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.dashed { border-style: dashed; }
.btn.block { width: 100%; }
.btn.lg { min-height: 48px; font-size: 1rem; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: .88rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
form.inline { display: inline; }

label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: .92rem; }
.label-caps { display: block; margin: 0 0 6px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hint { margin-top: 6px; font-size: .85rem; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit;
}
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select {
  appearance: none; padding-right: 36px; background-repeat: no-repeat; background-position: right 12px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d6372' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.filters .full { grid-column: 1 / -1; }
.filters label, .filters .label-caps { margin-top: 0; }
@media (max-width: 480px) { .filters { grid-template-columns: 1fr; } }

/* ── Поверхности ──────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card.tight { padding: 14px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.grid > .card, .list > .card, .grid > .stat { margin-top: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
@media (max-width: 480px) { .grid.two { grid-template-columns: minmax(0, 1fr); } }
.eyebrow { margin-bottom: 6px; font-size: .78rem; font-weight: 600; color: var(--accent); }

.page-hero { margin: 18px 0 14px; }
.page-hero h1 { margin: 0; }
.page-hero p { margin: 6px 0 0; color: var(--muted); }
.page-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); font-size: .9rem; }

.stat { padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stat .label { font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.stat .value { margin-top: 4px; font-size: 1.35rem; font-weight: 600; }
.stat .note { margin-top: 2px; font-size: .85rem; color: var(--muted); }
.stat.ok { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); background: var(--ok-soft); }

/* ── Статусы и сообщения ──────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--muted);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.pill { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: .8rem; }
.status { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.status .ico { width: 13px; height: 13px; }
.status.completed { background: var(--ok-soft); color: var(--ok); }
.status.failed { background: var(--bad-soft); color: var(--bad); }
.status.processing { background: var(--warn-soft); color: var(--warn); }
.flash { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.flash.error { background: var(--bad-soft); color: var(--bad); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash a { color: inherit; text-decoration: underline; }
.ok-text { color: var(--ok); font-weight: 600; }

/* ── Списки ───────────────────────────────────────────── */
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
a.item:hover { border-color: var(--line-strong); text-decoration: none; color: var(--text); }
.item .grow { flex: 1; min-width: 0; }
.item .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.item .title { font-weight: 600; }
.item .sub { margin-top: 2px; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.item .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.amount { font-weight: 600; white-space: nowrap; }
.amount.plus { color: var(--ok); }
.amount.minus { color: var(--bad); }
.link-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); font-weight: 600;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.link-row:hover { border-color: var(--line-strong); color: var(--text); text-decoration: none; }
.link-row .grow { flex: 1; min-width: 0; }
.link-row .sub { display: block; margin-top: 1px; font-weight: 400; font-size: .88rem; color: var(--muted); }
.link-row .go { color: var(--muted); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 12px; }
.section-title h2 { margin: 0; font-size: 1.15rem; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 20px 0; }

/* Иконки товаров: цветной знак на мягком фоне, по виду товара */
.tile {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent);
}
.tile.sm { width: 32px; height: 32px; }
.tile.sm .ico { width: 17px; height: 17px; }
.tile.ok, .tile.g4 { background: var(--ok-soft); color: var(--ok); }
.tile.bad { background: var(--bad-soft); color: var(--bad); }
.tile.g5, .tile.k-topup { background: var(--game-soft); color: var(--game); }
.tile.k-telegram_stars, .tile.k-telegram_premium, .tile.g2 { background: var(--tg-soft); color: var(--tg); }
.tile.k-steam_topup, .tile.k-steam_gift, .tile.g6, .tile.steam-tile { background: var(--steam-soft); color: var(--steam); }
.tile.k-gift_card, .tile.g3 { background: var(--card-soft); color: var(--card); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

pre { position: relative; margin: 0 0 1em; padding: 14px 16px; overflow-x: auto; border-radius: var(--r-sm);
  background: var(--code-bg); color: var(--code-text); line-height: 1.6; }
pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 6px; right: 12px; font-size: .72rem; color: #7d8494; }
:not(pre) > code { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); }
.keybox { white-space: pre-wrap; word-break: break-all; }

/* ── Кабинет: меню ────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; max-width: 1280px; margin: 0 auto; padding: 6px 16px 56px; }
.side { position: sticky; top: 70px; align-self: start; max-height: calc(100dvh - 84px); overflow-y: auto; }
.side h4 { margin: 18px 10px 6px; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side a.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text); font-weight: 500; }
.side a.nav-item .ico { color: var(--muted); width: 18px; height: 18px; }
.side a.nav-item .chev { display: none; }
.side a.nav-item:hover { background: var(--surface-2); text-decoration: none; }
.side a.nav-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side a.nav-item.on .ico { color: var(--accent); }
.balance-card { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.balance-card b { display: block; margin: 2px 0 10px; font: 600 1.3rem/1.2 "JetBrains Mono", ui-monospace, monospace; }
.drawer-head { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
  /* Меню на телефоне: шапка стоит, список прокручивается сам по себе (iOS прокручивает
     только внутренний блок с явной высотой, а не весь fixed-контейнер) */
  .side { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; z-index: 60; max-height: none;
    display: flex; flex-direction: column; overflow: hidden; padding: 0; background: var(--bg);
    transform: translateX(-100%); visibility: hidden; transition: transform .22s var(--ease), visibility 0s .22s; }
  .side.open { transform: none; visibility: visible; transition: transform .22s var(--ease); }
  .side-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    touch-action: pan-y; padding: 0 16px calc(40px + env(safe-area-inset-bottom)); }
  .drawer-head { display: flex; flex: none; align-items: center; justify-content: space-between;
    height: 58px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .side a.nav-item { padding: 12px; font-size: 1rem; }
  .side a.nav-item .chev { display: block; margin-left: auto; }
  .side .balance-card { display: none; }
  html.menu-open, body.menu-open { overflow: hidden; }
}

/* ── Главная ──────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 48px 0 28px; }
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.12; }
.hero .lead { max-width: 540px; font-size: 1.05rem; color: var(--muted); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; } }
.section { padding: 36px 0; }
.section-head { max-width: 640px; margin-bottom: 20px; }
.section-head p { color: var(--muted); }
.feature h3 { margin-top: 12px; }
.feature p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; color: var(--text); }
a.chip:hover { text-decoration: none; border-color: var(--line-strong); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps .num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; }
.price-card .big { margin: 8px 0 2px; font: 600 2rem/1.1 "JetBrains Mono", ui-monospace, monospace; }
.price-card.featured { border-color: var(--accent); }
.price-card .tag { margin-bottom: 8px; }
.checks { list-style: none; margin: 14px 0 18px; padding: 0; }
.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.checks .ico { margin-top: 3px; color: var(--ok); }
details.faq { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.2rem; line-height: 1; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 0 0 16px; color: var(--muted); }
.cta-card { padding: 32px 20px; text-align: center; }
.foot { margin-top: 40px; padding: 32px 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .92rem; }
.foot .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot .links a { color: var(--muted); }
.foot .brandline { color: var(--text); font-weight: 700; font-size: 1.05rem; }

/* Пример заказа на главной — настоящий интерфейс, а не картинка */
.window { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.window .chrome { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.window .url { flex: 1; }
.window .dot { display: none; }
.window .body { padding: 14px; }
.window pre { margin: 0 0 12px; font-size: .78rem; }
.window .orders { display: flex; flex-direction: column; gap: 8px; }
.window .orders .item { padding: 10px 12px; align-items: center; }

/* ── Покупка ──────────────────────────────────────────── */
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.step-head .n { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: .8rem; font-weight: 700; }
.step-head h3 { margin: 0; }
.step-head .grow-title { flex: 1; }
.summary { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.summary > div:last-child { border-bottom: 0; }
.summary > div > span:first-child { color: var(--muted); }
.summary > div > span:last-child { text-align: right; white-space: nowrap; }
.summary > div > span.wrap-text { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.summary > div.total { background: var(--surface-2); font-weight: 700; }
.summary > div.total > span { color: var(--text); font-family: inherit; }
.summary > div.total > span:last-child { color: var(--accent); font-family: "JetBrains Mono", ui-monospace, monospace; }
.card.summary { padding: 0; }

.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.pack, .pick, .cur, .paym {
  position: relative; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface);
  color: var(--text); font: inherit; cursor: pointer; transition: border-color .12s var(--ease), background .12s var(--ease);
}
.pack { padding: 10px 12px; text-align: left; }
.pack b { display: flex; align-items: center; gap: 6px; }
.pack b .ico { color: #d69e00; }
.pack span { color: var(--muted); font-size: .88rem; font-family: "JetBrains Mono", ui-monospace, monospace; }
.pack.on, .pick.on, .cur.on, .paym.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

.currencies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .currencies { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cur { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0; }
.cur input, .paym input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.cur:has(input:focus-visible), .paym:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.flag { border-radius: 2px; flex: none; }
.auth-head.steam-head { flex-wrap: wrap; }
.steam-head .btn { margin-left: auto; }

.gift-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.sticky-summary { position: sticky; top: 70px; }
@media (max-width: 900px) { .gift-grid { grid-template-columns: minmax(0, 1fr); } .sticky-summary { position: static; } }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 440px; margin-top: 12px; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 9px 12px; text-align: left; }
.pick .grow { flex: 1; min-width: 0; }
.pick b { display: block; }
.pick .sub { display: block; font-size: .86rem; color: var(--muted); }
.pick .cover { width: 104px; height: 49px; flex: none; object-fit: cover; border-radius: 6px; background: var(--surface-2); }

.paymethods { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 12px; }
.paym { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; font-weight: 500; }
.paym .sub { display: block; font-size: .8rem; color: var(--muted); }

/* Каталог с обложками поставщика */
.grid.products { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.product-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.product-card:hover { border-color: var(--line-strong); color: var(--text); text-decoration: none; }
.product-card > :not(.media) { padding: 0 4px; }
.product-card .price { font-weight: 600; font-size: 1.05rem; }
.product-card .row2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.media { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border-radius: var(--r-sm);
  display: grid; place-items: end start; padding: 10px; background: var(--surface-2); color: var(--muted); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-initials { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 2.2rem); letter-spacing: .02em; opacity: .9; }
.media:has(img) .media-initials { display: none; }
.media.k-topup { background: var(--game-soft); color: var(--game); }
.media.k-telegram_stars, .media.k-telegram_premium { background: var(--tg-soft); color: var(--tg); }
.media.k-steam_topup, .media.k-steam_gift { background: var(--steam-soft); color: var(--steam); }
.media.k-gift_card { background: var(--card-soft); color: var(--card); }
.media.banner { aspect-ratio: 21 / 7; margin-top: 14px; }
@media (max-width: 560px) {
  .grid.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-card .tile.sm { display: none; }
  .product-card .title { font-size: .92rem; }
  .product-card .muted.small { font-size: .78rem; }
  .product-card .row2 { flex-direction: column; align-items: stretch; }
  .media { aspect-ratio: 4 / 3; }
}

/* ── Вход ─────────────────────────────────────────────── */
.auth { max-width: 440px; margin: 28px auto; padding: 0 16px; }
.auth .card { padding: 24px; }
.auth-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.auth-head h2 { margin: 0; font-size: 1.3rem; }
.auth-head p { margin: 2px 0 0; color: var(--muted); }


/* ── Движение ─────────────────────────────────────────────
   Короткие, мягкие переходы: появление страницы, подъём карточек под курсором,
   плавное раскрытие FAQ и смена темы. Всё отключается при prefers-reduced-motion. */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); interpolate-size: allow-keywords; }

/* Переход между страницами: шапка и меню стоят, меняется только содержимое */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
@media (min-width: 861px) { .side { view-transition-name: side; } }
::view-transition-old(root) { animation: vt-out .16s ease both; }
::view-transition-new(root) { animation: vt-in .28s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* Появление блоков страницы по очереди */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.shell > main > *, .auth > .card, .hero > * { animation: rise .5s var(--ease-out) backwards; }
.shell > main > :nth-child(2), .hero > :nth-child(2) { animation-delay: .06s; }
.shell > main > :nth-child(3) { animation-delay: .12s; }
.shell > main > :nth-child(4) { animation-delay: .18s; }
.shell > main > :nth-child(n+5) { animation-delay: .24s; }
.grid > *, .list > * { animation: rise .45s var(--ease-out) backwards; }
.grid > :nth-child(2), .list > :nth-child(2) { animation-delay: .04s; }
.grid > :nth-child(3), .list > :nth-child(3) { animation-delay: .08s; }
.grid > :nth-child(4), .list > :nth-child(4) { animation-delay: .12s; }
.grid > :nth-child(5), .list > :nth-child(5) { animation-delay: .16s; }
.grid > :nth-child(n+6), .list > :nth-child(n+6) { animation-delay: .2s; }

/* Главная: секции проявляются при прокрутке (без JS остаются видимыми) */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal] .grid > * { animation-name: none; }
.js [data-reveal].in .grid > * { animation-name: rise; }
.window .item { animation: rise .5s var(--ease-out) .45s backwards; }
.window .item + .item { animation-delay: .7s; }

/* Карточки и ссылки поднимаются под курсором */
.product-card, .quick-tile, a.item, .link-row, .card.feature, .stat {
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s var(--ease-out);
}
@media (hover: hover) {
  .product-card:hover, .quick-tile:hover, a.item:hover, .link-row:hover, .card.feature:hover {
    transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgb(20 22 40 / .25);
  }
  .product-card:hover .media img { transform: scale(1.04); }
  .link-row:hover .go { transform: translateX(3px); color: var(--accent); }
}
.media img { transition: transform .5s var(--ease-out); }
.link-row .go { transition: transform .2s var(--ease-out), color .2s; }

.btn { transition: background .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease); }
.btn:active:not([disabled]), .icon-btn:active { transform: scale(.97); }
.btn.primary:hover { box-shadow: 0 6px 18px -8px var(--accent); }
.icon-btn { transition: background .15s var(--ease), transform .12s var(--ease); }
.theme-toggle .ico { transition: transform .4s var(--ease-out); }
.theme-toggle:hover .ico { transform: rotate(-20deg); }
.side a.nav-item { transition: background .18s var(--ease), color .18s var(--ease); }
.side a.nav-item:hover .ico { color: var(--text); }
.pack, .pick, .cur, .paym { transition: border-color .15s var(--ease), background .15s var(--ease), transform .12s var(--ease); }
.pack:active, .pick:active, .cur:active, .paym:active { transform: scale(.98); }
.flash { animation: flash-in .4s var(--ease-out) backwards; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } }
.dot-count { animation: pop .4s var(--ease-out) backwards; }
@keyframes pop { from { transform: scale(0); } 60% { transform: scale(1.15); } }

/* FAQ раскрывается по высоте; плюс поворачивается в крестик */
details.faq::details-content { height: 0; overflow: clip; transition: height .3s var(--ease-out), content-visibility .3s allow-discrete; }
details.faq[open]::details-content { height: auto; }
details.faq summary::after, details.faq[open] summary::after { content: "+"; transition: transform .25s var(--ease-out); }
details.faq[open] summary::after { transform: rotate(45deg); }

/* Быстрые действия в кабинете */
.grid.quick { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; color: var(--text); font-weight: 600;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.quick-tile:hover { color: var(--text); text-decoration: none; border-color: var(--line-strong); }
@media (max-width: 480px) { .grid.quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Смена темы — плавный переход цветов */
.theme-fade::view-transition-old(root) { animation: vt-out .3s ease both; }
.theme-fade::view-transition-new(root) { animation: vt-fade-in .3s ease both; }
@keyframes vt-fade-in { from { opacity: 0; } }

/* Каталог по играм: обложка игры от поставщика, у пакетов — только значок */
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; margin-bottom: 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--muted); }
.search input { border: 0; padding-left: 0; background: transparent; box-shadow: none !important; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.grid.games { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.game-card { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 12px; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s var(--ease-out); }
.game-card:hover { color: var(--text); text-decoration: none; border-color: var(--line-strong); }
.game-card .media { aspect-ratio: 1 / 1; }
.game-meta span { white-space: nowrap; }
.game-name { padding: 0 4px; font-weight: 600; font-size: .92rem; line-height: 1.3; overflow-wrap: anywhere; }
.game-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; padding: 0 4px; font-size: .84rem; color: var(--muted); }
@media (hover: hover) {
  .game-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgb(20 22 40 / .25); }
  .game-card:hover .media img { transform: scale(1.04); }
}
.game-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.game-head .media.cover { width: 88px; height: 88px; aspect-ratio: 1; flex: none; padding: 6px; }
.game-head .media.cover .media-initials { font-size: 1.5rem; }
.game-head h1 { margin: 0; }
.game-head p { margin: 2px 0 0; }
.chips.regions { margin-bottom: 16px; }
.grid.packs-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pack-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s var(--ease-out); }
.pack-card:hover { color: var(--text); text-decoration: none; border-color: var(--accent-line); }
.pack-name { font-weight: 600; line-height: 1.3; }
.pack-price { margin-top: auto; font: 600 1rem/1.2 "JetBrains Mono", ui-monospace, monospace; color: var(--accent); }
.pack-price small { font-size: .75rem; color: var(--muted); font-weight: 500; }
@media (hover: hover) { .pack-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgb(20 22 40 / .25); } }
@media (max-width: 480px) {
  .grid.games, .grid.packs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .game-head .media.cover { width: 64px; height: 64px; }
}
