/* ════════════════════════════════════════════════════════════════════════════
   PrimeSIM Design System
   ════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Syncopate:wght@400;700&family=DM+Sans:wght@200;300;400&display=swap');

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --ps-black:      #080810;
  --ps-gold:       #C8A96E;
  --ps-gold-light: #E8D5A8;
  --ps-gold-dark:  #8B6F3A;
  --ps-white:      #F5F2EC;
  --ps-grey:       #1E1E28;
  --ps-grey-mid:   #2A2A35;
  --ps-grey-light: #4A4A5A;

  --color-bg:            var(--ps-black);
  --color-surface:       var(--ps-grey);
  --color-surface2:      var(--ps-grey-mid);
  --color-accent:        var(--ps-gold);
  --color-text:          var(--ps-white);
  --color-muted:         var(--ps-grey-light);
  --color-border:        rgba(200,169,110,0.15);
  --color-border-strong: rgba(200,169,110,0.30);

  --nav-height:    64px;
  --header-height: 56px;
  --radius:        16px;
  --tr:            0.2s ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; font-family: inherit; border: none; }
input  { font-family: inherit; }

/* ── Body ────────────────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Золотая сетка */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    repeating-linear-gradient(0deg,  transparent, transparent 70px, rgba(200,169,110,0.012) 70px, rgba(200,169,110,0.012) 71px),
    repeating-linear-gradient(90deg, transparent, transparent 70px, rgba(200,169,110,0.012) 70px, rgba(200,169,110,0.012) 71px);
  pointer-events: none;
  z-index: 0;
}

/* Ambient glow */
body::after {
  content: '';
  position: fixed;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(200,169,110,0.06) 0%, transparent 65%);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
  z-index: 0;
  animation: ambientPulse 6s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%,100% { opacity: 1;   transform: translate(-50%,-50%) scale(1);    }
  50%      { opacity: 0.5; transform: translate(-50%,-50%) scale(1.15); }
}

/* ── App shell ───────────────────────────────────────────────────────────── */
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.ps-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-height);
  background: rgba(8,8,16,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(200,169,110,0.1);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* ── Logo ────────────────────────────────────────────────────────────────── */
.ps-logo { display: inline-flex; flex-direction: column; }

.ps-logo__wordmark {
  font-family: 'Syncopate', sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: flex;
  align-items: baseline;
  line-height: 1;
}
.ps-logo--sm .ps-logo__wordmark { font-size: 17px; }
.ps-logo--lg .ps-logo__wordmark { font-size: 26px; }

.ps-logo__prim { color: var(--ps-white); }
.ps-logo__e    { color: var(--ps-gold); }
.ps-logo__sim  { color: var(--ps-white); opacity: 0.45; }

.ps-logo__line { display: flex; height: 1.5px; margin-top: 4px; }
.ps-logo__line-prim { flex: 4; background: rgba(245,242,236,0.18); }
.ps-logo__line-e    { flex: 1; background: var(--ps-gold); box-shadow: 0 0 10px rgba(200,169,110,0.55); }
.ps-logo__line-sim  { flex: 3; background: rgba(245,242,236,0.07); }

/* ── Screens ─────────────────────────────────────────────────────────────── */
.screen {
  display: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.screen.active { display: block; }

/* ── Bottom navigation — плавающий «остров» (v3) ─────────────────────────── */
.ps-bottom-nav {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px));
  min-height: 56px;
  padding: 8px 6px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(30, 30, 40, 0.92);
  border: 1px solid rgba(200, 169, 110, 0.2);
  border-radius: 28px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
}

.ps-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: none;
  border: none;
  border-radius: 20px;
  transition: background var(--tr), color var(--tr);
  min-height: 44px;
  justify-content: center;
}

.ps-nav-btn .ps-nav-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  transition: color var(--tr);
}
.ps-nav-btn .ps-nav-svg svg {
  width: 22px;
  height: 22px;
}

.ps-nav-label {
  font-family: 'Syncopate', sans-serif;
  font-size: 7px;
  letter-spacing: 0.18em;
  color: var(--color-muted);
  transition: color var(--tr);
}

.ps-nav-btn.active {
  background: rgba(200, 169, 110, 0.14);
}
.ps-nav-btn.active .ps-nav-svg,
.ps-nav-btn.active .ps-nav-label {
  color: var(--ps-gold);
}

.ps-nav-icon-wrap {
  position: relative;
  display: inline-flex;
}
.ps-nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--ps-gold);
  color: var(--ps-black);
  font-size: 10px;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ps-nav-badge.visible {
  display: inline-flex;
}


/* ════════════════════════════════════════════════════════════════════════════
   SCREEN 1 — МАГАЗИН
   ════════════════════════════════════════════════════════════════════════════ */

.ps-shop-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(8,8,16,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 16px 0;
}

/* Search */
.ps-search-wrap { position: relative; margin-bottom: 0; }

.ps-search-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px; opacity: 0.4; pointer-events: none;
}

.ps-search {
  width: 100%;
  padding: 11px 16px 11px 40px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 15px;
  outline: none;
  transition: border-color var(--tr);
  -webkit-appearance: none;
}
.ps-search:focus        { border-color: rgba(200,169,110,0.5); }
.ps-search::placeholder { color: var(--color-muted); }

/* Inner tab bar */
.ps-tabs {
  display: flex;
  background: var(--color-surface);
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
  margin: 12px 0 0;
}

.ps-tab {
  flex: 1;
  padding: 9px 6px;
  border-radius: 9px;
  background: transparent;
  color: var(--color-muted);
  font-family: 'Syncopate', sans-serif;
  font-size: 8px;
  letter-spacing: 0.12em;
  transition: all var(--tr);
  white-space: nowrap;
  text-align: center;
}
.ps-tab.active {
  background: var(--color-surface2);
  color: var(--ps-gold);
  border: 1px solid rgba(200,169,110,0.2);
}

.tab-content        { display: none; padding-top: 10px; }
.tab-content.active { display: block; }

/* ── Section label ───────────────────────────────────────────────────────── */
.ps-section-label {
  font-family: 'Syncopate', sans-serif;
  font-size: 8px; letter-spacing: 0.28em;
  color: var(--color-muted);
  text-transform: uppercase;
  padding: 12px 16px 8px;
}

/* ── Banner (Telegram channel) ───────────────────────────────────────────── */
.ps-banner {
  margin: 8px 16px 4px;
  background: linear-gradient(135deg, rgba(200,169,110,0.10) 0%, rgba(200,169,110,0.04) 100%);
  border: 1px solid rgba(200,169,110,0.25);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
}

.ps-banner__body { flex: 1; }

.ps-banner__title {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 3px;
}
.ps-banner__sub {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 10px;
}
.ps-banner__btn {
  background: var(--ps-gold);
  color: var(--ps-black);
  border: none;
  border-radius: 8px;
  font-family: 'Syncopate', sans-serif;
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  padding: 8px 14px;
  transition: opacity var(--tr);
}
.ps-banner__btn:active { opacity: 0.8; }

.ps-banner__close {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  font-size: 13px; color: var(--color-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Country list (card style) ───────────────────────────────────────────── */
.ps-country-list { padding: 0 16px; }

.ps-country-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--ps-grey);
  border: 1px solid rgba(200,169,110,0.1);
  border-radius: 14px;
  padding: 15px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.ps-country-row:active {
  border-color: var(--ps-gold);
  background: rgba(200,169,110,0.05);
}

/* Россия (featured) — золотая звезда */
.ps-country-row--featured::after {
  content: '★ Топ';
  position: absolute;
  right: 46px; top: 50%;
  transform: translateY(-50%);
  font-family: 'Syncopate', sans-serif;
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--ps-gold);
  white-space: nowrap;
}

