/* ==========================================================================
   Дизайн «Ваучер».
   Цвета и шрифты — в :root. Ваучер (.voucher) и чек (.receipt) — фирменные элементы.
   ========================================================================== */
:root {
  --paper: #eef0f5;        /* фон страницы */
  --card: #ffffff;         /* ваучеры, чек, панели */
  --ink: #141a33;          /* основной текст */
  --muted: #5d6483;        /* вторичный текст */
  --line: #d9ddea;         /* перфорация, разделители */
  --tint: #e3e7f3;         /* мягкие подложки */
  --cobalt: #2f4bff;       /* действия, выбранный тариф */
  --cobalt-ink: #1f33c7;
  --cobalt-soft: #e6eaff;
  --mint: #12a37a;         /* «оплачен», «выполнен» */
  --mint-soft: #dcf4ec;
  --amber-soft: #fff3d6;
  --red: #d92f45;
  --red-soft: #fde4e8;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Onest", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --stub: 128px;           /* ширина корешка ваучера с ценой */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--cobalt); text-decoration: none; }
a:hover { color: var(--cobalt-ink); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.main { flex: 1; width: 100%; padding-top: 28px; padding-bottom: 88px; }
.label { display: block; font-weight: 600; font-size: 15px; color: var(--ink); margin: 0 0 10px; }
.hint { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.note { font-size: 15px; background: var(--amber-soft); border-radius: 12px; padding: 12px 14px; margin: 14px 0 0; }
.page-title { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 22px; }
.section-title { font-size: clamp(22px, 2.6vw, 28px); margin: 0 0 18px; }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 var(--text); color: #fff; background: var(--cobalt);
  border: 0; border-radius: 12px; padding: 14px 20px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--cobalt-ink); color: #fff; text-decoration: none; }
.btn:disabled { background: #a7b0d6; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.sm { padding: 10px 14px; font-size: 15px; }
.btn.wide { width: 100%; }
.btn-pay { width: 100%; padding: 18px; font-size: 18px; border-radius: 14px; }

.field { display: block; margin: 0 0 16px; font-weight: 600; font-size: 15px; }
.field input, .field textarea {
  display: block; width: 100%; margin-top: 8px; padding: 14px 16px;
  font: 400 16px/1.4 var(--text); color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; outline: none;
}
.field input::placeholder { color: #9aa1bd; }
.field input:focus { border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-soft); }
.field input.code { font: 600 28px/1 var(--display); letter-spacing: .3em; text-align: center; padding: 18px 10px; }

.msg { padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; background: var(--amber-soft); }
.msg.error { background: var(--red-soft); color: #8a1426; }
.msg.success { background: var(--mint-soft); color: #0b5e46; }

/* ---------- шапка ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(238, 240, 245, .9); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 700 19px/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.logo:hover { color: var(--ink); text-decoration: none; }
/* знак — маленький ваучер с вырезами */
.logo-mark { width: 36px; height: 25px; flex: none; display: block; }
.logo-word { white-space: nowrap; }
.logo .tld { color: var(--cobalt); }
.footer .logo .tld { color: #6f8cff; }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; color: var(--muted); }
.search:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: 500 16px var(--text); color: var(--ink); }
.search input::placeholder { color: #8e95b3; }
.topnav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.topnav a:not(.btn) { color: var(--ink); font-weight: 500; white-space: nowrap; }
.topnav a:not(.btn):hover { color: var(--cobalt); text-decoration: none; }

/* ---------- ВАУЧЕР ----------
   Карточка с вырезами сверху и снизу на линии перфорации и «корешком» справа. */
.voucher {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--stub);
  background: var(--card); color: var(--ink); border-radius: 16px;
  -webkit-mask: radial-gradient(circle 11px at calc(100% - var(--stub)) 0, #0000 96%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 11px at calc(100% - var(--stub)) 100%, #0000 96%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 11px at calc(100% - var(--stub)) 0, #0000 96%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 11px at calc(100% - var(--stub)) 100%, #0000 96%, #000) bottom / 100% 51% no-repeat;
}
a.voucher:hover { text-decoration: none; color: var(--ink); background: #f7f8fc; }
.v-body { padding: 18px 20px; min-width: 0; }
.v-stub {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 14px 10px; text-align: center;
  background-image: linear-gradient(var(--line) 50%, transparent 0); background-size: 2px 10px;
  background-repeat: repeat-y; background-position: left top; /* перфорация */
}
.v-price { font: 600 19px/1.1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.v-from { font-size: 13px; color: var(--muted); }
.v-tag { font-size: 12px; font-weight: 700; color: var(--cobalt); background: var(--cobalt-soft); border-radius: 999px; padding: 3px 10px; display: inline-block; }

/* иконка сервиса */
.ico {
  width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center; overflow: hidden;
  background: var(--c, var(--cobalt)); color: #fff; font: 700 22px/1 var(--display);
}
.ico img { width: 100%; height: 100%; object-fit: cover; }
.ico.sm { width: 40px; height: 40px; border-radius: 11px; font-size: 17px; }
.ico.lg { width: 84px; height: 84px; border-radius: 22px; font-size: 36px; }

/* ---------- главная ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; padding: 28px 0 44px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; margin-bottom: 18px; max-width: 13em; }
.hero-lead { font-size: 19px; color: var(--muted); max-width: 32em; margin-bottom: 26px; }
.hero-search { display: flex; gap: 10px; max-width: 560px; }
.hero-search .search { max-width: none; height: 58px; font-size: 17px; }
.hero-search .btn { height: 58px; padding: 0 24px; }
.hero-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-quick a { font-size: 15px; font-weight: 500; color: var(--ink); background: var(--card); border-radius: 999px; padding: 7px 14px; }
.hero-quick a:hover { color: var(--cobalt); text-decoration: none; }
/* веер из популярных ваучеров */
.fan { position: relative; height: 330px; }
.fan .voucher { position: absolute; left: 8%; right: 0; --stub: 118px; box-shadow: none; }
.fan .voucher:nth-child(1) { top: 0; transform: rotate(-5deg); }
.fan .voucher:nth-child(2) { top: 104px; left: 0; right: 6%; transform: rotate(2.5deg); }
.fan .voucher:nth-child(3) { top: 208px; left: 12%; right: -2%; transform: rotate(-1.5deg); }
.fan .voucher:hover { z-index: 2; }
.fan-wrap { filter: drop-shadow(0 18px 30px rgba(20, 26, 51, .12)); }
.v-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.v-title { font-weight: 700; font-size: 17px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.v-sub { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.promos { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-bottom: 52px; scrollbar-width: thin; }
.promo {
  scroll-snap-align: start; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 150px; padding: 22px 24px; border-radius: 18px; color: #fff; background: var(--c); overflow: hidden;
}
.promo:hover { color: #fff; text-decoration: none; filter: brightness(1.05); }
.promo h3 { font-size: 21px; margin: 6px 0 6px; }
.promo p { margin: 0; opacity: .9; font-size: 15px; }
.promo .p-tag { font-size: 13px; font-weight: 600; opacity: .85; }
.promo img { max-height: 120px; max-width: 40%; object-fit: contain; }
.promo .p-go { display: inline-block; margin-top: 14px; font-weight: 700; border-bottom: 2px solid rgba(255, 255, 255, .6); }

.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.catalog-head .section-title { margin: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.tab { font: 500 15px var(--text); color: var(--ink); background: transparent; border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.tab:hover { background: var(--tint); }
.tab[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tab span { color: inherit; opacity: .55; margin-left: 4px; }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.services .voucher[hidden] { display: none; }
.services .v-body { display: flex; align-items: center; gap: 14px; }
.empty { padding: 28px; border-radius: 16px; background: var(--card); color: var(--muted); }
.invite ~ .empty { max-width: 860px; }

.how { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--card); border-radius: 20px; overflow: hidden; }
.how li { list-style: none; padding: 26px 28px; position: relative; }
.how li + li { border-left: 1.5px dashed var(--line); }
.how b { display: block; font: 600 17px/1.3 var(--display); margin: 10px 0 6px; }
.how p { margin: 0; color: var(--muted); font-size: 15px; }
.how .n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cobalt-soft); color: var(--cobalt); font: 700 15px var(--display); }
.how-wrap { padding: 0; }

/* ---------- страница сервиса ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--cobalt); }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.svc-head { display: flex; gap: 22px; align-items: center; margin-bottom: 26px; }
.svc-head h1 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 6px; }
.svc-head p { margin: 0; color: var(--muted); font-size: 17px; }
.svc-over { font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.related { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 26px; }
.related a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; background: var(--card); border-radius: 999px; color: var(--ink); font-size: 15px; font-weight: 500; }
.related a:hover { color: var(--cobalt); text-decoration: none; }
.related .ico { width: 28px; height: 28px; border-radius: 50%; font-size: 12px; }

/* тарифы — ваучеры, выбираются целиком */
.tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 0 0 8px; padding: 0; border: 0; }
.tariffs legend { grid-column: 1 / -1; padding: 0; margin-bottom: 12px; }
.tariff { cursor: pointer; --stub: 128px; }
.tariff .t-feat { flex-direction: column; gap: 8px; }
.tariff input { position: absolute; opacity: 0; pointer-events: none; }
.tariff .v-body { padding: 20px 22px; }
.t-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 600 19px/1.25 var(--display); letter-spacing: -.01em; }
.t-badge { font: 700 12px/1 var(--text); letter-spacing: .02em; color: #fff; background: #ff6a3d; border-radius: 6px; padding: 5px 8px; }
.t-short { color: var(--muted); font-size: 15px; margin-top: 4px; }
.t-feat { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; }
.t-feat li { position: relative; padding-left: 22px; }
.t-feat li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 10px; height: 5px; border: solid var(--cobalt); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.t-radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b7bdd6; margin-top: 8px; display: grid; place-items: center; }
.tariff:hover { background: #f7f8fc; }
.tariff:has(input:checked) { background: var(--cobalt); color: #fff; }
.tariff:has(input:checked) .t-short, .tariff:has(input:checked) .v-from { color: rgba(255, 255, 255, .78); }
.tariff:has(input:checked) .t-feat li::before { border-color: #fff; }
.tariff:has(input:checked) .v-stub { background-image: linear-gradient(rgba(255, 255, 255, .45) 50%, transparent 0); }
.tariff:has(input:checked) .t-radio { border-color: #fff; background: #fff; }
.tariff:has(input:checked) .t-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cobalt); }
.tariff:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.tariff.off { cursor: not-allowed; opacity: .55; }

.details { background: var(--card); border-radius: 18px; padding: 24px; margin-top: 18px; }
.details[hidden] { display: none; }
.details h2 { font-size: 19px; margin: 0 0 10px; }
.details h2 + .desc { margin-bottom: 18px; }
.desc { color: #2c3352; }
.desc p:last-child { margin-bottom: 0; }
.seo-text { margin-top: 40px; color: #2c3352; max-width: 70ch; }

/* ---------- ЧЕК (панель заказа) ---------- */
.receipt-wrap { position: sticky; top: 100px; filter: drop-shadow(0 16px 30px rgba(20, 26, 51, .10)); }
.receipt {
  background: var(--card); border-radius: 18px 18px 0 0; padding: 26px 26px 40px;
  --z: 14px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--z) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--z) 100%;
}
.receipt h2 { font-size: 20px; margin: 0 0 16px; }
.r-item { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 2px dashed var(--line); }
.r-item b { display: block; font-size: 18px; line-height: 1.3; }
.r-item span { color: var(--muted); font-size: 15px; }
.r-line { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 16px; }
.r-line::after { content: none; }
.r-line .dots { flex: 1; border-bottom: 2px dotted #c2c8dc; transform: translateY(-4px); }
.r-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 14px; margin: 6px 0 18px; border-top: 2px dashed var(--line); }
.r-total span { font-weight: 600; }
.r-total b { font: 700 34px/1 var(--display); letter-spacing: -.03em; }
.r-bonus { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--mint-soft); cursor: pointer; }
.r-bonus input { width: 20px; height: 20px; margin: 0; accent-color: var(--mint); flex: none; }
.r-bonus span { flex: 1; font-weight: 600; font-size: 15px; }
.r-bonus small { display: block; font-weight: 400; font-size: 13px; color: #2c5b4c; }
.r-bonus b { font: 600 16px var(--display); color: #0b6b4f; white-space: nowrap; }
.r-bonus:has(input:not(:checked)) b { opacity: .45; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 16px; font-size: 15px; cursor: pointer; }
.agree input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--cobalt); flex: none; }
.r-alt { display: block; text-align: center; margin-top: 14px; font-weight: 500; }
.r-note { font-size: 14px; color: var(--muted); margin: 14px 0 0; text-align: center; }

/* нижняя панель оплаты на телефоне */
.paybar { display: none; }

/* ---------- заказ: ваучер с кодом ---------- */
.order-page { max-width: 760px; margin: 0 auto; }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.order-top h1 { font-size: clamp(24px, 3vw, 32px); }
.status { display: inline-block; font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--tint); color: var(--ink); white-space: nowrap; }
.status.paid, .status.done { background: var(--mint-soft); color: #0b6b4f; }
.status.processing { background: var(--cobalt-soft); color: var(--cobalt-ink); }
.status.no_stock, .status.new { background: var(--amber-soft); color: #7a5300; }
.status.refunded, .status.canceled { background: var(--red-soft); color: #8a1426; }
.code-voucher { --stub: 150px; margin: 6px 0 16px; }
.code-voucher .v-body { padding: 22px 24px; }
.goods { margin: 8px 0 0; font: 600 18px/1.45 var(--mono); white-space: pre-wrap; word-break: break-all; color: var(--ink); }
.copy { font: 600 14px var(--text); }
.panel { background: var(--card); border-radius: 18px; padding: 26px; }
.panel + .panel { margin-top: 14px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---------- кабинет, вход, служебные ---------- */
.product { background: var(--card); border-radius: 18px; padding: 28px; max-width: 760px; }
.product h1 { font-size: 28px; margin: 0 0 12px; }
.narrow { max-width: 460px; margin: 12px auto 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1.5px solid var(--line); }
.acc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 860px; margin-bottom: 18px; }
.acc-head h1 { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 4px; }
.acc-head form { margin: 0; }
.orders, .list { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.orders .voucher { --stub: 170px; }
.orders .v-body b { display: block; font-size: 17px; }
.orders .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; margin-top: 4px; }
.list .voucher .v-body { display: flex; align-items: center; gap: 14px; }
.linkbox { max-width: 860px; margin-top: 22px; padding: 16px 18px; border-radius: 14px; background: var(--tint); font-size: 15px; }

/* ---------- подвал ---------- */
.footer { background: var(--ink); color: #c9cde0; }
.footer a { color: #fff; }
.footer-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-top: 40px; padding-bottom: 44px; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer p { max-width: 380px; font-size: 15px; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: space-between; padding-top: 18px; padding-bottom: 26px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13.5px; color: #9aa0bd; }
.footer-bottom a { color: #c9cde0; }

/* ---------- документ (политика, условия) ---------- */
.doc { overflow-wrap: anywhere; max-width: 820px; margin: 32px auto 56px; background: var(--card); border-radius: 22px; padding: 40px 44px; }
.doc h1 { margin: 0 0 6px; }
.doc .doc-date { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 21px; margin: 32px 0 12px; }
.doc p, .doc li { line-height: 1.6; }
.doc ul { padding-left: 22px; margin: 8px 0 14px; }
.doc li { margin-bottom: 6px; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.doc-toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--cobalt-soft); color: var(--cobalt); font-size: 14px; }
@media (max-width: 640px) { .doc { padding: 26px 18px; margin: 16px 0 32px; border-radius: 16px; } }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .fan { display: none; }
  .svc { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
  .topnav a:not(.btn) { display: none; }
}
@media (max-width: 860px) {
  .svc { grid-template-columns: 1fr; }
  .receipt-wrap { position: static; margin-top: 8px; }
  .how { grid-template-columns: 1fr; }
  .how li + li { border-left: 0; border-top: 1.5px dashed var(--line); }
  /* панель оплаты внизу экрана, пока чек не на экране */
  .paybar {
    display: flex; align-items: center; gap: 14px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line);
    transition: transform .2s ease;
  }
  .paybar.away { transform: translateY(110%); }
  .paybar div { flex: 1; min-width: 0; }
  .paybar b { display: block; font: 700 20px/1.1 var(--display); white-space: nowrap; }
  .paybar .p-name { display: block; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .has-paybar .footer { padding-bottom: 80px; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .topbar-in { height: auto; flex-wrap: wrap; gap: 10px 14px; padding-top: 12px; padding-bottom: 12px; }
  .topbar .search { order: 3; flex-basis: 100%; max-width: none; height: 46px; }
  .topnav .btn span { display: none; }
  .topnav .btn { padding: 10px 12px; }
  .main { padding-top: 18px; }
  .hero { padding: 10px 0 28px; }
  .hero-lead { font-size: 17px; }
  .hero-search .btn { display: none; }
  .services { grid-template-columns: 1fr; }
  .voucher { --stub: 104px; }
  .tariff { --stub: 112px; }
  .v-body, .tariff .v-body { padding: 16px; }
  .v-price { font-size: 17px; }
  .t-name { font-size: 17px; }
  .t-feat { flex-direction: column; }
  .svc-head { gap: 14px; }
  .ico.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 28px; }
  .receipt { padding: 22px 20px 36px; }
  .details, .panel, .product { padding: 20px; }
  .orders .voucher { --stub: 120px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- пригласить друга ---------- */
.invite { max-width: 860px; margin: 0 0 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; background: var(--card); border-radius: 18px; overflow: hidden; }
.invite-main { padding: 24px 26px; }
.invite-main h2 { font-size: 21px; margin: 0 0 6px; }
.invite-main > p { color: var(--muted); margin: 0 0 16px; }
.invite-side { padding: 24px 26px; min-width: 210px; display: flex; flex-direction: column; justify-content: center; gap: 4px; text-align: center;
  background-image: linear-gradient(var(--line) 50%, transparent 0); background-size: 2px 10px; background-repeat: repeat-y; background-position: left top; }
.invite-side b { font: 700 30px/1.1 var(--display); letter-spacing: -.02em; }
.invite-side span { color: var(--muted); font-size: 14px; }
.copy-row { display: flex; gap: 8px; margin-top: 10px; }
.copy-row input { flex: 1; min-width: 0; padding: 11px 14px; font: 500 15px var(--text); color: var(--ink); background: var(--paper); border: 0; border-radius: 10px; }
.invite-stats { display: flex; gap: 22px; margin-top: 16px; font-size: 15px; color: var(--muted); }
.invite-stats b { color: var(--ink); }
.history { max-width: 860px; margin-top: 28px; }
.history h2 { font-size: 19px; margin-bottom: 10px; }
.history table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; font-size: 15px; }
.history td { padding: 12px 16px; border-top: 1px solid var(--tint); }
.history tr:first-child td { border-top: 0; }
.history .plus { color: #0b6b4f; font-weight: 700; text-align: right; white-space: nowrap; }
.history .minus { color: var(--ink); font-weight: 700; text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .invite { grid-template-columns: 1fr; }
  .invite-main, .invite-side { padding: 20px; }
  .invite-side { background-image: linear-gradient(90deg, var(--line) 50%, transparent 0); background-size: 10px 2px; background-repeat: repeat-x; }
  .copy-row { flex-direction: column; }
}

/* ---------- проверка перед оплатой ---------- */
.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--paper); cursor: pointer; font-size: 15px; line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--mint); }
.check:has(input:checked) { background: var(--mint-soft); }
.check:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.linkish { font: inherit; font-weight: 600; color: var(--cobalt); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.r-missing { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: #8a5a00; text-align: center; }
.btn-pay:disabled { background: #b9c1e6; }

.steps { margin-top: 18px; background: var(--card); border-radius: 18px; padding: 24px; }
.steps h2 { font-size: 19px; margin-bottom: 12px; }
.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt-soft); color: var(--cobalt); font: 700 13px/1 var(--display); margin-top: -2px; }

dialog.rules { width: min(640px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: var(--card); box-shadow: 0 30px 80px rgba(20, 26, 51, .35); }
dialog.rules::backdrop { background: rgba(20, 26, 51, .55); }
dialog.rules form { display: flex; flex-direction: column; max-height: inherit; }
.rules-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 24px 10px; }
.rules-head h2 { font-size: 21px; }
.rules .close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper); font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.rules-body { padding: 4px 24px 8px; overflow-y: auto; font-size: 15px; line-height: 1.6; }
.rules-confirmed { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--mint-soft); }
.rules-confirmed h3 { font: 600 15px var(--text); margin: 0 0 6px; }
.rules-confirmed ul { margin: 0; padding-left: 20px; }
.rules-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 22px; border-top: 1px solid var(--tint); }
@media (max-width: 640px) { .rules-foot { flex-direction: column-reverse; } .rules-foot .btn { width: 100%; } }

/* ---------- памятка «Проверьте аккаунт» ---------- */
.cl-intro { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; align-items: center; padding: 6px 0 36px; }
.cl-intro h1 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; margin-bottom: 14px; max-width: 14em; }
.cl-lead { font-size: 18px; color: var(--muted); max-width: 34em; margin-bottom: 22px; }
.cl-warning { background: var(--amber-soft); border-radius: 18px; padding: 24px; }
.cl-warning b { display: block; font: 600 19px/1.3 var(--display); margin-bottom: 8px; }
.cl-warning p { margin: 0; color: #5c4300; }
.cl-steps { display: flex; flex-direction: column; gap: 16px; }
.cl-step { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; align-items: start; background: var(--card); border-radius: 20px; padding: 26px; }
.cl-step.no-image { grid-template-columns: 56px minmax(0, 1fr); }
.cl-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt); color: #fff; font: 700 18px/1 var(--display); }
.cl-kind { font-size: 14px; font-weight: 600; color: var(--cobalt); margin-bottom: 4px; }
.cl-copy h2 { font-size: 22px; margin-bottom: 10px; }
.cl-check { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--paper); font-size: 15px; }
.cl-check b { display: block; margin-bottom: 4px; }
.cl-check p:last-child { margin-bottom: 0; }
.cl-points { flex-direction: column; margin-top: 6px; }
.cl-figure { margin: 0; }
.cl-figure img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.cl-figure figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.cl-tag { display: inline-block; margin-right: 8px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--tint); color: var(--ink); }
.cl-tag.err { background: var(--red-soft); color: #8a1426; }
.cl-final { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 22px; padding: 24px 26px; border-radius: 20px; background: var(--ink); color: #fff; }
.cl-final h2 { font-size: 21px; margin-bottom: 4px; }
.cl-final p { margin: 0; color: #c9cde0; }
.cl-final .btn { background: #fff; color: var(--ink); }
.precheck { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; margin: 0 0 18px; border-radius: 14px; background: var(--amber-soft); }
.precheck b { display: block; font-weight: 700; }
.precheck span { font-size: 14px; color: #5c4300; }
@media (max-width: 900px) {
  .cl-intro { grid-template-columns: 1fr; }
  .cl-step, .cl-step.no-image { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- чат на сайте ---------- */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 50; }
.chat-fab { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--cobalt); color: #fff; cursor: pointer; box-shadow: 0 12px 28px rgba(47, 75, 255, .4); display: grid; place-items: center; }
.chat-fab svg { width: 28px; height: 28px; }
.chat-fab:hover { background: var(--cobalt-ink); }
.chat-fab.on { background: var(--ink); }
.chat-dot { position: absolute; top: 10px; right: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid var(--cobalt); }
.chat-panel { position: absolute; right: 0; bottom: 74px; width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(20, 26, 51, .28); }
.chat-panel[hidden] { display: none; }  /* иначе display:flex перебивает атрибут hidden и окно открыто всегда */
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; background: var(--cobalt); color: #fff; }
.chat-head b { font: 600 16px var(--display); display: block; }
.chat-head span { font-size: 13px; opacity: .85; }
.chat-close { background: rgba(255, 255, 255, .18); border: 0; color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.chat-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 15px; line-height: 1.4; position: relative; word-wrap: break-word; }
.chat-msg time { display: block; font-size: 11px; opacity: .6; margin-top: 3px; }
.chat-msg.out { align-self: flex-end; background: var(--cobalt); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.in { align-self: flex-start; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--card); }
.chat-form input { flex: 1; min-width: 0; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; outline: none; }
.chat-form input:focus { border-color: var(--cobalt); }
.chat-form button { flex: none; width: 44px; border: 0; border-radius: 12px; background: var(--cobalt); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-form button:hover { background: var(--cobalt-ink); }
@media (max-width: 640px) {
  .chat { right: 14px; bottom: 14px; }
  .chat-panel { bottom: 70px; height: 70vh; }
  .has-paybar .chat { bottom: 78px; }
}

/* чат: форма входа для гостей */
.chat-gate { flex: 1; overflow-y: auto; padding: 24px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--paper); }
.chat-gate-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--cobalt-soft); color: var(--cobalt); display: grid; place-items: center; margin-bottom: 2px; }
.chat-gate-ic svg { width: 26px; height: 26px; }
.chat-gate b { font: 600 18px var(--display); }
.chat-gate p { font-size: 14px; color: var(--muted); margin: 0; }
.chat-gate form { width: 100%; margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.chat-gate input { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; outline: none; text-align: center; }
.chat-gate input:focus { border-color: var(--cobalt); }
.chat-gate > a { font-size: 14px; }
.chat-gate-msg { min-height: 0; font-size: 14px; }
.chat-gate-msg.ok { color: #0b6b4f; }
.chat-gate-msg:not(.ok):not(:empty) { color: var(--red); }

/* ---------- пополнение по сумме (Steam) ---------- */
.topup-head { background: linear-gradient(120deg, color-mix(in srgb, var(--c) 32%, #0b1016) 0%, #10151d 78%); color: #fff; }
.topup-head p { color: #c7cdd9; }
.topup-head .ico.lg { background: var(--c); }
.topup-panel { padding: 24px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; cursor: pointer; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-block; padding: 10px 16px; border-radius: 12px; background: var(--paper); border: 1.5px solid var(--line); font-weight: 600; font-size: 15px; }
.chip-radio:hover span { border-color: #b7bdd6; }
.chip-radio input:checked + span { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.chip-radio input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.topup-minmax { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-top: 8px; }
.topup-panel input[type=number]::-webkit-outer-spin-button,
.topup-panel input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.topup-panel input[type=number] { -moz-appearance: textfield; }
.r-line b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }

/* FAQ */
.faq { margin-top: 18px; background: var(--card); border-radius: 18px; padding: 10px 24px; }
.faq h2 { font-size: 19px; margin: 16px 0 6px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "⌄"; font-size: 20px; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details > div { padding: 0 0 16px; color: #2c3352; }
