/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:           #0A0F1A;
  --surface:      rgba(255,255,255,0.07);
  --surface-hi:   rgba(255,255,255,0.11);
  --border:       rgba(255,255,255,0.08);
  --border-hi:    rgba(255,255,255,0.16);
  --inner-hi:     rgba(255,255,255,0.12);
  --blur:         blur(32px) saturate(160%);
  --text-1:       #F0F4FF;
  --text-2:       #6E8AAE;
  --text-3:       #344559;
  --blue:         #4F8EF7;
  --blue-dim:     rgba(79,142,247,0.15);
  --blue-glow:    rgba(79,142,247,0.30);
  --green:        #30D158;
  --green-dim:    rgba(48,209,88,0.12);
  --purple:       #A78BFA;
  --purple-dim:   rgba(167,139,250,0.13);
  --r-sm:  10px; --r-md: 16px; --r-lg: 20px; --r-xl: 24px; --r-pill: 50px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
button { -webkit-tap-highlight-color: transparent; outline: none; }

body {
  font-family: -apple-system, 'Inter', BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Ambient glow — barely visible, not blobs ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 80% -10%, rgba(79,142,247,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 10% 90%,  rgba(48,209,88,0.08)  0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 55%,  rgba(167,139,250,0.05) 0%, transparent 70%);
}

/* ── Logo background pattern ── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url('/img/bg-pattern.png');
  background-repeat: repeat;
  background-size: 700px 700px;
  opacity: 0.12;
}

/* ── Layout ── */
#app { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; padding-bottom: 74px; }
.main-content { flex: 1; }
.screen { padding: 16px 16px 24px; max-width: 440px; margin: 0 auto; }

/* ── Header ── */
.header { text-align: center; padding: 20px 0 20px; }
.header h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -0.04em;
  line-height: 1.12; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-1) 0%, #C0CAFF 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header p { font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* ── Glass surface ── */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 var(--inner-hi);
}

/* ── Card ── */
.card { padding: 2px 0; margin-bottom: 12px; }
.card { @extend .glass; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 var(--inner-hi);
  padding: 4px 16px; margin-bottom: 12px;
}

/* ── Section label ── */
.section-title {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  padding: 0 4px; margin: 20px 0 8px; letter-spacing: 0.01em;
}

/* ── Country list ── */
.country-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 var(--inner-hi);
  padding: 13px 16px; margin-bottom: 8px; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.country-item:active { background: var(--surface-hi); border-color: var(--border-hi); }
.info  { flex: 1; min-width: 0; }
.name  { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.desc  { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.price { font-size: 13px; font-weight: 600; color: var(--blue); white-space: nowrap; }

/* ── Plans ── */
.plans { display: flex; gap: 8px; margin-bottom: 12px; }
.plan {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--inner-hi);
  padding: 13px 8px 11px; text-align: center; cursor: pointer;
  position: relative; overflow: visible;
  transition: border-color .18s, background .18s;
}
.plan.selected { border-color: var(--blue); background: var(--blue-dim); box-shadow: 0 0 0 1px rgba(79,142,247,0.25), 0 8px 24px rgba(79,142,247,0.15), inset 0 1px 0 var(--inner-hi); }
.plan .months { font-size: 11px; color: var(--text-2); margin-bottom: 5px; }
.plan .amount { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.plan .badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: var(--r-pill); white-space: nowrap;
}

/* ── Features list ── */
.features { list-style: none; }
.features li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.features li:last-child { border-bottom: none; }
.features li .ic { color: var(--text-2); }

/* ── Info rows ── */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-2); }

/* ── Buttons ── */
.btn {
  display: block; width: 100%;
  padding: 15px 20px; border: none; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: inherit; text-align: center; text-decoration: none;
  margin-bottom: 10px; letter-spacing: -0.01em;
  transition: opacity .15s, transform .1s;
}
.btn:active   { transform: scale(0.97); opacity: .88; }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #6366F1 100%); color: #fff;
  box-shadow: 0 6px 28px var(--blue-glow), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-secondary {
  background: var(--surface-hi); color: var(--text-1);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--inner-hi);
}
.btn-crypto {
  background: rgba(52,199,89,0.15); color: var(--green);
  border: 1px solid rgba(52,199,89,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-guide {
  background: var(--blue-dim); color: var(--blue);
  border: 1px solid rgba(79,142,247,0.28);
  box-shadow: inset 0 1px 0 var(--inner-hi);
  border-radius: var(--r-lg);
  margin-top: 8px; padding: 11px 16px; font-size: 14px;
}
.btn-renew {
  background: var(--blue-dim) !important; color: var(--blue) !important;
  border-color: rgba(79,142,247,0.32) !important;
}
.btn-inner { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-spin {
  width: 15px; height: 15px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: spin .7s linear infinite;
}

/* ── Navigation ── */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex;
  background: rgba(10,15,26,0.92);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 0 12px; background: none; border: none;
  color: var(--text-3); font-size: 11px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: color .2s; position: relative;
}
.nav-item.active { color: var(--blue); }
.nav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 2.5px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 10px rgba(79,142,247,0.55);
}

/* ── Platform selector ── */
.platform-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 7px; margin-bottom: 12px;
}
.platform-chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--inner-hi);
  padding: 12px 6px; cursor: pointer;
  font-size: 11px; font-weight: 600; color: var(--text-2);
  transition: border-color .18s, background .18s, color .18s;
}
.platform-chip.sel {
  border-color: var(--blue); background: var(--blue-dim); color: var(--text-1);
}