.ps-country-flag {
  font-size: 28px;
  width: 38px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.ps-country-info { flex: 1; min-width: 0; }

.ps-country-name {
  font-size: 15px; font-weight: 400;
  color: var(--color-text);
}
.ps-country-region {
  font-family: 'Syncopate', sans-serif;
  font-size: 8px; letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-top: 3px;
  text-transform: uppercase;
}

.ps-price-pill {
  background: rgba(200,169,110,0.08);
  border: 1px solid rgba(200,169,110,0.2);
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 12px;
  color: var(--ps-gold);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Regions grid ─────────────────────────────────────────────────────────── */
.ps-regions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 8px;
}

.ps-region-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr), transform var(--tr);
  min-height: 110px;
  display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.ps-region-card::before {
  content: '';
  position: absolute; top: -50px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(200,169,110,0.04) 0%, transparent 65%);
}
.ps-region-card:active { border-color: var(--ps-gold); background: rgba(200,169,110,0.04); transform: scale(0.97); }

.ps-region-emoji { font-size: 26px; }
.ps-region-name {
  font-family: 'Syncopate', sans-serif;
  font-size: 9px; letter-spacing: 0.18em;
  color: var(--color-text);
}
.ps-region-price { font-size: 11px; color: var(--color-muted); }

/* ── Global plans ─────────────────────────────────────────────────────────── */
.ps-global-list { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }

.ps-global-card {
  background: linear-gradient(135deg, var(--ps-grey) 0%, var(--ps-grey-mid) 100%);
  border: 1px solid rgba(200,169,110,0.2);
  border-radius: 20px;
  padding: 26px 22px;
  position: relative; overflow: hidden;
  cursor: default;
  transition: border-color var(--tr), transform var(--tr);
}
.ps-global-card:has(.global-add-cart-btn:active) {
  border-color: rgba(200, 169, 110, 0.35);
}

.ps-global-card::after {
  content: '';
  position: absolute;
  top: 0; left: 32px; right: 32px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ps-gold), transparent);
  border-radius: 0 0 2px 2px;
}
.ps-global-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(200,169,110,0.05) 0%, transparent 65%);
  pointer-events: none;
}

.ps-global-card__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.ps-global-card__countries {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px; font-style: italic;
  color: rgba(200,169,110,0.65);
}
.ps-global-card__title {
  font-family: 'Syncopate', sans-serif;
  font-size: 20px; font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-text);
  margin-bottom: 14px;
}
.ps-global-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(200, 169, 110, 0.12);
}
.ps-btn-global-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(200, 169, 110, 0.45);
  background: rgba(200, 169, 110, 0.08);
  color: var(--ps-gold);
  font-family: 'Syncopate', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
  max-width: 100%;
  transition: border-color var(--tr), background var(--tr), transform 0.15s ease;
}
.ps-btn-global-add:hover {
  background: rgba(200, 169, 110, 0.14);
  border-color: var(--ps-gold);
}
.ps-btn-global-add:active { transform: scale(0.98); }
.ps-btn-global-add .ps-inline-cart-ic {
  display: flex;
  width: 16px;
  height: 16px;
  opacity: 0.95;
}
.ps-btn-global-add .ps-inline-cart-ic svg {
  width: 16px;
  height: 16px;
}
.ps-global-card__price {
  font-size: 30px; font-weight: 300;
  color: var(--ps-gold);
  line-height: 1;
}
.ps-global-card__price span { font-size: 16px; color: var(--color-muted); }


/* ════════════════════════════════════════════════════════════════════════════
   COUNTRY DETAIL SCREEN (slide overlay)
   ════════════════════════════════════════════════════════════════════════════ */

.ps-country-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 150;
  background: var(--ps-black);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.ps-country-screen.open {
  transform: translateX(0);
}

/* Внутренний хедер */
.ps-country-screen__header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(8,8,16,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(200,169,110,0.08);
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.ps-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 8px 0;
  color: var(--ps-gold);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  min-height: 44px;
}
.ps-back-btn__arrow { font-size: 22px; line-height: 1; }
.ps-back-btn__label { font-size: 16px; }

/* Hero: флаг + название */
.ps-country-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px 14px;
}

.ps-country-hero__flag {
  font-size: 52px;
  line-height: 1;
  flex-shrink: 0;
}

.ps-country-hero__name {
  font-family: 'Syncopate', sans-serif;
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text);
}
.ps-country-hero__sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 400;
  color: rgba(245,242,236,0.65);
  margin-top: 5px;
}

/* Info-бейдж: только данные */
.ps-info-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 16px;
  padding: 12px 14px;
  background: rgba(200,169,110,0.06);
  border: 1px solid rgba(200,169,110,0.15);
  border-radius: 12px;
}
.ps-info-badge__icon { font-size: 20px; flex-shrink: 0; }
.ps-info-badge__title {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text);
}
.ps-info-badge__desc {
  font-size: 11px;
  color: var(--color-muted);
  margin-top: 2px;
}

/* ── Plan toggle ─────────────────────────────────────────────────────────── */
.ps-plan-toggle {
  display: flex;
  background: var(--ps-grey);
  border: 1px solid rgba(200,169,110,0.15);
  border-radius: 12px;
  padding: 4px;
  margin: 0 16px 16px;
}

.ps-plan-toggle-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-muted);
  font-family: 'Syncopate', sans-serif;
  font-size: 9px;
  letter-spacing: 0.15em;
  transition: all 0.18s;
  text-align: center;
}
.ps-plan-toggle-btn.active {
  background: var(--ps-grey-mid);
  color: var(--ps-gold);
  border-color: rgba(200,169,110,0.25);
}

/* ── Plan list ───────────────────────────────────────────────────────────── */
.ps-plan-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Plan row */
.ps-plan-row {
  display: flex;
  align-items: center;
  background: var(--ps-grey);
  border: 1px solid rgba(200,169,110,0.1);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.ps-plan-row.selected {
  border-color: var(--ps-gold);
  background: rgba(200,169,110,0.06);
}

/* Золотая линия сверху у выбранного */
.ps-plan-row.selected::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--ps-gold);
  box-shadow: 0 0 8px rgba(200,169,110,0.5);
  border-radius: 0 0 2px 2px;
}

.ps-plan-row__left { flex: 1; }

.ps-plan-row__data {
  font-size: 16px; font-weight: 400;
  color: var(--color-text);
}
.ps-plan-row__days {
  font-size: 12px; font-weight: 500;
  color: rgba(245,242,236,0.72);
  margin-top: 3px;
}

.ps-plan-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-right: 14px;
}
.ps-plan-row__price {
  font-size: 16px; font-weight: 400;
  color: var(--ps-gold);
  line-height: 1;
}
.ps-plan-row__per {
  font-size: 11px;
  color: var(--color-muted);
}

/* Бейдж скидки */
.ps-plan-row__discount {
  background: rgba(200,169,110,0.12);
  border: 1px solid rgba(200,169,110,0.3);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 9px;
  font-family: 'Syncopate', sans-serif;
  letter-spacing: 0.1em;
  color: var(--ps-gold);
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 2px;
}

/* Radio-кнопка */
.ps-plan-row__radio {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(200,169,110,0.3);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s;
}
.ps-plan-row.selected .ps-plan-row__radio {
  border-color: var(--ps-gold);
}
.ps-plan-row.selected .ps-plan-row__radio::after {
  content: '';
  width: 11px; height: 11px;
  background: var(--ps-gold);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(200,169,110,0.5);
}

