/* =========================================================================
   Общие стили витрины и админки: токены, кнопки, поля, всплывающие панели,
   страницы инструментов, правил, кабинета и партнёрки, окна и шторки.
   Базовая тема — светлая (на ней живёт админка), акцент синий.
   Витрина (index.html, body.site) подключает ещё store.css: тёмная тема
   в стиле маркетплейса, шапка с поиском, лента баннеров, каталог, страница
   товара и нижняя панель телефона.
   Все цвета, радиусы и тени — токены в :root.
   ========================================================================= */

@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../assets/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../assets/fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

:root {
  /* поверхности */
  --bg: #eceef2;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f3;
  --line: #dfe2e8;
  --line-2: #eaecf0;
  --line-strong: #c8cdd5;

  /* текст */
  --ink: #121214;
  --ink-2: #2c2c31;
  --muted: #585c65;
  --faint: #81858e;

  /* акцент */
  --accent: #2663f0;
  --accent-600: #1f55d6;
  --accent-700: #1a47b8;
  --accent-50: #eef3ff;
  --accent-100: #d9e4ff;
  --accent-ring: rgba(38, 99, 240, .22);

  /* статусы */
  --green: #12a150;
  --green-50: #e8f7ee;
  --amber: #df8600;
  --amber-50: #fff5e2;
  --red: #e5484d;
  --red-50: #fdeced;

  /* форма */
  --r-xs: 6px;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 1px rgba(16, 24, 40, .03);
  --sh-2: 0 10px 24px -12px rgba(16, 24, 40, .22), 0 2px 5px rgba(16, 24, 40, .06);
  --sh-pop: 0 18px 44px -14px rgba(18, 18, 20, .24), 0 2px 6px rgba(18, 18, 20, .06);

  --hdr-h: 76px;          /* сколько занимает парящая шапка: отступ 12 + высота 64 */
  --container: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------------------------------- база ---------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 120px); }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.is-locked { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
[hidden] { display: none !important; }
::selection { background: var(--accent-100); color: var(--ink); }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 15px; height: 15px; }
.i-xs { width: 13px; height: 13px; }
.i-lg { width: 22px; height: 22px; }
.i-fill { fill: currentColor; stroke: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
}

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* --------------------------------- кнопки --------------------------------- */