/* ── Toggles ── */
.toggle-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info  { flex: 1; min-width: 0; }
.toggle-label { font-size: 14px; font-weight: 500; }
.toggle-desc  { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.toggle-track {
  width: 44px; height: 26px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255,255,255,0.08); position: relative; cursor: pointer;
  transition: background .2s;
  border: 1px solid rgba(255,255,255,0.06);
}
.toggle-track.on { background: var(--blue); border-color: transparent; }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.toggle-track.on .toggle-thumb { transform: translateX(18px); }

/* ── NetShield chips ── */
.ns-chips { display: flex; gap: 5px; }
.ns-chip {
  padding: 5px 10px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-3); font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.ns-chip.sel { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }

/* ── Crypto items ── */
.crypto-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 var(--inner-hi);
  padding: 13px 16px; margin-bottom: 8px; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.crypto-item:not(.disabled):active { background: var(--surface-hi); border-color: var(--border-hi); }
.crypto-item.disabled { opacity: .35; cursor: default; }
.crypto-icon {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.25), 0 3px 8px rgba(0,0,0,0.18);
}
.badge-soon {
  font-size: 10px; font-weight: 600; white-space: nowrap;
  background: transparent; color: var(--text-3);
  border: 1px solid var(--border);
  padding: 3px 8px; border-radius: var(--r-pill);
}

/* ── Subscriptions ── */
.sub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 var(--inner-hi);
  padding: 16px; margin-bottom: 8px;
}
.sub-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sub-name   { font-weight: 600; font-size: 15px; flex: 1; letter-spacing: -0.02em; }
.sub-status {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill);
}
.sub-status.active  { background: var(--green-dim); color: var(--green); }
.sub-status.expired { background: rgba(255,69,58,.1); color: #FF453A; }
.sub-expires { font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.sub-actions { display: flex; gap: 8px; }
.sub-actions .btn { margin: 0; flex: 1; border-radius: var(--r-lg); }

/* ── Account ── */
.acct-avatar-wrap {
  position: relative; width: 76px; height: 76px;
  margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
}
.acct-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--surface-hi);
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(79,142,247,0.35), 0 6px 26px rgba(79,142,247,0.30);
}
.acct-photo { width: 100%; height: 100%; object-fit: cover; }

/* Мягкие волны вокруг аватара — расходятся наружу и затухают */
.avatar-rays { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.avatar-rays::before, .avatar-rays::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--blue);
  animation: avatar-pulse 3s cubic-bezier(.2,.6,.3,1) infinite;
  will-change: transform, opacity;
}
.avatar-rays::after { animation-delay: 1.5s; }
@keyframes avatar-pulse {
  0%   { transform: scale(1);    opacity: .5; }
  70%  { opacity: 0; }
  100% { transform: scale(1.85); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .avatar-rays::before, .avatar-rays::after { animation: none; opacity: 0; }
}

/* ── Payment history (ЛК) ── */
.pay-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.pay-row:last-child { border-bottom: none; }
.pay-method {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-hi);
}
.pay-amount {
  font-size: 14px; font-weight: 700; color: var(--text-1); white-space: nowrap;
  display: flex; align-items: center; gap: 3px;
}

/* ── Support icon ── */
.icon-circle {
  width: 68px; height: 68px;
  background: var(--surface-hi); border: 1px solid var(--border);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; color: var(--text-2);
}