/* Empty state для планов */
.ps-plan-empty {
  text-align: center;
  padding: 40px 24px;
  color: var(--color-muted);
  font-size: 14px;
}

/* ── Sticky buy bar ──────────────────────────────────────────────────────── */
.ps-buy-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(8,8,16,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(200,169,110,0.1);
  z-index: 160;
}

.ps-buy-bar__btn {
  width: 100%;
  padding: 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.ps-buy-bar__btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* В строке «В корзину» + «Купить сразу» — одинаковая высота и ширина колонок */
.ps-buy-bar__row .ps-buy-bar__btn {
  width: auto;
}


/* ════════════════════════════════════════════════════════════════════════════
   BOTTOM SHEET (регионы / глобальные)
   ════════════════════════════════════════════════════════════════════════════ */

.ps-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(8,8,16,0);
  z-index: 200;
  pointer-events: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
.ps-sheet-overlay.open {
  background: rgba(8,8,16,0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  pointer-events: auto;
}

.ps-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--ps-grey);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid rgba(200,169,110,0.15);
  z-index: 201;
  max-height: 90vh;
  /* Flex column: handle + scrollable content + sticky footer */
  display: flex;
  flex-direction: column;
  overflow: hidden;   /* clip rounded corners; scroll is on .ps-sheet__content */
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.ps-sheet.open { transform: translateY(0); }

/* Светлая тема: шиты той же ширины, что колонка приложения */
[data-theme="light"] .ps-sheet {
  left: 50%;
  right: auto;
  width: min(420px, calc(100vw - 32px));
  transform: translate(-50%, 100%);
}
[data-theme="light"] .ps-sheet.open {
  transform: translate(-50%, 0);
}

/* Scrollable area inside the sheet */
.ps-sheet__content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px;
  background: var(--ps-grey);
}

.ps-sheet__handle {
  width: 36px; height: 4px;
  background: rgba(200,169,110,0.3);
  border-radius: 2px;
  margin: 14px auto 20px;
}

.ps-sheet__header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(200,169,110,0.1);
}

.ps-sheet__title-group { display: flex; align-items: center; gap: 14px; }
.ps-sheet__flag { font-size: 38px; line-height: 1; }

.ps-sheet__country {
  font-family: 'Syncopate', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--color-text);
}
.ps-sheet__subtitle {
  font-size: 11px; color: var(--color-muted); margin-top: 4px;
}
.ps-sheet__badge {
  display: inline-block;
  margin-top: 6px;
}

.ps-sheet__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  font-size: 16px; color: var(--color-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 4px;
}

/* Plans grid (для регионов/глобальных) */
.ps-plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.ps-plan-card {
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.ps-plan-card.selected {
  border-color: var(--ps-gold);
  background: rgba(200,169,110,0.07);
}
.ps-plan-card.selected::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1.5px;
  background: var(--ps-gold);
  box-shadow: 0 0 8px rgba(200,169,110,0.6);
}
.ps-plan-card:active { transform: scale(0.97); }

.ps-plan-days {
  font-family: 'Syncopate', sans-serif;
  font-size: 9px; letter-spacing: 0.2em; font-weight: 500;
  color: rgba(245,242,236,0.72);
  margin-bottom: 8px;
}
.ps-plan-price {
  font-size: 22px; font-weight: 300;
  color: var(--ps-gold); line-height: 1;
}
.ps-plan-per-day { font-size: 10px; color: var(--color-muted); margin-top: 5px; }

.ps-sheet-buy-btn { width: 100%; margin-top: 4px; }

/* Sheet section title */
.ps-sheet-section-title {
  font-family: 'Syncopate', sans-serif;
  font-size: 9px; letter-spacing: 0.3em;
  color: var(--color-muted);
  margin-bottom: 16px;
  margin-top: 4px;
}


/* ════════════════════════════════════════════════════════════════════════════
   SCREEN 2 — АККАУНТ
   ════════════════════════════════════════════════════════════════════════════ */

.ps-account-screen { padding: 16px 16px calc(16px + var(--nav-height)); }

/* eSIM Card */
.ps-esim-card {
  width: 100%;
  aspect-ratio: 1.6 / 1;
  border-radius: 18px;
  background: linear-gradient(135deg, #0C0C18 0%, #181828 60%, #0C0C18 100%);
  border: 1px solid rgba(200,169,110,0.22);
  padding: 22px 24px;
  position: relative; overflow: hidden;
  margin-bottom: 14px;
}
.ps-esim-card::before {
  content: '';
  position: absolute; top: -80px; right: -50px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(200,169,110,0.07) 0%, transparent 65%);
}
.ps-esim-card::after {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--ps-gold), transparent);
}

.ps-esim-card__top {
  display: flex; align-items: flex-start; justify-content: space-between;
}
.ps-esim-card__chip {
  width: 34px; height: 26px;
  background: linear-gradient(135deg, var(--ps-gold-dark), var(--ps-gold));
  border-radius: 4px;
  opacity: 0.85;
}

.ps-esim-card__body {
  position: absolute;
  bottom: 20px; left: 24px; right: 24px;
}
.ps-esim-card__number {
  font-size: 11px; letter-spacing: 0.24em;
  color: rgba(245,242,236,0.35);
  font-weight: 200;
  margin-bottom: 8px;
}
.ps-esim-card__footer-row {
  display: flex; align-items: flex-end; justify-content: space-between;
}
.ps-esim-card__name {
  font-family: 'Syncopate', sans-serif;
  font-size: 10px; letter-spacing: 0.15em;
  color: rgba(245,242,236,0.6);
}
.ps-esim-card__world {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px; font-style: italic;
  color: rgba(200,169,110,0.55);
}

/* Balance block */
.ps-balance-block {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.ps-balance-label {
  font-family: 'Syncopate', sans-serif;
  font-size: 8px; letter-spacing: 0.3em;
  color: var(--color-muted);
  margin-bottom: 5px;
}
.ps-balance-amount { font-size: 26px; font-weight: 300; color: var(--color-text); }

/* Invite banner */
.ps-invite-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(200,169,110,0.08), rgba(200,169,110,0.03));
  border: 1px solid rgba(200,169,110,0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  position: relative;
}
.ps-invite-banner__text {
  flex: 1;
  font-size: 13px;
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.4;
}
.ps-invite-banner__btn {
  flex-shrink: 0;
  padding: 9px 16px;
  font-size: 10px;
}
.ps-invite-banner__close {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  font-size: 12px; color: var(--color-muted);
  display: flex; align-items: center; justify-content: center;
}

/* ── Menu card (TonMobile style) ─────────────────────────────────────────── */
.ps-menu-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}
.ps-menu-card::before {
  content: '';
  position: absolute; top: -60px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(200,169,110,0.04) 0%, transparent 65%);
  pointer-events: none;
}

.ps-menu-divider {
  height: 1px;
  background: rgba(200,169,110,0.07);
  margin: 0 16px;
}

.ps-menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  min-height: 54px;
  transition: background var(--tr);
}
.ps-menu-row:active { background: rgba(200,169,110,0.04); }

.ps-menu-row__icon { font-size: 18px; flex-shrink: 0; }

.ps-menu-row__text {
  flex: 1;
  font-size: 15px; font-weight: 300;
  color: var(--color-text);
}
.ps-menu-row__text-group {
  flex: 1;
  display: flex; flex-direction: column; gap: 2px;
}
.ps-menu-row__sub {
  font-size: 12px; color: var(--color-muted);
}

