/* ═══════════════════════════════════════════════════════════
   СОНИК VPN · Mini App — dark cyberpunk / glassmorphism
   Без внешних шрифтов и картинок: всё работает офлайн.
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #050a14;
  --bg-deep: #030711;
  --glass: rgba(18, 34, 58, 0.58);
  --glass-border: rgba(133, 196, 255, 0.16);
  --text: #f3f8ff;
  --muted: #8ba3c2;
  --blue: #3ea8ff;
  --cyan: #35e6ff;
  --glow: rgba(62, 168, 255, 0.55);
  --radius: 26px;
  --nav-h: 84px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 50% -10%, #102b5c 0%, rgba(8, 20, 42, 0) 62%),
    radial-gradient(700px 500px at 100% 75%, rgba(0, 156, 255, 0.12) 0%, rgba(0, 0, 0, 0) 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

/* Мягкие точечные свечения за стеклом */
.ambient {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  transition: opacity .6s ease, background .6s ease;
}
.ambient--a { top: -140px; left: -110px; background: rgba(24, 118, 255, .28); }
.ambient--b { bottom: -150px; right: -130px; background: rgba(0, 212, 255, .18); }
body.is-connected .ambient--a { background: rgba(0, 230, 170, .24); }
body.is-connected .ambient--b { background: rgba(62, 168, 255, .26); }

/* Тонкая «кожа» — self-contained SVG-шум, без внешних файлов */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px 18px calc(var(--nav-h) + var(--safe-bottom) + 28px);
}