/* ── Crypto waiting ── */
.amount-big {
  font-size: 22px; font-weight: 700; letter-spacing: -0.03em; color: var(--text-1);
}
.status-row  { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--green); }
.conf-label  { font-size: 13px; color: var(--text-2); margin-top: 10px; }
.timer-badge { margin-left: auto; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-1); }
.hint-text   { font-size: 12px; color: var(--text-2); text-align: center; margin-top: 12px; line-height: 1.65; }
.address-box {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,.2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 12px; cursor: pointer;
  transition: border-color .18s; width: 100%;
}
.address-box:active { border-color: var(--green); }
.address-box span:first-child {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px; color: var(--text-2); word-break: break-all; flex: 1;
}
.progress-bar  { background: var(--surface-hi); border-radius: 3px; height: 4px; margin-top: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width .6s ease; }

/* ── Success ── */
.success-wrap { text-align: center; padding: 28px 0 16px; }
.success-icon-wrap {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--green-dim); border: 1px solid rgba(52,199,89,0.2);
  margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
  color: var(--green); animation: pop .45s cubic-bezier(.34,1.56,.64,1);
}
.success-icon-wrap svg { width: 38px; height: 38px; }
.success-title { font-size: 26px; font-weight: 700; letter-spacing: -0.04em; margin-bottom: 6px; }
.success-sub   { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* ── Online dot ── */
.online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 6px var(--green), 0 0 14px rgba(48,209,88,0.4);
  animation: pulse-dot 2.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.72)} }

/* ── Loader / Error ── */
.loader {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 80px 24px;
  color: var(--text-2); font-size: 14px;
}
.loader-spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.06); border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
.empty { text-align: center; padding: 60px 24px 40px; color: var(--text-2); }

/* ── Skeletons (загрузка каталога/аккаунта) ── */
.skel { position: relative; overflow: hidden; background: var(--surface); flex-shrink: 0; }
.skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  animation: shimmer 1.3s infinite;
}
body.light .skel::after { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent); }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-row, .sk-card {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface);
}
.sk-card { flex-direction: column; align-items: stretch; gap: 0; padding: 16px; }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }

/* ── Native MainButton active: прячем внутреннюю Stars-кнопку и нижнюю навигацию ── */
body.mb-active #payStarsBtn { display: none; }
body.mb-active .nav { display: none; }
body.mb-active #app { padding-bottom: 20px; }

/* ── Footer ── */
.catalog-footer {
  text-align: center; color: var(--text-3); font-size: 11px;
  padding: 20px 0 6px; letter-spacing: 0.02em;
}

/* ── Settings screen ── */
.lang-sel-grid, .theme-toggle-row { display: flex; gap: 8px; margin-bottom: 4px; }
.lang-sel-btn, .theme-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--inner-hi);
  padding: 12px 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  font-family: inherit; transition: border-color .18s, color .18s, background .18s;
  min-height: 48px;
}
.lang-sel-btn.active {
  border-color: var(--blue); background: var(--blue-dim); color: var(--blue);
  box-shadow: 0 0 0 1px rgba(79,142,247,0.2), inset 0 1px 0 var(--inner-hi);
}
.theme-btn.active {
  border-color: var(--purple); background: var(--purple-dim); color: var(--purple);
  box-shadow: 0 0 0 1px rgba(167,139,250,0.2), inset 0 1px 0 var(--inner-hi);
}

/* ── Light theme ── */
body.light {
  --bg: #EAEEF4;
  --surface: rgba(255,255,255,0.88);
  --surface-hi: rgba(255,255,255,0.96);
  --border: rgba(0,0,0,0.08);
  --border-hi: rgba(0,0,0,0.15);
  --inner-hi: rgba(255,255,255,0.6);
  --text-1: #0C1526;
  --text-2: #50637C;
  --text-3: #94A3B8;
  --blue: #2563EB;
  --blue-dim: rgba(37,99,235,0.09);
  --blue-glow: rgba(37,99,235,0.22);
  --green: #16A34A;
  --green-dim: rgba(22,163,74,0.10);
  color-scheme: light;
}
body.light::before { display: none; }
body.light::after  { opacity: 0.06; }
body.light .nav { background: rgba(234,238,244,0.9); border-top-color: rgba(0,0,0,0.09); }
body.light .toggle-track { background: rgba(0,0,0,0.13); border-color: rgba(0,0,0,0.10); }
body.light .toggle-track.on { background: var(--blue); border-color: transparent; }
body.light .ns-chip { color: var(--text-2); border-color: rgba(0,0,0,0.15); }
body.light .header h1 {
  background: linear-gradient(135deg, #0C1526 0%, #2563EB 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
body.light .btn-primary { background: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%); }

/* ── Option badges / hints ── */
.rec-badge {
  display: inline-block;
  font-size: 10px; font-weight: 600; letter-spacing: 0;
  background: var(--green-dim); color: var(--green);
  border: 1px solid rgba(48,209,88,0.2);
  padding: 2px 7px; border-radius: var(--r-pill);
  vertical-align: middle; margin-left: 5px;
}
.ns-hint {
  font-size: 11px; color: var(--text-2);
  text-align: right; line-height: 1.4; max-width: 140px;
}
.ns-hint-rec { color: var(--green); }

/* ── Utility ── */
.ic    { display: inline-flex; align-items: center; flex-shrink: 0; }
.ic svg{ width: 100%; height: 100%; display: block; }
.ic-sm { width: 16px; height: 16px; display: inline-flex; align-items: center; flex-shrink: 0; }
.ic-sm svg { width: 100%; height: 100%; }

/* ── Search ── */
.search-wrap { position: relative; margin-bottom: 14px; }
.search-wrap .ic-sm {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--text-3); pointer-events: none;
}
.search-input {
  width: 100%; padding: 13px 16px 13px 40px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  box-shadow: inset 0 1px 0 var(--inner-hi);
  color: var(--text-1); font-size: 15px; font-family: inherit;
  outline: none; transition: border-color .18s;
}
.search-input:focus { border-color: var(--blue); }
.search-input::placeholder { color: var(--text-3); }