.ps-menu-row__value {
  font-size: 14px;
  color: var(--color-muted);
  margin-right: 4px;
}

.ps-menu-row__chevron {
  font-size: 20px;
  color: var(--color-muted);
  font-weight: 300;
  flex-shrink: 0;
}

.ps-menu-row__online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ps-gold);
  box-shadow: 0 0 6px rgba(200,169,110,0.6);
  flex-shrink: 0;
  margin-right: 4px;
  animation: blink 2s ease-in-out infinite;
}

/* Profile row */
.ps-profile-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
}

.ps-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ps-gold-dark), var(--ps-gold));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syncopate', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--ps-black);
  flex-shrink: 0;
}
.ps-profile-name     { font-size: 16px; font-weight: 400; color: var(--color-text); }
.ps-profile-username { font-size: 12px; color: var(--color-muted); margin-top: 3px; }

/* ── Language picker sheet ───────────────────────────────────────────────── */
.ps-lang-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr);
}
.ps-lang-option:active { border-color: var(--ps-gold); }
.ps-lang-option.active { border-color: var(--ps-gold); background: rgba(200,169,110,0.06); }

.ps-lang-option__flag { font-size: 24px; }
.ps-lang-option__name {
  flex: 1;
  font-size: 15px; font-weight: 300;
  color: var(--color-text);
  text-align: left;
}
.ps-lang-option__check {
  font-size: 18px;
  color: var(--ps-gold);
  min-width: 20px;
  text-align: center;
}

/* ── Orders in sheet ─────────────────────────────────────────────────────── */
.ps-order-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid rgba(200,169,110,0.07);
  min-height: 52px;
  gap: 0;
}
.ps-order-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.ps-order-row:last-child { border-bottom: none; }
.ps-order-info {}
.ps-order-name { font-size: 14px; font-weight: 400; color: var(--color-text); }
.ps-order-date { font-size: 11px; color: var(--color-muted); margin-top: 2px; }
.ps-order-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.ps-order-price { font-size: 14px; font-weight: 400; color: var(--color-text); }

/* Status pills */
.ps-status {
  font-family: 'Syncopate', sans-serif;
  font-size: 7px; letter-spacing: 0.2em;
  padding: 3px 8px; border-radius: 10px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.ps-status--active  { background: rgba(200,169,110,0.1); color: var(--ps-gold); border-color: rgba(200,169,110,0.25); }
.ps-status--done    { background: rgba(74,74,90,0.3);    color: var(--ps-grey-light); }
.ps-status--pending { background: rgba(200,169,110,0.05); color: rgba(200,169,110,0.6); border-color: rgba(200,169,110,0.15); }
.ps-status--error   { background: rgba(255,80,80,0.1); color: #ff6060; border-color: rgba(255,80,80,0.2); }


/* ════════════════════════════════════════════════════════════════════════════
   SCREEN 3 — ПОМОЩЬ
   ════════════════════════════════════════════════════════════════════════════ */

.ps-help-screen {
  padding: 16px 16px calc(16px + var(--nav-height));
}

.ps-help-title {
  font-family: 'Syncopate', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-text);
  margin-bottom: 16px;
}

.ps-support-btn {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(200,169,110,0.10), rgba(200,169,110,0.04));
  border: 1px solid rgba(200,169,110,0.28);
  border-radius: var(--radius);
  padding: 18px 20px;
  width: 100%;
  transition: border-color var(--tr), background var(--tr);
  margin-bottom: 8px;
  cursor: pointer;
}
.ps-support-btn:active { border-color: var(--ps-gold); background: rgba(200,169,110,0.1); }

.ps-support-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--ps-gold-dark), var(--ps-gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}
.ps-support-text { flex: 1; text-align: left; }
.ps-support-title-txt {
  font-family: 'Syncopate', sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 0.15em;
  color: var(--color-text);
}
.ps-support-sub { font-size: 12px; color: var(--color-muted); margin-top: 3px; }

.ps-support-online {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: 'Syncopate', sans-serif;
  font-size: 7px; letter-spacing: 0.12em;
  color: var(--ps-gold);
  flex-shrink: 0;
}

/* FAQ */
.ps-faq-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
}

.ps-faq-item { border-bottom: 1px solid rgba(200,169,110,0.08); overflow: hidden; }
.ps-faq-item:last-child { border-bottom: none; }

.ps-faq-trigger {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 16px;
  width: 100%; background: none; border: none; text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 300;
  color: var(--color-text);
  min-height: 52px;
  gap: 12px;
  transition: background var(--tr);
}
.ps-faq-trigger:active { background: rgba(200,169,110,0.03); }

.ps-faq-trigger::after {
  content: '+';
  font-size: 22px; font-weight: 300;
  color: var(--ps-gold);
  flex-shrink: 0;
  transition: transform 0.25s ease;
  line-height: 1;
}
.ps-faq-item.open .ps-faq-trigger::after { transform: rotate(45deg); }

.ps-faq-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 13px; line-height: 1.7;
  color: var(--color-muted);
  padding: 0 16px;
}
.ps-faq-item.open .ps-faq-body { max-height: 400px; padding: 0 16px 16px; }


/* ════════════════════════════════════════════════════════════════════════════
   COMPONENTS (общие)
   ════════════════════════════════════════════════════════════════════════════ */

/* Primary button */
.ps-btn-primary {
  background: linear-gradient(135deg, var(--ps-gold-dark), var(--ps-gold));
  color: var(--ps-black);
  border: none;
  border-radius: 12px;
  font-family: 'Syncopate', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em;
  padding: 14px 20px;
  min-height: 46px;
  transition: opacity var(--tr), transform 0.15s;
  white-space: nowrap;
}
.ps-btn-primary:active { opacity: 0.82; transform: scale(0.97); }

/* Outline button */
.ps-btn-outline {
  background: transparent;
  color: var(--ps-gold);
  border: 1px solid rgba(200,169,110,0.3);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 300;
  padding: 12px 20px;
  min-height: 44px;
  transition: background var(--tr), border-color var(--tr);
}
.ps-btn-outline:active { background: rgba(200,169,110,0.07); border-color: var(--ps-gold); }

/* Pill */
.ps-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(200,169,110,0.28);
  border-radius: 20px;
  padding: 4px 11px;
  font-family: 'Syncopate', sans-serif;
  font-size: 8px; letter-spacing: 0.22em;
  color: var(--ps-gold);
}

/* Blinking dot */
.ps-dot-blink {
  width: 6px; height: 6px;
  background: var(--ps-gold);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
  display: inline-block;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.2; }
}

/* Divider */
.ps-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,169,110,0.15), transparent);
  margin: 16px 0;
}

/* Dot status */
.ps-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.ps-dot--green { background: var(--ps-gold); box-shadow: 0 0 6px rgba(200,169,110,0.5); }
.ps-dot--grey  { background: var(--ps-grey-light); }


