/* Mini App — «жидкое стекло». Базовые токены и примитивы — в shared/theme.css */
html, body { min-height: 100%; overscroll-behavior-y: none; }
#root { max-width: 640px; margin: 0 auto; min-height: 100vh; position: relative; }
.boot { display: grid; place-items: center; min-height: 100vh; }
.screen-msg { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 12px; padding: 32px; }
.screen-msg img { width: 72px; margin: 0 auto; filter: drop-shadow(0 8px 24px rgba(var(--accent-rgb), 0.6)); }

/* ---------- Шапка: стеклянная полоса, под которой плывёт контент ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px;
  background: linear-gradient(180deg, rgba(10, 5, 22, 0.78), rgba(10, 5, 22, 0.42));
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: -0.03em; cursor: pointer; min-width: 0; flex: 1 1 auto; }
.brand img { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 3px 10px rgba(var(--accent-rgb), 0.6)); }
.brand b { color: var(--accent-2); font-weight: 800; }
.balance-chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 5px 0 13px; flex: none; font-size: 14px; border-radius: 99px; background: var(--glass-fill); background-color: rgba(255, 255, 255, 0.02); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); font-weight: 800; cursor: pointer; font-variant-numeric: tabular-nums; }
.balance-chip .plus { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gloss), linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; font-size: 18px; line-height: 1; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 12px -2px rgba(var(--accent-rgb), 0.7); }
.round-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-fill); background-color: rgba(255, 255, 255, 0.02); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); cursor: pointer; position: relative; transition: transform 0.14s ease, background-color 0.18s; }
.round-btn:hover { background-color: rgba(255, 255, 255, 0.09); }
.round-btn:active { transform: scale(0.94); }
.round-btn .dot { position: absolute; top: 6px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); border: 2px solid #1a1030; box-shadow: 0 0 10px rgba(255, 92, 122, 0.8); }

/* ---------- Контент и навигация ---------- */
#view { padding: 8px 16px calc(116px + env(safe-area-inset-bottom)); }
.page-title { font-size: 28px; font-weight: 800; margin: 8px 0 4px; letter-spacing: -0.03em; }
.section { margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 11px; }
.section-head h2 { font-size: 19px; }
.section-head a { font-size: 13px; font-weight: 600; cursor: pointer; }