/* ── Region segmented chips ── */
.region-row {
  display: flex; gap: 7px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.region-row::-webkit-scrollbar { display: none; }
.region-chip {
  flex: 0 0 auto; padding: 8px 15px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.region-chip.sel { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }

/* ── Guide hint line ── */
.guide-hint-line {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; color: var(--text-2);
  margin: 2px 4px 4px;
}
.guide-hint-line span { line-height: 1.35; text-align: left; }
.guide-hint-line .ic { color: var(--green); flex-shrink: 0; }

/* ── Country meta (cities count) ── */
.cc-meta { font-size: 12px; color: var(--text-2); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.cis-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0;
  background: var(--green-dim); color: var(--green);
  border: 1px solid rgba(48,209,88,0.22);
  padding: 1px 6px; border-radius: var(--r-pill); white-space: nowrap;
}

/* ── Bottom sheet ── */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity .25s ease;
  display: flex; align-items: flex-end;
}
.sheet-overlay.show { opacity: 1; }
.sheet {
  width: 100%; max-height: 78vh; display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 1px solid var(--border-hi);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.5);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.32,.72,0,1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet-overlay.show .sheet { transform: translateY(0); }
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--border-hi); margin: 10px auto 4px; flex-shrink: 0; }
.sheet-head { padding: 8px 20px 12px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sheet-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.sheet-body { overflow-y: auto; padding: 0 16px 16px; }
.city-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px; margin-bottom: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.city-item:active { background: var(--surface-hi); border-color: var(--border-hi); }
.city-item .name { font-weight: 600; font-size: 15px; flex: 1; }
.city-item.auto .name { color: var(--blue); }

/* ── Collapsible (Дополнительно) ── */
.collapse-head {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; padding: 2px;
}
.collapse-head .ic-sm { transition: transform .25s ease; color: var(--text-2); }
.collapse-head.open .ic-sm { transform: rotate(180deg); }
.collapse-body { overflow: hidden; }

/* ── Guide steps ── */
.guide-step { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 1.5; }
.guide-step:last-child { border-bottom: none; }
.guide-num {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-dim); color: var(--blue);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.guide-step code { font-family: 'JetBrains Mono','Courier New',monospace; font-size: 12px; background: rgba(0,0,0,.2); padding: 1px 5px; border-radius: 5px; word-break: break-all; }
.guide-step .wg-link { color: var(--blue); font-weight: 600; cursor: pointer; }

/* ── Admin native selects ── */
.adm-select {
  width: 100%; padding: 13px 16px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text-1);
  font-size: 15px; font-family: inherit; outline: none;
  -webkit-appearance: none; appearance: none;
}
.adm-label { font-size: 12px; font-weight: 600; color: var(--text-3); margin: 14px 2px 6px; }

