:root {
  --bg: #08090f;
  --surface: #12141d;
  --surface-2: #191c28;
  --surface-3: #22263a;
  --text: #f3f4fa;
  --muted: #9da3bd;
  --faint: #6c7290;
  --gold: #ffc94d;
  --violet: #8b6cff;
  --pink: #ff6fd8;
  --cyan: #4fd8ff;
  --ok: #37d39b;
  --danger: #ff7a7a;
  --ring: 0 0 0 1px oklch(1 0 0 / 0.08);
  --ring-strong: 0 0 0 1px oklch(1 0 0 / 0.14);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --gutter: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.glow {
  position: fixed; inset: -20vh -20vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 25% 30%, oklch(0.55 0.2 290 / 0.28), transparent 70%),
    radial-gradient(35% 45% at 80% 20%, oklch(0.75 0.15 80 / 0.16), transparent 70%);
  filter: blur(20px);
}

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--gutter) 8px;
}
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, var(--violet), var(--pink));
}
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.who-sub { font-size: 0.8125rem; color: var(--muted); line-height: 1.3; }
.balance {
  display: flex; align-items: center; gap: 6px; flex: none;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--ring); border: 1px solid transparent;
  font-weight: 700; font-size: 0.9375rem;
}
.balance-value, .price, .pack-amount, .buybar-price, .plan-price, .plan-month { font-variant-numeric: tabular-nums; }

/* Product switcher */
.products {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 8px;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.products::-webkit-scrollbar { display: none; }
.product {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 72px; min-height: 64px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--ring); color: var(--muted); font-size: 0.8125rem; font-weight: 600; white-space: nowrap;
  transition-property: scale, background-color, color; transition-duration: 150ms; transition-timing-function: ease-out;
}
.product[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: var(--ring-strong); }
@media (hover: hover) { .product:hover { color: var(--text); } }

/* Bottom navigation */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11;
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + var(--safe-bottom));
  background: oklch(0.13 0.02 280 / 0.92); backdrop-filter: blur(20px);
  box-shadow: 0 -1px 0 oklch(1 0 0 / 0.07);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 52px; padding: 4px 2px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--faint); font-size: 0.75rem; font-weight: 700;
  transition: color 150ms ease-out;
}
.nav-item[aria-current="page"] { color: var(--text); }
.nav-item .emoji { opacity: 0.55; transition: opacity 150ms ease-out; }
.nav-item[aria-current="page"] .emoji { opacity: 1; }
.emoji-nav { width: 26px; height: 26px; }
.screen { display: flex; flex-direction: column; gap: 16px; }
.screen-title { margin: 8px 0 0; font-size: 1.5rem; }
.balance { color: inherit; cursor: pointer; }
.balance-plus {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--violet); color: #fff; font-size: 0.875rem; line-height: 1;
}

/* Lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 56px; padding: 12px 14px; border: 1px solid transparent; border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--ring); text-align: start; color: inherit; text-decoration: none;
  transition-property: scale, background-color; transition-duration: 150ms; transition-timing-function: ease-out;
}
button.row:not(:disabled):active { scale: 0.96; }
@media (hover: hover) { button.row:hover { background: var(--surface-2); } }
.row-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 10px; background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.row-end { flex: none; text-align: end; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap;
  background: var(--surface-3); color: var(--muted);
}
.status.ok { background: oklch(0.75 0.15 160 / 0.16); color: var(--ok); }
.status.wait { background: oklch(0.6 0.2 290 / 0.18); color: #b9a6ff; }
.status.warn { background: oklch(0.8 0.15 85 / 0.16); color: var(--gold); }
.status.bad { background: oklch(0.65 0.2 25 / 0.16); color: var(--danger); }

/* Gifts */
.hero-sm .emoji-hero { width: 84px; height: 84px; }
.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gift {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 6px 10px; border: 1px solid transparent; border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--ring);
  transition-property: scale, box-shadow, background-color; transition-duration: 150ms; transition-timing-function: ease-out;
}
.gift-emoji { font-size: 2.5rem; line-height: 1.1; }
.gift[aria-checked="true"] { background: var(--surface-2); box-shadow: 0 0 0 2px var(--pink), 0 8px 24px -8px oklch(0.7 0.2 340 / 0.5); }
.gift .check { background: var(--pink); color: #fff; }
.gift:active { scale: 0.96; }

/* Profile and admin blocks */
.panel { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--ring); border: 1px solid transparent; }
.panel h2 { margin: 0; font-size: 1.0625rem; line-height: 1.3; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.balance-card {
  background: radial-gradient(90% 120% at 0% 0%, oklch(0.45 0.2 290 / 0.6), transparent 60%), linear-gradient(135deg, #1d1838, #121424);
}
.balance-big { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kpi { padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.kpi-value { font-size: 1.25rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-label { color: var(--muted); font-size: 0.8125rem; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.segmented button {
  min-height: 40px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-weight: 700; font-size: 0.875rem;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.segmented button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip[aria-pressed="true"] { background: var(--violet); color: #fff; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 0.8125rem; overflow-wrap: anywhere; }
textarea {
  width: 100%; min-height: 120px; padding: 12px 14px; resize: vertical;
  border-radius: var(--radius-md); background: var(--surface); color: var(--text);
  border: 1px solid oklch(1 0 0 / 0.16); font: inherit; font-size: 1rem; line-height: 1.5;
}
textarea:focus { outline: none; border-color: var(--violet); }
.switch {
  position: relative; flex: none; width: 52px; height: 32px; border: 0; border-radius: 999px; background: var(--surface-3);
  transition: background-color 150ms ease-out;
}
.switch::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  transition: translate 150ms ease-out;
}
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { translate: 20px 0; }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }
.bubble { max-width: 85%; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9375rem; }
.bubble.mine { align-self: flex-end; background: oklch(0.45 0.18 290 / 0.55); }
.bubble small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.75rem; }
.codes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.code-pill { padding: 10px 16px; border-radius: 14px; background: var(--surface-2); font-size: 1.5rem; font-weight: 800; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; user-select: all; }
.thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8125rem; overflow-wrap: anywhere; }

/* Emoji containers */
.emoji { display: inline-grid; place-items: center; flex: none; }
.emoji svg, .emoji img, .emoji video { width: 100%; height: 100%; display: block; }
.emoji-sm { width: 22px; height: 22px; }
.emoji-tab { width: 26px; height: 26px; }
.emoji-hero { width: 104px; height: 104px; }

main { padding: 8px var(--gutter) calc(160px + var(--safe-bottom)); }
.view { display: flex; flex-direction: column; gap: 16px; }
.spacer { height: 8px; }

/* Hero */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 0 4px; }
.hero .emoji-hero { filter: drop-shadow(0 10px 30px oklch(0.8 0.15 85 / 0.35)); }
h1 { margin: 8px 0 0; font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; text-wrap: balance; }
.lead { margin: 6px 0 0; color: var(--muted); text-wrap: balance; max-width: 34ch; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 14px; min-height: 52px;
  border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid oklch(1 0 0 / 0.16);
  transition: border-color 150ms ease-out;
}
.input-row:focus-within { border-color: var(--violet); }
.input-row input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 1rem; /* 16px keeps iOS from zooming */ padding: 10px 0;
}
.input-row input::placeholder { color: var(--faint); }
.at, .suffix { color: var(--muted); font-weight: 700; }
.suffix { padding-right: 10px; }
.field-error { margin: 0; min-height: 1.25em; font-size: 0.8125rem; color: var(--danger); }
.field-error:empty { min-height: 0; }

.chip {
  min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--radius-sm);
  background: var(--surface-3); font-weight: 600; font-size: 0.875rem; white-space: nowrap;
  transition-property: scale, background-color; transition-duration: 150ms; transition-timing-function: ease-out;
}

/* Packages */
.packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pack, .plan {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 14px; border-radius: var(--radius-md); text-align: start;
  background: var(--surface); border: 1px solid transparent; box-shadow: var(--ring);
  transition-property: scale, box-shadow, background-color; transition-duration: 150ms; transition-timing-function: ease-out;
}
.pack[aria-checked="true"], .plan[aria-checked="true"] {
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--gold), 0 8px 24px -8px oklch(0.8 0.15 85 / 0.45);
}
.plan[aria-checked="true"] { box-shadow: 0 0 0 2px var(--violet), 0 8px 24px -8px oklch(0.6 0.2 290 / 0.5); }
.pack-amount { font-size: 1.25rem; font-weight: 800; line-height: 1.2; display: flex; align-items: center; gap: 6px; }
.pack-amount .star { color: var(--gold); }
.price { color: var(--muted); font-weight: 600; font-size: 0.9375rem; }
.pack[aria-checked="true"] .price { color: var(--text); }
.check {
  position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: #1a1300;
  opacity: 0; scale: 0.25; filter: blur(4px);
  transition: opacity 300ms var(--ease), scale 300ms var(--ease), filter 300ms var(--ease);
}
.plan .check { background: var(--violet); color: #fff; }
[aria-checked="true"] > .check { opacity: 1; scale: 1; filter: blur(0); }
.check svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 3; fill: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border: 0; border-radius: var(--radius-md);
  font-weight: 700; font-size: 1rem; white-space: nowrap;
  transition-property: scale, opacity, background-color; transition-duration: 150ms; transition-timing-function: ease-out;
}
.btn-primary { background: linear-gradient(135deg, #9d7bff, #6f4dff); color: #fff; box-shadow: 0 10px 30px -10px oklch(0.6 0.22 290 / 0.8); }
.btn-gold { background: linear-gradient(135deg, #ffd66b, #ffb020); color: #241600; }
.btn-payme { background: #00c3c3; color: #002b2b; }
.btn-ghost { background: var(--surface-3); color: var(--text); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn:not(:disabled):active, .chip:active, .pack:active, .plan:active, .card:active, .product:active, .nav-item:active { scale: 0.96; }

/* Buy bar */
.buybar {
  position: fixed; left: 0; right: 0; bottom: calc(64px + var(--safe-bottom)); z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gutter);
  background: oklch(0.15 0.02 280 / 0.85); backdrop-filter: blur(20px);
  box-shadow: 0 -1px 0 oklch(1 0 0 / 0.06);
  transition: translate 300ms var(--ease), opacity 300ms var(--ease);
}
.buybar.is-hidden { translate: 0 110%; opacity: 0; pointer-events: none; }
.buybar-sum { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.buybar-label { font-size: 0.8125rem; color: var(--muted); }
.buybar-price { font-size: 1.125rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Premium card */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.premium-card {
  position: relative; padding: 2px; border-radius: 26px; /* 24 + 2 */
  background: conic-gradient(from var(--angle), var(--violet), var(--pink), var(--gold), var(--cyan), var(--violet));
  box-shadow: 0 20px 60px -20px oklch(0.6 0.22 300 / 0.6);
}
.premium-inner {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 22px 18px 20px; border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 60% at 50% 0%, oklch(0.45 0.2 295 / 0.55), transparent 70%),
    linear-gradient(180deg, #1a1430, #0f0d1c);
}
.premium-inner::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, oklch(1 0 0 / 0.14) 50%, transparent 65%);
  translate: -100% 0;
}
.premium-orbit { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.premium-orbit::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  background: radial-gradient(circle, oklch(0.7 0.2 300 / 0.45), transparent 65%);
}
.premium-title {
  margin-top: 4px;
  background: linear-gradient(90deg, #c9b6ff, #ffffff 40%, #ffd98a 60%, #ff9be6);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.perks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; text-align: start; width: 100%; max-width: 320px; }
.perks li { display: flex; align-items: center; gap: 10px; color: #d9d4f5; font-size: 0.9375rem; }
.perk-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--violet), var(--pink)); box-shadow: 0 0 10px var(--pink); }
.sparkles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sparkles i {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px 2px oklch(0.85 0.12 300 / 0.9); opacity: 0.5;
}
.sparkles i:nth-child(1) { left: 12%; top: 18%; }
.sparkles i:nth-child(2) { left: 84%; top: 14%; width: 4px; height: 4px; }
.sparkles i:nth-child(3) { left: 22%; top: 46%; width: 3px; height: 3px; }
.sparkles i:nth-child(4) { left: 76%; top: 40%; }
.sparkles i:nth-child(5) { left: 8%; top: 74%; width: 4px; height: 4px; }
.sparkles i:nth-child(6) { left: 90%; top: 70%; width: 3px; height: 3px; }
.sparkles i:nth-child(7) { left: 50%; top: 8%; width: 3px; height: 3px; }
.sparkles i:nth-child(8) { left: 62%; top: 86%; width: 4px; height: 4px; }

.plans { display: grid; gap: 10px; }
.plan { flex-direction: row; align-items: center; gap: 12px; padding: 14px 44px 14px 14px; }
.plan-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.plan-name { font-weight: 800; font-size: 1.0625rem; line-height: 1.3; }
.plan-month { color: var(--muted); font-size: 0.8125rem; }
.plan-price { font-weight: 800; white-space: nowrap; }
.plan .check { top: 50%; translate: 0 -50%; }
.badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; vertical-align: 2px;
  font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff;
}

/* NFT cards: animation only, no text */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.card {
  position: relative; aspect-ratio: 1; padding: 0; border: 1px solid transparent; border-radius: 20px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, var(--card-glow, #3b2f6b), var(--card-bg, #171427) 75%);
  box-shadow: var(--ring);
  transition-property: scale, box-shadow; transition-duration: 150ms; transition-timing-function: ease-out;
}
.card-bg {
  position: absolute; inset: -25%; width: 150%; height: 150%; object-fit: cover; pointer-events: none;
  filter: blur(26px) saturate(1.5) brightness(0.85); opacity: 0.95;
}
/* Fragment's gift animation carries its own backdrop and pattern, so it fills the card. */
.card-art { position: absolute; inset: 0; display: grid; place-items: center; }
.card-art svg, .card-art img { width: 100%; height: 100%; object-fit: contain; }
@media (hover: hover) { .card:hover { box-shadow: var(--ring-strong); } }
.card.skeleton { pointer-events: none; background: var(--surface); }
.card.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, oklch(1 0 0 / 0.06) 50%, transparent 70%);
  translate: -100% 0;
}
.skeleton-orb { position: absolute; inset: 26%; border-radius: 50%; background: var(--surface-3); opacity: 0.6; }
.empty-note { margin: 4px 0 0; text-align: center; color: var(--muted); font-size: 0.9375rem; }
.link-row { align-self: center; color: var(--violet); font-weight: 700; text-decoration: none; padding: 12px; }

/* Sheet */
.backdrop {
  position: fixed; inset: 0; z-index: 20; background: oklch(0 0 0 / 0.55);
  opacity: 0; transition: opacity 200ms ease-out;
}
.backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px var(--gutter) calc(20px + var(--safe-bottom));
  border-radius: 28px 28px 0 0; background: var(--surface);
  box-shadow: 0 -1px 0 oklch(1 0 0 / 0.08);
  opacity: 0; translate: 0 24px;
  transition: opacity 150ms ease-out, translate 150ms ease-out;
}
.sheet.open { opacity: 1; translate: 0 0; transition-duration: 300ms; transition-timing-function: var(--ease); }
.sheet-grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--surface-3); margin: 0 auto 6px; }
.sheet-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: transparent; color: var(--muted);
}
.sheet-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.sheet-body { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.sheet h2 { margin: 0; font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; padding-right: 44px; text-wrap: balance; }
.sheet .panel-head { padding-right: 44px; }
.sheet .panel-head h2 { padding-right: 0; }
pre.mono { margin: 0; white-space: pre-wrap; }
.sheet p { margin: 0; color: var(--muted); text-wrap: pretty; }
.summary { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius-md); background: var(--surface-2); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; }
.summary-row span:first-child { color: var(--muted); }
.summary-row span:last-child { font-weight: 700; text-align: end; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pay-options { display: grid; gap: 10px; }
.sheet-art { width: 160px; height: 160px; margin: 0 auto; border-radius: 28px; display: grid; place-items: center; overflow: hidden; }
.sheet-art { position: relative; }
.attrs { display: flex; flex-wrap: wrap; gap: 6px; }
.attr { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 0.8125rem; color: var(--muted); }
.attr b { color: var(--text); font-weight: 600; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper .btn { min-width: 52px; padding: 0; font-size: 1.375rem; }
.stepper-value { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.terms-text { max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: 0.9375rem; }

.status-icon {
  width: 72px; height: 72px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center;
  background: oklch(0.75 0.15 160 / 0.15); color: var(--ok);
}
.status-icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.status-icon.wait { background: oklch(0.6 0.2 290 / 0.15); color: var(--violet); }
.status-icon.warn { background: oklch(0.8 0.15 85 / 0.15); color: var(--gold); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid oklch(1 0 0 / 0.12); border-top-color: var(--violet); }
.center { text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: calc(150px + var(--safe-bottom)); z-index: 30;
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 14px;
  background: var(--surface-3); box-shadow: var(--ring-strong); font-weight: 600; font-size: 0.9375rem;
  translate: -50% 0; opacity: 0; pointer-events: none; transition: opacity 150ms ease-out;
}
.toast.show { opacity: 1; }

/* Motion: opacity everywhere, movement only without the reduced-motion preference */
.stagger { animation: fade-in 300ms ease-out both; }
.stagger:nth-child(2) { animation-delay: 100ms; }
.stagger:nth-child(3) { animation-delay: 200ms; }
.stagger:nth-child(4) { animation-delay: 300ms; }
.stagger:nth-child(5) { animation-delay: 400ms; }
@keyframes fade-in { from { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .stagger { animation-name: fade-in-up; }
  .premium-card { animation: spin-border 6s linear infinite; }
  .premium-inner::after { animation: shimmer 3.2s var(--ease) 0.6s infinite; }
  .premium-title { animation: title-sheen 5s linear infinite; }
  .premium-orbit { animation: float 4s ease-in-out infinite; }
  .sparkles i { animation: twinkle 2.4s ease-in-out infinite; }
  .sparkles i:nth-child(2n) { animation-delay: 0.6s; animation-duration: 3s; }
  .sparkles i:nth-child(3n) { animation-delay: 1.2s; animation-duration: 2s; }
  .card.skeleton::after { animation: shimmer 1.6s ease-in-out infinite; }
  .spinner { animation: spin 0.9s linear infinite; }
  .card-enter { animation: fade-in-up 300ms ease-out both; }
}
@keyframes fade-in-up { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } }
@keyframes spin-border { to { --angle: 360deg; } }
@keyframes shimmer { 0% { translate: -100% 0; } 60%, 100% { translate: 100% 0; } }
@keyframes title-sheen { to { background-position: -200% 0; } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.6); } 50% { opacity: 0.9; transform: scale(1); } }
@keyframes spin { to { rotate: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .btn:not(:disabled):active, .chip:active, .pack:active, .plan:active, .card:active, .product:active, .nav-item:active, button.row:active, .gift:active { scale: 1; }
  .switch::after { transition: none; }
  .sheet { translate: 0 0; }
  .buybar { transition-property: opacity; }
}

@media (min-width: 560px) {
  body { max-width: 560px; margin: 0 auto; }
  .packs { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .buybar, .sheet, .bottom-nav { left: 50%; right: auto; width: 560px; margin-left: -280px; }
  .gift-grid { grid-template-columns: repeat(4, 1fr); }
}
