/* NovaShop Mini App v2 — mobile-first RTL */
@font-face {
  font-family: Vazirmatn;
  src: url(/app/assets/fonts/vazirmatn-arabic.woff2) format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+6??, U+750-77F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: Vazirmatn;
  src: url(/app/assets/fonts/vazirmatn-latin.woff2) format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+??, U+2000-206F;
}

:root {
  --bg: #f6f7fb;
  --paper: #ffffff;
  --ink: #171a2b;
  --text: #23273a;
  --muted: #6b7284;
  --line: rgba(23, 26, 43, 0.08);
  --brand: #7c3aed;
  --brand-dark: #5b21b6;
  --brand-soft: #f1eafe;
  --hero-start: #7c3aed;
  --hero-end: #5b21b6;
  --hero-glow: #a78bfa;
  --green: #0e9f6e;
  --green-soft: #e3f7ef;
  --amber: #d97706;
  --amber-soft: #fdf1df;
  --red: #dc2626;
  --red-soft: #fdecec;
  --blue: #2563eb;
  --blue-soft: #e8effd;
  --teal: #0d9488;
  --teal-soft: #e0f5f2;
  --pink: #db2777;
  --pink-soft: #fdeaf3;
  --radius: 18px;
  --font-scale: 1;
  --shadow: 0 8px 28px rgba(23, 26, 43, 0.07);
  --nav-h: 62px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: 0.6; cursor: wait; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.25);
  outline-offset: 2px;
  border-radius: 8px;
}

.app {
  max-width: 560px;
  margin-inline: auto;
  padding: calc(env(safe-area-inset-top) + 10px) 14px calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
}

/* ---------- header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px 12px;
}
.top__brand { display: flex; align-items: center; gap: 9px; }
.top__logo {
  width: 38px; height: 38px; border-radius: 12px; object-fit: cover;
  box-shadow: var(--shadow);
}
.top__title { font-size: calc(16px * var(--font-scale)); font-weight: 800; color: var(--ink); line-height: 1.2; }
.top__sub { font-size: calc(11px * var(--font-scale)); color: var(--muted); }
.top__user {
  font-size: calc(12px * var(--font-scale)); color: var(--muted); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px;
  max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 20px 18px;
  color: #fff;
  background:
    radial-gradient(120% 160% at 85% -20%, var(--hero-glow) 0%, transparent 55%),
    radial-gradient(100% 140% at 0% 110%, var(--hero-end) 0%, transparent 60%),
    linear-gradient(135deg, var(--hero-start), var(--hero-end));
  box-shadow: 0 14px 34px rgba(91, 33, 182, 0.28);
  margin-bottom: 16px;
}
.hero__tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: calc(10.5px * var(--font-scale)); font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px; padding: 4px 10px; margin-bottom: 10px;
}
.hero__title { font-size: calc(19px * var(--font-scale)); font-weight: 900; line-height: 1.55; margin: 0 0 6px; }
.hero__sub { font-size: calc(12.5px * var(--font-scale)); line-height: 1.9; opacity: 0.92; margin: 0; }
.hero__perks { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.hero__perk {
  font-size: calc(10.5px * var(--font-scale)); font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px; padding: 5px 10px;
  display: inline-flex; align-items: center; gap: 5px;
}
.hero__perk svg { width: 13px; height: 13px; }

/* ---------- search & chips ---------- */
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 13px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input {
  border: 0; outline: none; background: none; width: 100%;
  font-size: calc(13.5px * var(--font-scale)); color: var(--ink);
}
.search input::placeholder { color: var(--muted); }

.chips {
  display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 12px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; font-size: calc(12px * var(--font-scale)); font-weight: 600; color: var(--muted);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; transition: all 0.15s;
}
.chip--on { color: #fff; background: var(--brand); border-color: var(--brand); box-shadow: 0 6px 14px rgba(124, 58, 237, 0.3); }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: calc(14.5px * var(--font-scale)); font-weight: 800; color: var(--ink);
  margin: 6px 2px 12px;
}
.section-title small { font-size: calc(11px * var(--font-scale)); font-weight: 500; color: var(--muted); }

/* ---------- product grid (2 per row) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pcard {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: right;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 13px 12px;
  box-shadow: var(--shadow);
  transition: transform 0.12s;
  overflow: hidden;
}
.pcard:active { transform: scale(0.97); }
body[data-card-style="flat"] .pcard,
body[data-card-style="flat"] .plan,
body[data-card-style="flat"] .card,
body[data-card-style="flat"] .phead { box-shadow: none; }
body[data-card-style="bordered"] .pcard,
body[data-card-style="bordered"] .plan,
body[data-card-style="bordered"] .card,
body[data-card-style="bordered"] .phead {
  box-shadow: none;
  border-color: color-mix(in srgb, var(--ink) 18%, transparent);
}
.pcard__glow {
  position: absolute; inset: 0 0 auto 0; height: 58px;
  opacity: 0.1; pointer-events: none;
  background: linear-gradient(180deg, var(--accent, #7c3aed), transparent);
}
.pcard__logo {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--tile, #f1eafe);
  margin-bottom: 10px;
}
.pcard__logo svg, .pcard__logo img { width: 27px; height: 27px; object-fit: contain; }
.pcard__name { font-size: calc(13.5px * var(--font-scale)); font-weight: 800; color: var(--ink); }
.pcard__eyebrow { font-size: calc(10.5px * var(--font-scale)); color: var(--muted); margin: 3px 0 10px; line-height: 1.7; }
.pcard__meta { margin-top: auto; display: flex; flex-direction: column; gap: 3px; width: 100%; }
.pcard__count { font-size: calc(10px * var(--font-scale)); color: var(--muted); }
.pcard__price { font-size: calc(12px * var(--font-scale)); font-weight: 700; color: var(--brand-dark); }
.pcard__price b { font-size: calc(12.5px * var(--font-scale)); }

/* ---------- product page ---------- */
.product-page {
  --page-accent: var(--brand);
  color: var(--page-text, var(--text));
  background: var(--page-bg, transparent);
  border-radius: calc(var(--radius) + 4px);
}
.product-page .phead,
.product-page .plan,
.product-page .note,
.product-page .content-block {
  background-color: var(--page-surface, var(--paper));
}
.product-page .plan--popular { border-color: color-mix(in srgb, var(--page-accent) 42%, transparent); }
.product-page .plan__cta {
  color: var(--page-accent);
  background: color-mix(in srgb, var(--page-accent) 12%, transparent);
}
.back {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: calc(12.5px * var(--font-scale)); font-weight: 600; color: var(--muted);
  padding: 8px 2px; margin-bottom: 4px;
}
.back svg { width: 16px; height: 16px; }