/* ─── Экраны ─────────────────────────────────────────────── */
.screen { display: none; }
.screen.is-active { display: block; animation: screen-in .38s cubic-bezier(.22, .9, .3, 1) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.eyebrow {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
  color: var(--cyan);
  text-transform: uppercase;
}

/* ─── Верхняя панель ─────────────────────────────────────── */
.topbar { display: flex; align-items: center; gap: 13px; margin-bottom: 34px; }

.avatar {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(145deg, #1d4e9c, #0b1e3d);
  box-shadow: 0 0 0 1px rgba(145, 205, 255, .28), 0 8px 24px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.avatar__dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #38f0b0;
  border: 3px solid #081426;
  box-shadow: 0 0 12px rgba(56, 240, 176, .8);
}
.avatar--lg { width: 58px; height: 58px; font-size: 23px; border-radius: 19px; }

.topbar__text { min-width: 0; flex: 1; }
.greeting { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.greeting span#user-name { color: var(--blue); }
.greeting#user-name { color: var(--blue); }
.wave { display: inline-block; animation: wave 2.8s ease-in-out infinite; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(18deg); } 80% { transform: rotate(-10deg); } }

.icon-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #cfe6ff;
  font-size: 15px;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Логотип ────────────────────────────────────────────── */
.hero { text-align: center; padding: 4px 0 30px; }
.hero__emblem {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(39, 116, 224, .32), rgba(9, 22, 44, .5));
  border: 1px solid rgba(120, 195, 255, .3);
  box-shadow: 0 0 40px rgba(35, 133, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .16);
  animation: float 5s ease-in-out infinite;
}
.hero__emblem svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 0 8px var(--glow)); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.hero__kicker { margin: 0 0 10px; font-size: 9px; letter-spacing: .42em; color: #67a8e8; font-weight: 700; }
.logo {
  margin: 0;
  font-size: clamp(38px, 11vw, 52px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.045em;
  background: linear-gradient(180deg, #ffffff 10%, #a9d6ff 55%, #3ea8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(62, 168, 255, .55));
}
.logo__accent { -webkit-text-fill-color: var(--cyan); text-shadow: 0 0 26px rgba(53, 230, 255, .65); }
.hero__tagline { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* ─── Главная кнопка ─────────────────────────────────────── */
.cta {
  width: 100%;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(115deg, #1668e8 0%, #3ea8ff 52%, #35e6ff 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(30, 132, 255, .42), 0 0 0 1px rgba(180, 225, 255, .35) inset, 0 0 42px rgba(62, 168, 255, .25);
  animation: cta-glow 3.2s ease-in-out infinite;
  transition: transform .18s ease, filter .18s ease;
}
.cta:active { transform: scale(.975); filter: brightness(1.12); }
.cta__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, .16); }
.cta__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cta--small { height: 52px; font-size: 14px; border-radius: 16px; animation: none; }
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 12px 34px rgba(30, 132, 255, .42), 0 0 0 1px rgba(180, 225, 255, .35) inset, 0 0 34px rgba(62, 168, 255, .22); }
  50% { box-shadow: 0 14px 40px rgba(30, 132, 255, .55), 0 0 0 1px rgba(180, 225, 255, .5) inset, 0 0 58px rgba(62, 168, 255, .42); }
}

/* ─── Стеклянные карточки ────────────────────────────────── */
.glass {
  background: linear-gradient(150deg, rgba(23, 43, 73, .66), rgba(9, 19, 38, .56));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.status-card { margin-top: 18px; padding: 18px; }
.status-card__head { display: flex; align-items: center; gap: 12px; }
.status-card__icon {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(62, 168, 255, .14);
  color: var(--blue);
}
.status-card__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card-label { margin: 0; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.card-title { margin: 3px 0 0; font-size: 16px; font-weight: 750; letter-spacing: -.01em; }
.pill {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}
.pill--live { color: #62f0c0; background: rgba(56, 240, 176, .1); border: 1px solid rgba(56, 240, 176, .28); }
.pill--expired { color: #ffb87a; background: rgba(255, 168, 90, .1); border: 1px solid rgba(255, 168, 90, .28); }
.pill--none { color: #9bb4d2; background: rgba(155, 180, 210, .1); border: 1px solid rgba(155, 180, 210, .22); }
.pill--pro { color: #cfe8ff; background: rgba(62, 168, 255, .16); border: 1px solid rgba(62, 168, 255, .35); }

.status-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 12px; color: var(--muted); }
.link-btn {
  border: 0; background: none; padding: 0;
  color: var(--cyan); font-size: 12px; font-weight: 700; cursor: pointer;
}

.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.mini-tile { padding: 16px; }
.mini-tile__icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; }
.mini-tile__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini-tile__icon--blue { color: var(--blue); background: rgba(62, 168, 255, .14); }
.mini-tile__icon--cyan { color: var(--cyan); background: rgba(53, 230, 255, .12); }
.mini-tile__value { margin: 14px 0 3px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.mini-tile__value small { font-size: 11px; color: var(--muted); font-weight: 600; }
.mini-tile__value--down { color: var(--cyan); }
.mini-tile__value--up { color: #a98bff; }
.mini-tile__value--status { font-size: 17px; word-break: break-word; }
.mini-tile__value--status[data-status="active"] { color: #5cf2c4; }
.mini-tile__value--status[data-status="expired"] { color: #ffb87a; }
.mini-tile__value--status[data-status="not_active"] { color: #9bb4d2; }
.mini-tile__label { margin: 0; font-size: 11px; color: var(--muted); }

/* ─── Заголовки разделов ─────────────────────────────────── */
.section-head { margin: 12px 0 26px; }
.section-title { margin: 0; font-size: 29px; font-weight: 850; letter-spacing: -.035em; }
.section-subtitle { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* ─── Настройка VPN: ссылка для копирования, затем Happ ── */
.happ-connect { margin-top: 12px; }
.connect-link-card { margin-bottom: 14px; padding: 16px 18px; }
.connect-link-card code {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 12px;
  border-radius: 12px;
  background: rgba(3, 10, 22, .55);
  border: 1px solid rgba(120, 190, 255, .12);
  color: #bfe2ff; font-size: 11px;
}
.connect-link-card__note { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Сервис подключения: Happ */
.service-list { display: grid; gap: 10px; margin-top: 2px; }
.service-card {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--text);
  font-size: 14px; font-weight: 700; text-align: left; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease;
}
.service-card:active { transform: scale(.99); }
.service-card__action { color: var(--cyan); font-size: 12px; font-weight: 800; white-space: nowrap; }
.service-empty { margin: 0; padding: 16px; font-size: 13px; color: var(--muted); text-align: center; }

.connect-faq { margin-top: 12px; }

.server-card { margin-top: 8px; padding: 18px; }
.server-card__row { display: flex; align-items: center; gap: 12px; }
.server-card__flag { font-size: 26px; width: 40px; text-align: center; }
.ping { margin-left: auto; font-size: 17px; font-weight: 800; color: #62f0c0; }
.ping small { font-size: 10px; color: var(--muted); }

/* ─── Заработать ─────────────────────────────────────────── */
.earn-hero { padding: 26px 20px; text-align: center; }
.earn-hero__coin {
  width: 62px; height: 62px; margin: 0 auto 14px;
  display: grid; place-items: center; border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 196, 62, .22), rgba(120, 70, 10, .12));
  border: 1px solid rgba(255, 205, 92, .28);
  color: #ffd166;
  box-shadow: 0 0 32px rgba(255, 190, 60, .22);
}
.earn-hero__coin svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.earn-hero h2 { margin: 0 0 8px; font-size: 19px; }
.earn-hero p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }

.referral-card { margin-top: 12px; padding: 16px; }
.referral-card__row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.referral-card code {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 12px; border-radius: 12px;
  background: rgba(3, 10, 22, .55); border: 1px solid rgba(120, 190, 255, .12);
  color: #bfe2ff; font-size: 11px;
}
.copy-btn {
  flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 13px; border: 1px solid rgba(62, 168, 255, .3);
  background: rgba(62, 168, 255, .13); color: var(--blue); cursor: pointer;
}
.copy-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat-tile { padding: 15px 10px; text-align: center; }
.stat-tile__value { margin: 0; font-size: 17px; font-weight: 850; }
.stat-tile__value small { font-size: 10px; color: var(--muted); }
.stat-tile__label { margin: 5px 0 0; font-size: 10px; color: var(--muted); }

.earn-bonus { margin-top: 12px; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: center; }
.earn-bonus__item h3 { margin: 8px 0 4px; font-size: 21px; font-weight: 850; color: var(--cyan); }
.earn-bonus__item p:last-child { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ─── Профиль ────────────────────────────────────────────── */
.profile-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.details-card { margin-top: 12px; padding: 8px 18px; }
.details-card__row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; font-size: 13px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.details-card__row:last-child { border-bottom: 0; }
.details-card__row span { color: var(--muted); }
.accent-text { color: #5cf2c4; }
.menu-list { margin-top: 12px; padding: 6px 18px; }
.menu-list button {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .05);
  background: none; color: var(--text); font-size: 13px; cursor: pointer;
}
.menu-list button:last-child { border-bottom: 0; }

/* ─── Поддержка ──────────────────────────────────────────── */
.support-hero { padding: 26px 20px; text-align: center; }
.support-hero__icon {
  width: 62px; height: 62px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 20px; color: var(--cyan);
  background: rgba(53, 230, 255, .1); border: 1px solid rgba(53, 230, 255, .25);
}
.support-hero__icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.support-hero h2 { margin: 0 0 8px; font-size: 19px; }
.support-hero p { margin: 0 0 20px; font-size: 13px; color: var(--muted); line-height: 1.55; }

.faq { margin-top: 12px; padding: 16px 18px; }
.faq details { border-bottom: 1px solid rgba(255, 255, 255, .05); }
.faq details:last-child { border-bottom: 0; }
.faq summary { padding: 14px 0; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--blue); font-size: 17px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ─── Нижняя навигация ───────────────────────────────────── */
.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 480px);
  min-height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 10px 8px calc(10px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 2px;
  background: linear-gradient(180deg, rgba(12, 26, 48, .72), rgba(5, 12, 25, .94));
  border-top: 1px solid rgba(140, 200, 255, .16);
  border-radius: 26px 26px 0 0;
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .4);
}
.nav-item {
  position: relative;
  border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 2px 6px;
  color: #7490b2;
  font-size: 9px; font-weight: 650; white-space: nowrap;
  transition: color .22s ease;
}
.nav-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.is-active { color: var(--cyan); }
.nav-item.is-active svg { filter: drop-shadow(0 0 8px rgba(53, 230, 255, .7)); }
.nav-item.is-active::before {
  content: ""; position: absolute; top: -7px; width: 22px; height: 3px; border-radius: 3px;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
}

/* ─── Шторка покупки ─────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(2, 7, 16, .7); backdrop-filter: blur(6px); }
.sheet {
  position: fixed; z-index: 41; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 480px);
  max-height: 88dvh;
  overflow-y: auto;
  padding: 10px 18px calc(20px + var(--safe-bottom));
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, rgba(17, 34, 60, .96), rgba(6, 14, 29, .98));
  border: 1px solid rgba(140, 200, 255, .18);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  animation: sheet-in .32s cubic-bezier(.22, .9, .3, 1);
}
@keyframes sheet-in { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet__handle { width: 42px; height: 4px; margin: 0 auto 16px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet__head h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }

/* Три шага оформления: тариф → устройства → оплата */
.sheet-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.sheet-step-dot {
  flex: 1; height: 4px; border-radius: 99px;
  background: rgba(255, 255, 255, .1);
  transition: background .25s ease, box-shadow .25s ease;
}
.sheet-step-dot.is-active { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.step-hint { margin: 0 0 12px; font-size: 12px; color: var(--muted); }

.device-list { display: grid; gap: 8px; }
.device-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(140, 200, 255, .13);
  background: rgba(255, 255, 255, .035);
  color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.device-option.is-selected {
  border-color: rgba(62, 168, 255, .7);
  background: rgba(62, 168, 255, .12);
  box-shadow: 0 0 22px rgba(62, 168, 255, .16) inset;
}
.device-option strong { color: var(--cyan); font-size: 13px; }

.pay-summary { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(140, 200, 255, .13); }
.pay-summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; }
.pay-summary__row span { color: var(--muted); }
.pay-summary__row--total { margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 15px; }
.pay-summary__row--total strong { font-size: 22px; color: var(--cyan); }
.pay-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: #ffb87a; }
.ghost-btn {
  width: 100%; margin-top: 12px; padding: 12px;
  border: 0; background: none; color: var(--muted);
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.tariff-list { display: grid; gap: 10px; }
.tariff {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  gap: 4px 10px;
  width: 100%; padding: 15px 16px;
  border-radius: 18px; cursor: pointer; text-align: left;
  border: 1px solid rgba(140, 200, 255, .13);
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.tariff:active { transform: scale(.99); }
.tariff.is-selected { border-color: rgba(62, 168, 255, .7); background: rgba(62, 168, 255, .12); box-shadow: 0 0 24px rgba(62, 168, 255, .18) inset; }
.tariff__badge { font-size: 10px; font-weight: 900; letter-spacing: .12em; color: var(--cyan); }
.tariff__term { grid-column: 1; grid-row: 2; font-size: 15px; font-weight: 700; }
.tariff strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 18px; }
.tariff__hit { position: absolute; top: -8px; right: 12px; padding: 3px 8px; border-radius: 99px; font-size: 8px; font-weight: 900; letter-spacing: .1em; background: var(--blue); color: #04101f; }
.sheet__foot { margin-top: 18px; }
.sheet__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.sheet__total strong { font-size: 21px; color: var(--text); }

/* ─── Оплата: процесс и успех ───────────────────────────── */
.pay-progress {
  position: fixed; z-index: 70; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 22px; border-radius: 16px;
  background: rgba(12, 30, 56, .96);
  border: 1px solid rgba(120, 195, 255, .3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  color: #dff0ff; font-size: 13px; font-weight: 700;
}
.success-backdrop {
  position: fixed; z-index: 65; inset: 0;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(2, 7, 16, .8);
  backdrop-filter: blur(8px);
}
.success-card { width: min(100%, 380px); padding: 30px 24px; text-align: center; }
.success-card__icon {
  width: 72px; height: 72px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 24px;
  background: rgba(56, 240, 176, .14);
  border: 1px solid rgba(56, 240, 176, .35);
  color: #5cf2c4;
}
.success-card__icon svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.success-card h2 { margin: 0 0 8px; font-size: 22px; }
.success-card p { margin: 0 0 22px; font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ───Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(var(--nav-h) + var(--safe-bottom) + 18px);
  transform: translate(-50%, 20px);
  max-width: min(90%, 440px);
  padding: 12px 18px; border-radius: 14px;
  background: rgba(12, 30, 56, .95);
  border: 1px solid rgba(120, 195, 255, .3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  color: #dff0ff; font-size: 12px; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Ошибка связи с ботом/БД: показываем явно, а не подменяем демо-данными. */
.session-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 138, 138, .38);
  background: rgba(92, 24, 34, .42);
  color: #ffdede;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.session-error[hidden] { display: none; }

/* ─── Доступность ────────────────────────────────────────── */
button:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (max-width: 360px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .nav-item { font-size: 8px; }
}