/* ════════════════════════════════════════════════════════════════════════════
   ANIMATIONS & UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ps-fade-up { animation: fadeUp 0.4s ease forwards; }

/* Skeleton shimmer */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.ps-skeleton {
  background: linear-gradient(90deg,
    rgba(200,169,110,0.05) 25%,
    rgba(200,169,110,0.13) 50%,
    rgba(200,169,110,0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}

.ps-skel-row    { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.ps-skel-circle { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.ps-skel-lines  { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ps-skel-line   { height: 13px; }
.ps-skel-line.w60 { width: 60%; }
.ps-skel-line.w35 { width: 35%; }

/* Empty state */
.ps-empty {
  text-align: center; padding: 52px 24px;
  color: var(--color-muted);
}
.ps-empty-icon { font-size: 44px; margin-bottom: 12px; }
.ps-empty-text {
  font-family: 'Syncopate', sans-serif;
  font-size: 10px; letter-spacing: 0.2em;
}

/* Scrollbar */
::-webkit-scrollbar { width: 0; }


/* ════════════════════════════════════════════════════════════════════════════
   LIGHT THEME — override ALL primitive vars so every component responds
   ════════════════════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  /* Primitive overrides */
  --ps-black:      #F0EDE6;   /* bg becomes warm light */
  --ps-white:      #18181F;   /* text becomes near-black */
  --ps-grey:       #E4DFD2;   /* surfaces become light */
  --ps-grey-mid:   #DAD4C5;
  --ps-grey-light: #7A7A8A;
  --ps-gold:       #8B6F3A;   /* darker gold for contrast on light */
  --ps-gold-light: #6B5228;
  --ps-gold-dark:  #C8A96E;   /* swap: light gold used in gradients */

  /* Semantic overrides */
  --color-bg:            #F0EDE6;
  --color-surface:       #E4DFD2;
  --color-surface2:      #DAD4C5;
  --color-text:          #18181F;
  --color-muted:         #7A7A8A;
  --color-border:        rgba(139,111,58,0.2);
  --color-border-strong: rgba(139,111,58,0.4);
}

/* Opaque element backgrounds (hardcoded rgba in dark theme) */
[data-theme="light"] body                  { background: #F0EDE6; }
[data-theme="light"] .ps-header            { background: rgba(240,237,230,0.94); border-color: rgba(139,111,58,0.12); }
[data-theme="light"] .ps-shop-header       { background: rgba(240,237,230,0.94); }
[data-theme="light"] .ps-country-screen    { background: #F0EDE6; }
[data-theme="light"] .ps-country-screen__header { background: rgba(240,237,230,0.94); border-color: rgba(139,111,58,0.1); }
[data-theme="light"] .ps-buy-bar           { background: rgba(240,237,230,0.98); border-color: rgba(139,111,58,0.12); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-theme="light"] .ps-sheet__content    { background: #E4DFD2; }
[data-theme="light"] .ps-sheet__footer     { background: #E4DFD2; border-color: rgba(139,111,58,0.12); }

/* Ambient decorations hidden on light */
[data-theme="light"] body::before,
[data-theme="light"] body::after           { display: none; }

/* Logo — black text on light bg */
[data-theme="light"] .ps-logo__prim        { color: #18181F; }
[data-theme="light"] .ps-logo__sim         { color: #18181F; }
[data-theme="light"] .ps-logo__line-prim   { background: rgba(24,24,31,0.18); }
[data-theme="light"] .ps-logo__line-e      { box-shadow: none; }
[data-theme="light"] .ps-logo__line-sim    { background: rgba(24,24,31,0.07); }

/* Online pill */
[data-theme="light"] .ps-pill             { border-color: rgba(139,111,58,0.3); color: #8B6F3A; }
[data-theme="light"] .ps-dot-blink        { background: #8B6F3A; box-shadow: none; }
[data-theme="light"] .ps-menu-row__online-dot { background: #8B6F3A; box-shadow: none; }

/* Active nav label color (uses --ps-gold, already overridden) */
[data-theme="light"] .ps-nav-btn.active::after { background: #8B6F3A; box-shadow: none; }

/* Sheet overlay darker on light */
[data-theme="light"] .ps-sheet-overlay.open { background: rgba(24,24,31,0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* ════════════════════════════════════════════════════════════════════════════
   FLAG CIRCLES (flagcdn.com) — wrapper div so onerror & clip work reliably
   ════════════════════════════════════════════════════════════════════════════ */
.ps-flag {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center; justify-content: center;
  border: 1px solid rgba(200,169,110,0.15);
  background: var(--color-surface2);
  font-size: 18px;   /* fallback emoji size */
}
.ps-flag img {
  width: 140%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* ОАЭ: в круге якорим по левому краю — видна красная вертикаль у древка */
.ps-flag--hoist-start {
  justify-content: flex-start;
}
.ps-flag--hoist-start img {
  object-position: left center;
  width: 165%;
  height: 100%;
  max-width: none;
}
.ps-flag-fallback {
  font-size: 18px;
  line-height: 1;
}
.ps-flag--lg { width: 56px; height: 56px; font-size: 26px; }
.ps-flag--sm { width: 24px; height: 24px; font-size: 13px; }
.ps-flag--xs { width: 22px; height: 22px; font-size: 11px; }

.ps-inline-cart-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-right: 4px;
}
.ps-inline-cart-ic svg {
  width: 18px;
  height: 18px;
}


/* ════════════════════════════════════════════════════════════════════════════
   PREMIUM COUNTRY ROW (Russia / featured)
   ════════════════════════════════════════════════════════════════════════════ */
.ps-country-row--premium {
  background: linear-gradient(135deg, rgba(200,169,110,0.10) 0%, rgba(200,169,110,0.03) 100%);
  border-color: rgba(200,169,110,0.30);
}

.ps-premium-badge {
  font-family: 'Syncopate', sans-serif;
  font-size: 7px; letter-spacing: 0.18em;
  color: var(--ps-gold);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2px;
}

/* Price under country name */
.ps-country-meta {
  font-size: 11px;
  color: var(--ps-gold);
  margin-top: 3px;
  opacity: 0.75;
}


/* ════════════════════════════════════════════════════════════════════════════
   SHEET — ALWAYS-VISIBLE FOOTER (flex child, never scrolls)
   ════════════════════════════════════════════════════════════════════════════ */
.ps-sheet__footer {
  flex-shrink: 0;   /* never compressed by flex */
  background: var(--ps-grey);
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(200,169,110,0.1);
  box-shadow: 0 -8px 16px -8px rgba(8,8,16,0.35);
}
.ps-sheet__footer .ps-btn-primary { width: 100%; }

/* Two-button row inside sheet footer (mirrors .ps-buy-bar__row) */
.ps-sheet__footer-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.ps-sheet__footer-row .ps-btn-outline,
.ps-sheet__footer-row .ps-btn-primary {
  flex: 1 1 0;
  min-width: 0;
  min-height: 54px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  width: auto;
}
.ps-sheet__footer-row .ps-btn-outline {
  flex-direction: column;
  gap: 5px;
  padding: 10px 8px;
  font-size: 12px;
  line-height: 1.2;
}
.ps-sheet__footer-row .ps-btn-primary {
  flex-direction: column;
  padding: 12px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}


/* ════════════════════════════════════════════════════════════════════════════
   COUNTRIES ACCORDION (in region / global sheets)
   ════════════════════════════════════════════════════════════════════════════ */
.ps-accordion {
  margin-top: 12px;
  border-top: 1px solid rgba(200,169,110,0.1);
  padding-top: 2px;
}

.ps-accordion-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none;
  padding: 12px 0;
  font-family: 'Syncopate', sans-serif;
  font-size: 8px; letter-spacing: 0.2em;
  color: var(--ps-gold);
  cursor: pointer; text-align: left;
  gap: 8px;
}

.ps-accordion-chevron {
  font-size: 16px; flex-shrink: 0;
  transition: transform 0.25s ease;
  display: inline-block;
}
.ps-accordion.open .ps-accordion-chevron { transform: rotate(90deg); }

.ps-accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease;
}
.ps-accordion.open .ps-accordion-body { max-height: 1200px; }

.ps-countries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 6px;
  padding: 4px 0 12px;
}

.ps-accordion-flag-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.ps-accordion-flag-item .ps-flag {
  width: 32px; height: 32px;
}
.ps-accordion-flag-name {
  font-size: 8px;
  color: var(--color-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50px;
  line-height: 1.2;
}


/* ════════════════════════════════════════════════════════════════════════════
   THEME OPTION (in sheet)
   ════════════════════════════════════════════════════════════════════════════ */
.ps-theme-option {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr);
}
.ps-theme-option:active { border-color: var(--ps-gold); }
.ps-theme-option.active {
  border-color: var(--ps-gold);
  background: rgba(200,169,110,0.06);
}

/* ════════════════════════════════════════════════════════════════════════════
   v3 — Header cart, SVG icons, buy bar, cart screen, global countries toggle
   ════════════════════════════════════════════════════════════════════════════ */

.ps-header-cart {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  color: var(--ps-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr);
}
.ps-header-cart:active,
.ps-header-cart:hover {
  background: rgba(200, 169, 110, 0.1);
  border-color: var(--ps-gold);
}
.ps-header-cart svg {
  width: 22px;
  height: 22px;
}
.ps-header-cart__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--ps-gold);
  color: var(--ps-black);
  font-size: 11px;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-bg);
  line-height: 1;
}
.ps-header-cart__badge.visible {
  display: inline-flex;
}

.ps-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  background: rgba(200, 169, 110, 0.12);
  color: var(--ps-gold);
}
.ps-icon-circle--sm {
  width: 32px;
  height: 32px;
}
.ps-icon-circle--sm svg,
.ps-icon-circle svg {
  width: 18px;
  height: 18px;
}
[data-theme="light"] .ps-icon-circle {
  background: rgba(139, 111, 58, 0.08);
  color: var(--ps-gold);
}

.ps-menu-row__icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ps-buy-bar__row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 0;
}
.ps-buy-bar__row .ps-btn-outline,
.ps-buy-bar__row .ps-btn-primary {
  flex: 1 1 0;
  min-width: 0;
  min-height: 54px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}
.ps-buy-bar__row .ps-btn-outline {
  flex-direction: column;
  gap: 5px;
  padding: 10px 8px;
  font-size: 12px;
  line-height: 1.2;
}
.ps-buy-bar__row .ps-btn-outline .ps-inline-cart-ic {
  margin-right: 0;
}
.ps-buy-bar__row .ps-btn-outline .ps-inline-cart-ic svg {
  width: 20px;
  height: 20px;
}
.ps-buy-bar__row .ps-btn-primary {
  flex-direction: column;
  padding: 12px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}

.ps-global-card__countries-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  margin: 8px 0 0;
  background: rgba(200, 169, 110, 0.06);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--ps-gold);
  font-family: 'Syncopate', sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.ps-global-card__countries-toggle .ps-chevron {
  transition: transform 0.25s ease;
}
.ps-global-card.open .ps-global-card__countries-toggle .ps-chevron {
  transform: rotate(90deg);
}
.ps-global-card__countries-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.ps-global-card.open .ps-global-card__countries-body {
  max-height: 420px;
  overflow-y: auto;
  margin-top: 10px;
}
.ps-global-card .ps-countries-grid {
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.ps-country-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text);
  opacity: 0.9;
}
.ps-country-mini .ps-flag {
  width: 22px;
  height: 22px;
}

.ps-cart-screen {
  padding: 16px 16px 120px;
}
.ps-cart-title {
  font-family: 'Syncopate', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ps-gold);
  margin-bottom: 16px;
}
.ps-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  margin-bottom: 10px;
}
.ps-cart-item__info {
  flex: 1;
  min-width: 0;
}
.ps-cart-item__title {
  font-weight: 500;
  font-size: 14px;
}
.ps-cart-item__sub {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 2px;
}
.ps-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--ps-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ps-qty-btn svg {
  width: 14px;
  height: 14px;
}
.ps-cart-item__qty {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}
.ps-cart-item__price {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ps-cart-remove {
  background: none;
  border: none;
  color: var(--color-muted);
  padding: 4px;
}
.ps-cart-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-muted);
}
.ps-cart-summary {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.ps-cart-pay-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.ps-cart-pay-row:active {
  border-color: var(--ps-gold);
  background: rgba(200, 169, 110, 0.06);
}
.ps-cart-pay-row__label {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--color-muted);
}
.ps-cart-pay-row__value {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
}
.ps-cart-pay-row__chev {
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1;
}

/* Шит способов оплаты (TonMobile-style) */
.ps-sheet--pay .ps-sheet__content {
  padding-top: 8px;
}
.ps-pay-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.ps-pay-sheet__title {
  font-size: 17px;
  font-weight: 500;
  color: var(--color-muted);
}
.ps-pay-sheet__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--color-surface2);
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-pay-sheet__close:active {
  opacity: 0.85;
}
.ps-pay-sheet__body {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
}
.ps-pay-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 16px;
}
.ps-pay-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 4px 12px 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  border-radius: 12px;
  transition: background 0.15s;
}
.ps-pay-option:active {
  background: rgba(200, 169, 110, 0.08);
}
.ps-pay-option__label {
  flex: 1;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
}
.ps-pay-option__radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(139, 111, 58, 0.35);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .ps-pay-option__radio {
  border-color: rgba(200, 169, 110, 0.35);
}
.ps-pay-option.selected .ps-pay-option__radio {
  border-color: var(--ps-gold);
}
.ps-pay-option:not(.selected) .ps-pay-option__dot {
  display: none;
}
.ps-pay-option.selected .ps-pay-option__dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ps-gold);
}