.btn {
  --h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; line-height: 1;
  white-space: nowrap; text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .2s, transform .15s var(--ease);
}
.btn:active:not([disabled]) { transform: translateY(1px) scale(.985); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .i { width: 17px; height: 17px; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not([disabled]) { background: #2b2b31; }

.btn-accent {
  background: var(--accent); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 16px -8px rgba(38, 99, 240, .75);
}
.btn-accent:hover:not([disabled]) { background: var(--accent-600); }

.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not([disabled]) { background: var(--surface-2); border-color: var(--line-strong); }

.btn-soft { background: var(--accent-50); color: var(--accent-700); }
.btn-soft:hover:not([disabled]) { background: var(--accent-100); }

.btn-tg { background: #2aabee; color: #fff; }
.btn-tg:hover:not([disabled]) { background: #1f9bdc; }

.btn-sm { --h: 32px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.btn-lg { --h: 46px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }

.link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0; border: 0; background: none;
  color: var(--accent-700); font-weight: 600; text-decoration: none; cursor: pointer;
}
.link:hover { color: var(--accent); }
.link .i { transition: transform .2s var(--ease); }
.link:hover .i-arrow { transform: translateX(3px); }

/* ---------------------------------- поля ---------------------------------- */

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span, .field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

.input {
  width: 100%; height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input[readonly] { background: var(--surface-2); }
input[type=number].input::-webkit-inner-spin-button { opacity: .4; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .i { position: absolute; left: 12px; color: var(--faint); pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.input-wrap > .input-btn {
  position: absolute; right: 6px;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
}
.input-wrap > .input-btn:hover { background: var(--surface-3); color: var(--ink); }

.form-error { min-height: 0; margin: 0 0 10px; color: var(--red); font-size: 13px; font-weight: 500; }
.form-error:empty { display: none; }
.form-ok {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 0 12px; padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--green-50); color: #0c7a3c; font-size: 13px; font-weight: 500;
}

/* чекбокс в стиле панели: квадрат с галочкой */
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--ink-2); }
.check input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 17px; height: 17px; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: 5px;
  background: var(--surface) center / 11px no-repeat;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.check:hover input { border-color: var(--muted); }
.check input:checked {
  border-color: var(--accent); background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  animation: checkPop .25s var(--spring);
}
.check input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
@keyframes checkPop { 0% { transform: scale(.8); } 100% { transform: scale(1); } }

/* переключатель (запомнить выбор и т. п.) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 34px; height: 20px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background-color .2s; flex: none; }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--spring); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }

/* ---------------------------- бейджи и метки ------------------------------ */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px;
  border-radius: 5px;
  font-size: 11.5px; font-weight: 650; line-height: 1;
  white-space: nowrap;
}
.badge .i { width: 12px; height: 12px; }
.badge-hot { background: var(--accent); color: #fff; }
.badge-new { background: var(--green); color: #fff; }
.badge-top { background: var(--red); color: #fff; }
.badge-dark { background: var(--ink); color: #fff; }
.badge-soft { background: var(--accent-50); color: var(--accent-700); }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}

.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-ok { background: var(--green-50); color: var(--green); }
.status-wait { background: var(--amber-50); color: var(--amber); }

/* ------------------------------ плашка сверху ------------------------------ */

.announce { background: var(--ink); color: rgba(255, 255, 255, .88); font-size: 13px; }
.announce-in { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 38px; padding: 7px 48px; text-align: center; }
.announce-in .i { color: var(--accent); }
.announce a { color: var(--accent); font-weight: 650; text-decoration: none; white-space: nowrap; }
.announce a:hover { text-decoration: underline; text-underline-offset: 3px; }
.announce-x {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 26px; height: 26px;
  border: 0; border-radius: 6px; background: none; color: rgba(255, 255, 255, .55); cursor: pointer;
}
.announce-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------------------------------- шапка --------------------------------- */
/* общее для витрины и админки; сама шапка витрины — в store.css */

.hdr { position: sticky; top: 0; z-index: 50; }

.brand { justify-self: start; display: flex; align-items: center; gap: 10px; flex: none; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 6px;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 30% 20%, #2c2c33, var(--ink));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 6px 14px -6px rgba(18, 18, 20, .6);
  transition: transform .45s var(--spring);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand-text b { font-size: 17px; font-weight: 800; letter-spacing: -.025em; }
.brand-text small { color: var(--muted); font-size: 11px; font-weight: 550; }

.i-tile {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent-50); color: var(--accent);
}
.i-tile.is-dark { background: var(--ink); color: var(--accent); }

.hdr-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.hpop { position: relative; }

.is-bump { animation: bump .5s var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 100% { transform: scale(1); } }

.avatar {
  position: relative; display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #2b2b31, #121214);
  color: #fff; font-size: 14px; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 52px; height: 52px; font-size: 19px; }

/* выпадающие панели шапки */
.pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 320px; padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--sh-pop);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(.985);
  transform-origin: top right;
  transition: opacity .18s, transform .22s var(--ease), visibility 0s .22s;
}
.hpop.is-open > .pop { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.pop-title { margin-bottom: 12px; color: var(--ink); font-size: 14px; font-weight: 700; }

.lang-pop { width: 200px; padding: 6px; }
.lang-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px;
  border: 0; border-radius: 8px; background: none;
  color: var(--ink-2); font-weight: 550; text-align: left; cursor: pointer;
}
.lang-opt:hover { background: var(--surface-2); }
.lang-opt.is-active { color: var(--ink); font-weight: 700; }
.lang-opt.is-active::after { content: ''; width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--accent); }
.lang-opt img { width: 20px; height: 14px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }

/* кошелёк */
.wallet-pop { width: 340px; }
.wallet-sum { padding: 16px; border-radius: 12px; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.wallet-sum::after {
  content: ''; position: absolute; right: -40px; top: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 99, 240, .55), transparent 65%);
  pointer-events: none;
}
.wallet-sum span { position: relative; display: block; color: rgba(255, 255, 255, .6); font-size: 12px; font-weight: 500; }
.wallet-sum b { position: relative; display: block; margin: 2px 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.wallet-sum i { position: relative; color: rgba(255, 255, 255, .55); font-size: 12.5px; font-style: normal; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.quick button {
  height: 32px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--ink); font-size: 13px; font-weight: 650; cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.quick button:hover, .quick button.is-active { border-color: var(--accent); background: var(--accent-50); color: var(--accent-700); }

.coins-box { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.coins-head { display: flex; align-items: center; gap: 10px; }
.coins-head .coin { width: 30px; height: 30px; }
.coins-head b { display: block; color: var(--ink); font-size: 15px; font-weight: 750; }
.coins-head b + span { display: block; color: var(--muted); font-size: 12px; }
.coins-head em { margin-left: auto; color: var(--muted); font-size: 12.5px; font-style: normal; font-weight: 600; }
.progress { height: 6px; margin: 10px 0 8px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c5cff, var(--accent)); transition: width .6s var(--ease); }
.coins-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.coins-box.is-ready { border-color: var(--accent-100); background: var(--accent-50); }

/* профиль */
.profile-pop { width: 300px; padding: 8px; }
.profile-pop-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profile-pop-head b { display: block; color: var(--ink); font-size: 14px; }
.profile-pop-head b + span { display: block; color: var(--muted); font-size: 12px; }
.pop-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px;
  border: 0; border-radius: 8px; background: none;
  color: var(--ink-2); font-size: 13.5px; font-weight: 550; text-decoration: none; text-align: left; cursor: pointer;
}
.pop-link:hover { background: var(--surface-2); color: var(--ink); }
.pop-link .i { color: var(--muted); }
.pop-link em { margin-left: auto; color: var(--muted); font-size: 12.5px; font-style: normal; font-weight: 600; }
.pop-link.is-danger:hover { color: var(--red); }
.pop-link.is-danger:hover .i { color: var(--red); }
.pop-sep { height: 1px; margin: 6px 0; background: var(--line); }

/* --------------------------------- страницы ------------------------------- */

#view { min-height: 62vh; }
.view-in { animation: viewIn .4s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head p { margin-top: 4px; color: var(--muted); }

.page-top { padding-top: 32px; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
.page-sub { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--faint); font-size: 12.5px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-700); }

/* --------------------------------- баннеры -------------------------------- */
/* слайдер окна входа; лента баннеров на главной — в store.css */

.banner {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--ink);
  isolation: isolate;
}
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
.banner-slide.is-active { opacity: 1; z-index: 1; }
.banner-slide img, .banner-slide video { width: 100%; height: 100%; object-fit: cover; }
.banner-slide.is-active img { animation: kenburns 9s var(--ease) backwards; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1); } }

.banner-dots {
  position: absolute; left: 50%; bottom: 14px; z-index: 3;
  display: flex; gap: 6px;
  padding: 7px 9px;
  border-radius: 99px;
  background: rgba(18, 18, 20, .55);
  transform: translateX(-50%);
}
.banner-dot {
  position: relative; overflow: hidden;
  width: 7px; height: 7px; padding: 0;
  border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .35s var(--ease), background-color .2s;
}
.banner-dot.is-active { width: 24px; background: rgba(255, 255, 255, .45); }
.banner-dot.is-active::after {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; background: #fff;
  transform-origin: left; animation: dotFill var(--dur, 6s) linear both;
}
.banner-dot.is-video.is-active::after { animation: none; transform: none; }
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.banner-nav {
  position: absolute; top: 50%; z-index: 3;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  box-shadow: var(--sh-2);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%) scale(.9);
  transition: opacity .2s, transform .25s var(--spring);
}
.banner-nav.is-prev { left: 14px; }
.banner-nav.is-next { right: 14px; }
.banner:hover .banner-nav { opacity: 1; transform: translateY(-50%); }
.banner-nav:hover { background: #fff; }

/* --------------------------- боковые карточки ------------------------------ */
/* страница «Правила»: правило замены, как это работает, поддержка */

.side-card { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.side-card .eyebrow { margin-bottom: 14px; }
.side-card-foot { margin-top: auto; padding-top: 14px; }

.manager { display: flex; align-items: center; gap: 12px; }
.manager-ava {
  position: relative; display: grid; place-items: center; flex: none;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: #2aabee; color: #fff;
}
.manager-ava .i { width: 24px; height: 24px; }
.manager-ava::after {
  content: ''; position: absolute; right: -3px; bottom: -3px;
  width: 13px; height: 13px;
  border: 3px solid var(--surface); border-radius: 50%;
  background: var(--green);
}
.manager b { display: block; color: var(--ink); font-size: 15px; font-weight: 750; }
.manager b + span { display: block; color: var(--muted); font-size: 12.5px; }

.rules-text { color: var(--ink-2); font-size: 14px; line-height: 1.55; }

/* --------------------------- позиции: общие куски -------------------------- */
/* сетка каталога и карточки товаров — в store.css; здесь то, что нужно
   корзине, кабинету (таблица заказов) и странице товара */

.tbl { overflow: hidden; }
.tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 128px 150px 182px;
  align-items: center;
  column-gap: 16px;
  padding: 0 18px;
}
.th {
  min-height: 40px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px; font-weight: 550;
}

.th > :last-child { justify-self: end; }
.row {
  position: relative;
  padding-top: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
  transition: background-color .15s;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #fcfcfd; }
.row.is-out { background: #fbfbfc; }
.row.is-enter { animation: rowIn .35s var(--ease) backwards; }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.flag {
  width: 34px; height: 25px; flex: none;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(18, 18, 20, .07), 0 1px 2px rgba(18, 18, 20, .08);
}
.logo-tile {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface);
  color: var(--accent); font-weight: 800;
}
.logo-tile img { width: 22px; height: 22px; object-fit: contain; }

.stock { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-size: 13.5px; font-weight: 650; white-space: nowrap; }
.stock-dot { position: relative; width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; }
.stock.is-low { color: var(--amber); }
.stock.is-low .stock-dot::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid currentColor;
  animation: ping 1.8s var(--ease) infinite;
}
.stock.is-out { color: var(--faint); font-weight: 550; }
@keyframes ping { 0% { opacity: .7; transform: scale(.6); } 80%, 100% { opacity: 0; transform: scale(1.5); } }

.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px 18px; margin-bottom: 12px; }
.details-grid div span { display: block; color: var(--faint); font-size: 11.5px; }
.details-grid div b { color: var(--ink); font-size: 13px; font-weight: 600; }
.details-label { margin: 12px 0 6px; color: var(--faint); font-size: 11.5px; }
.details-format { padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px dashed var(--line-strong); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-word; }
.geo-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.geo-more { margin-top: 12px; }
.geo-more summary {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-700); font-size: 12.5px; font-weight: 650;
  list-style: none; cursor: pointer;
}
.geo-more summary::-webkit-details-marker { display: none; }
.geo-more summary .i { transition: transform .25s var(--ease); }
.geo-more[open] summary .i { transform: rotate(180deg); }
.geo-more .geo-chips { margin-top: 10px; animation: rowIn .3s var(--ease); }
.geo-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 8px 0 5px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--ink-2); font-size: 12px;
}
.geo-chip img { width: 16px; height: 12px; border-radius: 2px; object-fit: cover; }
.details-note { margin-top: 8px; color: var(--faint); font-size: 12px; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 24px; margin-top: 20px;
  color: var(--muted); text-align: center;
}
.empty .i-tile { width: 52px; height: 52px; border-radius: 14px; }
.empty .i-tile .i { width: 24px; height: 24px; }
.empty b { color: var(--ink); font-size: 16px; }