/* Подпись всего интерфейса: нижнее меню — плавающая линза из стекла.
   Активный пункт подсвечивает «линза» (.lens), которая переезжает между пунктами. */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
  width: min(calc(100% - 24px), 520px); display: flex; justify-content: space-between; gap: 2px; padding: 6px;
  background: var(--float-fill); background-color: var(--float-tint);
  -webkit-backdrop-filter: var(--float-blur); backdrop-filter: var(--float-blur);
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 30px;
  box-shadow: var(--glass-hi), inset 0 -12px 22px -16px rgba(var(--accent-rgb), 0.5), 0 22px 44px -14px rgba(2, 0, 10, 0.85), 0 0 0 1px rgba(2, 0, 10, 0.35);
}
.nav .lens {
  position: absolute; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 24px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.07) 55%, rgba(255, 255, 255, 0.12)), linear-gradient(135deg, rgba(var(--accent-rgb), 0.85), rgba(var(--accent-rgb), 0.45));
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -6px 12px -6px rgba(var(--accent-rgb), 0.8), 0 8px 22px -6px rgba(var(--accent-rgb), 0.85);
  transition: transform 0.42s cubic-bezier(0.3, 1.25, 0.45, 1), width 0.42s cubic-bezier(0.3, 1.25, 0.45, 1), opacity 0.2s;
}
.nav .lens.on { opacity: 1; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 24px; color: var(--muted); font-size: 11px; font-weight: 700; position: relative; z-index: 1; transition: color 0.2s; }
.nav a svg { width: 22px; height: 22px; transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1); }
.nav a.active { color: #fff; text-shadow: 0 1px 6px rgba(20, 5, 70, 0.5); }
.nav a.active svg { transform: translateY(-1px) scale(1.08); }
.nav .count { position: absolute; top: 3px; right: calc(50% - 22px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10px; display: grid; place-items: center; box-shadow: 0 0 10px rgba(255, 92, 122, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4); }

/* ---------- Drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; z-index: 800; background: rgba(4, 2, 12, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fadeOnly 0.22s both; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 86vw);
  background: var(--float-fill); background-color: rgba(16, 9, 34, 0.66);
  -webkit-backdrop-filter: var(--float-blur); backdrop-filter: var(--float-blur);
  border-left: 1px solid rgba(255, 255, 255, 0.16); box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.12), -24px 0 60px -20px rgba(var(--accent-rgb), 0.4);
  border-radius: 28px 0 0 28px;
  padding: calc(16px + env(safe-area-inset-top)) 14px 14px; display: flex; flex-direction: column; gap: 4px; animation: drawerIn 0.32s cubic-bezier(0.2, 0.9, 0.3, 1) both; overflow-y: auto;
}
@keyframes drawerIn { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .me { display: flex; align-items: center; gap: 12px; padding: 12px 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--gloss), linear-gradient(135deg, var(--accent), var(--accent-deep)); display: grid; place-items: center; font-weight: 800; font-size: 19px; flex: none; border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 16px -4px rgba(var(--accent-rgb), 0.7); }
.drawer a.item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 15px; color: var(--text); font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: background 0.16s, border-color 0.16s; }
.drawer a.item:hover, .drawer a.item.active { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.1); }
.drawer a.item svg { width: 20px; height: 20px; color: var(--accent-2); }

/* ---------- Главная ---------- */
.hero { position: relative; overflow: hidden; border-radius: 30px; padding: 20px 16px 16px; border: 1px solid rgba(255, 255, 255, 0.18); background-color: #0d0720; background-size: cover; background-position: center; box-shadow: var(--glass-hi), 0 24px 50px -20px rgba(var(--accent-rgb), 0.55); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(7, 4, 15, 0) 35%, rgba(7, 4, 15, 0.5)); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-logo { width: 88px; height: 88px; flex: none; filter: drop-shadow(0 8px 26px rgba(var(--accent-rgb), 0.75)); animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.hero-copy { min-width: 0; }
.hero h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.04em; text-shadow: 0 2px 22px rgba(var(--accent-rgb), 0.7); overflow-wrap: anywhere; }
.hero h1 b { color: var(--accent-2); font-weight: 800; }
.hero p { margin: 6px 0 0; color: #e0d6ff; font-size: 14.5px; line-height: 1.3; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.feat { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 11px; line-height: 1.2; font-weight: 600; color: #e6dcff; min-width: 0; }
.feat .fi { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; color: var(--accent-2); background: rgba(var(--accent-rgb), 0.22); border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.searchbar { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.search { position: relative; }
.search input { padding-left: 44px; border-radius: 18px; min-height: 48px; }
.search svg { z-index: 1; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--accent-2); pointer-events: none; }
.searchbar .round-btn { width: 48px; height: 48px; flex: none; color: var(--accent-2); }
.home-chips { margin-top: 12px; padding-bottom: 6px; }
.chip svg { width: 16px; height: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: var(--glass-fill); background-color: var(--glass-tint); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); border-radius: 18px; padding: 10px 9px; min-width: 0; }
.stat .si { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; color: var(--accent-2); background: rgba(var(--accent-rgb), 0.2); }
.stat b { display: block; font-size: 18px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--muted); }
.hscroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 14px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.cat-tile { width: 132px; padding: 14px 12px; border-radius: 22px; background: var(--glass-fill); background-color: var(--glass-tint); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--glass-drop); cursor: pointer; transition: transform 0.18s, border-color 0.18s, background-color 0.18s; }
.cat-tile:active { transform: scale(0.96); }
.cat-tile:hover { border-color: rgba(255, 255, 255, 0.28); background-color: rgba(var(--accent-rgb), 0.14); }
.cat-tile .ic { font-size: 26px; height: 38px; display: flex; align-items: center; }
.cat-tile .ic img { width: 38px; height: 38px; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.cat-tile b { display: block; font-size: 14px; margin-top: 6px; }
.cat-tile span { font-size: 12px; color: var(--muted); }
.promo { width: 284px; min-height: 124px; border-radius: 24px; padding: 16px; position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.2); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.6), rgba(213, 0, 249, 0.22)); background-size: cover; background-position: center; box-shadow: var(--glass-hi), 0 18px 36px -16px rgba(var(--accent-rgb), 0.6); cursor: pointer; }
.promo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 40%), linear-gradient(90deg, rgba(7, 4, 15, 0.7), rgba(7, 4, 15, 0.05)); }
.promo > * { position: relative; z-index: 1; }
.promo b { display: block; font-size: 17px; margin: 6px 0 4px; }
.promo span.t { font-size: 13px; color: #e3d9ff; }

/* ---------- Карточка товара ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pcard { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 24px; background: var(--glass-fill); background-color: var(--glass-tint); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi), var(--glass-drop); cursor: pointer; min-width: 0; transition: transform 0.18s cubic-bezier(0.3, 1.3, 0.5, 1), border-color 0.18s, background-color 0.18s; }
.pcard:hover { border-color: rgba(255, 255, 255, 0.28); background-color: rgba(var(--accent-rgb), 0.12); }
.pcard:active { transform: scale(0.975); }
.pcard.out { opacity: 0.6; }
.pcard .t { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; line-height: 1.22; }
.pcard .t .fl { font-size: 26px; line-height: 1; flex: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
.pcard .t .ttl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; overflow-wrap: anywhere; }
.pcard .d { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.pcard .tags { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.pcard .tags .stock { margin-left: auto; }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 6px; }
.buy-pill { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 700; color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); background: var(--gloss), linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 18px -6px rgba(var(--accent-rgb), 0.7); }
.price { font-weight: 800; font-size: 18px; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.7); }
.price s { display: block; font-size: 12px; color: var(--faint); font-weight: 600; margin-bottom: -2px; text-shadow: none; }
.hscroll .pcard { width: 214px; }

/* ---------- Каталог ---------- */
.filters { display: flex; flex-direction: column; gap: 10px; }
.toolbar { display: flex; gap: 8px; align-items: center; }
.toolbar select { flex: 1; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

/* ---------- Товар ---------- */
.pimg { height: 200px; border-radius: 28px; background: radial-gradient(circle at 70% 20%, rgba(var(--accent-rgb), 0.7), rgba(13, 7, 32, 0.9) 72%); display: grid; place-items: center; font-size: 72px; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: var(--glass-hi), 0 24px 48px -20px rgba(var(--accent-rgb), 0.55); overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg img.flag { width: 1.3333em; height: 1em; border-radius: 0.1em; }
.pcard .t .fl, .line .fl, .item-card .fl { display: inline-flex; align-items: center; }
.buybar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 65; width: min(calc(100% - 24px), 520px);
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px;
  background: var(--float-fill); background-color: rgba(16, 9, 34, 0.58);
  -webkit-backdrop-filter: var(--float-blur); backdrop-filter: var(--float-blur);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 28px;
  box-shadow: var(--glass-hi), inset 0 -12px 22px -16px rgba(var(--accent-rgb), 0.5), 0 22px 44px -14px rgba(2, 0, 10, 0.85);
}
.qty { display: inline-flex; align-items: center; gap: 4px; background: rgba(6, 3, 16, 0.4); border: 1px solid var(--line); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4); border-radius: 15px; padding: 3px; }
.qty button { width: 34px; height: 34px; border-radius: 12px; border: 1px solid var(--glass-edge); background: var(--glass-fill); background-color: rgba(255, 255, 255, 0.02); box-shadow: var(--glass-hi); font-size: 18px; cursor: pointer; transition: transform 0.12s; }
.qty button:active { transform: scale(0.9); }
.qty button:disabled { opacity: 0.35; }
.qty span { min-width: 28px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Корзина / заказы / покупки ---------- */
.line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .fl { font-size: 26px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.item-card { display: flex; gap: 12px; align-items: center; padding: 14px; cursor: pointer; transition: transform 0.16s, border-color 0.16s; }
.item-card:active { transform: scale(0.985); }
.item-card .fl { font-size: 28px; }
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.timeline .ev { display: flex; gap: 12px; padding: 0 0 14px 0; position: relative; font-size: 13.5px; }
.timeline .ev::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2); margin-top: 6px; flex: none; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.24), 0 0 14px rgba(var(--accent-rgb), 0.9); }
.timeline .ev::after { content: ''; position: absolute; left: 4px; top: 16px; bottom: -2px; width: 1px; background: linear-gradient(180deg, var(--line-strong), transparent); }
.timeline .ev:last-child::after { display: none; }
.secret-row { display: flex; align-items: center; gap: 8px; }
.secret-row .k { width: 78px; font-size: 12px; color: var(--muted); flex: none; }
.notice { border-radius: 18px; padding: 12px 14px; font-size: 13.5px; background: rgba(var(--accent-rgb), 0.14); border: 1px solid rgba(var(--accent-rgb), 0.4); box-shadow: var(--glass-hi); }
.notice.warn { background: rgba(255, 183, 77, 0.1); border-color: rgba(255, 183, 77, 0.42); }
.notice.bad { background: rgba(255, 92, 122, 0.1); border-color: rgba(255, 92, 122, 0.42); }