/* ── Splash / loading screen ── */
#splash {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  transition: opacity .55s ease;
}
#splash.hide { opacity: 0; pointer-events: none; }
.splash-stage {
  position: relative; width: 300px; height: 300px;
  display: flex; align-items: center; justify-content: center;
  animation: stage-fade .6s ease both;
}
@keyframes stage-fade { from { opacity: 0; } to { opacity: 1; } }
/* мягкое многоцветное свечение в цветах лого */
.splash-halo {
  position: absolute; inset: 0; margin: auto; width: 270px; height: 270px; border-radius: 50%;
  background: conic-gradient(from 0deg,
    #34D6C5, #4F9BF2, #8B5CF6, #F472B6, #FB923C, #34D6C5);
  filter: blur(36px);
  -webkit-mask: radial-gradient(circle, #000 28%, transparent 68%);
          mask: radial-gradient(circle, #000 28%, transparent 68%);
  animation: halo-breathe 6s ease-in-out infinite;
}
@keyframes halo-spin { to { transform: rotate(360deg); } }
.splash-logo {
  position: relative; z-index: 1;
  width: 150px; height: auto; display: block;
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.35));
  animation: logo-in 1.1s cubic-bezier(.16,.84,.34,1) both;
}
.splash-title {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: 28px; font-weight: 800; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-1), #9DB4FF);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: splash-in 1s ease both .35s;
}
.splash-sub {
  font-size: 11px; color: var(--text-2); letter-spacing: 0.1em; text-transform: uppercase; margin-top: -16px;
  animation: splash-in 1s ease both .5s;
}
@keyframes halo-breathe { 0%,100% { opacity: .5; } 50% { opacity: .8; } }
@keyframes splash-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes logo-in      { from { opacity: 0; transform: scale(.82); filter: blur(8px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes splash-in    { from { opacity: 0; transform: translateY(12px) scale(.94); filter: blur(5px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }

/* ── Brand title + анимация прорисовки (clip-path reveal — работает в Safari/iOS) ── */
.brand-title {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
}
/* до запуска — спрятан (обрезан справа налево) */
.brand-anim { -webkit-clip-path: inset(0 101% 0 -2%); clip-path: inset(0 101% 0 -2%); }
.brand-anim.draw {
  animation: brand-reveal 1.6s cubic-bezier(.22,.61,.31,1) forwards,
             brand-glow 2s ease-out forwards;
}
@keyframes brand-reveal {
  from { -webkit-clip-path: inset(0 101% 0 -2%); clip-path: inset(0 101% 0 -2%); }
  to   { -webkit-clip-path: inset(0 -2% 0 -2%);  clip-path: inset(0 -2% 0 -2%); }
}
/* свечение «прокрашивает» текст по мере проявления, затем затухает */
@keyframes brand-glow {
  0%   { filter: drop-shadow(0 0 0 rgba(120,160,255,0)); }
  55%  { filter: drop-shadow(0 0 16px rgba(120,160,255,0.6)); }
  100% { filter: drop-shadow(0 0 0 rgba(120,160,255,0)); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-anim, .brand-anim.draw { -webkit-clip-path: none; clip-path: none; animation: none; }
}

/* ── Language switcher (top of main screen) ── */
#langFab { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; z-index: 400; }
.lang-fab-btn {
  display: flex; align-items: center; gap: 5px; padding: 7px 10px;
  border-radius: var(--r-pill); cursor: pointer; font-family: inherit;
  background: rgba(10,15,26,0.55);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border); color: var(--text-2);
  box-shadow: inset 0 1px 0 var(--inner-hi);
}
body.light .lang-fab-btn { background: rgba(255,255,255,0.7); }
.lang-fab-btn .fi { width: 22px; height: 16px; border-radius: 3px; background-size: cover; display: inline-block; }
.lang-fab-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 152px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 5px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.45);
  opacity: 0; transform: scale(.95) translateY(-4px); transform-origin: top right;
  pointer-events: none; transition: opacity .15s ease, transform .15s ease;
}
.lang-fab-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.lang-fab-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px;
  border: none; background: transparent; border-radius: var(--r-md);
  color: var(--text-1); font-size: 14px; font-family: inherit; cursor: pointer; text-align: left;
}
.lang-fab-opt .fi { width: 22px; height: 16px; border-radius: 3px; background-size: cover; flex-shrink: 0; display: inline-block; }
.lang-fab-opt.active { color: var(--blue); background: var(--blue-dim); }

/* ── QR modal ── */
/* фон под модалкой не скроллится */
body.modal-open { overflow: hidden; }
.qr-overlay {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(0,0,0,0.6); padding: 28px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
  touch-action: none; overscroll-behavior: contain;
}
.qr-overlay.show { opacity: 1; }
.qr-card {
  position: relative;
  background: #fff; border-radius: var(--r-xl); padding: 18px;
  max-width: 300px; width: 100%; text-align: center;
  transform: scale(.92); transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.qr-overlay.show .qr-card { transform: scale(1); }
.qr-img { width: 100%; height: auto; display: block; border-radius: 8px; image-rendering: pixelated; }
.qr-cap { margin-top: 12px; font-size: 13px; color: #333; }
/* кнопка закрытия модалки */
.modal-close {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 26px; height: 26px; padding: 4px; border: none; cursor: pointer;
  background: transparent; color: #888;
  display: flex; align-items: center; justify-content: center;
  -webkit-appearance: none; appearance: none; outline: none;
  -webkit-tap-highlight-color: transparent;
}
.modal-close:focus, .modal-close:active { background: transparent; outline: none; }
.modal-close svg { width: 100%; height: 100%; }

/* ── Guide modal (как установить) ── */
.guide-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 18px;
  max-width: 360px; width: 100%; max-height: 80vh; overflow-y: auto;
  transform: scale(.92); transition: transform .25s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  touch-action: pan-y; overscroll-behavior: contain;  /* внутренний скролл работает, фон — нет */
}
.qr-overlay.show .guide-card { transform: scale(1); }
.guide-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.guide-modal-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-dim); color: var(--blue);
}
.guide-modal-title { font-size: 16px; font-weight: 700; color: var(--text-1); line-height: 1.2; }
.guide-modal-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.guide-plat-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.guide-plat {
  padding: 7px 13px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  transition: background .15s, border-color .15s, color .15s;
}
.guide-plat.sel { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }
.guide-steps { display: flex; flex-direction: column; }

/* ── Tab switch animation ── */
.screen-enter { animation: screen-in .28s ease both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Animations ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop  { from { transform: scale(.5) rotate(-8deg); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ════════════════════════════════════════════════════════════════════════════
   Design polish v2 — флаг-фон стран, акценты, билет-карточки, hero-статус
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Country card: флаг-watermark + акцентный цвет + появление ── */
.country-item { position: relative; overflow: hidden; transition: border-color .18s, background .18s, transform .12s; }
.country-item { animation: card-rise .4s ease backwards; animation-delay: calc(var(--i, 0) * 32ms); }
@keyframes card-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.country-item .fi { position: relative; z-index: 1; }
.country-item .info, .country-item .cc-right { position: relative; z-index: 1; }
.cc-right { display: flex; align-items: center; gap: 8px; }
.country-item .price { color: var(--blue); }
.country-item:active { background: var(--surface-hi); border-color: var(--accent-mid, var(--border-hi)); transform: scale(.985); }
@media (prefers-reduced-motion: reduce) { .country-item { animation: none; } }

/* ── Hero-статус (активное подключение наверху каталога) ── */
.hero-status {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px; margin-bottom: 14px; cursor: pointer;
  border-radius: var(--r-xl);
  background:
    linear-gradient(135deg, var(--accent-soft, var(--blue-dim)), transparent 70%),
    var(--surface);
  border: 1px solid var(--accent-mid, var(--border));
  box-shadow: inset 0 1px 0 var(--inner-hi);
  transition: transform .12s;
  animation: card-rise .45s ease backwards;
}
.hero-status:active { transform: scale(.985); }
.hs-flag { position: relative; flex-shrink: 0; }
.hs-flag .fi { border-radius: 5px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.hs-dot {
  position: absolute; right: -3px; bottom: -3px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--green); border: 2px solid var(--bg);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2.6s ease-in-out infinite;
}
.hs-info { flex: 1; min-width: 0; }
.hs-title { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ── Sub-card как «билет» ── */
.sub-card.ticket { position: relative; overflow: hidden; padding-left: 19px; transition: border-color .2s, box-shadow .2s; }
.sub-card.ticket::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent, var(--blue)); opacity: .9;
}
.sub-card.ticket.expired::before { background: var(--text-3); opacity: .6; }
.sub-card.soon { border-color: var(--accent-mid, var(--border)); box-shadow: 0 0 0 1px var(--accent-mid), 0 8px 24px rgba(0,0,0,.18), inset 0 1px 0 var(--inner-hi); }
.sub-status.active .st-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 5px var(--green);
  animation: pulse-dot 2.6s ease-in-out infinite;
}
.sub-progress { height: 5px; border-radius: 3px; background: var(--surface-hi); overflow: hidden; margin: 12px 0 7px; }
.sub-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent, var(--blue)), var(--accent-mid, var(--blue-glow)));
  transition: width .7s cubic-bezier(.22,.61,.31,1);
}
.sub-meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.sub-days { font-size: 13px; font-weight: 700; color: var(--text-1); }