.phead {
  display: flex; align-items: center; gap: 13px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 15px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.phead__logo {
  width: 58px; height: 58px; border-radius: 17px; flex: none;
  display: grid; place-items: center; background: var(--tile, #f1eafe);
}
.phead__logo svg, .phead__logo img { width: 34px; height: 34px; object-fit: contain; }
.phead__name { font-size: calc(17px * var(--font-scale)); font-weight: 900; color: var(--ink); }
.phead__eyebrow { font-size: calc(11px * var(--font-scale)); color: var(--muted); margin-top: 2px; }

.template--editorial .phead {
  flex-direction: column;
  text-align: center;
  padding: 24px 18px;
  border-top: 4px solid var(--page-accent);
}
.template--editorial .phead__logo { width: 74px; height: 74px; border-radius: 22px; }
.template--editorial .phead__logo svg,
.template--editorial .phead__logo img { width: 44px; height: 44px; }
.template--editorial .phead__name { font-size: calc(21px * var(--font-scale)); }
.template--compact .phead { padding: 10px 12px; border-radius: 12px; }
.template--compact .phead__logo { width: 44px; height: 44px; border-radius: 12px; }
.template--compact .phead__logo svg,
.template--compact .phead__logo img { width: 26px; height: 26px; }
.template--compact .plan { padding: 9px 11px; border-radius: 12px; }
.template--spotlight .phead {
  min-height: 152px;
  align-items: flex-end;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--page-accent) 55%, #fff), transparent 48%),
    linear-gradient(135deg, var(--page-accent), color-mix(in srgb, var(--page-accent) 55%, #111827));
}
.template--spotlight .phead__logo { width: 70px; height: 70px; background: rgba(255,255,255,.9); }
.template--spotlight .phead__name { color: #fff; font-size: calc(21px * var(--font-scale)); }
.template--spotlight .phead__eyebrow { color: rgba(255,255,255,.82); }

.note {
  border-radius: var(--radius);
  padding: 13px 14px;
  font-size: calc(11.5px * var(--font-scale)); line-height: 2;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
}
.note--info { background: var(--blue-soft); border-color: rgba(37, 99, 235, 0.15); color: #1e40af; }
.note--warn { background: var(--amber-soft); border-color: rgba(217, 119, 6, 0.2); color: #92400e; }
.note--ok { background: var(--green-soft); border-color: rgba(14, 159, 110, 0.18); color: #065f46; }
.note b { font-weight: 800; }

.content-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.content-block h3 { margin: 0 0 6px; color: var(--ink); font-size: calc(14px * var(--font-scale)); font-weight: 900; }
.content-block p { margin: 0; color: var(--muted); font-size: calc(11.5px * var(--font-scale)); line-height: 2; }
.content-block--intro { border-inline-start: 4px solid var(--page-accent); }
.content-block--notice.tone--info { background: var(--blue-soft); color: #1e40af; }
.content-block--notice.tone--success { background: var(--green-soft); color: #065f46; }
.content-block--notice.tone--warning { background: var(--amber-soft); color: #92400e; }
.content-block--notice.tone--brand {
  background: color-mix(in srgb, var(--page-accent) 10%, var(--paper));
  border-color: color-mix(in srgb, var(--page-accent) 25%, transparent);
}
.content-block--features ul { list-style: none; padding: 0; margin: 10px 0 0; }
.content-block--features li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: calc(11.5px * var(--font-scale)); line-height: 1.9; margin: 5px 0;
}
.content-block--features li svg { width: 15px; color: var(--green); flex: none; margin-top: 4px; }
.content-block--faq details {
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  margin-top: 8px; overflow: hidden; transition: border-color .15s, background .15s;
}
.content-block--faq details[open] { border-color: color-mix(in srgb, var(--page-accent) 35%, var(--line)); }
.content-block--faq summary {
  cursor: pointer; color: var(--ink); font-size: calc(11.5px * var(--font-scale)); font-weight: 800;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 11px 12px;
}
.content-block--faq summary::-webkit-details-marker { display: none; }
.faq-toggle {
  width: 23px; height: 23px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: var(--page-accent);
  background: color-mix(in srgb, var(--page-accent) 9%, var(--paper));
  font-size: calc(17px * var(--font-scale)); font-weight: 500; transition: transform .18s;
}
.content-block--faq details[open] .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  border-top: 1px solid var(--line); padding: 10px 12px 12px;
  color: var(--muted); font-size: calc(11.5px * var(--font-scale)); line-height: 2;
}
.faq-answer a { color: var(--brand-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.content-block--cta {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: color-mix(in srgb, var(--page-accent) 8%, var(--paper));
  border-color: color-mix(in srgb, var(--page-accent) 22%, var(--line));
}
.content-block--cta > div { min-width: 0; }
.content-block--cta .btn { flex: none; }
.content-divider { border: 0; border-top: 1px solid var(--line); height: 0; }
.content-divider--dashed { border-top-style: dashed; }
.content-divider--dotted { border-top-style: dotted; }
.content-divider--compact { margin: 10px 0; }
.content-divider--normal { margin: 18px 0; }
.content-divider--large { margin: 30px 0; }

/* compare table (dedicated vs shared) */
.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px;
}
.compare__col {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 11px 11px;
}
.compare__col--recommended {
  border-color: color-mix(in srgb, var(--page-accent) 38%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--page-accent) 7%, var(--paper)), var(--paper));
}
.compare__recommended {
  position: absolute; top: -8px; inset-inline-start: 9px; padding: 2px 7px;
  border-radius: 999px; background: var(--page-accent); color: #fff;
  font-size: calc(8px * var(--font-scale)); font-weight: 800;
}
.compare__head { font-size: calc(12px * var(--font-scale)); font-weight: 900; margin-bottom: 4px; color: var(--ink); }
.compare__col--recommended .compare__head { color: var(--page-accent); }
.compare__note { min-height: 0; margin: 0 0 8px !important; font-size: calc(9.5px * var(--font-scale)) !important; line-height: 1.7 !important; }
.compare__item {
  font-size: calc(10.5px * var(--font-scale)); color: var(--muted); line-height: 1.8;
  display: flex; gap: 6px; margin-bottom: 5px;
}
.compare__item svg { width: 13px; height: 13px; flex: none; margin-top: 3px; }
.compare__item--yes svg { color: var(--green); }
.compare__item--no svg { color: var(--red); }
.compare__item--neutral { color: var(--muted); }
.compare__dot { width: 13px; flex: none; text-align: center; color: var(--muted); font-size: calc(15px * var(--font-scale)); line-height: 1.2; }

@media (max-width: 350px) {
  .compare { grid-template-columns: 1fr; }
  .content-block--cta { align-items: stretch; flex-direction: column; }
  .content-block--cta .btn { width: 100%; }
}

.group-title {
  font-size: calc(13px * var(--font-scale)); font-weight: 800; color: var(--ink);
  margin: 16px 2px 10px; display: flex; align-items: center; gap: 7px;
}
.group-title::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.group-description { margin: -6px 0 10px; color: var(--muted); font-size: calc(11px * var(--font-scale)); line-height: 1.9; }
.content-block--comparison > h3 { margin-bottom: 5px; }
.content-block--comparison > p { margin-top: 0; }
.content-block--comparison.container--soft { background: var(--brand-soft); border-color: transparent; }
.content-block--comparison.container--bordered { border-width: 2px; }
.badge--custom { border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }

/* ---------- plan cards ---------- */
.plans { display: flex; flex-direction: column; gap: 9px; }
.plan {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: right;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 13px;
  box-shadow: var(--shadow); transition: transform 0.12s;
  position: relative; overflow: hidden;
}
.plan:active { transform: scale(0.98); }
.plan--popular { border-color: rgba(124, 58, 237, 0.35); }
.plan__pop {
  position: absolute; top: 0; left: 14px;
  font-size: calc(9px * var(--font-scale)); font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 0 0 8px 8px; padding: 3px 8px;
  z-index: 1;
}
.plan__main { flex: 1; min-width: 0; }
.plan__name { font-size: calc(13px * var(--font-scale)); font-weight: 800; color: var(--ink); line-height: 1.6; }
.plan__short { font-size: calc(10.5px * var(--font-scale)); color: var(--muted); line-height: 1.8; margin-top: 3px; }
.plan__badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.plan__side { flex: none; text-align: left; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.plan--popular .plan__side { padding-top: calc(22px * var(--font-scale)); }
.plan__price { font-size: calc(13px * var(--font-scale)); font-weight: 800; color: var(--ink); white-space: nowrap; }
.plan__price small { font-size: calc(9.5px * var(--font-scale)); font-weight: 500; color: var(--muted); }
.plan__cta {
  font-size: calc(10px * var(--font-scale)); font-weight: 700; color: var(--brand-dark);
  background: var(--brand-soft); border-radius: 999px; padding: 4px 10px;
  display: inline-flex; align-items: center; gap: 3px;
}
.plan__cta svg { width: 11px; height: 11px; }

.badge {
  font-size: calc(9.5px * var(--font-scale)); font-weight: 700; border-radius: 7px; padding: 3px 7px;
  display: inline-flex; align-items: center; gap: 3px; line-height: 1.5;
}
.badge svg { width: 11px; height: 11px; }
.badge--brand { color: var(--brand-dark); background: var(--brand-soft); }
.badge--blue { color: #1e40af; background: var(--blue-soft); }
.badge--green { color: #065f46; background: var(--green-soft); }
.badge--amber { color: #92400e; background: var(--amber-soft); }
.badge--teal { color: #115e59; background: var(--teal-soft); }
.badge--pink { color: #9d174d; background: var(--pink-soft); }
.badge--gray { color: var(--muted); background: #eef0f5; }
.badge--size-sm { font-size: calc(8.5px * var(--font-scale)); padding: 2px 6px; }
.badge--size-lg { font-size: calc(11px * var(--font-scale)); padding: 4px 9px; }

/* ---------- flash sale (جشنواره) ---------- */
.badge--sale { color: #b91c1c; background: #fee2e2; }
.plan--sale { border-color: color-mix(in srgb, #ef4444 35%, transparent); }
.plan__price-old {
  font-size: calc(10.5px * var(--font-scale)); font-weight: 600; color: var(--muted);
  text-decoration: line-through; text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, #ef4444 65%, transparent);
  white-space: nowrap;
}
.plan__price--sale { color: #dc2626; }
.plan__price--sale small { color: color-mix(in srgb, #dc2626 70%, var(--muted)); }
.sale-timer {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 7px;
  font-size: calc(9.5px * var(--font-scale)); font-weight: 700;
  color: #b91c1c; background: #fef2f2; border: 1px dashed #fecaca;
  border-radius: 999px; padding: 3px 9px; width: fit-content;
}
.sale-timer svg { width: 12px; height: 12px; flex: none; }
.sale-timer b { font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 0.4px; }
.sale-timer--lg { font-size: calc(11px * var(--font-scale)); padding: 6px 12px; margin-top: 0; }
.sale-timer--urgent { animation: sale-pulse 1.2s ease-in-out infinite; }
@keyframes sale-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}
.sale-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  border: 1px solid #fecaca; border-radius: 14px;
  padding: 10px 12px; margin: 10px 0;
}
.sale-banner > svg { width: 20px; height: 20px; color: #dc2626; flex: none; }
.sale-banner > div { flex: 1; min-width: 0; }
.sale-banner b { display: block; font-size: calc(12px * var(--font-scale)); color: #b91c1c; }
.sale-banner span { font-size: calc(10px * var(--font-scale)); color: #9a3412; }
.sheet__price del, .sumrow__price del {
  font-size: calc(10.5px * var(--font-scale)); color: var(--muted);
  margin-inline-end: 5px;
  text-decoration-color: color-mix(in srgb, #ef4444 65%, transparent);
}
.sheet__price--sale, .sheet__price b.sheet__price--sale { color: #dc2626; }
.pcard__sale {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 3px;
  font-size: calc(8.5px * var(--font-scale)); font-weight: 800;
  color: #fff; background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 999px; padding: 3px 8px;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.35);
}
.pcard__sale svg { width: 10px; height: 10px; }

/* ---------- bottom sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 12, 30, 0.45);
  opacity: 0; transition: opacity 0.22s;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.sheet {
  position: fixed; inset: auto 0 0 0; z-index: 61;
  max-width: 560px; margin-inline: auto;
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 16px);
  transform: translateY(105%); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.25, 1);
  max-height: 86vh; overflow-y: auto;
  box-shadow: 0 -12px 40px rgba(15, 12, 30, 0.2);
}
.sheet-open .sheet { transform: translateY(0); }
.sheet-open .sheet-backdrop { opacity: 1; }
.sheet__handle { width: 42px; height: 4px; border-radius: 99px; background: #d9dce6; margin: 2px auto 14px; }
.sheet__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sheet__logo {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  display: grid; place-items: center; background: var(--tile, #f1eafe);
}
.sheet__logo svg, .sheet__logo img { width: 28px; height: 28px; object-fit: contain; }
.sheet__name { font-size: calc(15px * var(--font-scale)); font-weight: 900; color: var(--ink); line-height: 1.6; }
.sheet__badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.sheet__desc { font-size: calc(12px * var(--font-scale)); line-height: 2.1; color: var(--muted); margin: 0 0 12px; }
.sheet__features { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.sheet__features li {
  display: flex; gap: 8px; font-size: calc(11.5px * var(--font-scale)); line-height: 1.9; color: var(--text);
}
.sheet__features svg { width: 15px; height: 15px; flex: none; color: var(--green); margin-top: 3px; }
.sheet__foot {
  display: flex; align-items: center; gap: 12px;
  border-top: 1px solid var(--line); padding-top: 14px;
}
.sheet__price { flex: 1; }
.sheet__price small { display: block; font-size: calc(10px * var(--font-scale)); color: var(--muted); }
.sheet__price b { font-size: calc(16.5px * var(--font-scale)); font-weight: 900; color: var(--ink); }
.sheet__price b em { font-style: normal; font-size: calc(10.5px * var(--font-scale)); font-weight: 500; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: calc(13.5px * var(--font-scale)); font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-radius: 14px; padding: 13px 22px;
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.3);
  transition: transform 0.12s;
}
.btn:active { transform: scale(0.97); }
.btn--block { width: 100%; }
.btn--ghost {
  color: var(--brand-dark); background: var(--brand-soft); box-shadow: none;
}
.btn--line {
  color: var(--muted); background: var(--paper);
  border: 1px solid var(--line); box-shadow: none;
}
.btn svg { width: 16px; height: 16px; }

/* ---------- checkout ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.card__title { font-size: calc(12.5px * var(--font-scale)); font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.sumrow { display: flex; align-items: center; gap: 12px; }
.sumrow__logo {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--tile, #f1eafe);
}
.sumrow__logo svg, .sumrow__logo img { width: 26px; height: 26px; object-fit: contain; }
.sumrow__name { font-size: calc(13px * var(--font-scale)); font-weight: 800; color: var(--ink); }
.sumrow__sub { font-size: calc(10.5px * var(--font-scale)); color: var(--muted); margin-top: 2px; }
.sumrow__price { margin-inline-start: auto; font-size: calc(13.5px * var(--font-scale)); font-weight: 900; color: var(--brand-dark); white-space: nowrap; }
.sumrow__price small { font-size: calc(9.5px * var(--font-scale)); font-weight: 500; color: var(--muted); }

.field { margin-bottom: 11px; }
.field label { display: block; font-size: calc(11.5px * var(--font-scale)); font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg); padding: 11px 13px; font-size: calc(13px * var(--font-scale));
  outline: none; transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); background: #fff; }
.field textarea { resize: vertical; min-height: 64px; }

.coupon__entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.coupon__entry input {
  min-width: 0; width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg); padding: 11px 13px; font-size: calc(13px * var(--font-scale));
  outline: none; text-transform: uppercase;
}
.coupon__entry input:focus { border-color: var(--brand); background: #fff; }
.coupon__entry .btn { min-height: 43px; white-space: nowrap; padding-inline: 15px; }
.coupon__result {
  margin-top: 11px; padding: 9px 11px; border: 1px solid rgba(5,150,105,.2);
  border-radius: 12px; background: #ecfdf5; color: #065f46;
}
.coupon__result[hidden] { display: none; }
.coupon__result > div {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 4px 0; font-size: calc(11px * var(--font-scale));
}
.coupon__result > div:last-child { border-top: 1px dashed rgba(5,150,105,.25); margin-top: 3px; padding-top: 7px; }
.coupon__saving b { color: #047857; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg__opt {
  border: 1.5px solid var(--line); border-radius: 13px;
  background: var(--bg); padding: 11px 10px; text-align: center;
  font-size: calc(12px * var(--font-scale)); font-weight: 700; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all 0.15s;
}
.seg__opt small { font-size: calc(9.5px * var(--font-scale)); font-weight: 400; }
.seg__opt svg { width: 18px; height: 18px; }
.seg__opt--on { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }

.agree {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: calc(11px * var(--font-scale)); line-height: 1.9; color: #92400e;
  background: var(--amber-soft); border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 13px; padding: 11px 12px; margin-bottom: 12px;
}
.agree input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--brand); flex: none; }

/* ---------- orders ---------- */
.order {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: right;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 14px;
  box-shadow: var(--shadow); margin-bottom: 9px;
  transition: transform 0.12s;
}
.order:active { transform: scale(0.98); }
.order__logo {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--tile, #f1eafe);
}
.order__logo svg, .order__logo img { width: 26px; height: 26px; object-fit: contain; }
.order__main { flex: 1; min-width: 0; }
.order__name { font-size: calc(12.5px * var(--font-scale)); font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order__meta { font-size: calc(10px * var(--font-scale)); color: var(--muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.order__side { flex: none; text-align: left; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.order__total { font-size: calc(12px * var(--font-scale)); font-weight: 800; color: var(--ink); white-space: nowrap; }

.status { font-size: calc(9.5px * var(--font-scale)); font-weight: 700; border-radius: 999px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 4px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.status--amber { color: var(--amber); background: var(--amber-soft); }
.status--blue { color: var(--blue); background: var(--blue-soft); }
.status--green { color: var(--green); background: var(--green-soft); }
.status--red { color: var(--red); background: var(--red-soft); }
.status--gray { color: var(--muted); background: #eef0f5; }

/* payment info */
.pay {
  border-radius: var(--radius); padding: 16px;
  background: linear-gradient(135deg, #1f1b3a, #33265c);
  color: #fff; margin-bottom: 12px;
  box-shadow: 0 12px 30px rgba(31, 27, 58, 0.35);
}
.pay--auto {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 0 0, rgba(124, 58, 237, .58), transparent 44%),
    linear-gradient(145deg, #17152f, #30225d);
}
.pay--auto::after {
  content: "";
  position: absolute;
  inset: auto -35% -65% auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  pointer-events: none;
}
.pay__auto-badge {
  width: fit-content;
  margin: -3px 0 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255,255,255,.12);
  font-size: calc(9.5px * var(--font-scale));
  font-weight: 800;
}
.pay__label { font-size: calc(10.5px * var(--font-scale)); opacity: 0.75; margin-bottom: 4px; }
.pay__num {
  font-size: calc(19px * var(--font-scale)); font-weight: 800; letter-spacing: 1px;
  direction: ltr; text-align: left; font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.pay__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: calc(12px * var(--font-scale)); margin-bottom: 4px; }
.pay__amount { font-size: calc(15px * var(--font-scale)); font-weight: 900; }
.pay__identity {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 9px;
  color: rgba(255,255,255,.78);
  font-size: calc(9.5px * var(--font-scale));
  line-height: 1.8;
}
.pay__exact-warning {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  margin-top: 12px;
  border: 1px solid rgba(253, 230, 138, .38);
  border-radius: 12px;
  padding: 10px 11px;
  color: #fff7d6;
  background: rgba(180, 83, 9, .25);
  line-height: 1.8;
}
.pay__exact-warning b { font-size: calc(11px * var(--font-scale)); }
.pay__exact-warning span {
  color: rgba(255,255,255,.82);
  font-size: calc(9.5px * var(--font-scale));
}
.pay__copy {
  font-size: calc(10.5px * var(--font-scale)); font-weight: 700; color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px; padding: 6px 12px;
  display: inline-flex; align-items: center; gap: 5px;
}
.pay__copy svg { width: 13px; height: 13px; }
.pay-timer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  border-radius: 12px;
  padding: 9px 11px;
  background: rgba(255,255,255,.1);
  font-size: calc(10.5px * var(--font-scale));
}
.pay-timer b {
  direction: ltr;
  font-variant-numeric: tabular-nums;
  font-size: calc(14px * var(--font-scale));
}
.pay-timer--ending { color: #ffd8a8; }

.payment-success {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(5, 150, 105, .18);
  border-radius: calc(var(--radius) + 3px);
  padding: 28px 18px 20px;
  background:
    radial-gradient(circle at 50% -10%, rgba(52, 211, 153, .22), transparent 44%),
    linear-gradient(180deg, #f2fff9, #fff);
  text-align: center;
  box-shadow: 0 14px 38px rgba(5, 150, 105, .11);
}
.payment-success__check {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: linear-gradient(145deg, #10b981, #047857);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(5, 150, 105, .28);
  animation: payment-check-in .45s cubic-bezier(.2,.9,.25,1.25);
}
.payment-success__spark {
  position: absolute;
  top: 18px;
  right: 25%;
  color: #34d399;
  font-size: 20px;
  animation: payment-spark 1.4s ease-in-out infinite;
}
.payment-success h2 { margin: 0 0 7px; color: #065f46; font-size: calc(18px * var(--font-scale)); }
.payment-success p { margin: 0; color: #48756a; font-size: calc(11px * var(--font-scale)); line-height: 1.9; }
.payment-success__id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  border: 1px dashed rgba(5, 150, 105, .25);
  border-radius: 12px;
  padding: 9px 11px;
  background: rgba(255,255,255,.74);
  color: #48756a;
  font-size: calc(10px * var(--font-scale));
}
.payment-success__id b { color: #065f46; }
.payment-expired {
  margin-bottom: 14px;
  border: 1px solid rgba(201, 42, 42, .16);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--red-soft);
  color: var(--red);
}
.payment-expired p { margin: 7px 0 0; font-size: calc(10.5px * var(--font-scale)); line-height: 1.9; }
@keyframes payment-check-in {
  from { opacity: 0; transform: scale(.45) rotate(-18deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes payment-spark {
  0%,100% { opacity: .35; transform: scale(.8) rotate(0); }
  50% { opacity: 1; transform: scale(1.2) rotate(25deg); }
}

.kv { display: flex; justify-content: space-between; gap: 10px; font-size: calc(11.5px * var(--font-scale)); padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv b { color: var(--ink); font-weight: 700; text-align: left; }
.kv span { color: var(--muted); flex: none; }

/* ---------- post-payment delivery ---------- */
.delivery-page, .delivery-wait { margin: 14px 0; }
.delivery-page {
  padding: var(--delivery-page-padding, 0);
  border-radius: var(--delivery-card-radius, var(--radius));
  background: var(--delivery-page-bg, transparent);
  color: var(--delivery-page-text, var(--text));
  font-size: calc(1em * var(--delivery-font-scale, 1));
}
.delivery-hero {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid color-mix(in srgb, var(--delivery-accent, var(--brand)) 25%, transparent);
  border-radius: calc(var(--radius) + 3px);
  padding: 20px 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--delivery-accent, var(--brand)) 10%, #fff), #fff);
  box-shadow: var(--shadow);
}
.delivery-page--hero-soft .delivery-hero { background: color-mix(in srgb, var(--delivery-accent, var(--brand)) 8%, var(--delivery-page-surface, #fff)); box-shadow: none; }
.delivery-page--hero-minimal .delivery-hero { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding-inline: 4px; }
.delivery-page--hero-minimal .delivery-hero::after { display: none; }
.delivery-hero::after {
  content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%;
  top: -70px; left: -50px; background: color-mix(in srgb, var(--delivery-accent, var(--brand)) 12%, transparent);
}
.delivery-hero__icon {
  width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 10px;
  border-radius: 50%; color: #fff; background: var(--delivery-accent, var(--brand));
  font-size: 23px; font-weight: 900; box-shadow: 0 8px 20px color-mix(in srgb, var(--delivery-accent, var(--brand)) 28%, transparent);
}
.delivery-hero h2 { margin: 0 0 6px; color: var(--ink); font-size: calc(17px * var(--font-scale)); }
.delivery-hero p { margin: 0; color: var(--muted); font-size: calc(11px * var(--font-scale)); line-height: 1.9; }
.delivery-content { display: flex; flex-direction: column; gap: var(--delivery-card-gap, 10px); margin-top: 10px; }
.delivery-block, .delivery-secret, .delivery-choice, .delivery-selection, .delivery-wait {
  border: 1px solid var(--delivery-block-border, var(--line));
  border-radius: var(--delivery-block-radius, var(--delivery-card-radius, var(--radius)));
  padding: var(--delivery-block-padding, 15px);
  margin-top: var(--delivery-block-mt, 0);
  margin-bottom: var(--delivery-block-mb, 0);
  color: var(--delivery-block-text, var(--delivery-page-text, var(--text)));
  background: var(--delivery-block-bg, var(--delivery-page-surface, var(--surface)));
  box-shadow: var(--shadow);
}
.delivery-block--shadow-none { box-shadow: none; }
.delivery-block--shadow-strong { box-shadow: 0 16px 38px rgba(20,25,45,.16); }
.delivery-block--align-center { text-align: center; }
.delivery-block--align-left { text-align: left; direction: ltr; }
.delivery-block--text-xs { font-size: .82em; }
.delivery-block--text-sm { font-size: .9em; }
.delivery-block--text-lg { font-size: 1.12em; }
.delivery-block--text-xl { font-size: 1.28em; }
.delivery-block--width-wide { margin-inline: 8px; }
.delivery-block--width-compact { margin-inline: 24px; }
.delivery-block--divider { padding: 0; border: 0; background: transparent; box-shadow: none; }
.delivery-block--divider hr { border: 0; border-top: 1px solid var(--delivery-block-border, var(--line)); margin: 0; }
.delivery-block--spacer { min-height: var(--delivery-spacer-height, 24px); padding: 0; border: 0; background: transparent; box-shadow: none; }
.delivery-block h3, .delivery-secret h3, .delivery-choice h3 {
  margin: 0 0 7px; color: var(--ink); font-size: calc(13px * var(--font-scale));
}
.delivery-block p, .delivery-secret p, .delivery-choice p {
  margin: 0 0 10px; color: var(--text); font-size: calc(11px * var(--font-scale)); line-height: 2;
}
.delivery-block--notice { border-color: color-mix(in srgb, var(--delivery-accent, var(--brand)) 24%, transparent); background: color-mix(in srgb, var(--delivery-accent, var(--brand)) 7%, #fff); }
.delivery-value {
  display: grid; grid-template-columns: auto minmax(0,1fr) 32px; align-items: center; gap: 8px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.delivery-value:last-child { border-bottom: 0; }
.delivery-value span { color: var(--muted); font-size: calc(9.5px * var(--font-scale)); }
.delivery-value code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: calc(10.5px * var(--font-scale)); }
.delivery-value button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.delivery-value button svg { width: 16px; height: 16px; }
.delivery-block--media img, .delivery-block--media video {
  display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 13px; background: #10121a;
}
.delivery-block--fit-cover img, .delivery-block--fit-cover video { object-fit: cover; }
.delivery-video { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 13px; background: #10121a; }
.delivery-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.delivery-placeholder { border: 1px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.delivery-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.delivery-gallery__item { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--background); }
.delivery-gallery__item img { width: 100%; aspect-ratio: 1.25; object-fit: cover; display: block; }
.delivery-gallery__item div { padding: 9px; }
.delivery-gallery__item b, .delivery-step b { display: block; color: var(--ink); font-size: calc(10.5px * var(--font-scale)); }
.delivery-gallery__item p, .delivery-step p { margin: 4px 0 0; color: var(--muted); font-size: calc(9.5px * var(--font-scale)); line-height: 1.8; }
.delivery-steps { display: flex; flex-direction: column; gap: 11px; }
.delivery-step { position: relative; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; border: 1px solid var(--line); border-radius: 13px; padding: 10px; }
.delivery-step img { grid-column: 1 / -1; width: 100%; max-height: 420px; object-fit: contain; border-radius: 10px; background: var(--background); }
.delivery-step__num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--delivery-accent, var(--brand)); font-size: calc(10px * var(--font-scale)); font-weight: 800; }
.delivery-block--code pre { overflow: auto; white-space: pre-wrap; word-break: break-all; direction: ltr; text-align: left; border-radius: 12px; padding: 12px; background: #171a2b; color: #d1fae5; font-size: calc(9px * var(--font-scale)); line-height: 1.75; }
.delivery-choice { margin: 10px 0; border-color: color-mix(in srgb, var(--delivery-accent, var(--brand)) 28%, transparent); }
.delivery-choice > div { display: grid; gap: 8px; }
.delivery-choice button { text-align: right; border: 1.5px solid var(--line); border-radius: 13px; padding: 12px; background: var(--background); display: flex; flex-direction: column; gap: 3px; }
.delivery-choice button:hover, .delivery-choice button:active { border-color: var(--delivery-accent, var(--brand)); background: var(--brand-soft); }
.delivery-choice button b { color: var(--ink); font-size: calc(11px * var(--font-scale)); }
.delivery-choice button small { color: var(--muted); font-size: calc(9.5px * var(--font-scale)); line-height: 1.7; }
.delivery-selection { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.delivery-selection span { color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.delivery-selection b { color: var(--delivery-accent, var(--brand)); font-size: calc(11px * var(--font-scale)); }
.delivery-wait { text-align: center; color: var(--muted); }
.delivery-wait .spin { display: block; width: 28px; height: 28px; margin: 3px auto 11px; }
.delivery-wait b { display: block; color: var(--ink); font-size: calc(12px * var(--font-scale)); }
.delivery-wait p { margin: 6px 0 0; font-size: calc(10px * var(--font-scale)); line-height: 1.9; }

/* ---------- empty / loading ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { width: 52px; height: 52px; margin: 0 auto 14px; color: #c9cede; }
.empty__title { font-size: calc(14px * var(--font-scale)); font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: calc(12px * var(--font-scale)); line-height: 2; margin: 0 0 16px; }

/* ---------- connectivity guidance ---------- */
.connectivity-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: calc(var(--radius) - 4px);
  padding: 10px 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  line-height: 1.8;
}
.connectivity-hint svg { width: 20px; height: 20px; flex: none; }

.spin {
  width: 34px; height: 34px; margin: 70px auto;
  border: 3.5px solid var(--brand-soft); border-top-color: var(--brand);
  border-radius: 99px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- bottom nav ---------- */
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  max-width: 560px; margin-inline: auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
.nav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: calc(10px * var(--font-scale)); font-weight: 700; color: var(--muted);
}
.nav__item svg { width: 21px; height: 21px; }
.nav__item--on { color: var(--brand); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  left: 50%; transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: #fff;
  font-size: calc(12px * var(--font-scale)); font-weight: 600;
  border-radius: 999px; padding: 10px 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  animation: toast-in 0.25s;
  white-space: nowrap;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- preview mode ---------- */
.preview-ribbon {
  font-size: calc(11px * var(--font-scale)); font-weight: 700; text-align: center; color: #fff;
  background: repeating-linear-gradient(135deg, #d97706, #d97706 14px, #b45309 14px, #b45309 28px);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 12px;
}

@media (min-width: 480px) {
  .grid { gap: 12px; }
  .hero__title { font-size: calc(21px * var(--font-scale)); }
}

/* ---------- shared ChatGPT delivery (XGPT) ---------- */
.xgpt { border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); }
.xgpt__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.xgpt__head > div { flex: 1; min-width: 0; }
.xgpt__head b { display: block; font-size: calc(12.5px * var(--font-scale)); color: var(--ink); }
.xgpt__head small { color: var(--muted); font-size: calc(9.5px * var(--font-scale)); }
.xgpt__logo {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--tile, #e7f5f0);
}
.xgpt__logo svg, .xgpt__logo img { width: 22px; height: 22px; }
.xgpt__intro { font-size: calc(11px * var(--font-scale)); color: var(--text); line-height: 2; margin-bottom: 10px; }
.xgpt__cred { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; margin-bottom: 12px; }
.xgpt__row {
  display: flex; align-items: center; gap: 8px; padding: 9px 11px;
  border-bottom: 1px solid var(--line); font-size: calc(11px * var(--font-scale));
}
.xgpt__row:last-child { border-bottom: 0; }
.xgpt__row span { color: var(--muted); flex: none; width: 58px; }
.xgpt__row code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  font-weight: 800; color: var(--ink); font-size: calc(11.5px * var(--font-scale));
}
.xgpt__copy {
  border: 0; cursor: pointer; background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 9px; padding: 5px 8px; display: inline-flex; align-items: center; gap: 4px;
  font-size: calc(10px * var(--font-scale)); font-weight: 700; flex: none;
}
.xgpt__copy svg { width: 13px; height: 13px; }
.xgpt__copy--big { padding: 7px 14px; margin-top: 10px; }
.xgpt__hint { color: var(--muted); font-size: calc(9.5px * var(--font-scale)); text-align: center; margin-top: 8px; line-height: 2; }
.xgpt__code-btns { display: flex; flex-direction: column; gap: 8px; }
.xgpt__code {
  text-align: center; border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, transparent);
  background: var(--brand-soft); border-radius: 15px; padding: 14px;
}
.xgpt__code small { display: block; color: var(--brand-dark); font-size: calc(10px * var(--font-scale)); }
.xgpt__code b {
  display: block; font-size: calc(30px * var(--font-scale)); font-weight: 900;
  color: var(--brand-dark); letter-spacing: 8px; margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.xgpt__code span { display: block; color: var(--muted); font-size: calc(9.5px * var(--font-scale)); }
.xgpt__done {
  background: var(--green-soft); border: 1px solid color-mix(in srgb, #059669 30%, transparent);
  border-radius: 13px; padding: 11px 13px; margin-bottom: 10px;
}
.xgpt__done b { display: block; color: #065f46; font-size: calc(12px * var(--font-scale)); }
.xgpt__done span { color: #047857; font-size: calc(10px * var(--font-scale)); line-height: 2; }
.xgpt__policy {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 10px;
  color: var(--muted); font-size: calc(9.5px * var(--font-scale)); line-height: 2;
  background: var(--bg); border-radius: 11px; padding: 9px 11px;
}
.xgpt__policy svg { width: 14px; height: 14px; flex: none; margin-top: 4px; color: var(--brand); }

/* ---------- bottom sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 12, 30, 0.45);
  opacity: 0; transition: opacity 0.22s;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.sheet {
  position: fixed; inset: auto 0 0 0; z-index: 61;
  max-width: 560px; margin-inline: auto;
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 16px);
  transform: translateY(105%); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.25, 1);
  max-height: 86vh; overflow-y: auto;
  box-shadow: 0 -12px 40px rgba(15, 12, 30, 0.2);
}
.sheet-open .sheet { transform: translateY(0); }
.sheet-open .sheet-backdrop { opacity: 1; }
.sheet__handle { width: 42px; height: 4px; border-radius: 99px; background: #d9dce6; margin: 2px auto 14px; }
.sheet__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sheet__logo {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  display: grid; place-items: center; background: var(--tile, #f1eafe);
}
.sheet__logo svg, .sheet__logo img { width: 28px; height: 28px; object-fit: contain; }
.sheet__name { font-size: calc(15px * var(--font-scale)); font-weight: 900; color: var(--ink); line-height: 1.6; }
.sheet__badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.sheet__desc { font-size: calc(12px * var(--font-scale)); line-height: 2.1; color: var(--muted); margin: 0 0 12px; }
.sheet__features { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.sheet__features li {
  display: flex; gap: 8px; font-size: calc(11.5px * var(--font-scale)); line-height: 1.9; color: var(--text);
}
.sheet__features svg { width: 15px; height: 15px; flex: none; color: var(--green); margin-top: 3px; }
.sheet__foot {
  display: flex; align-items: center; gap: 12px;
  border-top: 1px solid var(--line); padding-top: 14px;
}
.sheet__price { flex: 1; }
.sheet__price small { display: block; font-size: calc(10px * var(--font-scale)); color: var(--muted); }
.sheet__price b { font-size: calc(16.5px * var(--font-scale)); font-weight: 900; color: var(--ink); }
.sheet__price b em { font-style: normal; font-size: calc(10.5px * var(--font-scale)); font-weight: 500; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: calc(13.5px * var(--font-scale)); font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-radius: 14px; padding: 13px 22px;
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.3);
  transition: transform 0.12s;
}
.btn:active { transform: scale(0.97); }
.btn--block { width: 100%; }
.btn--ghost {
  color: var(--brand-dark); background: var(--brand-soft); box-shadow: none;
}
.btn--line {
  color: var(--muted); background: var(--paper);
  border: 1px solid var(--line); box-shadow: none;
}
.btn svg { width: 16px; height: 16px; }

/* ---------- checkout ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.card__title { font-size: calc(12.5px * var(--font-scale)); font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.sumrow { display: flex; align-items: center; gap: 12px; }
.sumrow__logo {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--tile, #f1eafe);
}
.sumrow__logo svg, .sumrow__logo img { width: 26px; height: 26px; object-fit: contain; }
.sumrow__name { font-size: calc(13px * var(--font-scale)); font-weight: 800; color: var(--ink); }
.sumrow__sub { font-size: calc(10.5px * var(--font-scale)); color: var(--muted); margin-top: 2px; }
.sumrow__price { margin-inline-start: auto; font-size: calc(13.5px * var(--font-scale)); font-weight: 900; color: var(--brand-dark); white-space: nowrap; }
.sumrow__price small { font-size: calc(9.5px * var(--font-scale)); font-weight: 500; color: var(--muted); }

.field { margin-bottom: 11px; }
.field label { display: block; font-size: calc(11.5px * var(--font-scale)); font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg); padding: 11px 13px; font-size: calc(13px * var(--font-scale));
  outline: none; transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); background: #fff; }
.field textarea { resize: vertical; min-height: 64px; }

.coupon__entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.coupon__entry input {
  min-width: 0; width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg); padding: 11px 13px; font-size: calc(13px * var(--font-scale));
  outline: none; text-transform: uppercase;
}
.coupon__entry input:focus { border-color: var(--brand); background: #fff; }
.coupon__entry .btn { min-height: 43px; white-space: nowrap; padding-inline: 15px; }
.coupon__result {
  margin-top: 11px; padding: 9px 11px; border: 1px solid rgba(5,150,105,.2);
  border-radius: 12px; background: #ecfdf5; color: #065f46;
}
.coupon__result[hidden] { display: none; }
.coupon__result > div {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 4px 0; font-size: calc(11px * var(--font-scale));
}
.coupon__result > div:last-child { border-top: 1px dashed rgba(5,150,105,.25); margin-top: 3px; padding-top: 7px; }
.coupon__saving b { color: #047857; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg__opt {
  border: 1.5px solid var(--line); border-radius: 13px;
  background: var(--bg); padding: 11px 10px; text-align: center;
  font-size: calc(12px * var(--font-scale)); font-weight: 700; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all 0.15s;
}
.seg__opt small { font-size: calc(9.5px * var(--font-scale)); font-weight: 400; }
.seg__opt svg { width: 18px; height: 18px; }
.seg__opt--on { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }

.agree {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: calc(11px * var(--font-scale)); line-height: 1.9; color: #92400e;
  background: var(--amber-soft); border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 13px; padding: 11px 12px; margin-bottom: 12px;
}
.agree input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--brand); flex: none; }

/* ---------- orders ---------- */
.order {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: right;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 14px;
  box-shadow: var(--shadow); margin-bottom: 9px;
  transition: transform 0.12s;
}
.order:active { transform: scale(0.98); }
.order__logo {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--tile, #f1eafe);
}
.order__logo svg, .order__logo img { width: 26px; height: 26px; object-fit: contain; }
.order__main { flex: 1; min-width: 0; }
.order__name { font-size: calc(12.5px * var(--font-scale)); font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order__meta { font-size: calc(10px * var(--font-scale)); color: var(--muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.order__side { flex: none; text-align: left; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.order__total { font-size: calc(12px * var(--font-scale)); font-weight: 800; color: var(--ink); white-space: nowrap; }

.status { font-size: calc(9.5px * var(--font-scale)); font-weight: 700; border-radius: 999px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 4px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.status--amber { color: var(--amber); background: var(--amber-soft); }
.status--blue { color: var(--blue); background: var(--blue-soft); }
.status--green { color: var(--green); background: var(--green-soft); }
.status--red { color: var(--red); background: var(--red-soft); }
.status--gray { color: var(--muted); background: #eef0f5; }

/* payment info */
.pay {
  border-radius: var(--radius); padding: 16px;
  background: linear-gradient(135deg, #1f1b3a, #33265c);
  color: #fff; margin-bottom: 12px;
  box-shadow: 0 12px 30px rgba(31, 27, 58, 0.35);
}
.pay--auto {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 0 0, rgba(124, 58, 237, .58), transparent 44%),
    linear-gradient(145deg, #17152f, #30225d);
}
.pay--auto::after {
  content: "";
  position: absolute;
  inset: auto -35% -65% auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  pointer-events: none;
}
.pay__auto-badge {
  width: fit-content;
  margin: -3px 0 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255,255,255,.12);
  font-size: calc(9.5px * var(--font-scale));
  font-weight: 800;
}
.pay__label { font-size: calc(10.5px * var(--font-scale)); opacity: 0.75; margin-bottom: 4px; }
.pay__num {
  font-size: calc(19px * var(--font-scale)); font-weight: 800; letter-spacing: 1px;
  direction: ltr; text-align: left; font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.pay__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: calc(12px * var(--font-scale)); margin-bottom: 4px; }
.pay__amount { font-size: calc(15px * var(--font-scale)); font-weight: 900; }
.pay__identity {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 9px;
  color: rgba(255,255,255,.78);
  font-size: calc(9.5px * var(--font-scale));
  line-height: 1.8;
}
.pay__copy {
  font-size: calc(10.5px * var(--font-scale)); font-weight: 700; color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px; padding: 6px 12px;
  display: inline-flex; align-items: center; gap: 5px;
}
.pay__copy svg { width: 13px; height: 13px; }
.pay-timer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  border-radius: 12px;
  padding: 9px 11px;
  background: rgba(255,255,255,.1);
  font-size: calc(10.5px * var(--font-scale));
}
.pay-timer b {
  direction: ltr;
  font-variant-numeric: tabular-nums;
  font-size: calc(14px * var(--font-scale));
}
.pay-timer--ending { color: #ffd8a8; }

.payment-success {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(5, 150, 105, .18);
  border-radius: calc(var(--radius) + 3px);
  padding: 28px 18px 20px;
  background:
    radial-gradient(circle at 50% -10%, rgba(52, 211, 153, .22), transparent 44%),
    linear-gradient(180deg, #f2fff9, #fff);
  text-align: center;
  box-shadow: 0 14px 38px rgba(5, 150, 105, .11);
}
.payment-success__check {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: linear-gradient(145deg, #10b981, #047857);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(5, 150, 105, .28);
  animation: payment-check-in .45s cubic-bezier(.2,.9,.25,1.25);
}
.payment-success__spark {
  position: absolute;
  top: 18px;
  right: 25%;
  color: #34d399;
  font-size: 20px;
  animation: payment-spark 1.4s ease-in-out infinite;
}
.payment-success h2 { margin: 0 0 7px; color: #065f46; font-size: calc(18px * var(--font-scale)); }
.payment-success p { margin: 0; color: #48756a; font-size: calc(11px * var(--font-scale)); line-height: 1.9; }
.payment-success__id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  border: 1px dashed rgba(5, 150, 105, .25);
  border-radius: 12px;
  padding: 9px 11px;
  background: rgba(255,255,255,.74);
  color: #48756a;
  font-size: calc(10px * var(--font-scale));
}
.payment-success__id b { color: #065f46; }
.payment-expired {
  margin-bottom: 14px;
  border: 1px solid rgba(201, 42, 42, .16);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--red-soft);
  color: var(--red);
}
.payment-expired p { margin: 7px 0 0; font-size: calc(10.5px * var(--font-scale)); line-height: 1.9; }
@keyframes payment-check-in {
  from { opacity: 0; transform: scale(.45) rotate(-18deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes payment-spark {
  0%,100% { opacity: .35; transform: scale(.8) rotate(0); }
  50% { opacity: 1; transform: scale(1.2) rotate(25deg); }
}

.kv { display: flex; justify-content: space-between; gap: 10px; font-size: calc(11.5px * var(--font-scale)); padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv b { color: var(--ink); font-weight: 700; text-align: left; }
.kv span { color: var(--muted); flex: none; }

/* ---------- post-payment delivery ---------- */
.delivery-page, .delivery-wait { margin: 14px 0; }
.delivery-page {
  padding: var(--delivery-page-padding, 0);
  border-radius: var(--delivery-card-radius, var(--radius));
  background: var(--delivery-page-bg, transparent);
  color: var(--delivery-page-text, var(--text));
  font-size: calc(1em * var(--delivery-font-scale, 1));
}
.delivery-hero {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid color-mix(in srgb, var(--delivery-accent, var(--brand)) 25%, transparent);
  border-radius: calc(var(--radius) + 3px);
  padding: 20px 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--delivery-accent, var(--brand)) 10%, #fff), #fff);
  box-shadow: var(--shadow);
}
.delivery-page--hero-soft .delivery-hero { background: color-mix(in srgb, var(--delivery-accent, var(--brand)) 8%, var(--delivery-page-surface, #fff)); box-shadow: none; }
.delivery-page--hero-minimal .delivery-hero { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding-inline: 4px; }
.delivery-page--hero-minimal .delivery-hero::after { display: none; }
.delivery-hero::after {
  content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%;
  top: -70px; left: -50px; background: color-mix(in srgb, var(--delivery-accent, var(--brand)) 12%, transparent);
}
.delivery-hero__icon {
  width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 10px;
  border-radius: 50%; color: #fff; background: var(--delivery-accent, var(--brand));
  font-size: 23px; font-weight: 900; box-shadow: 0 8px 20px color-mix(in srgb, var(--delivery-accent, var(--brand)) 28%, transparent);
}
.delivery-hero h2 { margin: 0 0 6px; color: var(--ink); font-size: calc(17px * var(--font-scale)); }
.delivery-hero p { margin: 0; color: var(--muted); font-size: calc(11px * var(--font-scale)); line-height: 1.9; }
.delivery-content { display: flex; flex-direction: column; gap: var(--delivery-card-gap, 10px); margin-top: 10px; }
.delivery-block, .delivery-secret, .delivery-choice, .delivery-selection, .delivery-wait {
  border: 1px solid var(--delivery-block-border, var(--line));
  border-radius: var(--delivery-block-radius, var(--delivery-card-radius, var(--radius)));
  padding: var(--delivery-block-padding, 15px);
  margin-top: var(--delivery-block-mt, 0);
  margin-bottom: var(--delivery-block-mb, 0);
  color: var(--delivery-block-text, var(--delivery-page-text, var(--text)));
  background: var(--delivery-block-bg, var(--delivery-page-surface, var(--surface)));
  box-shadow: var(--shadow);
}
.delivery-block--shadow-none { box-shadow: none; }
.delivery-block--shadow-strong { box-shadow: 0 16px 38px rgba(20,25,45,.16); }
.delivery-block--align-center { text-align: center; }
.delivery-block--align-left { text-align: left; direction: ltr; }
.delivery-block--text-xs { font-size: .82em; }
.delivery-block--text-sm { font-size: .9em; }
.delivery-block--text-lg { font-size: 1.12em; }
.delivery-block--text-xl { font-size: 1.28em; }
.delivery-block--width-wide { margin-inline: 8px; }
.delivery-block--width-compact { margin-inline: 24px; }
.delivery-block--divider { padding: 0; border: 0; background: transparent; box-shadow: none; }
.delivery-block--divider hr { border: 0; border-top: 1px solid var(--delivery-block-border, var(--line)); margin: 0; }
.delivery-block--spacer { min-height: var(--delivery-spacer-height, 24px); padding: 0; border: 0; background: transparent; box-shadow: none; }
.delivery-block h3, .delivery-secret h3, .delivery-choice h3 {
  margin: 0 0 7px; color: var(--ink); font-size: calc(13px * var(--font-scale));
}
.delivery-block p, .delivery-secret p, .delivery-choice p {
  margin: 0 0 10px; color: var(--text); font-size: calc(11px * var(--font-scale)); line-height: 2;
}
.delivery-block--notice { border-color: color-mix(in srgb, var(--delivery-accent, var(--brand)) 24%, transparent); background: color-mix(in srgb, var(--delivery-accent, var(--brand)) 7%, #fff); }
.delivery-value {
  display: grid; grid-template-columns: auto minmax(0,1fr) 32px; align-items: center; gap: 8px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.delivery-value:last-child { border-bottom: 0; }
.delivery-value span { color: var(--muted); font-size: calc(9.5px * var(--font-scale)); }
.delivery-value code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: calc(10.5px * var(--font-scale)); }
.delivery-value button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.delivery-value button svg { width: 16px; height: 16px; }
.delivery-block--media img, .delivery-block--media video {
  display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 13px; background: #10121a;
}
.delivery-block--fit-cover img, .delivery-block--fit-cover video { object-fit: cover; }
.delivery-video { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 13px; background: #10121a; }
.delivery-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.delivery-placeholder { border: 1px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.delivery-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.delivery-gallery__item { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--background); }
.delivery-gallery__item img { width: 100%; aspect-ratio: 1.25; object-fit: cover; display: block; }
.delivery-gallery__item div { padding: 9px; }
.delivery-gallery__item b, .delivery-step b { display: block; color: var(--ink); font-size: calc(10.5px * var(--font-scale)); }
.delivery-gallery__item p, .delivery-step p { margin: 4px 0 0; color: var(--muted); font-size: calc(9.5px * var(--font-scale)); line-height: 1.8; }
.delivery-steps { display: flex; flex-direction: column; gap: 11px; }
.delivery-step { position: relative; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; border: 1px solid var(--line); border-radius: 13px; padding: 10px; }
.delivery-step img { grid-column: 1 / -1; width: 100%; max-height: 420px; object-fit: contain; border-radius: 10px; background: var(--background); }
.delivery-step__num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--delivery-accent, var(--brand)); font-size: calc(10px * var(--font-scale)); font-weight: 800; }
.delivery-block--code pre { overflow: auto; white-space: pre-wrap; word-break: break-all; direction: ltr; text-align: left; border-radius: 12px; padding: 12px; background: #171a2b; color: #d1fae5; font-size: calc(9px * var(--font-scale)); line-height: 1.75; }
.delivery-choice { margin: 10px 0; border-color: color-mix(in srgb, var(--delivery-accent, var(--brand)) 28%, transparent); }
.delivery-choice > div { display: grid; gap: 8px; }
.delivery-choice button { text-align: right; border: 1.5px solid var(--line); border-radius: 13px; padding: 12px; background: var(--background); display: flex; flex-direction: column; gap: 3px; }
.delivery-choice button:hover, .delivery-choice button:active { border-color: var(--delivery-accent, var(--brand)); background: var(--brand-soft); }
.delivery-choice button b { color: var(--ink); font-size: calc(11px * var(--font-scale)); }
.delivery-choice button small { color: var(--muted); font-size: calc(9.5px * var(--font-scale)); line-height: 1.7; }
.delivery-selection { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.delivery-selection span { color: var(--muted); font-size: calc(10px * var(--font-scale)); }
.delivery-selection b { color: var(--delivery-accent, var(--brand)); font-size: calc(11px * var(--font-scale)); }
.delivery-wait { text-align: center; color: var(--muted); }
.delivery-wait .spin { display: block; width: 28px; height: 28px; margin: 3px auto 11px; }
.delivery-wait b { display: block; color: var(--ink); font-size: calc(12px * var(--font-scale)); }
.delivery-wait p { margin: 6px 0 0; font-size: calc(10px * var(--font-scale)); line-height: 1.9; }

/* ---------- empty / loading ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { width: 52px; height: 52px; margin: 0 auto 14px; color: #c9cede; }
.empty__title { font-size: calc(14px * var(--font-scale)); font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: calc(12px * var(--font-scale)); line-height: 2; margin: 0 0 16px; }

/* ---------- connectivity guidance ---------- */
.connectivity-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: calc(var(--radius) - 4px);
  padding: 10px 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  line-height: 1.8;
}
.connectivity-hint svg { width: 20px; height: 20px; flex: none; }

.spin {
  width: 34px; height: 34px; margin: 70px auto;
  border: 3.5px solid var(--brand-soft); border-top-color: var(--brand);
  border-radius: 99px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- bottom nav ---------- */
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  max-width: 560px; margin-inline: auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
.nav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: calc(10px * var(--font-scale)); font-weight: 700; color: var(--muted);
}
.nav__item svg { width: 21px; height: 21px; }
.nav__item--on { color: var(--brand); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  left: 50%; transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: #fff;
  font-size: calc(12px * var(--font-scale)); font-weight: 600;
  border-radius: 999px; padding: 10px 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  animation: toast-in 0.25s;
  white-space: nowrap;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- preview mode ---------- */
.preview-ribbon {
  font-size: calc(11px * var(--font-scale)); font-weight: 700; text-align: center; color: #fff;
  background: repeating-linear-gradient(135deg, #d97706, #d97706 14px, #b45309 14px, #b45309 28px);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 12px;
}

@media (min-width: 480px) {
  .grid { gap: 12px; }
  .hero__title { font-size: calc(21px * var(--font-scale)); }
}

/* claude-stock-v2: very long activation links wrap (up to 4 lines) instead of one-line ellipsis */
.delivery-secret .delivery-value code {
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  direction: ltr;
  text-align: left;
  line-height: 1.65;
}

/* claude-stock-v3: out-of-stock plans */
.plan--oos { opacity: 0.9; }
.plan--oos .plan__name, .plan--oos .plan__short { color: var(--muted); }
.plan--oos .plan__price {
  position: relative;
  display: inline-block;
  color: var(--muted);
  opacity: 0.85;
}
.plan--oos .plan__price::after {
  /* one continuous straight strike over number + تومان — cleaner than
     per-font-size text-decoration lines */
  content: "";
  position: absolute;
  inset-inline: -3px;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: #c0392b;
  transform: translateY(-50%);
  pointer-events: none;
}
.plan--oos .plan__cta { color: #b3372f; font-weight: 800; }
.badge--oos { color: #fff; background: #b3372f; font-weight: 800; }

/* ---------- balance card (checkout) ---------- */
.balance-card__check {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  font-size: 12px; line-height: 2; color: var(--text);
}
.balance-card__check input { width: 17px; height: 17px; margin-top: 4px; accent-color: var(--brand); flex: none; }
.balance-card__row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: var(--muted); padding: 5px 2px 0;
}
.balance-card__row b { color: var(--ink); }
.balance-card__row--due { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; }
.balance-card__row--due b { color: var(--brand); font-size: 13px; }
.tos-link b { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- vpn gift card (order page) ---------- */
.gift-card {
  border: 1px solid color-mix(in srgb, #16a34a 35%, var(--line));
  background: color-mix(in srgb, #16a34a 6%, var(--paper));
  border-radius: 16px; padding: 14px; margin: 12px 0;
}
.gift-card__head { font-size: 13.5px; color: var(--ink); margin-bottom: 6px; }
.gift-card p { font-size: 11.5px; color: var(--text); line-height: 2; margin: 0 0 9px; }
.gift-card__link {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 9px; overflow-x: auto;
}
.gift-card__link code { font-size: 10.5px; word-break: break-all; white-space: normal; display: block; }
.gift-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- credit banner (orders page) ---------- */
.credit-banner {
  display: flex; align-items: center; gap: 11px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  background: color-mix(in srgb, var(--brand) 7%, var(--paper));
  border-radius: 14px; padding: 11px 13px; margin-bottom: 12px;
}
.credit-banner__icon { font-size: 20px; flex: none; }
.credit-banner b { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 2px; }
.credit-banner span { font-size: 10.5px; color: var(--muted); line-height: 1.9; }

/* ---------- phone verification (checkout) ---------- */
.pv-row { display: flex; gap: 8px; }
.pv-row input { flex: 1; min-width: 0; }
.pv-btn { flex: none; padding: 10px 18px; font-size: 12.5px; border-radius: 12px; white-space: nowrap; }
.pv-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 8px; font-size: 10.5px; color: var(--muted);
}
.pv-link {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--brand); font-size: 10.5px; font-weight: 700; font-family: inherit;
}
.pv-link:disabled { color: var(--muted); cursor: default; }
/* One morphing row: the same shell holds the phone input, the code step and
   the verified state; only its skin transitions to green on success. */
.pv-shell {
  border-radius: 14px;
  transition: background 0.45s ease, box-shadow 0.45s ease, padding 0.45s ease;
}
.pv-shell--ok {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 12px 26px -14px rgba(5, 150, 105, 0.6);
  padding: 13px 16px;
}
/* The hidden attribute must always beat the display rules below. */
.pv-shell [hidden] { display: none !important; }
.pv-done { display: flex; align-items: center; gap: 10px; animation: pv-pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.35); }
.pv-done__chip {
  display: inline-flex; align-items: center; gap: 7px;
  color: #ffffff; font-size: 12.5px; font-weight: 800;
}
.pv-done__chip svg {
  width: 18px; height: 18px; flex: none;
  background: rgba(255, 255, 255, 0.22); border-radius: 50%; padding: 3px;
}
.pv-done b { font-size: 14px; color: #ffffff; letter-spacing: 0.6px; }
.pv-done .pv-link { margin-inline-start: auto; color: rgba(255, 255, 255, 0.9); }
/* Once verified there is nothing to explain — the green state speaks. */
.field--pv-ok > label { color: #059669; }
.field--pv-ok > label small { color: #059669; opacity: 0.75; }
.field--pv-ok > label small b { color: #047857; }
@keyframes pv-pop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- product badges (home tiles) ---------- */
.pcard__badges {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  pointer-events: none;
}
.pcard__sale ~ .pcard__badges { top: 10px; }
.pbadge {
  display: inline-flex; align-items: center; gap: 3px;
  font-style: normal; font-size: calc(8.5px * var(--font-scale)); font-weight: 800;
  line-height: 1; padding: 4px 8px; border-radius: 999px;
  color: #fff; background: #7c3aed;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.1px; white-space: nowrap;
}
.pbadge--new {
  background: linear-gradient(135deg, #22c55e, #059669);
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.4);
  animation: pbadge-glow 2.2s ease-in-out infinite;
}
.pbadge--hot {
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.4);
}
.pbadge--bestseller {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1c1917;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.4);
}
.pbadge--limited {
  background: linear-gradient(135deg, #64748b, #334155);
  box-shadow: 0 3px 10px rgba(51, 65, 85, 0.35);
  animation: pbadge-pulse 1.6s ease-in-out infinite;
}
.pbadge--festival {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.4);
}
.pbadge--soon {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4);
}
.pbadge--premium {
  background: linear-gradient(135deg, #1f2937, #0f172a);
  border: 1px solid rgba(251, 191, 36, 0.55); color: #fcd34d;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.pbadge--free {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.4);
}
@keyframes pbadge-glow {
  0%, 100% { box-shadow: 0 3px 10px rgba(5, 150, 105, 0.4); }
  50% { box-shadow: 0 3px 16px rgba(34, 197, 94, 0.75); }
}
@keyframes pbadge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}
@media (prefers-reduced-motion: reduce) {
  .pbadge--new, .pbadge--limited { animation: none; }
}

/* dedicated-account delivery guide (claude) */
.xgpt__guide { margin-top: 12px; border: 1px solid var(--line); border-radius: 13px; padding: 12px; }
.xgpt__guide > b { display: block; margin-bottom: 6px; font-size: calc(11px * var(--font-scale)); color: var(--ink); }
.xgpt__guide-body { font-size: calc(10.5px * var(--font-scale)); line-height: 2; color: var(--ink); }
.xgpt__guide-body a { color: var(--brand); word-break: break-all; }