/* ---------- Чат обращений ---------- */
.msgs { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; background: var(--glass-fill); background-color: rgba(255, 255, 255, 0.025); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hi); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--gloss), linear-gradient(135deg, rgba(var(--accent-rgb), 0.75), rgba(var(--accent-rgb), 0.4)); background-color: transparent; border-color: rgba(255, 255, 255, 0.26); border-bottom-right-radius: 6px; }
.msg.admin, .msg.system { border-bottom-left-radius: 6px; }
.msg small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.msg.user small { color: rgba(255, 255, 255, 0.7); }
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; border: 1px solid var(--glass-edge); background: var(--glass-fill); background-color: rgba(255, 255, 255, 0.02); box-shadow: var(--glass-hi); cursor: pointer; width: 100%; text-align: left; transition: border-color 0.16s, transform 0.14s, background-color 0.16s; }
.pay-opt:hover { border-color: rgba(var(--accent-rgb), 0.9); background-color: rgba(var(--accent-rgb), 0.12); }
.pay-opt:active { transform: scale(0.985); }
.pay-opt.off { opacity: 0.5; cursor: not-allowed; }
.pay-opt .ic { font-size: 24px; }
.presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

/* ---------- Баннер, меню, подвал, шапки экранов ---------- */
.cta { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 24px; cursor: pointer; position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.2); background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.45), rgba(213, 0, 249, 0.18)); box-shadow: var(--glass-hi), 0 18px 36px -18px rgba(var(--accent-rgb), 0.7); }
.cta .cta-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; color: var(--accent-2); filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.9)); }
.cta b { display: block; font-size: 15px; }
.cta .grow span { display: block; font-size: 12px; color: #dcd0ff; line-height: 1.3; margin-top: 2px; }
.brand-foot { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 26px 0 4px; opacity: 0.9; }
.brand-foot img { width: 46px; height: 46px; filter: drop-shadow(0 4px 14px rgba(var(--accent-rgb), 0.6)); }
.brand-foot b { display: block; font-size: 15px; color: var(--accent-2); }
.brand-foot span { font-size: 12px; color: var(--muted); }
.menu { padding: 4px 14px; }
.menu-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; cursor: pointer; border-bottom: 1px solid var(--line); color: var(--faint); transition: opacity 0.15s; }
.menu-row:last-child { border-bottom: 0; }
.menu-row:active { opacity: 0.6; }
.menu-row .ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--accent-2); background: rgba(var(--accent-rgb), 0.18); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.menu-row b { color: var(--text); font-size: 15px; }
.menu-row .sub { display: block; color: var(--muted); font-size: 12.5px; }
.page-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: 28px; border: 1px solid rgba(255, 255, 255, 0.18); background-color: #0d0720; background-size: cover; background-position: center; box-shadow: var(--glass-hi), 0 22px 44px -20px rgba(var(--accent-rgb), 0.55); }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 4, 15, 0.55), rgba(7, 4, 15, 0.1)); pointer-events: none; }
.page-hero > * { position: relative; z-index: 1; }
.page-hero img { width: 76px; height: 76px; flex: none; filter: drop-shadow(0 6px 20px rgba(var(--accent-rgb), 0.75)); }
.page-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; text-shadow: 0 2px 18px rgba(var(--accent-rgb), 0.6); }
.page-hero p { margin: 4px 0 0; color: #ddd2ff; font-size: 13.5px; }
.profile-hero { display: flex; align-items: center; gap: 14px; }
.profile-hero .avatar { width: 64px; height: 64px; font-size: 26px; outline: 3px solid rgba(var(--accent-rgb), 0.4); outline-offset: 3px; }
.balance-card { display: flex; align-items: center; gap: 14px; }
.balance-card .wic { width: 50px; height: 50px; flex: none; border-radius: 16px; display: grid; place-items: center; color: var(--accent-2); background: rgba(var(--accent-rgb), 0.2); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.balance-card .amt { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.balance-card .lbl { font-size: 12.5px; color: var(--muted); }
.balance-card .btn { margin-left: auto; flex: none; }
.trust { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 12px 14px; border-radius: 18px; font-size: 12.5px; color: var(--muted); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); margin-top: 14px; }
.trust svg { color: var(--accent-2); flex: none; }
.pay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pay-grid .pay-opt { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 92px; }
.pay-grid .pay-opt .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: rgba(var(--accent-rgb), 0.2); border: 1px solid rgba(255, 255, 255, 0.12); color: var(--accent-2); }
.amount-field { position: relative; }
.amount-field .input { font-size: 22px; font-weight: 800; min-height: 56px; padding-right: 44px; }
.amount-field .cur { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.presets { grid-template-columns: repeat(4, 1fr); }
.presets .chip { padding: 0 6px; font-size: 13px; min-height: 40px; justify-content: center; }
.logout-btn { color: #ffa9b9; border-color: rgba(255, 92, 122, 0.42); background: linear-gradient(152deg, rgba(255, 92, 122, 0.16), rgba(255, 92, 122, 0.04)); }

/* ---------- Выдача аккаунтов и получение кодов Telegram ---------- */
.tg-login-box {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(20, 10, 40, 0.6));
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px -10px rgba(var(--accent-rgb), 0.5);
  margin: 8px 0;
}
.tg-login-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-2);
}
.tg-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.4;
}
.tg-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.3);
  border: 1px solid rgba(var(--accent-rgb), 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex: none;
  margin-top: 1px;
}
.code-display {
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid var(--accent);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.35);
}
.code-digits {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 0 16px rgba(var(--accent-rgb), 0.9);
  margin: 6px 0;
}
.code-timer {
  font-size: 12px;
  color: var(--muted);
}
.code-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.code-actions .btn {
  flex: 1;
}

/* ---------- Юридические документы и согласие ---------- */
.legal { padding: 16px 18px 6px; }
.legal-h { margin: 18px 0 6px; font-size: 16px; }
.legal-h:first-child { margin-top: 0; }
.legal-p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.legal-ul { margin: 0 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.consent { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--faint); text-align: center; }
.consent a { color: var(--accent2, var(--accent)); text-decoration: underline; cursor: pointer; }