.ps-pay-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ps-pay-icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}
.ps-pay-icon__txt {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.1;
  text-align: center;
  max-width: 34px;
}
.ps-pay-icon--sbp {
  background: linear-gradient(145deg, #4a148c 0%, #6a1b9a 40%, #e65100 100%);
}
.ps-pay-icon--mir {
  background: #0d8043;
}
.ps-pay-icon--intl {
  background: #42a5f5;
}
.ps-pay-icon--ton {
  background: #0098ea;
}
.ps-pay-icon--wallet {
  background: #2481cc;
}
.ps-pay-icon--stars {
  background: #64b5f6;
}
.ps-pay-icon--crypto {
  background: #1a237e;
}

.ps-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 16px 0;
  font-size: 18px;
}
.ps-promo-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.ps-promo-row .ps-search {
  flex: 1;
}

[data-theme="light"] .ps-bottom-nav {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(139, 111, 58, 0.15);
  box-shadow:
    0 8px 24px rgba(139, 111, 58, 0.18),
    0 2px 6px rgba(139, 111, 58, 0.1);
}
[data-theme="light"] .ps-nav-btn.active {
  background: rgba(139, 111, 58, 0.1);
}

[data-theme="light"] body,
[data-theme="light"] {
  --color-bg: #eee8dc;
  --color-surface: #ffffff;
  --color-surface2: #f8f3e8;
  --color-text: #1a1a1f;
  --color-muted: #8a7e68;
  --color-border: rgba(139, 111, 58, 0.18);
  --color-border-strong: rgba(139, 111, 58, 0.4);
  --ps-gold: #8b6f3a;
}
[data-theme="light"] body {
  background: #eee8dc;
}

/* Одна колонка по ширине навбара — контент и строки визуально по центру экрана */
[data-theme="light"] #app {
  max-width: 420px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

