:root {
  --bg: #07080a;
  --accent: #2f6bff;
  --accent-hi: #7ba2ff;
  --accent-rgb: 47, 107, 255;
  --bg-rgb: 7, 8, 10;
  --ink: #0a0a0a;          /* text on light buttons */
  --light: #f5f5f7;        /* light buttons / active chips */
  --sheet: #111112;        /* bottom sheets */
  --sheet-deep: #0b0b0c;   /* admin sheet */
  --surface-deep: #0e0e0f; /* recessed controls */
  --card: #151516;
  --card-hi: #1d1d1f;
  --card2: #232325;
  --card3: #2e2e31;
  --line: rgba(255, 255, 255, .07);
  --text: #fff;
  --muted: #9a9aa1;
  --muted2: #85858c;
  --ok: #34c759;
  --warn: #ff9f0a;
  --bad: #ff453a;
  --r: 26px;
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --ease: cubic-bezier(.2, .9, .3, 1);
  --safe-top: calc(env(safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px));
  --safe-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tg-safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; font-size: 16px; line-height: 1.3;
  overscroll-behavior-y: none; min-height: 100vh;
  -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
input, textarea { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
svg { display: block; }
a { color: inherit; }
.sel { -webkit-user-select: text; user-select: text; }

html, * { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

#app { max-width: 540px; margin: 0 auto; padding: calc(var(--safe-top) + 12px) 14px calc(118px + var(--safe-bottom)); }
body.has-buybar #app { padding-bottom: calc(112px + var(--safe-bottom)); }
body.editing #app { padding-top: calc(var(--safe-top) + 64px); }
body.editor-open #app { padding-bottom: 58vh; }

/* ---------- boot ---------- */
#boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 200; transition: opacity .35s; }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #2a2a2c; border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-err { text-align: center; padding: 30px; color: var(--muted); line-height: 1.45; }
.boot-err b { color: #fff; display: block; font-size: 19px; margin-bottom: 8px; }

/* ---------- motion ---------- */
.view > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.view.still > * { animation: none; }

.view.push > * { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes pushIn { from { opacity: 0; transform: translateX(34px); } }
.grid > * { animation: tilePop .5s var(--spring) both; animation-delay: calc(var(--k, 0) * 40ms + 80ms); }
.view.still .grid > *, .view.push .grid > * { animation: none; }
@keyframes tilePop { from { opacity: 0; transform: scale(.88) translateY(10px); } }
.press { transition: transform .3s var(--spring), background .2s, filter .2s; }
.press:active { transform: scale(.955); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}

/* ---------- cards ---------- */
.card {
  position: relative; background: linear-gradient(180deg, var(--card-hi) 0%, var(--card) 100%);
  border-radius: var(--r); overflow: hidden; margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.pad { padding: 18px; }
.section-title { font-size: 14px; font-weight: 600; color: var(--muted); margin: 22px 6px 10px; }

/* hero (shop / balance) */
.hero { min-height: 196px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.hero-bg { position: absolute; inset: 0; background:
  radial-gradient(70% 90% at 88% 78%, rgba(47,107,255,.55) 0%, rgba(47,107,255,.18) 45%, transparent 75%),
  radial-gradient(90% 80% at 0% 100%, rgba(255,255,255,.04) 0%, transparent 60%),
  linear-gradient(160deg, #15171c 0%, #0b0c0f 100%); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .09) 50%, transparent 65%); transform: translateX(-120%); animation: shine 5s ease-in-out infinite 1.4s; pointer-events: none; }
@keyframes shine { 0% { transform: translateX(-120%); } 28%, 100% { transform: translateX(120%); } }
.hero-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; z-index: 2; }
.hero-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; padding-top: 4px; }
.wordmark { font-size: 40px; font-weight: 800; letter-spacing: -.06em; line-height: 1; padding-top: 0; }
.wordmark i { font-style: normal; color: var(--accent); }
.hero-bottom { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; }
.cap { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: rgba(255,255,255,.62); text-transform: uppercase; }
.bal { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 4px; display: flex; align-items: baseline; gap: 8px; }
.bal .cur { font-size: 32px; color: rgba(255,255,255,.55); font-weight: 700; }
.plus { width: 38px; height: 38px; border-radius: 50%; background: var(--light); color: var(--ink); display: grid; place-items: center; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); margin-bottom: 6px; }
.plus:active { transform: scale(.88); }

/* ---------- product / category grid ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pc {
  position: relative; overflow: hidden; border-radius: 24px; min-height: 172px; padding: 16px 14px 14px;
  display: flex; flex-direction: column; background: linear-gradient(180deg, var(--card-hi) 0%, var(--card) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 0 0 1px rgba(255, 255, 255, .03);
  transition: transform .32s var(--spring);
}
.pc:active { transform: scale(.955); }
.pc-icon-wrap { height: 50px; display: flex; align-items: flex-start; position: relative; z-index: 1; }
.pc-name { position: relative; z-index: 3; font-size: 15px; font-weight: 600; line-height: 1.25; margin-top: 12px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-foot { position: relative; z-index: 3; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 10px; }
.pc-price { font-size: 21px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; }
.pc-price small { font-size: 14px; color: rgba(255,255,255,.55); font-weight: 650; margin-left: 2px; }
.pc-price .from { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: 3px; }
.pc-stock { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pc-stock.low { color: var(--warn); }
.pc-stock.out { color: var(--bad); }
.pc-bar { position: relative; z-index: 3; height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); margin-top: 8px; overflow: hidden; }
.pc-bar i { position: absolute; inset: 0; right: auto; width: calc(var(--w, 1) * 100%); background: var(--accent); border-radius: 3px; transform-origin: left; animation: barGrow 1s var(--ease) both .35s; }
.pc-bar.low i { background: var(--warn); }
@keyframes barGrow { from { transform: scaleX(0); } }
.pc.soldout .pc-name, .pc.soldout .pc-icon-wrap { opacity: .45; }
.pc-arrow { position: absolute; top: 16px; right: 14px; color: var(--muted); z-index: 3; }
.pc-sub { position: relative; z-index: 3; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 4px; }
.deco-anchor { position: absolute; right: 0; bottom: 0; z-index: 2; pointer-events: none; }
.deco-anchor .slot { pointer-events: none; }
body.editing .deco-anchor, body.editing .deco-anchor .slot { pointer-events: auto; }

/* ---------- slots (stickers the admin can place) ---------- */
.slot {
  display: inline-block; position: relative; flex: none; line-height: 0;
  width: var(--s, 40px); height: var(--s, 40px);
  transform: translate(var(--x, 0px), var(--y, 0px)) rotate(var(--r, 0deg)) scaleX(var(--f, 1));
  opacity: var(--o, 1);
}
.slot.hid { display: none; }
.deco-anchor .slot { transform-origin: 100% 100%; }
.slot.cover { position: absolute; inset: 0; width: 100%; height: 100%; transform: translate(var(--x, 0px), var(--y, 0px)) scale(var(--k, 1)) rotate(var(--r, 0deg)) scaleX(var(--f, 1)); }

.stk { display: block; width: 100%; height: 100%; position: relative; line-height: 0; color: inherit; }
.stk svg { width: 100% !important; height: 100% !important; }
.stk img, .stk video { width: 100%; height: 100%; object-fit: contain; display: block; -webkit-user-drag: none; pointer-events: none; }
.stk .fb { display: grid; place-items: center; width: 100%; height: 100%; font-size: calc(var(--s, 40px) * .7); line-height: 1; }
.float { animation: floaty 3.4s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* custom emoji inside text */
.ce { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -0.24em; line-height: 0; margin: 0 .04em; }
.ce .stk { width: 100%; height: 100%; }
.ce-fb { line-height: 1.2em; font-size: 1em; }

/* ---------- product page ---------- */
.p-hero { position: relative; aspect-ratio: 16 / 10.5; border-radius: 28px; overflow: hidden; margin-bottom: 18px;
  background: radial-gradient(70% 70% at 50% 45%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 70%), linear-gradient(180deg, #1b1b1d, var(--surface-deep));
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.p-hero .glow { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%); filter: blur(10px); animation: pulse 4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .7; } }
.p-title { display: flex; align-items: center; gap: 12px; margin: 0 4px 10px; }
.p-title h1 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; font-weight: 750; }
.p-price { display: flex; align-items: center; gap: 12px; margin: 0 4px 18px; }
.p-price b { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.chip-stock { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: var(--card2); color: #c7c7cc; font-size: 14px; font-weight: 600; }
.chip-stock.low { color: var(--warn); }
.chip-stock.out { color: var(--bad); }
.qblock { position: relative; background: linear-gradient(180deg, var(--card-hi), var(--card)); border-radius: 20px; padding: 14px 16px 14px 20px; margin-bottom: 10px; font-size: 16px; line-height: 1.45; color: #e5e5ea;
  -webkit-user-select: text; user-select: text; }
.qblock::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: rgba(255,255,255,.28); }
.rich b { font-weight: 700; color: #fff; }
.rich code, .rich pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: rgba(255,255,255,.08); border-radius: 6px; padding: 1px 5px; }
.rich pre { display: block; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; margin: 6px 0; }
.rich blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid rgba(255,255,255,.25); }
.rich a { text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 2px; }
.spoiler { background: rgba(255,255,255,.22); color: transparent; border-radius: 4px; transition: color .3s, background .3s; cursor: pointer; }
.spoiler.open { background: transparent; color: inherit; }

.denoms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.denom { background: var(--card); border-radius: 18px; padding: 14px; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background .2s, transform .3s var(--spring); }
.denom b { display: block; font-size: 19px; font-weight: 750; }
.denom span { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.denom.on { background: var(--card2); box-shadow: inset 0 0 0 1.5px var(--accent); }
.denom:active { transform: scale(.95); }
.custom-amt { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 18px; padding: 6px 6px 6px 16px; }
.custom-amt input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 19px; font-weight: 650; padding: 10px 0; }
.custom-amt input::placeholder { color: var(--muted2); font-weight: 500; }
.custom-amt .cur { color: var(--muted); font-weight: 650; }
.hint { color: var(--muted); font-size: 13.5px; line-height: 1.4; margin: 8px 6px 0; }

/* buy bar */
#buybar { position: fixed; left: 50%; bottom: calc(12px + var(--safe-bottom)); transform: translate(-50%, 140%); width: min(calc(100% - 24px), 520px); z-index: 30;
  display: flex; gap: 8px; align-items: stretch; transition: transform .45s var(--spring); pointer-events: none; }
body.has-buybar #buybar { transform: translate(-50%, 0); pointer-events: auto; }
.stepper { display: flex; align-items: center; background: rgba(38,38,40,.78); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border-radius: 99px; height: 58px; padding: 0 4px; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.stepper button { height: 48px; display: grid; place-items: center; color: #fff; border-radius: 99px; }
.stepper button:disabled { color: #555; }
.stepper span { min-width: 22px; text-align: center; font-size: 19px; font-weight: 650; }
.buy { flex: 1; min-width: 0; height: 58px; border-radius: 99px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; white-space: nowrap; padding: 0 10px; font-weight: 700; text-align: center;
  box-shadow: 0 10px 30px rgba(var(--accent-rgb),.28); transition: transform .3s var(--spring), opacity .2s; }
.buy:active { transform: scale(.96); }
.buy:disabled { background: #2c2c2e; color: #8e8e93; box-shadow: none; }
.round-glass { width: 58px; height: 58px; min-width: 58px; aspect-ratio: 1; padding: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(38,38,40,.78); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); flex: none; }
.round-glass:active { transform: scale(.9); }

/* ---------- lists / rows ---------- */
.rows { background: linear-gradient(180deg, var(--card-hi), var(--card)); border-radius: 22px; overflow: hidden; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; min-height: 66px; position: relative; }
.row + .row::before { content: ""; position: absolute; left: 66px; right: 0; top: 0; height: 1px; background: var(--line); }
.row:active { background: rgba(255,255,255,.035); }
.row .ri { width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-size: 16.5px; font-weight: 650; }
.row .s { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.row .end { text-align: right; font-weight: 650; }
.chev { width: 30px; height: 30px; border-radius: 50%; background: var(--card3); display: grid; place-items: center; color: #d1d1d6; flex: none; }
.row.card-row { background: linear-gradient(180deg, var(--card-hi), var(--card)); border-radius: 22px; margin-bottom: 10px; }
.row.card-row + .row.card-row::before { display: none; }
.row.dim { opacity: .5; }

/* ---------- tiles (info / profile) ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.tile { position: relative; background: linear-gradient(180deg, var(--card-hi), var(--card)); border-radius: 22px; padding: 16px; min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; transition: transform .3s var(--spring); }
.tile:active { transform: scale(.955); }
.tile .ti { height: 36px; display: flex; align-items: center; }
.tile .tt { font-size: 16px; font-weight: 700; margin-top: 12px; }
.tile .ts { font-size: 13px; color: var(--muted); margin-top: 3px; }
.tile .ta { position: absolute; top: 14px; right: 14px; color: var(--muted2); }
.stat { background: linear-gradient(180deg, var(--card-hi), var(--card)); border-radius: 22px; padding: 16px; min-height: 104px; }
.stat .k { font-size: 13.5px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 10px; }
.stat .v small { font-size: 18px; color: rgba(255,255,255,.55); }
.stat .n { font-size: 12.5px; color: var(--muted2); margin-top: 3px; font-weight: 500; }
.stat:active { transform: scale(.97); }

.about { display: flex; justify-content: space-between; min-height: 170px; }
.about-left { display: flex; flex-direction: column; justify-content: space-between; position: relative; z-index: 2; }
.about h2 { margin: 0; font-size: 27px; line-height: 1.05; letter-spacing: -.02em; font-weight: 800; }
.about h2 .sub { display: block; color: rgba(255,255,255,.42); font-weight: 750; }
.about .badge { align-self: flex-start; margin-bottom: 26px; }
.about-left { flex: 1; min-width: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: rgba(255,255,255,.08); font-size: 13.5px; font-weight: 600; color: #d1d1d6; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.quote { position: relative; padding: 14px 16px 14px 22px; font-size: 15.5px; font-weight: 600; line-height: 1.4; color: #e5e5ea; }
.quote::before { content: ""; position: absolute; left: 12px; top: 13px; bottom: 13px; width: 3px; border-radius: 3px; background: rgba(255,255,255,.3); }

.prof-head { display: flex; align-items: center; gap: 14px; }
.ava { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #3a3a3c, #1c1c1e); display: grid; place-items: center; font-size: 22px; font-weight: 700; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.prof-name { font-size: 19px; font-weight: 750; }
.prof-user { font-size: 14px; color: var(--muted); margin-top: 2px; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.btn-tile { display: flex; align-items: center; justify-content: center; gap: 10px; height: 64px; border-radius: 22px; background: linear-gradient(180deg, var(--card-hi), var(--card)); font-size: 16.5px; font-weight: 700; transition: transform .3s var(--spring); }
.btn-tile:active { transform: scale(.95); }

/* orders */
.orders-hero { min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; }
.orders-hero h2 { margin: 0; font-size: 30px; line-height: 1.08; letter-spacing: -.02em; font-weight: 800; max-width: 62%; position: relative; z-index: 2; }
.hero-deco { position: absolute; right: 18px; bottom: 16px; z-index: 1; }
.o-date { font-size: 12.5px; color: var(--muted2); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; padding: 3px 9px; border-radius: 99px; background: var(--card3); color: #d1d1d6; }
.status-pill.ok { background: rgba(52,199,89,.14); color: var(--ok); }
.status-pill.wait { background: rgba(255,159,10,.14); color: var(--warn); }
.status-pill.bad { background: rgba(255,69,58,.14); color: var(--bad); }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 20px; border-radius: 18px; font-weight: 700; font-size: 17px; text-align: center; background: var(--card3); color: #fff; transition: transform .3s var(--spring), opacity .2s, filter .2s; }
.btn:active { transform: scale(.965); filter: brightness(.92); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: var(--card2); }
.btn.sm { min-height: 44px; font-size: 15.5px; border-radius: 14px; width: auto; padding: 0 18px; }
.btn:disabled, .btn.disabled { opacity: .4; pointer-events: none; }
.btn.center-pill { width: auto; margin: 18px auto 0; border-radius: 99px; padding: 0 26px; min-height: 48px; background: #e5e5ea; color: var(--ink); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; opacity: .8; }

/* ---------- tab bar (liquid glass) ---------- */
#nav {
  position: fixed; left: 50%; bottom: calc(14px + var(--safe-bottom)); transform: translateX(-50%);
  width: min(calc(100% - 40px), 360px); height: 66px; z-index: 25; padding: 5px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(34, 34, 36, .64); backdrop-filter: blur(26px) saturate(1.7); -webkit-backdrop-filter: blur(26px) saturate(1.7);
  border-radius: 999px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(255, 255, 255, .07);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .45s var(--spring), box-shadow .3s, opacity .3s;
  transform-origin: 50% 100%;
  animation: navIn .7s cubic-bezier(.2, 1.2, .3, 1) backwards .15s;
}
body.nav-compact:not(.has-buybar) #nav { transform: translateX(-50%) translateY(6px) scale(.8); box-shadow: 0 8px 24px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(255, 255, 255, .07); }
body.has-buybar #nav { transform: translate(-50%, 160%); opacity: 0; pointer-events: none; }
#nav.dragging { box-shadow: 0 20px 50px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .14); }
@keyframes navIn { from { transform: translate(-50%, 90px) scale(.9); opacity: 0; } }
#nav .ind { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 4); transform: translateX(var(--x, 0px)); transition: transform .5s cubic-bezier(.3, 1.35, .5, 1); pointer-events: none; }
#nav.dragging .ind { transition: none; will-change: transform; }
#nav .ind i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .13); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .2);
  transition: transform .42s cubic-bezier(.3, 1.6, .5, 1), background .25s, box-shadow .25s; }
#nav.dragging .ind i { transform: scale(1.2, 1.15); background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px) brightness(1.25); -webkit-backdrop-filter: blur(6px) brightness(1.25);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .5), inset 0 1.5px 0 rgba(255, 255, 255, .4), inset 0 0 0 1px rgba(255, 255, 255, .12); }
#nav button { position: relative; z-index: 1; display: grid; place-items: center; border-radius: 999px; color: #8e8e93; transition: color .25s; }
#nav button .ni { display: grid; place-items: center; width: 28px; height: 28px; transition: transform .45s cubic-bezier(.3, 1.8, .5, 1); }
#nav button .ni .slot { --s: 28px; }
#nav button.on, #nav button.hot { color: var(--accent-hi); }
#nav button.hot .ni { transform: scale(1.18); }
#nav button.pop .ni { animation: navPop .55s cubic-bezier(.3, 1.8, .5, 1); }
#nav button .dot { position: absolute; top: 12px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px rgba(34,34,36,1); }
@keyframes navPop { 0% { transform: scale(1); } 35% { transform: scale(1.3) translateY(-3px); } 100% { transform: scale(1); } }

/* ---------- sheets ---------- */
#sheets { position: relative; z-index: 50; }
.sheet-wrap { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: sfade .25s ease both; }
.sheet { position: relative; width: 100%; max-width: 540px; max-height: calc(100% - var(--safe-top) - 8px); overflow-y: auto; overscroll-behavior: contain; background: var(--sheet); border-radius: 30px 30px 0 0; padding: 8px 16px calc(22px + var(--safe-bottom)); box-shadow: 0 -12px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255,255,255,.06); }
.sheet-wrap.full .sheet { min-height: calc(100% - var(--safe-top) - 8px); }

.sheet-wrap.out .scrim { animation: sfadeout .22s ease both; }
.sheet.drag { transition: none !important; animation: none; }
.sheet.snap { transition: transform .38s var(--spring); }
@keyframes sup { from { transform: translateY(100%); } }
@keyframes sdown { to { transform: translateY(100%); } }
@keyframes sfade { from { opacity: 0; } }
@keyframes sfadeout { to { opacity: 0; } }
.grab { width: 38px; height: 5px; border-radius: 3px; background: #3a3a3c; margin: 4px auto 12px; touch-action: none; }
.grab-zone { padding: 2px 0 6px; margin: -8px -16px 0; touch-action: none; cursor: grab; }
.sheet .x { top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; color: #aeaeb2; z-index: 3; transition: transform .3s var(--spring); }
.sheet .x:active { transform: scale(.85) rotate(90deg); }
.sheet .body > * { animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 38ms + 50ms); }
.sheet .body.still > * { animation: none; }
.sh-hero { display: grid; place-items: center; margin: 12px 0 6px; min-height: 100px; }
.sh-title { text-align: center; font-size: 25px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin: 8px 26px 6px; }
.sh-sub { text-align: center; color: var(--muted); margin: 0 12px 18px; font-size: 15px; line-height: 1.4; }
.sh-label { font-size: 13.5px; font-weight: 600; color: var(--muted); margin: 18px 6px 8px; }
.amount-box { background: var(--card); border-radius: 24px; padding: 18px; display: flex; align-items: baseline; justify-content: center; gap: 6px; cursor: text; }
.amount-box input { width: calc(var(--n, 1) * 1ch + .35em); min-width: 1ch; max-width: 78%; text-align: right; background: none; border: 0; outline: 0; font-size: 50px; font-weight: 800; letter-spacing: -.03em; padding: 0; caret-color: var(--accent); font-variant-numeric: tabular-nums; }
.amount-box input::placeholder { color: #55555a; }
.amount-box .cur { font-size: 34px; font-weight: 800; color: var(--muted2); }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.chip { height: 44px; border-radius: 99px; background: var(--card2); font-weight: 650; font-size: 15px; color: #c7c7cc; display: grid; place-items: center; transition: background .2s, color .2s, transform .3s var(--spring); }
.chip:active { transform: scale(.92); }
.chip.on { background: var(--light); color: var(--ink); }
.legal { color: var(--muted2); font-size: 12.5px; line-height: 1.45; text-align: center; margin: 14px 8px 0; }
.legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.sum-row { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 20px; padding: 14px 16px; }
.sum-row .grow { flex: 1; min-width: 0; }
.sum-row .t { font-weight: 650; font-size: 16px; }
.sum-row .s { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.sum-row .p { font-weight: 800; font-size: 19px; white-space: nowrap; }
.big-amt { text-align: center; font-size: 52px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 18px; }
.big-amt small { font-size: 36px; color: #8e8e93; }
.status-line { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 14.5px; margin: 14px 0 4px; }
.content-box { background: var(--card); border-radius: 18px; padding: 14px 16px; font-size: 15.5px; line-height: 1.45; word-break: break-word; -webkit-user-select: text; user-select: text; }
.content-box + .content-box { margin-top: 8px; }
.copy-row { display: flex; gap: 8px; margin-top: 10px; justify-content: center; }
.pop { animation: pop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.3) rotate(-12deg); opacity: 0; } }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; line-height: 1.45; }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; top: calc(var(--safe-top) + 10px); z-index: 300; display: flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 9px; border-radius: 99px; max-width: min(calc(100% - 32px), 420px);
  background: rgba(30, 30, 32, .9); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .08);
  color: #d1d1d6; font-weight: 650; font-size: 15.5px; opacity: 0; pointer-events: none; transform: translate(-50%, -140%) scale(.9); }
#toast:empty { display: none; }
#toast.show { animation: toastIn .55s cubic-bezier(.2, 1.4, .4, 1) forwards; }
#toast.hide { animation: toastOut .32s cubic-bezier(.5, 0, .75, 0) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -140%) scale(.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translate(-50%, 0) scale(1); } to { opacity: 0; transform: translate(-50%, -140%) scale(.92); } }
#toast .t-ic { width: 30px; height: 30px; flex: none; }
#toast .t-ic svg { width: 100%; height: 100%; display: block; }
#toast .t-ic circle { fill: #fff; transform-origin: center; animation: icPop .45s cubic-bezier(.3, 1.8, .5, 1) both .08s; }
#toast .t-ic path { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 20; stroke-dashoffset: 20; animation: icDraw .4s ease-out forwards .28s; }
#toast.err .t-ic circle { fill: #ff453a; }
#toast.err .t-ic path { stroke: #fff; }
#toast .t-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes icPop { from { transform: scale(.2); opacity: 0; } }
@keyframes icDraw { to { stroke-dashoffset: 0; } }

/* ---------- layout editor (admins) ---------- */
.edit-fab { position: fixed; top: calc(var(--safe-top) + 10px); right: 12px; z-index: 40; height: 34px; padding: 0 12px; border-radius: 99px; display: flex; align-items: center; gap: 6px;
  background: rgba(40,40,42,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 13.5px; font-weight: 650; color: #e5e5ea; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
#editbar { position: fixed; top: 0; left: 0; right: 0; z-index: 45; display: none; padding: calc(var(--safe-top) + 8px) 12px 8px; }
body.editing #editbar { display: block; }
.editbar-in { max-width: 540px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 18px;
  background: rgba(255,214,10,.14); box-shadow: inset 0 0 0 1px rgba(255,214,10,.35); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: #ffd60a; font-size: 13.5px; font-weight: 600; }
.editbar-in span { flex: 1; line-height: 1.3; }
.editbar-in button { background: #ffd60a; color: #000; border-radius: 12px; padding: 8px 14px; font-weight: 750; font-size: 14px; }
body.editing .slot { outline: 1.5px dashed rgba(255,214,10,.75); outline-offset: 2px; border-radius: 8px; cursor: pointer; touch-action: none; }
body.editing .slot.hid { display: inline-block; opacity: .3; }
body.editing .slot.ghost { display: inline-block; outline-color: rgba(255,214,10,.45); background: rgba(255,214,10,.06); }
body.editing .slot.ghost::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,214,10,.8); font-size: 20px; font-weight: 600; line-height: 1; }
body.editing .slot.cover.ghost::after { content: "+ фон"; font-size: 14px; }
body.editing .slot.sel-slot { outline: 2px solid #ffd60a; background: rgba(255,214,10,.08); }
body.editing [data-tslot] { outline: 1.5px dashed rgba(100,210,255,.7); outline-offset: 3px; border-radius: 6px; cursor: text; }
.slot.ghost { display: none; }
.ed-sheet .sheet { max-height: 52vh; padding-bottom: 0; border-radius: 26px 26px 0 0; background: rgba(17,17,18,.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.ed-sheet { pointer-events: none; }
.ed-sheet .sheet { pointer-events: auto; }
.ed-head { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.ed-head .ed-prev { width: 46px; height: 46px; border-radius: 14px; background: var(--card2); display: grid; place-items: center; flex: none; overflow: hidden; }
.ed-head .ed-prev .stk { width: 36px; height: 36px; }
.ed-head .grow { flex: 1; min-width: 0; padding-right: 36px; }
.ed-head .t { font-weight: 750; font-size: 15.5px; line-height: 1.25; }
.ed-head .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ed-media { display: flex; gap: 8px; margin-bottom: 8px; }
.ed-media .btn { min-height: 40px; font-size: 15px; border-radius: 13px; }
.slider { display: grid; grid-template-columns: 88px 1fr 46px; align-items: center; gap: 8px; padding: 1px 2px; font-size: 14px; color: #d1d1d6; font-weight: 600; }
.slider output { text-align: right; font-variant-numeric: tabular-nums; color: #fff; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: #3a3a3c; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; margin-top: -10px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: #3a3a3c; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 99px; background: var(--card2); font-size: 14px; font-weight: 600; color: #c7c7cc; }
.check.on { background: var(--light); color: #000; }
.ed-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; position: sticky; bottom: 0; z-index: 3; margin: 0 -16px; padding: 12px 16px calc(12px + var(--safe-bottom)); background: linear-gradient(180deg, rgba(17,17,18,0), rgba(17,17,18,.97) 28%); }
.ed-actions .btn { min-height: 48px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 4px -16px 12px; padding: 0 16px; }
.tabs button { flex: none; padding: 0 14px; border-radius: 99px; background: var(--card2); font-size: 14px; font-weight: 650; color: #aeaeb2; }
.tabs button.on { background: var(--light); color: #000; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.pick-grid button { aspect-ratio: 1; border-radius: 16px; background: var(--card); display: grid; place-items: center; padding: 8px; position: relative; transition: transform .3s var(--spring); color: #fff; }
.pick-grid button:active { transform: scale(.9); }
.pick-grid button.on { box-shadow: inset 0 0 0 2px #ffd60a; }
.pick-grid .stk { width: 100%; height: 100%; }
.pick-grid .nm { position: absolute; left: 0; right: 0; bottom: 3px; font-size: 9.5px; color: var(--muted); text-align: center; line-height: 1; overflow: hidden; white-space: nowrap; }
.field { display: flex; gap: 8px; }
.field input, .tarea { flex: 1; min-width: 0; background: var(--card); border: 0; outline: 0; border-radius: 14px; padding: 12px 14px; font-size: 15.5px; }
.tarea { width: 100%; min-height: 110px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; line-height: 1.45; }
.drop { border: 1.5px dashed #48484a; border-radius: 18px; padding: 22px; text-align: center; color: var(--muted); font-size: 14.5px; line-height: 1.4; display: block; }
.drop input { display: none; }
.tip { background: rgba(255,214,10,.08); color: #e5d38a; border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.4; margin-top: 12px; }

/* ---------- misc ---------- */
.cat-head { display: flex; align-items: center; gap: 14px; margin: 6px 4px 16px; }
.cat-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.cat-head .muted { font-size: 14px; margin-top: 3px; }
.ce .fb { font-size: 1em; }
.edit-fab.hid { display: none; }

.p-title .slot { flex: none; }
.row .ri .stk { color: #fff; }
.buy .slot { margin-right: 1px; }
.buy .lbl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.orders-hero .hero-top { margin-bottom: 18px; }

body.editing .slot.ghost:not(.cover) { width: 44px; height: 44px; }
.ed-sheet .sheet .body > * { animation: none; }
.deco-anchor:has(.slot.ontop) { z-index: 4; }

/* soft halo behind every placed sticker / emoji (static gradient — cheap, no per-frame filter) */
.slot:not(.ghost):not(.cover):has(.stk)::before, .mini:has(.stk)::before, .chip-ic:has(.stk)::before, .gc-glyph:has(.stk)::before {
  content: ""; position: absolute; inset: -38%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--glow, 255,255,255), .26) 0%, rgba(var(--glow, 255,255,255), .09) 38%, transparent 68%);
  transition: background .6s;
}
.mini, .chip-ic { position: relative; isolation: isolate; }
.slot:has(.stk) { isolation: isolate; }
.ce { position: relative; isolation: isolate; }
.ce::before { content: ""; position: absolute; inset: -45%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .12) 0%, transparent 65%); }
#nav .slot::before { display: none; }

/* ---------- full-bleed photos (product page banner, card backgrounds) ---------- */
.slot.cover { z-index: 0; overflow: hidden; }
.slot.cover .stk { position: absolute; inset: 0; width: 100%; height: 100%; }
.slot.cover .stk img, .slot.cover .stk video { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.slot.cover .stk svg { width: 100% !important; height: 100% !important; }
.slot.card-bg { border-radius: inherit; }
.pc .pc-shade { display: none; }
.pc.has-bg .pc-shade { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.72) 100%); }
.pc.has-bg .pc-name, .pc.has-bg .pc-price, .pc.has-bg .pc-sub { text-shadow: 0 1px 8px rgba(0,0,0,.55); }
.pc.has-bg .pc-icon-wrap { z-index: 2; }
.p-hero .slot.cover { position: absolute; inset: 0; }
/* in edit mode an empty photo slot is a small chip, so the rest of the card stays tappable */
body.editing .pc .slot.cover.ghost { inset: auto auto 8px 8px; width: 64px; height: 24px; border-radius: 99px; z-index: 5; }
body.editing .pc .slot.cover.ghost::after { content: "+ фото"; font-size: 11px; }

.p-hero .p-big { position: relative; z-index: 2; }
.p-hero.has-photo .glow, .p-hero.has-photo .p-big { display: none; }
body.editing .p-hero.has-photo .p-big { display: block; opacity: .35; }
body.editing .p-hero .slot.cover.ghost::after { content: "+ фото баннера"; font-size: 14px; align-items: end; padding-bottom: 14px; }

/* Featured product — wide horizontal card between the hero and the grid */
.pc.wide { width: 100%; min-height: 0; margin: 0 0 10px; flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
.pc.wide .pc-icon-wrap { height: auto; flex: none; }
.pc.wide .wide-mid { position: relative; z-index: 3; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pc.wide .pc-name { margin-top: 0; flex: none; }
.pc.wide .pc-price { font-size: 19px; }
.pc.wide .wide-go { position: relative; z-index: 3; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff; }

/* ---------- catalog tabs: root categories as chips, services with their variants ---------- */
.chips-row { display: flex; gap: 8px; overflow-x: auto; margin: 4px -14px 14px; padding: 2px 14px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; }
.cchip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 99px;   background: linear-gradient(180deg, var(--card-hi), var(--card)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  font-size: 15.5px; font-weight: 700; color: #aeaeb2; white-space: nowrap; transition: transform .3s var(--spring), background .25s, color .25s; }
.cchip:active { transform: scale(.94); }
.cchip.on { background: var(--light); color: var(--ink); box-shadow: none; }
.chip-ic { width: 22px; height: 22px; display: inline-block; flex: none; }
.cchip.on .chip-ic { filter: none; }
.tab-body > * { animation: rise .45s var(--ease) both; }
.view.still .tab-body > * { animation: none; }
.tab-head { display: flex; align-items: center; gap: 10px; }
.tab-head h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; flex: 1; min-width: 0; }
.tab-n { color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tab-sub { color: var(--muted); font-size: 15px; line-height: 1.4; }
.mode { display: flex; gap: 4px; padding: 4px; border-radius: 16px; flex: none; background: var(--surface-deep); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.mode button { border-radius: 12px; display: grid; place-items: center; color: #6c6c70; transition: background .25s, color .25s, box-shadow .25s, transform .3s var(--spring); }
.mode button:active { transform: scale(.92); }
.mode button.on { background: #2a2a2d; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 2px 8px rgba(0,0,0,.4); }
.cat-head .grow { flex: 1; min-width: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 18px;
  background: linear-gradient(180deg, var(--card-hi), var(--card)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.seg.scroll { display: flex; overflow-x: auto; }
.seg.scroll button { flex: none; padding: 0 16px; }
.seg button { height: 44px; border-radius: 14px; font-size: 15.5px; font-weight: 700; color: #aeaeb2; text-align: center; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .25s, color .25s; white-space: nowrap; }
.seg button.on { background: var(--card3); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }

.grp { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--card-hi), var(--card)); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(255,255,255,.03); }
.grp-head { position: relative; display: flex; align-items: center; width: 100%; overflow: hidden; transition: background .2s; }
.grp-head:active { background: rgba(255,255,255,.03); }
.grp.has-bg .grp-head .pc-shade { display: block; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(0,0,0,.65), rgba(0,0,0,.2)); pointer-events: none; }
.grp-head .pc-shade { display: none; }
.grp-ic { position: relative; z-index: 2; display: grid; place-items: center; flex: none; }
.grp-ic .slot { --s: 58px; }
.grp-mid { position: relative; z-index: 2; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.grp-name { font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.grp-sub { color: var(--muted); line-height: 1.35; }
.grp-go { position: relative; z-index: 2; border-radius: 50%; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18); color: #fff; }
.grp-rows { border-top: 1px solid var(--line); }
.grp-rows.solo { border-top: 0; }
.vrow { display: flex; align-items: center; width: 100%; position: relative; transition: background .2s; }
.vrow + .vrow::before { content: ""; position: absolute; right: 0; top: 0; height: 1px; background: var(--line); }
.vrow:active { background: rgba(255,255,255,.035); }
.mini { display: inline-block; flex: none; line-height: 0; color: #fff; }
.mini .stk { width: 100%; height: 100%; }
.vr-name { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; font-weight: 700; }
.vr-term { flex-basis: 100%; color: var(--muted); font-weight: 500; }
.hit { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em;
  color: var(--accent-hi); background: rgba(var(--accent-rgb),.14); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.5); }
.vr-price { font-weight: 800; white-space: nowrap; }
.vr-out { color: var(--muted); font-weight: 600; white-space: nowrap; }
.vrow.out .mini, .vrow.out .vr-name { opacity: .45; }

/* ---------- Telegram / Steam forms ---------- */
.spc { border-radius: 26px; padding: 14px; margin-bottom: 12px; background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(255,255,255,.03); }
.spc .seg { background: rgba(0,0,0,.25); }
.sp-label { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 6px 8px; }
.spc > .sp-label:first-child { margin-top: 4px; }
.sp-input { display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,.35); border-radius: 18px; padding: 0 12px 0 18px; height: 60px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); transition: box-shadow .2s; }
.sp-input:focus-within { box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb),.75); }
.sp-input .pre { font-size: 20px; font-weight: 700; color: var(--muted); }
.sp-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 20px; font-weight: 700; padding: 0; }
.sp-input input::placeholder { color: var(--muted2); font-weight: 600; }
.sp-input.big input { font-size: 26px; font-weight: 800; }
.sp-input .cur { font-size: 22px; font-weight: 800; color: var(--muted); }
.okmark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card3); color: transparent; transition: background .25s, color .25s, transform .4s var(--spring); transform: scale(.7); }
.okmark.on { background: var(--accent); color: #fff; transform: scale(1); }
.packs { display: flex; flex-direction: column; gap: 8px; }
.pack { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: rgba(0,0,0,.25); width: 100%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); transition: box-shadow .2s, background .2s, transform .3s var(--spring); }
.pack:active { transform: scale(.97); }
.pack.on { background: rgba(var(--accent-rgb),.1); box-shadow: inset 0 0 0 2px var(--accent); }
.pack .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pack b { font-size: 17.5px; font-weight: 800; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.nw { white-space: nowrap; }
.pack .s { font-size: 13.5px; color: var(--muted); }
.pack .s em { font-style: normal; color: var(--accent-hi); font-weight: 700; }
.pk-price { font-size: 18px; font-weight: 800; white-space: nowrap; }
.sp-pay { margin-top: 14px; }
.sp-total { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 14px 14px 18px; border-radius: 20px; background: rgba(0,0,0,.3); }
.sp-total .grow { flex: 1; min-width: 0; }
.sp-total b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.sp-total .btn { min-height: 52px; border-radius: 16px; }
.cap2 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.ticks .row { min-height: 54px; }
.ticks .row + .row::before { left: 56px; }
.ticks .t { font-size: 15.5px; font-weight: 600; }
.ri.tick { color: var(--accent-hi); }

/* admin buttons at the top */
.admin-fabs { display: flex; gap: 8px; }
.admin-fabs.hid { display: none; }

.edit-fab.adm { background: rgba(245,245,247,.92); color: var(--ink); box-shadow: none; }

/* ---------- admin panel ---------- */
.adm-sheet .sheet { background: var(--sheet-deep); }
.adm-title { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 10px 4px 12px; }
.adm-tabs { margin-bottom: 14px; }
.adm-tabs button { height: 42px; padding: 0 16px; display: inline-flex; align-items: center; gap: 7px; font-size: 15px; }
.adm-body > * { animation: rise .4s var(--ease) both; }
.sheet .body.still .adm-body > * { animation: none; }
.adm-h { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 750; margin-bottom: 12px; }
.adm-h .ib { margin-left: auto; }
.adm-alert { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 20px; margin-bottom: 10px;
  background: rgba(255,69,58,.1); box-shadow: inset 0 0 0 1px rgba(255,69,58,.3); color: #ff9a92; }
.adm-alert.warn { background: rgba(255,159,10,.1); box-shadow: inset 0 0 0 1px rgba(255,159,10,.3); color: #ffc46b; }
.adm-alert .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-alert b { color: #fff; font-size: 15.5px; }
.adm-alert span span, .adm-alert .grow span { font-size: 13px; }
.adm-chart { padding-bottom: 12px; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; align-items: end; height: 120px; }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar i { width: 100%; height: calc(var(--h) * 92px + 3px); border-radius: 6px; transform-origin: bottom; animation: barUp .8s var(--ease) both; }

.bar span { font-size: 10.5px; color: var(--muted2); font-weight: 600; }
@keyframes barUp { from { transform: scaleY(0); } }
.adm-rank { font-weight: 800; color: var(--muted); font-size: 17px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted2); }
.dot.ok { background: var(--accent-hi); box-shadow: 0 0 10px rgba(var(--accent-rgb),.6); }
.dot.low { background: var(--warn); box-shadow: 0 0 10px rgba(255,159,10,.5); }
.dot.bad { background: var(--bad); box-shadow: 0 0 10px rgba(255,69,58,.5); }
.bad-t { color: #ff8a80; }
.muted { color: var(--muted); }
.adm-tools { margin-bottom: 10px; }
.adm-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 16px; background: var(--card); color: var(--muted); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.adm-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; color: #fff; }
.adm-cat { margin: 14px 0 0 calc(var(--d, 0) * 12px); }
.adm-cat.dim > .adm-cat-h { opacity: .55; }
.adm-cat-h { display: flex; align-items: center; gap: 8px; padding: 2px 2px 8px; }
.adm-cat-h .ri { width: 30px; display: grid; place-items: center; color: var(--muted); flex: none; }
.adm-cat-h .grow { flex: 1; min-width: 0; }
.adm-cat-h .t { font-size: 17px; font-weight: 750; }
.adm-cat-h .s { font-size: 13px; color: var(--muted); margin-top: 1px; }
.ib { width: 34px; height: 34px; border-radius: 11px; background: var(--card2); display: grid; place-items: center; color: #d1d1d6; flex: none; font-size: 15px; transition: transform .25s var(--spring); }
.ib:active { transform: scale(.88); }
.ib.sm { width: 28px; height: 24px; border-radius: 8px; }
.ib.on { background: var(--accent); color: #fff; }
.adm-prod { gap: 10px; padding: 12px 12px 12px 16px; }
.adm-prod + .adm-prod::before { left: 16px; }
.adm-prod .t { font-size: 15.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.adm-prod .s { font-size: 12.5px; }
.adm-pr { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.adm-pr b { font-size: 15.5px; color: #fff; }
.adm-mv { display: flex; flex-direction: column; gap: 4px; }
.row.dim, .adm-prod.dim { opacity: .5; }
.fld { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; min-width: 0; }
.fld > span { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.fld input, .fld select, .fld textarea { width: 100%; background: var(--card); border: 0; outline: 0; border-radius: 14px; padding: 13px 14px; font-size: 16px; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); font-family: inherit; }
.fld textarea { resize: vertical; line-height: 1.4; }
.fld select { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8e8e93 50%), linear-gradient(135deg, #8e8e93 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb),.75); }
.fld-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fld-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.tgl { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--card); }
.tgl .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tgl b { font-size: 15.5px; }
.tgl .grow span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.tgl i { width: 50px; height: 30px; border-radius: 99px; background: var(--card3); position: relative; flex: none; transition: background .25s; }
.tgl i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .35s var(--spring); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.tgl.on i { background: var(--accent); }
.tgl.on i::after { transform: translateX(20px); }
.btn.danger { color: #ff6b61; }
.opt-rows { display: flex; flex-direction: column; gap: 8px; }
.opt-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: end; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.03); }
.opt-row .fld { margin-top: 0; }
.opt-row .ib { height: 46px; }
.opt-cost { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.row.src { gap: 8px; }
.row.src .s { font-size: 12.5px; }
.stock-list .rows { max-height: 230px; overflow: hidden; margin-top: 10px; }
.stock-list.open .rows { max-height: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; }
.sup-tag { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--card3); color: #d1d1d6; font-size: 11.5px; font-weight: 650; margin-right: 4px; }
.adm-sup { padding: 16px 14px; }
.sup-row { display: flex; align-items: center; gap: 12px; padding: 13px 2px; position: relative; }
.sup-row + .sup-row::before { content: ""; position: absolute; left: 22px; right: 0; top: 0; height: 1px; background: var(--line); }
.sup-row .grow { flex: 1; min-width: 0; }
.sup-row .t { font-size: 16px; font-weight: 700; }
.sup-row .s { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.sup-row .s2 { font-size: 11.5px; color: var(--muted2); margin-top: 2px; }
.sup-btns { display: flex; gap: 6px; flex: none; }
.sup-btns .btn.sm { padding: 0 13px; font-size: 14px; border-radius: 13px; }
.sup-btns { flex-direction: column; }
.sup-btns .btn.sm { width: 112px; min-height: 38px; }
@media (min-width: 420px) { .sup-btns { flex-direction: row; } }

/* whole service card is one tap target */
.grp.tap { cursor: pointer; transition: transform .32s var(--spring); }
.grp.tap:active { transform: scale(.975); }
.grp.tap .vrow:active, .grp.tap .grp-head:active { background: none; }

/* ---------- service page: hero + tariffs ---------- */
.svc-sub { color: var(--muted); font-size: 15px; line-height: 1.4; margin: -4px 4px 16px; }
.tariffs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tariff { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 22px;
  background: linear-gradient(180deg, var(--card-hi), var(--card)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  transition: box-shadow .2s, transform .3s var(--spring), opacity .2s; }
.tariff:active { transform: scale(.97); }
.tariff.on { background: linear-gradient(180deg, #1b2236, #151a28); }
.tariff.out { opacity: .5; }
.tariff .mini { border-radius: 12px; }
.tariff .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tariff b { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.tariff .s { font-size: 14px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; }
.tp { font-size: 19px; font-weight: 800; white-space: nowrap; }
.sd { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 2px 0 2px; }
.sd.ok { background: var(--accent-hi); box-shadow: 0 0 8px rgba(var(--accent-rgb),.7); }
.sd.out { background: var(--bad); }
.sd.man { background: var(--warn); }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 18px; margin-bottom: 12px; border-radius: 22px;
  background: linear-gradient(180deg, var(--card-hi), var(--card)); font-weight: 650; }
.qty-row .stepper { height: 48px; background: var(--card2); box-shadow: none; }
.sumbar { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 18px; height: 58px; border-radius: 22px; background: rgba(38,38,40,.82); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sb-t { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-p { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.sumbar + .buy { border-radius: 22px; }

/* compact service cards */
.grp { border-radius: 22px; margin-bottom: 10px; }
.grp-head { gap: 12px; padding: 12px 14px; }
.grp-ic { width: 46px; height: 46px; border-radius: 14px; }
.grp-ic .slot { --s: 42px; }
.grp-name { font-size: 19px; }
.grp-sub { font-size: 13px; }
.grp-go { width: 32px; height: 32px; }
.grp-go svg { width: 15px; height: 15px; }
.vrow { gap: 10px; padding: 9px 14px; min-height: 46px; }
.vrow + .vrow::before { left: 46px; }
.vrow .mini { width: 22px !important; height: 22px !important; }
.vr-name { font-size: 15px; gap: 1px 6px; }
.vr-term { font-size: 12.5px; }
.vr-price { font-size: 15.5px; }
.vr-out { font-size: 12.5px; }
.grp .hit { height: 19px; padding: 0 6px; font-size: 10.5px; border-radius: 7px; }

.okmark:not(.on):not(.bad):not(.wait) { opacity: 0; }
.okmark.bad { background: var(--bad); color: #fff; transform: scale(1); }
.okmark.wait { background: none; color: var(--muted); transform: scale(1); }
.okmark.wait .spinner { width: 16px; height: 16px; border-width: 2px; }
.sp-input .okmark { flex: none; }
.ok-t { color: var(--accent-hi); }
/* admin chart: tap a bar */
.adm-chart .adm-h { align-items: flex-start; }
.bar-info { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 1px; }
.bar-info b { font-size: 18px; font-weight: 800; }
.bar-info span { font-size: 12px; color: var(--muted); font-weight: 600; }
.bar { cursor: pointer; }
.bar i { background: linear-gradient(180deg, #5a5a5e, #3a3a3d); transition: background .2s; }
.bar:last-child i { background: linear-gradient(180deg, #5a5a5e, #3a3a3d); }
.bar.sel i { background: linear-gradient(180deg, var(--light), #b8b8bd); }
.bar.sel span { color: #fff; }
.adm-chart.still .bar i { animation: none; }

/* keyboard open: hide the tab bar so it can't be tapped by accident */
body.kb #nav { transform: translate(-50%, 160%); opacity: 0; pointer-events: none; }
body.kb .admin-fabs { display: none; }
.sp-input.custom { height: 54px; }
.sp-input.custom input { font-size: 18px; }

/* ---------- card tint from its icon colour ---------- */
.grp, .tariff, .pc, .pack { isolation: isolate; }
.grp::before, .tariff::before, .pc::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(70% 90% at 0% 0%, rgba(var(--tint), .16), transparent 62%);
  animation: tintIn .9s var(--ease) both;
}
.tariff { position: relative; overflow: hidden; }
.tariff > * { position: relative; z-index: 1; }

@keyframes tintIn { from { opacity: 0; } }

/* ---------- gift cards ---------- */
.gift-grid { gap: 10px; }
.gcard { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 14px 14px 12px; border-radius: 24px; text-align: left;
  background: linear-gradient(180deg, #161618, #0d0d0e); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .45s var(--spring); transform-style: preserve-3d; }
.gcard:active { transform: perspective(600px) rotateX(6deg) scale(.96); }
.gc-glow { position: absolute; left: 50%; top: 18%; width: 120%; height: 70%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(var(--gc), .38), transparent 70%); filter: blur(10px); opacity: .85; }
.plastic { position: relative; aspect-ratio: 1.6; border-radius: 14px; overflow: hidden; transform: rotate(-5deg); margin: 4px 2px 12px;
  background: linear-gradient(140deg, rgba(var(--gc), .30) 0%, #1b1b1e 38%, #0c0c0d 100%);
  box-shadow: 0 14px 28px -12px rgba(var(--gc), .7), inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.18); }
.pl-holo { position: absolute; inset: -40% -60%; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.16) 47%, rgba(var(--gc), .22) 50%, rgba(255,255,255,.08) 53%, transparent 60%);
  animation: holo 5.5s ease-in-out infinite; pointer-events: none; }
@keyframes holo { 0%, 100% { transform: translateX(-30%); } 50% { transform: translateX(30%); } }
.pl-brand { position: absolute; left: 10%; top: 12%; font-size: 8.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55);
  max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-waves { position: absolute; right: 9%; top: 9%; width: 16px; height: 16px; }
.pl-waves i { position: absolute; right: 0; top: 50%; border: 1.6px solid rgba(255,255,255,.45); border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; transform: translateY(-50%) rotate(45deg); }
.pl-waves i:nth-child(1) { width: 6px; height: 6px; } .pl-waves i:nth-child(2) { width: 11px; height: 11px; } .pl-waves i:nth-child(3) { width: 16px; height: 16px; }
.gc-glyph { position: absolute; display: grid; place-items: center; }
.gc-glyph.txt { border-radius: 30%; }
.gc-glyph .stk { width: 100%; height: 100%; }
.pl-face { position: absolute; left: 10%; bottom: 12%; font-weight: 850; letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.pl-face.flip { animation: faceFlip .45s var(--spring); }
@keyframes faceFlip { 0% { transform: translateY(8px) rotateX(70deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.gc-name { position: relative; font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.gc-flags { position: relative; display: flex; gap: 5px; margin-top: 6px; font-size: 17px; }
.gc-foot { position: relative; display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); }
.gc-from { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.gc-from b { font-size: 17px; color: #fff; font-weight: 800; }
.gc-go { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18); }
.gift-hero { position: relative; display: grid; place-items: center; padding: 26px 0 18px; perspective: 900px; }
.gh-glow { position: absolute; inset: 10% 15%; background: radial-gradient(50% 50% at 50% 50%, rgba(var(--gc), .45), transparent 70%); filter: blur(24px); animation: pulse 4s ease-in-out infinite; }
.gift-hero .tilt { width: min(78%, 330px); animation: tiltFloat 7s ease-in-out infinite; transform-style: preserve-3d; }
.gift-hero .plastic { margin: 0; transform: rotate(-4deg); }
.plastic.big .pl-brand { font-size: 11px; }

.plastic.big .pl-waves { transform: scale(1.4); transform-origin: right top; }
@keyframes tiltFloat { 0%, 100% { transform: rotateY(-10deg) rotateX(6deg) translateY(0); } 50% { transform: rotateY(10deg) rotateX(-4deg) translateY(-6px); } }
.gift-title { text-align: center; margin: 0 10px 8px; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.reg-row { display: flex; gap: 8px; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 4px; }
.reg { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 99px; font-weight: 700; font-size: 15px; color: #aeaeb2;
  background: linear-gradient(180deg, var(--card-hi), var(--card)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); transition: background .25s, color .25s, transform .3s var(--spring); }
.reg:active { transform: scale(.94); }
.reg.on { background: var(--light); color: var(--ink); }
.reg .flag { font-size: 19px; }
.denoms3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.dn { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 12px; border-radius: 18px; text-align: left;
  background: linear-gradient(180deg, var(--card-hi), var(--card)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); transition: box-shadow .25s, transform .3s var(--spring), background .25s; }
.dn:active { transform: scale(.94); }
.dn b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.dn span { font-size: 13.5px; color: var(--muted); font-weight: 650; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.07); }
.dn.on { background: linear-gradient(180deg, #232326, #161618); box-shadow: inset 0 0 0 2px rgba(var(--gc), .95), 0 10px 26px -12px rgba(var(--gc), .8); }
.dn.on span { color: #fff; }

/* ---------- transitions ---------- */
.view.push { animation: zoomIn .52s cubic-bezier(.2, .95, .25, 1) both; transform-origin: var(--ox, 50%) var(--oy, 30%); }
@keyframes zoomIn { 0% { opacity: 0; transform: scale(.82); filter: blur(10px); } 55% { filter: blur(0); } 100% { opacity: 1; transform: none; filter: none; } }
.view.leave { animation: zoomOut .18s cubic-bezier(.4, 0, 1, 1) forwards; pointer-events: none; }
@keyframes zoomOut { to { opacity: 0; transform: scale(.93) translateY(14px); filter: blur(6px); } }
.view.back { animation: backIn .42s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes backIn { from { opacity: 0; transform: scale(1.04); filter: blur(6px); } }
.view.tabin { animation: tabIn .38s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes tabIn { from { opacity: 0; transform: translateY(10px); } }
.tab-body.sl-r > *, .seg-body.sl-r > * { animation: slideR .42s cubic-bezier(.2, .9, .3, 1) both !important; }
.tab-body.sl-l > *, .seg-body.sl-l > * { animation: slideL .42s cubic-bezier(.2, .9, .3, 1) both !important; }
.tab-body.sl-r > *:nth-child(n+3), .tab-body.sl-l > *:nth-child(n+3) { animation-delay: 40ms !important; }
@keyframes slideR { from { opacity: 0; transform: translateX(28px); } }
@keyframes slideL { from { opacity: 0; transform: translateX(-28px); } }
.seg-body.sl-r .grp, .seg-body.sl-l .grp, .tab-body.sl-r .grp, .tab-body.sl-l .grp { animation: inherit; }
/* sheet open: page behind recedes */
#app { transition: transform .45s cubic-bezier(.2, .9, .3, 1), filter .45s, border-radius .45s; transform-origin: 50% 0; }
body.sheet-open #app { transform: scale(.95) translateY(6px); filter: brightness(.7); border-radius: 28px; }
.scrim { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { animation: sup .48s cubic-bezier(.2, 1.04, .3, 1) both; }
.sheet-wrap.out .sheet { animation: sdown .24s cubic-bezier(.4, 0, 1, 1) both; }
.grp-rows { position: relative; z-index: 1; }
.opt-row.gc-row { grid-template-columns: 1.3fr 1fr auto auto; }

.gc-glyph { right: 9%; top: 46%; bottom: auto; transform: translateY(-50%); }
.gc-glyph.txt { background: none; box-shadow: none; font-weight: 900; letter-spacing: -.05em; color: #fff;
  text-shadow: 0 0 18px rgba(var(--gc), .9), 0 0 4px rgba(var(--gc), .6); }
.pl-face { font-size: 15px; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plastic.big .pl-face { font-size: 26px; }

.gc-glyph.logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 10px rgba(var(--gc), .55)); }
.plastic .gc-glyph { left: 50%; right: auto; top: 42%; bottom: auto; transform: translate(-50%, -50%); }
.pc-sub .hit { margin-left: 4px; vertical-align: 1px; height: 19px; padding: 0 6px; font-size: 10.5px; }

/* ---------- bash. fixes: empty sticker holes, brand blue ---------- */
/* halo only once a sticker has actually loaded (no grey blob while loading / on failure) */
.slot:has(.stk):not(:has(.stk img, .stk video, .stk svg, .stk .fb))::before,
.mini:has(.stk):not(:has(.stk img, .stk video, .stk svg, .stk .fb))::before,
.chip-ic:has(.stk):not(:has(.stk img, .stk video, .stk svg, .stk .fb))::before,
.gc-glyph:has(.stk):not(:has(.stk img, .stk video, .stk svg, .stk .fb))::before { display: none !important; }
/* a sticker that failed to load collapses instead of leaving an empty box (edit mode keeps every slot) */
body:not(.editing) .slot:has(> .stk.err),
body:not(.editing) .mini:has(> .stk.err),
body:not(.editing) .chip-ic:has(> .stk.err),
body:not(.editing) .grp-ic:has(.stk.err),
body:not(.editing) .gc-glyph:has(> .stk.err),
body:not(.editing) .ri:has(> .stk.err) { display: none; }
/* …and so does any icon / banner / hero zone that has no working sticker at all */
body:not(.editing) .pc-icon-wrap:not(:has(.stk:not(.err), svg)),
body:not(.editing) .sh-hero:not(:has(.stk:not(.err), svg)),
body:not(.editing) .p-hero:not(:has(.stk:not(.err))),
body:not(.editing) .tile .ti:not(:has(.stk:not(.err), svg)),
body:not(.editing) .cat-head > .slot:has(> .stk.err) { display: none; }
body:not(.editing) .sh-hero:not(:has(.stk:not(.err), svg)) + .sh-title { margin-top: 26px; }
/* selected = brand blue, whatever colour the icon has */
.tariff.on { box-shadow: inset 0 0 0 2px var(--accent), 0 8px 28px -12px rgba(var(--accent-rgb), .55); }
.sp-input.custom.on { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- bash. fixes 6–9, 11 ---------- */
/* 6: chip already names the category — count on the left, view switch on the right */
.tab-head { margin: 6px 4px 10px; }
.tab-head .tab-n { flex: 1; }
.tab-sub { margin: 4px 4px 4px; }
/* 7: label over the pinned product */
.feat-t { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin: 2px 6px 8px; }
/* 8: a long disabled label ("Выберите номинал") must fit */
.sumbar { flex: 1 1 0; }
.sumbar + .buy { flex: 0 0 auto; width: auto; min-width: 46%; max-width: 66%; padding: 0 14px; }
/* 11: content fades out under the tab bar instead of running into it */
body::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(104px + var(--safe-bottom)); z-index: 20; pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0) 0%, rgba(var(--bg-rgb), .86) 58%, var(--bg) 100%); }

/* ---------- bash. fixes 10, 13 ---------- */
/* 10: admin buttons live in the column, scroll away with the page and never cover the header */
.admin-fabs { position: absolute; top: calc(var(--safe-top) + 10px); left: 50%; right: auto; transform: translateX(-50%); width: min(100%, 540px);
  padding: 0 14px; box-sizing: border-box; justify-content: flex-end; z-index: 40; }
.admin-fabs .edit-fab { position: relative; height: 40px; padding: 0 14px; }
body.admin #app { padding-top: calc(var(--safe-top) + 66px); }
body.admin.editing #app { padding-top: calc(var(--safe-top) + 70px); }
/* 13: small controls keep their look but get a 44 px touch area */
.edit-fab::after, .sheet .x::after, .ib::after, .plus::after { content: ""; position: absolute; inset: -6px; }
.sheet .x, .ib, .plus { position: relative; }
.sheet .x { position: absolute; }
.ib.sm::after { inset: -10px -8px; }
.stepper button { width: 42px; }
.mode button { width: 44px; height: 38px; }
.check { height: 40px; }
.tabs button { height: 40px; }

/* ---------- bash. fix 14: long balances ---------- */
.bal { white-space: nowrap; }
.hero-bottom > div:first-child { min-width: 0; }
.bal.sm { font-size: 38px; } .bal.sm .cur { font-size: 26px; }
.bal.xs { font-size: 30px; } .bal.xs .cur { font-size: 22px; }

/* ---------- product search ---------- */
.chips-bar { display: flex; align-items: center; gap: 8px; margin: 4px -14px 14px; }
.chips-bar .chips-row { flex: 1; min-width: 0; margin: 0; padding: 2px 0 2px 14px; --fl: 0px; --fr: 0px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); }
.srch-btn { flex: none; position: relative; width: 46px; height: 46px; margin-right: 14px; border-radius: 50%; display: grid; place-items: center; color: #d1d1d6;
  background: linear-gradient(180deg, var(--card-hi), var(--card)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); transition: transform .3s var(--spring); }
.srch-btn:active { transform: scale(.92); }
.srch-btn::after { content: ""; position: absolute; inset: -4px; }
.chips-bar.searching { margin: 4px 0 12px; }
.srch-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 16px; border-radius: 99px; color: var(--muted);
  background: linear-gradient(180deg, var(--card-hi), var(--card)); box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .6); }
.srch-field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; color: #fff; padding: 0; caret-color: var(--accent); -webkit-appearance: none; appearance: none; }
.srch-field input::placeholder { color: var(--muted2); }
.srch-field input::-webkit-search-cancel-button, .srch-field input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.srch-x { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #aeaeb2; background: var(--card3); flex: none; }
.srch-x::after { content: ""; position: absolute; inset: -5px; }
#sres .rows { margin-top: 2px; }
#sres .empty .muted { font-size: 14px; }
/* search results: no empty gap where a sticker failed to load */
body:not(.editing) #sres .row .ri:not(:has(.stk:not(.err), svg)) { display: none; }
body:not(.editing) #sres .row:not(:has(.stk:not(.err)))::before { left: 16px; }

/* bash. emoji are flat glyphs: a soft glow behind them only makes them look blurry */
.slot::before, .mini::before, .chip-ic::before, .gc-glyph::before, .ce::before { display: none !important; }