/* ── Plans: цена за месяц + нажатие ── */
.plan-mo { font-size: 10px; color: var(--text-3); margin-top: 2px; }
.plan.selected .plan-mo { color: var(--blue); }
.plan { transition: border-color .18s, background .18s, transform .12s; }
.plan:active { transform: scale(.97); }

/* ── Нажатие на остальные интерактивные карточки ── */
.crypto-item:not(.disabled) { transition: border-color .18s, background .18s, transform .12s; }
.crypto-item:not(.disabled):active { transform: scale(.985); }
.platform-chip { transition: border-color .18s, background .18s, color .18s, transform .12s; }
.platform-chip:active { transform: scale(.96); }

/* ── Удаление конфигов ── */
.btn-danger {
  background: rgba(255,69,58,0.14); color: #FF6B6B;
  border: 1px solid rgba(255,69,58,0.3);
  box-shadow: inset 0 1px 0 var(--inner-hi);
}
.btn-danger:disabled { opacity: .4; }
.del-row {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: inset 0 1px 0 var(--inner-hi);
  padding: 12px 14px; margin-bottom: 8px;
}
.del-row .info { flex: 1; min-width: 0; }
.del-btn {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,69,58,0.12); color: #FF6B6B;
  border: 1px solid rgba(255,69,58,0.22); cursor: pointer;
  transition: transform .12s, background .15s;
}
.del-btn:active { transform: scale(.9); background: rgba(255,69,58,0.22); }
.del-card {
  position: relative;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 22px 20px 20px;
  max-width: 340px; width: 100%; text-align: center;
  transform: scale(.92); transition: transform .25s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.qr-overlay.show .del-card { transform: scale(1); }
.del-modal-icon {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,69,58,0.14); color: #FF6B6B;
}
.del-modal-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.del-modal-warn { font-size: 13px; color: #FF6B6B; line-height: 1.5; margin-bottom: 14px; }
.del-modal-confirm { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 10px; }
.del-input { text-align: center; margin-bottom: 12px; padding-left: 16px !important; }
.del-card .btn { margin-bottom: 0; }
.del-refund {
  display: flex; align-items: flex-start; gap: 8px; text-align: left;
  background: rgba(245,183,10,0.10); border: 1px solid rgba(245,183,10,0.25);
  border-radius: var(--r-md); padding: 10px 12px;
  font-size: 12px; line-height: 1.45; color: #E6A700;
}
.del-refund .ic { flex-shrink: 0; margin-top: 1px; }
.del-actions { display: flex; gap: 8px; margin-top: 16px; }

/* промокод в списке «Полезное» — плавное раскрытие поля ввода */
.promo-inline {
  display: flex; gap: 8px; padding: 4px 0 12px;
  overflow: hidden; transform-origin: top;
  animation: promo-drop .26s cubic-bezier(.22,.61,.31,1) both;
}
@keyframes promo-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.promo-row .chev { transition: transform .2s ease; }
.promo-row.open .chev { transform: rotate(90deg); }

/* плавное появление вложенных экранов (О сервисе, История платежей и т.п.) */
.view-enter { animation: screen-in .28s ease both; }

/* ── Hero-приветствие для новых юзеров ── */
.hero-welcome {
  background: linear-gradient(135deg, var(--blue-dim), transparent 72%), var(--surface);
  border-color: rgba(79,142,247,0.28);
  cursor: default;
}
.hero-welcome:active { transform: none; }
.hs-shield {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-dim); color: var(--blue);
}