[data-theme="light"] .ps-country-row,
[data-theme="light"] .ps-menu-card,
[data-theme="light"] .ps-region-card,
[data-theme="light"] .ps-global-card,
[data-theme="light"] .ps-faq-card,
[data-theme="light"] .ps-cart-item,
[data-theme="light"] .ps-cart-pay-row {
  box-shadow: 0 2px 6px rgba(139, 111, 58, 0.12);
  border-color: rgba(139, 111, 58, 0.12);
}
[data-theme="light"] .ps-cart-pay-row {
  background: #ffffff;
}

/* Магазин: строки стран — белая карточка как блок меню в профиле */
[data-theme="light"] .ps-country-row {
  background: #ffffff;
  color: var(--color-text);
}
[data-theme="light"] .ps-country-row:active {
  background: rgba(139, 111, 58, 0.06);
}
[data-theme="light"] .ps-country-row .ps-country-name {
  color: var(--color-text);
}
[data-theme="light"] .ps-country-row .ps-country-meta {
  color: var(--color-muted);
}
[data-theme="light"] .ps-btn-global-add {
  background: rgba(139, 111, 58, 0.08);
  border-color: rgba(139, 111, 58, 0.35);
}
[data-theme="light"] .ps-btn-global-add:hover {
  background: rgba(139, 111, 58, 0.14);
  border-color: rgba(139, 111, 58, 0.5);
}

[data-theme="light"] .ps-country-row--premium {
  background: #fffdf8;
  border-color: rgba(139, 111, 58, 0.35);
  box-shadow: 0 2px 10px rgba(139, 111, 58, 0.12);
}

/* Магазин: РЕГИОНЫ — белые карточки в светлой теме (как страны) */
[data-theme="light"] .ps-region-card {
  background: #ffffff;
  color: var(--color-text);
}
[data-theme="light"] .ps-region-card::before {
  display: none;
}
[data-theme="light"] .ps-region-card:active {
  background: rgba(139, 111, 58, 0.06);
  border-color: var(--ps-gold);
}
[data-theme="light"] .ps-region-name {
  color: var(--color-text);
}

/* Магазин: МИР — белые карточки в светлой теме (как страны) */
[data-theme="light"] .ps-global-card {
  background: #ffffff;
  color: var(--color-text);
}
[data-theme="light"] .ps-global-card::before {
  display: none;
}
[data-theme="light"] .ps-global-card__title {
  color: var(--color-text);
}
[data-theme="light"] .ps-global-card__countries {
  color: rgba(139, 111, 58, 0.7);
}
[data-theme="light"] .ps-global-card__footer {
  border-top-color: rgba(139, 111, 58, 0.12);
}

/* Детальный экран СТРАНЫ — переключатель и строки тарифов в светлой теме */
[data-theme="light"] .ps-plan-toggle {
  background: #f8f3e8;
  border-color: rgba(139, 111, 58, 0.18);
}
[data-theme="light"] .ps-plan-toggle-btn {
  color: var(--color-muted);
}
[data-theme="light"] .ps-plan-toggle-btn.active {
  background: #ffffff;
  border-color: rgba(139, 111, 58, 0.25);
  color: var(--ps-gold);
  box-shadow: 0 1px 3px rgba(139, 111, 58, 0.12);
}
[data-theme="light"] #plan-list .ps-plan-row {
  background: #ffffff;
  border-color: rgba(139, 111, 58, 0.18);
  box-shadow: 0 2px 6px rgba(139, 111, 58, 0.08);
}
[data-theme="light"] #plan-list .ps-plan-row.selected {
  background: rgba(139, 111, 58, 0.06);
  border-color: var(--ps-gold);
}
[data-theme="light"] #plan-list .ps-plan-row__data {
  color: var(--color-text);
}
[data-theme="light"] #plan-list .ps-plan-row__days,
[data-theme="light"] #plan-list .ps-plan-row__per {
  color: var(--color-muted);
}
[data-theme="light"] .ps-info-badge {
  background: #ffffff;
  border-color: rgba(139, 111, 58, 0.18);
  box-shadow: 0 2px 6px rgba(139, 111, 58, 0.08);
}
[data-theme="light"] .ps-info-badge__title {
  color: var(--color-text);
}
[data-theme="light"] .ps-info-badge__desc {
  color: var(--color-muted);
}
[data-theme="light"] .ps-country-hero__name {
  color: var(--color-text);
}
[data-theme="light"] .ps-country-hero__sub {
  color: var(--color-muted);
}

/* Регионы / Мир — детальный bottom sheet: белые строки тарифов в светлой теме */
[data-theme="light"] .ps-sheet {
  background: #ffffff;
  border-top-color: rgba(139, 111, 58, 0.18);
}
[data-theme="light"] .ps-sheet__content {
  background: #ffffff;
}
[data-theme="light"] .ps-sheet__footer {
  background: #ffffff;
  border-color: rgba(139, 111, 58, 0.12);
}
[data-theme="light"] .ps-sheet__handle {
  background: rgba(139, 111, 58, 0.25);
}
[data-theme="light"] .ps-sheet__header {
  border-bottom-color: rgba(139, 111, 58, 0.12);
}
[data-theme="light"] .ps-sheet-plan-toggle {
  background: #f8f3e8;
  border-color: rgba(139, 111, 58, 0.18);
}
[data-theme="light"] .ps-sheet-plan-toggle .ps-plan-toggle-btn.active {
  background: #ffffff;
  border-color: rgba(139, 111, 58, 0.25);
  color: var(--ps-gold);
  box-shadow: 0 1px 3px rgba(139, 111, 58, 0.12);
}
[data-theme="light"] .ps-sheet-plan-list .ps-plan-row {
  background: #ffffff;
  border-color: rgba(139, 111, 58, 0.18);
  box-shadow: 0 2px 6px rgba(139, 111, 58, 0.08);
}
[data-theme="light"] .ps-sheet-plan-list .ps-plan-row.selected {
  background: rgba(139, 111, 58, 0.06);
  border-color: var(--ps-gold);
}
[data-theme="light"] .ps-sheet-plan-list .ps-plan-row__data {
  color: var(--color-text);
}
[data-theme="light"] .ps-sheet-plan-list .ps-plan-row__days,
[data-theme="light"] .ps-sheet-plan-list .ps-plan-row__per {
  color: var(--color-muted);
}
[data-theme="light"] .ps-sheet__country {
  color: var(--color-text);
}
[data-theme="light"] .ps-sheet__close {
  background: #f8f3e8;
  border-color: rgba(139, 111, 58, 0.18);
  color: var(--color-muted);
}
[data-theme="light"] .ps-accordion {
  border-top-color: rgba(139, 111, 58, 0.12);
}
[data-theme="light"] .ps-shop-header {
  background: rgba(238, 232, 220, 0.96);
}
[data-theme="light"] .ps-header {
  background: rgba(238, 232, 220, 0.94);
}

/* Нижняя панель покупки — та же ширина колонки, что и #app / навбар */
[data-theme="light"] .ps-buy-bar {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px));
  box-sizing: border-box;
  border-radius: 16px 16px 0 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   TOAST — всплывающее уведомление с галочкой («Добавлено в корзину»)
   ════════════════════════════════════════════════════════════════════════════ */