/* скелет загрузки */
.skeleton-row { height: 64px; border-bottom: 1px solid var(--line-2); background: linear-gradient(90deg, transparent, rgba(18, 18, 20, .035), transparent) 0 0 / 50% 100% no-repeat; animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ---------------------- сервисы: выпадающий список и почта ----------------- */
/* сам виджет сервисов — в store.css */

/* свой выпадающий список (события пикселя и т. п.) */
.select-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink); font-size: 14px; text-align: left; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.select-btn:hover { border-color: var(--line-strong); }
.select-btn[aria-expanded='true'] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.select-btn .chev { width: 16px; height: 16px; margin-left: auto; color: var(--faint); transition: transform .2s; }
.select-btn[aria-expanded='true'] .chev { transform: rotate(180deg); }
.select-list {
  position: fixed; z-index: 300;
  max-height: 260px; padding: 6px; overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--sh-pop);
  animation: popIn .16s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.mail-list { display: grid; max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.mail-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px;
  padding: 12px 14px;
  border: 0; border-bottom: 1px solid var(--line-2); background: none;
  text-align: left; cursor: pointer;
  transition: background-color .15s;
}
.mail-item:last-child { border-bottom: 0; }
.mail-item:hover { background: var(--surface-2); }
.mail-item.is-loading { opacity: .5; pointer-events: none; }
.mail-from { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.mail-date { color: var(--faint); font-size: 12px; white-space: nowrap; }
.mail-subj { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mail-body { max-height: 420px; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* ---------------------------------- FAQ ----------------------------------- */

.faq { display: grid; gap: 10px; }
.faq-item { overflow: hidden; }
.faq-q {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 18px 20px;
  border: 0; background: none;
  color: var(--ink); font-size: 15px; font-weight: 650; text-align: left; cursor: pointer;
}
.faq-q .i { margin-left: auto; color: var(--faint); transition: transform .3s var(--ease), color .2s; }
.faq-item.is-open .faq-q .i { transform: rotate(45deg); color: var(--accent); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.faq-a > div { min-height: 0; overflow: hidden; }
.faq-a p { padding: 0 20px 18px; color: var(--ink-2); line-height: 1.65; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }

.rules-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; margin-top: 24px; align-items: start; }

/* --------------------------------- кабинет -------------------------------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 550; }
.stat-label .coin { width: 18px; height: 18px; }
.stat-value { color: var(--ink); font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-sub { color: var(--faint); font-size: 12.5px; }
.stat-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.stat.is-dark { position: relative; overflow: hidden; background: var(--ink); border-color: var(--ink); }
.stat.is-dark::after { content: ''; position: absolute; right: -60px; top: -70px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(38, 99, 240, .5), transparent 65%); pointer-events: none; }
.stat.is-dark .stat-label { color: rgba(255, 255, 255, .6); }
.stat.is-dark .stat-value { color: #fff; }
.stat.is-dark .stat-sub { color: rgba(255, 255, 255, .5); }
.stat.is-dark > * { position: relative; z-index: 1; }

.orders .tr { grid-template-columns: 110px 120px minmax(0, 1fr) 110px 130px 150px; }
.orders .row { padding-top: 12px; padding-bottom: 12px; }
.order-id { color: var(--ink); font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.order-items { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.order-sum { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.order-sum small { display: flex; align-items: center; gap: 4px; color: var(--accent-700); font-size: 11.5px; font-weight: 650; }
.order-sum small img { width: 13px; height: 13px; }

.guest-card { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: center; padding: 32px; margin-top: 24px; }
.guest-card h2 { font-size: 22px; font-weight: 800; }
.guest-card p { margin-top: 6px; color: var(--muted); }
.perk-list { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.perk-list li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.perk-list li .i { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--green-50); color: var(--green); stroke-width: 2.6; }
.guest-actions { display: grid; gap: 8px; }

.partner-cta {
  position: relative; display: flex; align-items: center; gap: 16px;
  margin-top: 16px; padding: 20px 22px; overflow: hidden;
  color: inherit; text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.partner-cta:hover { border-color: var(--accent-100); box-shadow: var(--sh-2); }
.partner-cta b { display: block; color: var(--ink); font-size: 15px; }
.partner-cta b + span { color: var(--muted); font-size: 13px; }
.partner-cta > .i { margin-left: auto; color: var(--faint); transition: transform .2s var(--ease), color .2s; }
.partner-cta:hover > .i { transform: translateX(3px); color: var(--accent); }

/* ---------------------------- партнёрская программа ------------------------ */

.pt-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center;
  margin-top: 14px; padding: clamp(24px, 4vw, 44px);
  border-radius: var(--r-lg);
  color: #fff;
  background:
    radial-gradient(60% 90% at 90% 0%, rgba(38, 99, 240, .5), transparent 60%),
    radial-gradient(40% 70% at 100% 100%, rgba(124, 92, 255, .3), transparent 70%),
    linear-gradient(160deg, #1b1b20, #0e0e10);
}
.pt-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 90% at 85% 15%, #000, transparent 75%);
  pointer-events: none;
}
.pt-hero > * { position: relative; }
.pt-hero-main { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.pt-hero h1 { color: #fff; font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; }
.pt-hero h1 em { color: var(--accent); font-style: normal; }
.pt-hero p { max-width: 520px; color: rgba(255, 255, 255, .7); font-size: 15px; line-height: 1.6; }
.pt-hero .btn-ghost { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08); color: #fff; }
.pt-hero .btn-ghost:hover:not([disabled]) { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .14); }
.pt-hero-stats { display: grid; gap: 10px; }
.pt-hero-stats > div {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  transition: transform .3s var(--spring), border-color .2s;
}
.pt-hero-stats > div:hover { transform: translateX(-4px); border-color: rgba(38, 99, 240, .45); }
.pt-hero-stats b { min-width: 74px; color: var(--accent); font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.pt-hero-stats span { color: rgba(255, 255, 255, .78); font-size: 13.5px; line-height: 1.45; }

.pt-formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pt-format { display: flex; flex-direction: column; gap: 10px; padding: 24px; transition: box-shadow .25s, transform .25s var(--ease); }
.pt-format:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.pt-format-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pt-format-head .i-tile { width: 44px; height: 44px; border-radius: 12px; }
.pt-num { color: var(--line-strong); font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.pt-format h3 { font-size: 19px; font-weight: 800; }
.pt-format .perk-list { flex: 1; margin: 6px 0 12px; }
.pt-format .perk-list li { align-items: flex-start; font-size: 13.5px; line-height: 1.5; }
.pt-format .perk-list li .i { margin-top: 1px; }
.pt-format .perk-list b { color: var(--ink); }

.pt-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.pt-steps li { display: flex; flex-direction: column; gap: 12px; padding: 20px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.pt-step-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--accent); font-size: 15px; font-weight: 800; }

/* кабинет партнёра */
.pt-withdraw { margin-top: 16px; padding: 20px; animation: rowIn .3s var(--ease); }
.pt-withdraw h3 { margin-bottom: 14px; font-size: 16px; font-weight: 750; }
.pt-wd-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; }
.pt-share { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.pt-copy { padding: 18px 20px; }
.pt-copy .eyebrow { margin-bottom: 10px; }
.pt-copy-row { display: flex; align-items: center; gap: 10px; }
.pt-copy-row .i-tile { width: 36px; height: 36px; border-radius: 10px; }
.pt-copy-row code { flex: 1; min-width: 0; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.pt-code { color: var(--accent-700) !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px !important; font-weight: 800; letter-spacing: .06em; }
input.pt-code { flex: 1; min-width: 0; height: 36px; text-transform: uppercase; }
.pt-lists { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.pt-list-card { overflow: hidden; }
.pt-list-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pt-list-head h3 { font-size: 15px; font-weight: 750; }
.pt-list { max-height: 420px; overflow-y: auto; }
.pt-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; }
.pt-row + .pt-row { border-top: 1px solid var(--line-2); }
.pt-row-main { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.35; }
.pt-row-main b { overflow: hidden; color: var(--ink); font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.pt-row-main span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pt-kind { flex: none; min-width: 96px; padding: 4px 9px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: 11.5px; font-weight: 650; text-align: center; }
.pt-kind.is-topup { background: var(--green-50); color: var(--green); }
.pt-kind.is-signup { background: var(--accent-50); color: var(--accent-700); }
.pt-plus { color: var(--green); font-variant-numeric: tabular-nums; }

/* --------------------------------- партнёры ------------------------------- */

.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pcard { --c: var(--accent); display: flex; flex-direction: column; gap: 12px; padding: 20px; transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--c) 35%, var(--line)); }
.pcard-pink { --c: #e0306b; }
.pcard-blue { --c: #3a6df0; }
.pcard-green { --c: #12a150; }
.pcard-logo { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.pcard-logo img.pcard-icon { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; }
.pcard-logo img.pcard-icon.is-tile { padding: 4px; background: var(--surface-3); }
.pcard-logo svg.pcard-icon { width: 36px; height: 36px; }
.pcard-logo .pcard-logo-img { max-width: 180px; max-height: 40px; object-fit: contain; }
.pcard-word { color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.pcard-word i { color: var(--c); font-style: normal; }
.pcard h3 { font-size: 14.5px; font-weight: 700; }
.pcard p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.pcard-offer {
  display: grid; gap: 6px; width: 100%;
  margin-top: auto; padding: 10px 12px;
  border: 1px dashed color-mix(in srgb, var(--c) 45%, var(--line)); border-radius: 10px;
  background: color-mix(in srgb, var(--c) 6%, var(--surface));
  text-align: left;
}
button.pcard-offer { cursor: pointer; transition: background-color .15s; }
button.pcard-offer:hover { background: color-mix(in srgb, var(--c) 11%, var(--surface)); }
.pcard-code { display: flex; align-items: center; gap: 8px; }
.pcard-code span { color: var(--muted); font-size: 12px; }
.pcard-code b { color: var(--c); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: .04em; }
.pcard-code .i { margin-left: auto; width: 15px; height: 15px; color: var(--c); }
.pcard-bonus { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; font-weight: 550; }
.pcard-bonus .i { width: 15px; height: 15px; color: var(--c); }
.pcard-offer.is-copied { animation: bump .5s var(--spring); }
.pcard .btn { margin-top: 2px; }

/* ---------------------------------- подвал -------------------------------- */

.footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--line); }
.footer-in { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 32px; }
.footer-brand p { max-width: 300px; margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.footer h4 { margin-bottom: 12px; color: var(--ink); font-size: 13px; font-weight: 700; }
.footer-links { display: grid; gap: 8px; }
.footer-links a, .footer-links button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; transition: color .15s; }
.footer-links a:hover, .footer-links button:hover { color: var(--accent-700); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; }
.footer-pay { display: flex; align-items: center; gap: 6px; }
.footer-pay img { width: 20px; height: 20px; }

/* --------------------------------- окна ----------------------------------- */

.modal-wrap {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(18, 18, 20, .55);
  opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility 0s .2s;
}
.modal-wrap.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.modal {
  position: relative;
  width: 100%; max-width: 460px;
  max-height: calc(100dvh - 48px);
  padding: 28px;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .4);
  transform: translateY(12px) scale(.98);
  transition: transform .3s var(--spring);
}
.modal-wrap.is-open .modal { transform: none; }
.modal.is-lg { max-width: 540px; }
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border: 0; border-radius: 9px; background: var(--surface-3);
  color: var(--muted); cursor: pointer;
  transition: background-color .15s, color .15s, transform .2s var(--ease);
}
.modal-x:hover { background: var(--line); color: var(--ink); transform: rotate(90deg); }
.modal-body > .step { animation: stepIn .28s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.m-title { padding-right: 36px; color: var(--ink); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.m-sub { margin: 4px 0 18px; color: var(--muted); }
.m-label { margin: 18px 0 8px; color: var(--ink-2); font-size: 12.5px; font-weight: 650; }
.m-back {
  display: inline-flex; align-items: center; gap: 4px;
  margin: -6px 0 10px -4px; padding: 4px;
  border: 0; border-radius: 6px; background: none;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.m-back:hover { color: var(--ink); }
.m-note { display: flex; gap: 8px; margin-top: 14px; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.m-note .i { width: 15px; height: 15px; margin-top: 2px; color: var(--green); }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }

/* что оплачиваем */
.sum-card { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.sum-card-text { flex: 1; min-width: 0; }
.sum-card-text b { display: block; overflow: hidden; color: var(--ink); font-size: 14.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sum-card-text span { display: block; overflow: hidden; color: var(--muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.sum-price { flex: none; text-align: right; }
.sum-price s { display: block; color: var(--faint); font-size: 12px; }
.sum-price b { display: block; color: var(--ink); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sum-price span { display: block; color: var(--faint); font-size: 12px; }
.sum-lines { margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.sum-line { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.sum-line .flag { width: 26px; height: 19px; }
.sum-line .logo-tile { width: 26px; height: 26px; border-radius: 7px; }
.sum-line .logo-tile img { width: 16px; height: 16px; }
.sum-line-name { flex: 1; min-width: 0; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sum-line-qty { color: var(--muted); font-size: 12.5px; }
.sum-line-sum { min-width: 64px; color: var(--ink); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.sum-total { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--surface-2); }
.sum-total > span { color: var(--muted); font-size: 13px; }

/* количество */
.qty { display: inline-flex; align-items: center; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.qty button { display: grid; place-items: center; width: 36px; height: 100%; border: 0; background: none; color: var(--ink); cursor: pointer; transition: color .15s; }
.qty button:hover:not([disabled]) { color: var(--accent); }
.qty button[disabled] { color: var(--line-strong); cursor: not-allowed; }
.qty input { width: 44px; height: 100%; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: center; -moz-appearance: textfield; }
.qty input:focus { outline: none; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 30px; border-radius: 8px; }
.qty-sm button { width: 28px; }
.qty-sm input { width: 30px; font-size: 13px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.qty-row > span { color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.qty-total { margin-left: auto; text-align: right; }
.qty-total small { display: block; color: var(--muted); font-size: 12px; }
.qty-total b { color: var(--ink); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.presets button { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 650; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.presets button:hover, .presets button.is-active { border-color: var(--accent); background: var(--accent-50); color: var(--accent-700); }

/* способы оплаты */
.opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  text-align: left; cursor: pointer;
  transition: border-color .15s, box-shadow .2s, transform .15s;
}
.opt:hover:not([disabled]) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.opt:active:not([disabled]) { transform: scale(.995); }
.opt[disabled] { cursor: not-allowed; opacity: .55; }
.opt-ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); color: var(--ink); }
.opt-ico img { width: 24px; height: 24px; }
.opt.is-primary .opt-ico { background: var(--accent); color: #fff; }
.opt-text { flex: 1; min-width: 0; }
.opt-text b { display: block; color: var(--ink); font-size: 14px; font-weight: 650; }
.opt-text span { display: block; color: var(--muted); font-size: 12.5px; }
.opt > .i { color: var(--faint); transition: transform .2s var(--ease), color .2s; }
.opt:hover:not([disabled]) > .i { transform: translateX(2px); color: var(--accent); }
.coin-stack { display: flex; }
.coin-stack img { width: 22px; height: 22px; margin-left: -6px; border: 2px solid var(--surface); border-radius: 50%; background: var(--surface); }
.coin-stack img:first-child { margin-left: 0; }
.coin-stack img.is-off { filter: grayscale(1); opacity: .45; }
.soon { padding: 3px 8px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 650; }
.net-ico { position: relative; flex: none; width: 40px; height: 40px; }
.net-ico img { width: 40px; height: 40px; }
.net-ico img + img { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border: 2px solid var(--surface); border-radius: 50%; background: var(--surface); }

.promo { display: flex; gap: 8px; margin-top: 16px; }
.promo .input-wrap { flex: 1; }
.promo-on {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 10px 12px;
  border: 1px solid #bfe8cf; border-radius: 10px; background: var(--green-50);
  color: #0c7a3c; font-size: 13px;
}
.promo-on .i { color: var(--green); }
.promo-on button { margin-left: auto; display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; }
.promo-on button:hover { background: rgba(18, 161, 80, .12); }

.invoice { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.invoice-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.invoice-row > span { color: var(--muted); font-size: 13px; }
.invoice-row b { color: var(--ink); font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.invoice-coin { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.invoice-coin b { display: block; color: var(--ink); }
.invoice-coin b + span { display: block; color: var(--muted); font-size: 12.5px; }
.address { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 10px 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.address code { flex: 1; min-width: 0; color: var(--ink); font-size: 12.5px; word-break: break-all; }
.help {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  color: inherit; text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
.help:hover { border-color: #9ad7f5; background: #f3fbff; }
.help .manager-ava { width: 38px; height: 38px; border-radius: 11px; }
.help .manager-ava::after { display: none; }
.help .manager-ava .i { width: 19px; height: 19px; }
.help b { display: block; color: var(--ink); font-size: 13.5px; }
.help b + span { display: block; color: var(--muted); font-size: 12.5px; }

.done { text-align: center; }
.done-ico {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin: 4px auto 14px;
  border-radius: 50%;
  background: var(--green-50); color: var(--green);
  animation: doneIn .5s var(--spring);
}
.done-ico .i { width: 30px; height: 30px; stroke-width: 2.4; }
.done-ico .i path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .2s var(--ease) forwards; }
@keyframes doneIn { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done .m-title { padding: 0; }
.done-sum { margin: 6px 0 4px; color: var(--ink); font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.earned { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 4px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--accent-50); color: var(--accent-700); font-size: 13px; font-weight: 650; }
.earned img { width: 24px; height: 24px; }

/* окно входа */
.modal.is-auth { max-width: 860px; padding: 0; overflow: hidden; }
.modal.is-auth .modal-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.auth-form { padding: 32px; overflow-y: auto; max-height: calc(100dvh - 48px); }
.auth-tabs { display: inline-flex; gap: 2px; margin-bottom: 22px; padding: 3px; border-radius: 10px; background: var(--surface-3); }
.auth-tabs button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; transition: background-color .15s, color .15s, box-shadow .15s; }
.auth-tabs button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1), 0 1px 3px rgba(0, 0, 0, .06); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--faint); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-tg-hint { margin-top: 8px; color: var(--muted); font-size: 12.5px; text-align: center; }
.auth-switch { margin-top: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.auth-promo { position: relative; overflow: hidden; background: var(--ink); min-height: 520px; }
.auth-promo .banner { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.auth-promo-stub {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 16px;
  padding: 32px 28px;
  color: #fff;
  background:
    radial-gradient(80% 50% at 100% 0%, rgba(38, 99, 240, .55), transparent 65%),
    linear-gradient(170deg, #1b1b20, #0e0e10);
}
.auth-promo-stub img { width: 48px; height: 48px; border-radius: 13px; }
.auth-promo-stub h3 { margin-top: auto; color: #fff; font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.auth-promo-stub p { color: rgba(255, 255, 255, .65); }
.auth-promo-stub .perk-list li { color: rgba(255, 255, 255, .85); }
.auth-promo-stub .perk-list li .i { background: rgba(38, 99, 240, .18); color: var(--accent); }
.auth-promo-stub small { color: rgba(255, 255, 255, .4); font-size: 12px; }

/* ------------------------------ шторка (корзина) --------------------------- */

.drawer-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(18, 18, 20, .35); opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .3s; }
.drawer-wrap.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer {
  position: absolute; top: 0; right: 0;
  display: flex; flex-direction: column;
  width: min(420px, 100%); height: 100%;
  background: var(--surface);
  box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .35);
  transform: translateX(100%);
  transition: transform .34s var(--ease);
}
.drawer-wrap.is-open .drawer { transform: none; }
.drawer.is-left { right: auto; left: 0; transform: translateX(-100%); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 17px; font-weight: 800; }
.drawer-head .tag { height: 22px; }
.drawer-head .modal-x { position: static; margin-left: auto; }
.drawer-body { flex: 1; padding: 8px 20px; overflow-y: auto; overscroll-behavior: contain; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.drawer-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.drawer-total span { color: var(--muted); }
.drawer-total b { color: var(--ink); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.drawer-total small { display: block; color: var(--faint); font-size: 12px; text-align: right; }

.cline { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); animation: rowIn .3s var(--ease) backwards; }
.cline:last-child { border-bottom: 0; }
.cline-name b { display: block; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.cline-name span { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.cline-sum { color: var(--ink); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.cline-foot { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; }
.cline-del { padding: 4px; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; }
.cline-del:hover { background: var(--red-50); color: var(--red); }
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px 12px; color: var(--muted); text-align: center; }
.cart-empty .i-tile { width: 56px; height: 56px; border-radius: 16px; }
.cart-empty .i-tile .i { width: 26px; height: 26px; }
.cart-empty b { color: var(--ink); font-size: 16px; }

/* мобильное меню */
.mnav { display: grid; gap: 2px; }
.mnav a, .mnav button {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px;
  border: 0; border-radius: 10px; background: none;
  color: var(--ink); font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
}
.mnav a:hover, .mnav button:hover { background: var(--surface-2); }
.mnav a.is-active { background: var(--accent-50); color: var(--accent-700); }
.mnav .i { color: var(--muted); }
.mnav a.is-active .i { color: var(--accent); }
.m-section { margin: 18px 0 8px; }
.m-langs { display: flex; gap: 6px; }
.m-langs button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 6px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 650; cursor: pointer; }
.m-langs button.is-active { border-color: var(--accent); background: var(--accent-50); color: var(--accent-700); }
.m-langs img { width: 18px; height: 13px; border-radius: 3px; object-fit: cover; }
.m-user { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.m-user b { display: block; color: var(--ink); }
.m-user b + span { display: block; color: var(--muted); font-size: 12.5px; }
.m-wallet { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 14px; border-radius: 14px; background: var(--ink); color: #fff; }
.m-wallet span { display: block; color: rgba(255, 255, 255, .6); font-size: 12px; }
.m-wallet b { font-size: 20px; font-weight: 800; }

/* --------------------------------- тосты ---------------------------------- */

.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 400; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: 380px; padding: 11px 16px 11px 12px;
  border-radius: 12px;
  background: var(--ink); color: #fff;
  font-size: 13.5px; font-weight: 550;
  box-shadow: var(--sh-pop);
  pointer-events: auto;
  animation: toastIn .4s var(--spring);
}
.toast.is-out { animation: toastOut .25s var(--ease) forwards; }
.toast-ico { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--green); }
.toast-ico .i { width: 13px; height: 13px; stroke-width: 3; }
.toast.is-error .toast-ico { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

.is-shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* -------------------------------- адаптив --------------------------------- */

@media (max-width: 1180px) {
  .brand-text small { display: none; }
}

@media (max-width: 1060px) {
  .tr { grid-template-columns: minmax(0, 1fr) 100px 116px 130px 170px; column-gap: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-in { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .pt-hero { grid-template-columns: 1fr; }
  .pt-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-share, .pt-lists { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .rules-grid { grid-template-columns: 1fr; }
  .guest-card { grid-template-columns: 1fr; }

  /* таблица заказов → карточки */
  .tbl .th { display: none; }
  .tbl .tr.row { row-gap: 12px; padding: 14px; }
  .orders .tr.row { grid-template-columns: 1fr auto; grid-template-areas: 'id sum' 'items items' 'status file'; }
  .orders .row > :nth-child(1) { grid-area: id; }
  .orders .row > :nth-child(2) { display: none; }
  .orders .row > :nth-child(3) { grid-area: items; }
  .orders .row > :nth-child(4) { grid-area: sum; text-align: right; }
  .orders .row > :nth-child(5) { grid-area: status; }
  .orders .row > :nth-child(6) { grid-area: file; justify-self: end; }
  .orders .order-sum small { justify-content: flex-end; }
}

@media (max-width: 720px) {
  body { font-size: 14px; }
  .container { padding: 0 16px; }
  .brand-text small { display: none; }
  .announce-in { justify-content: flex-start; gap: 8px; padding: 8px 44px 8px 16px; text-align: left; font-size: 12px; line-height: 1.4; }
  .announce-in > .i { display: none; }
  .announce-in > span { display: -webkit-box; flex: 1; min-width: 0; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .announce-in > a { flex: none; }
  .side-card { padding: 16px; }
  .side-card .eyebrow { margin-bottom: 10px; }
  .banner { border-radius: 14px; }
  .banner-nav { display: none; }
  .section { margin-top: 32px; }
  .page-title { font-size: 23px; }

  .pt-formats, .pt-steps, .pt-wd-grid { grid-template-columns: 1fr; }
  .pt-steps li { flex-direction: row; align-items: center; padding: 14px 16px; }
  .pt-step-num { flex: none; }
  .pt-copy-row { flex-wrap: wrap; }
  .pt-copy-row code { flex-basis: calc(100% - 46px); }
  .pt-copy-row .btn { flex: 1; }
  .pt-row { padding: 12px 16px; }
  .pt-kind { min-width: 0; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats .stat { padding: 14px; }
  .stats .stat.is-dark { grid-column: 1 / -1; }
  .stats .stat-value { font-size: 20px; }
  .stats .stat-label { font-size: 12px; }
  .footer-in { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; }
  .modal-wrap { place-items: end center; padding: 0; }
  .modal { max-width: none; max-height: 92dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform .35s var(--ease); }
  .modal.is-lg { max-width: none; }
  .modal.is-auth { overflow-y: auto; }
  .modal.is-auth .modal-body { grid-template-columns: 1fr; }
  .auth-promo { display: none; }
  .auth-form { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 92dvh; }
  .m-actions { grid-template-columns: 1fr; }
  .toasts { left: 16px; right: 16px; bottom: 16px; justify-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* крестик окна входа поверх тёмного баннера справа */
@media (min-width: 721px) {
  .modal.is-auth .modal-x { background: rgba(255, 255, 255, .14); color: #fff; }
  .modal.is-auth .modal-x:hover { background: rgba(255, 255, 255, .24); color: #fff; }
}