/* ── Шеврон на карточке страны ── */
.cc-chev { width: 16px; height: 16px; display: inline-flex; align-items: center; color: var(--text-3); flex-shrink: 0; }
.cc-chev svg { width: 100%; height: 100%; }
.online-dot { margin-right: 1px; }

/* ── Best-value тариф ── */
.plan-best {
  border-color: rgba(48,209,88,0.42);
  box-shadow: 0 0 0 1px rgba(48,209,88,0.22), 0 8px 22px rgba(48,209,88,0.12), inset 0 1px 0 var(--inner-hi);
}
.badge-best { background: var(--green); }
.badge-star { display: inline-flex; width: 9px; height: 9px; vertical-align: middle; }
.badge-star svg { width: 100%; height: 100%; }

/* ── Пустые состояния ── */
.empty-title { margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--text-1); }
.empty-sub { margin-top: 4px; font-size: 13px; color: var(--text-3); }

/* ════════════════════════════════════════════════════════════════════════════
   Motion v3 — оркестрованный момент успеха, кольцо подтверждений, count-up
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Успех: спокойные кольца расходятся → эмблема всплывает → галочка прорисовывается ── */
.success-stage {
  position: relative; width: 100px; height: 100px;
  margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
}
.success-ring {
  position: absolute; inset: 10px; border-radius: 50%;
  border: 1.5px solid var(--green); opacity: 0;
  animation: success-ripple 1.5s cubic-bezier(.2,.6,.3,1) forwards;
}
.success-ring:nth-child(2) { animation-delay: .22s; }
@keyframes success-ripple {
  0%   { transform: scale(.6);  opacity: .55; }
  70%  { opacity: 0; }
  100% { transform: scale(1.75); opacity: 0; }
}
.success-emblem {
  position: relative; z-index: 1;
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--green-dim); border: 1px solid rgba(48,209,88,0.22);
  display: flex; align-items: center; justify-content: center; color: var(--green);
  animation: success-pop .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes success-pop {
  0%   { transform: scale(.5); opacity: 0; }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
.success-check { width: 40px; height: 40px; }
.success-check path {
  fill: none; stroke: var(--green); stroke-width: 3.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 32; stroke-dashoffset: 32;
  animation: success-draw .5s cubic-bezier(.65,0,.35,1) .3s forwards;
}
@keyframes success-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .success-ring { display: none; }
  .success-emblem { animation: none; }
  .success-check path { animation: none; stroke-dashoffset: 0; }
}