.ps-toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  left: 50%;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px 11px 13px;
  background: linear-gradient(135deg, rgba(30,30,40,0.96), rgba(20,20,28,0.96));
  border: 1px solid rgba(200,169,110,0.35);
  border-radius: 999px;
  box-shadow:
    0 14px 36px -12px rgba(8,8,16,0.7),
    0 0 0 1px rgba(200,169,110,0.08) inset,
    0 0 28px -10px rgba(200,169,110,0.4);
  color: var(--ps-white);
  font-family: 'Syncopate', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(-22px) scale(.9);
  transition:
    opacity .28s ease,
    transform .42s cubic-bezier(.18,.89,.32,1.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  max-width: calc(100vw - 32px);
}
.ps-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
.ps-toast__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E8D5A8, #C8A96E 60%, #8B6F3A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 4px 12px -2px rgba(200,169,110,0.5),
    inset 0 -2px 4px rgba(139,111,58,0.45);
  position: relative;
}
.ps-toast__icon::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,169,110,0.45), transparent 65%);
  opacity: 0;
  transform: scale(.6);
  pointer-events: none;
}
.ps-toast.show .ps-toast__icon::before {
  animation: ps-toast-pulse .9s ease-out .05s;
}
@keyframes ps-toast-pulse {
  0%   { opacity: 0;   transform: scale(.5); }
  35%  { opacity: 0.7; transform: scale(1.0); }
  100% { opacity: 0;   transform: scale(1.5); }
}
.ps-toast__icon svg {
  width: 14px;
  height: 14px;
  stroke: #18181F;
  stroke-width: 3.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}
.ps-toast.show .ps-toast__icon svg {
  animation: ps-toast-check .42s cubic-bezier(.65,.05,.36,1) .14s forwards;
}
@keyframes ps-toast-check {
  to { stroke-dashoffset: 0; }
}
.ps-toast__text {
  color: var(--ps-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

/* Light theme — белая карточка, золотой текст */
[data-theme="light"] .ps-toast {
  background: linear-gradient(135deg, #ffffff, #faf6ee);
  border-color: rgba(139,111,58,0.35);
  box-shadow:
    0 14px 36px -12px rgba(139,111,58,0.32),
    0 0 0 1px rgba(139,111,58,0.06) inset,
    0 0 24px -10px rgba(200,169,110,0.45);
}
[data-theme="light"] .ps-toast__text {
  color: var(--ps-gold-dark);
}

/* ════════════════════════════════════════════════════════════════════════════
   CHECKOUT SUCCESS — полноэкранный оверлей (остаёмся в WebApp)
   ════════════════════════════════════════════════════════════════════════════ */
.ps-checkout-success {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: rgba(8, 8, 16, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
}
.ps-checkout-success__panel {
  width: 100%;
  max-width: 380px;
  background: var(--ps-grey);
  border: 1px solid rgba(200, 169, 110, 0.28);
  border-radius: 20px;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.55);
}
.ps-checkout-success__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #e8d5a8, #c8a96e 55%, #8b6f3a);
  color: #18181f;
  font-size: 28px;
  line-height: 56px;
  font-weight: 700;
  box-shadow: 0 8px 20px -6px rgba(200, 169, 110, 0.55);
}
.ps-checkout-success__title {
  font-family: 'Syncopate', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ps-gold);
  margin-bottom: 8px;
}
.ps-checkout-success__sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--color-text);
  opacity: 0.88;
  margin-bottom: 12px;
  line-height: 1.45;
}
.ps-checkout-success__orders {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.ps-checkout-success__pay-label {
  font-family: 'Syncopate', sans-serif;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--ps-gold);
  text-align: left;
  margin-bottom: 6px;
}
.ps-checkout-success__pre {
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.45;
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(200, 169, 110, 0.12);
  border-radius: 12px;
  padding: 12px;
  max-height: 28vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 16px;
}
.ps-checkout-success__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ps-checkout-success__actions .ps-btn-primary,
.ps-checkout-success__actions .ps-btn-outline {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
}

[data-theme="light"] .ps-checkout-success__panel {
  background: #ffffff;
  border-color: rgba(139, 111, 58, 0.22);
}
[data-theme="light"] .ps-checkout-success__pre {
  background: #f8f3e8;
  border-color: rgba(139, 111, 58, 0.15);
  color: var(--color-text);
}

/* Автопродление в списке заказов */
.ps-order-autorenew {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(200, 169, 110, 0.1);
}
.ps-order-autorenew__label {
  font-family: 'Syncopate', sans-serif;
  font-size: 7px;
  letter-spacing: 0.16em;
  color: var(--ps-gold);
}
.ps-order-autorenew__hint {
  font-size: 10px;
  color: var(--color-muted);
  margin-top: 4px;
  line-height: 1.35;
}
.ps-toggle {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(200, 169, 110, 0.25);
  position: relative;
  flex-shrink: 0;
  transition: background var(--tr), border-color var(--tr);
}
.ps-toggle.on {
  background: rgba(200, 169, 110, 0.35);
  border-color: var(--ps-gold);
}
.ps-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ps-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.22s ease;
}
.ps-toggle.on .ps-toggle__knob {
  transform: translateX(18px);
}
[data-theme="light"] .ps-toggle {
  background: #e8e0d4;
}
[data-theme="light"] .ps-toggle.on {
  background: #d4c4a8;
}

/* ── Checkout success: per-order paid rows ──────────────────────────────── */
.ps-success-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ps-success-order-row:last-child { border-bottom: none; }
.ps-success-order-id {
  font-size: 13px;
  color: var(--color-muted);
  white-space: nowrap;
}
.ps-btn-paid {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--ps-gold);
  background: rgba(200,169,110,0.08);
  color: var(--ps-gold);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.ps-btn-paid:disabled { opacity: 0.45; cursor: default; }
.ps-btn-paid:not(:disabled):active { background: rgba(200,169,110,0.18); }
.ps-paid-sent {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--ps-gold);
  font-weight: 500;
}
[data-theme="light"] .ps-btn-paid {
  border-color: var(--ps-gold-dark, #b8960a);
  color: var(--ps-gold-dark, #b8960a);
  background: rgba(200,169,110,0.06);
}

/* ── Order: eSIM QR block ────────────────────────────────────────────────── */
.ps-order-esim {
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ps-order-esim__title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  width: 100%;
}
.ps-order-esim__qr {
  border-radius: 8px;
  display: block;
  width: 180px;
  height: 180px;
  background: #fff;
}
.ps-order-esim__lpa {
  font-family: monospace;
  font-size: 10px;
  color: var(--color-muted);
  word-break: break-all;
  text-align: center;
  padding: 0 4px;
  line-height: 1.5;
}
.ps-order-esim__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.ps-btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[data-theme="light"] .ps-order-esim {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}

/* ── Top-up sheet ─────────────────────────────────────────────────────────── */
.ps-topup-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ps-topup-amount {
  flex: 1 1 calc(33% - 8px);
  min-width: 80px;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--ps-white);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: center;
}
.ps-topup-amount.active,
.ps-topup-amount:active {
  background: var(--ps-gold);
  border-color: var(--ps-gold);
  color: #000;
}
[data-theme="light"] .ps-topup-amount {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.04);
  color: var(--ps-black);
}
[data-theme="light"] .ps-topup-amount.active {
  background: var(--ps-gold);
  color: #000;
}
.ps-topup-custom {
  width: 100%;
  box-sizing: border-box;
}
.ps-topup-amount-badge {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  padding: 16px 0 8px;
  color: var(--ps-white);
  letter-spacing: -0.02em;
}
[data-theme="light"] .ps-topup-amount-badge { color: var(--ps-black); }
.ps-topup-details-hint {
  font-size: 13px;
  color: var(--ps-grey-light);
  margin: 12px 0 6px;
}