/* ── Крипто: кольцо подтверждений вместо линейного бара ── */
.conf-ring-wrap { position: relative; width: 76px; height: 76px; margin: 12px auto 4px; }
.conf-ring { width: 76px; height: 76px; transform: rotate(-90deg); display: block; }
.conf-ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.conf-ring-bg { stroke: var(--surface-hi); }
.conf-ring-fill {
  stroke: var(--green);
  filter: drop-shadow(0 0 5px rgba(48,209,88,0.45));
  transition: stroke-dashoffset .7s cubic-bezier(.22,.61,.31,1);
}
.conf-ring-num {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1;
}
.conf-ring-num b { font-size: 21px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.conf-ring-num span { font-size: 11px; color: var(--text-2); margin-top: 3px; }

/* ── Count-up цены: tabular, чтобы не дёргалась ширина ── */
#totalAmount { font-variant-numeric: tabular-nums; }

/* ── Signature: дуга-маршрут «ты → сервер» в шторке выбора города ── */
.sheet-route { display: flex; align-items: center; gap: 6px; padding: 12px 22px 4px; }
.route-node { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.route-you { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(79,142,247,0.3); }
.route-you svg { width: 17px; height: 17px; }
.route-dest .fi { border-radius: 5px; box-shadow: 0 2px 9px rgba(0,0,0,0.32); }
.route-arc { flex: 1; height: 40px; overflow: visible; }
.route-path {
  fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round;
  filter: drop-shadow(0 0 4px var(--blue-glow));
  stroke-dasharray: 300; stroke-dashoffset: 300;
  animation: route-draw 1s cubic-bezier(.4,0,.2,1) .12s forwards;
}
@keyframes route-draw { to { stroke-dashoffset: 0; } }
.route-pkt { fill: #fff; filter: drop-shadow(0 0 5px var(--blue)); opacity: 0; animation: route-pkt-on .3s ease 1s forwards; }
@keyframes route-pkt-on { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .route-path { animation: none; stroke-dashoffset: 0; }
  .route-pkt { display: none; }
}

/* ── Однократный блик на тарифе «выгодно» (badge не обрезаем — clip только псевдо) ── */
.plan-best { position: relative; }
.plan-best::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--r-lg);
  pointer-events: none; clip-path: inset(0 round var(--r-lg));
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,0.16) 50%, transparent 62%);
  background-size: 220% 100%; background-position: -120% 0;
  animation: plan-shine 1.2s ease-out .55s 1 forwards;
}
@keyframes plan-shine { to { background-position: 130% 0; } }
@media (prefers-reduced-motion: reduce) { .plan-best::after { display: none; } }

/* ── Успех как сквозная история: маршрут установлен → замок защёлкивается ── */
.route-success { display: flex; align-items: center; gap: 8px; max-width: 300px; margin: 4px auto 10px; }
.route-success .route-arc { height: 38px; }
.route-success .route-node { width: 40px; height: 40px; }
.route-success .route-you svg { width: 19px; height: 19px; }
.route-dest { position: relative; }
.route-pkt-arrive { fill: #fff; filter: drop-shadow(0 0 6px var(--blue)); }
.route-lock {
  position: absolute; right: -5px; bottom: -5px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  opacity: 0; transform: scale(0);
  animation: lock-snap .42s cubic-bezier(.34,1.56,.64,1) 1.3s forwards;
}
.route-lock svg { width: 9px; height: 9px; }
@keyframes lock-snap { to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .route-lock { animation: none; opacity: 1; transform: scale(1); }
  .route-pkt-arrive { display: none; }
}
