/* BPL Gift Perps: premium dark trading look, Gifts as heroes. $BPL palette as accents, each gift brings its own colour (--g, --g2).
   Motion: transform/opacity only. Large readable type for phones. */
/* gift colours are typed so a model change retints cards smoothly (transition on the variables, no layout work) */
@property --g { syntax: '<color>'; inherits: true; initial-value: #f9b21a; }
@property --g2 { syntax: '<color>'; inherits: true; initial-value: #f08a12; }
.slide, .mrow, .hero, .pod, .pz, .pos, .nft, .evg, .bo { transition: --g 1.2s ease, --g2 1.2s ease; }
:root {
  --ink: #0b0a0d; --ink2: #121016; --ink3: #1b1820;
  /* surfaces: smoked glass over the living Gift backdrop (bg/), dark enough that numbers always sit on a calm zone */
  --card: rgba(16, 14, 20, .68); --card2: rgba(255, 255, 255, .065); --line: rgba(255, 255, 255, .085); --line2: rgba(255, 255, 255, .15);
  --glass: rgba(13, 11, 17, .8); --hi: inset 0 1px 0 rgba(255, 255, 255, .06);
  --txt: #fbf6ee; --mute: #b8afa5; --dim: #8b8279;
  --gold: #ffd84a; --amber: #f9b21a; --orange: #f08a12; --deep: #c45a0a; --brown: #4a2c1a;
  --up: #2fd89a; --dn: #ff5d73; --warn: #ffb547;
  --g: #f9b21a; --g2: #f08a12;
  --r1: 14px; --r2: 20px; --r3: 28px;
  --disp: 'Unbounded', 'Manrope', system-ui, sans-serif; --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sat: max(env(safe-area-inset-top), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --sab: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* html carries the base colour; body stays transparent so the living Gift backdrop (bg/, z-index -1) shows through */
html { background: #08070a; }
html, body { margin: 0; color: var(--txt); font: 500 16px/1.4 var(--ui); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overscroll-behavior-y: none; }
/* no sideways panning: whatever sticks out (glows, shadows) is clipped at the screen edge. clip (not hidden) on body keeps it from
   becoming a scroll container, so position: sticky and the window scroll keep working; hidden on html (passed to the viewport) is the fallback */
html { overflow-x: hidden; overscroll-behavior-x: none; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
/* fallback backdrop when bg/ is missing (the .bgx layer paints on top of it) */
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 60% at 50% -10%, rgba(240, 138, 18, .12), transparent 60%), var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3, p { margin: 0; }
img { display: block; }
[hidden] { display: none !important; }
.muted { color: var(--mute); } .c { text-align: center; } .pad { padding: 16px; }
.up { color: var(--up); } .dn { color: var(--dn); }
.ic { display: inline-flex; width: 1.2em; height: 1.2em; flex: none; } .ic svg { width: 100%; height: 100%; }
.ton { display: inline-flex; width: .82em; height: .82em; flex: none; vertical-align: -.06em; margin-inline-start: .28em; } .ton svg { width: 100%; height: 100%; }
.coin { width: 20px; height: 20px; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); } .coin.sm { width: 16px; height: 16px; } .coin.big { width: 64px; height: 64px; }

/* ---------- shell ---------- */
.shell { max-width: 520px; margin: 0 auto; min-height: 100vh; }
.page { padding: calc(var(--sat) + 10px) 16px calc(var(--sab) + 104px); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; margin-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); background: linear-gradient(145deg, var(--gold), var(--orange)); box-shadow: 0 6px 18px -6px rgba(240, 138, 18, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.brand-mark .ic { width: 20px; height: 20px; }
.brand-t { font: 600 17px/1 var(--disp); letter-spacing: -.01em; }
.balpill { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 5px 0 10px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line2); box-shadow: var(--hi); transition: transform .12s; }
.balpill:active { transform: scale(.97); }
.balpill b { font: 600 15px/1 var(--disp); }
.balplus { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: linear-gradient(145deg, var(--gold), var(--amber)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 4px 12px -4px rgba(249, 178, 26, .8); }
.balplus .ic { width: 18px; height: 18px; }

.nav { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(var(--sab) + 10px); width: min(488px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px; border-radius: 24px; background: rgba(13, 11, 17, .8); border: 1px solid var(--line2); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8), var(--hi); }
.nv { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 18px; color: var(--mute); font-size: 12px; font-weight: 700; transition: color .2s, background .2s; }
.nv:active { background: rgba(255, 255, 255, .05); }
.nv .ic { width: 24px; height: 24px; }
.nv.on { color: var(--gold); background: rgba(255, 216, 74, .1); box-shadow: inset 0 0 0 1px rgba(255, 216, 74, .16); }
.nv-dot { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font: 700 11px/18px var(--ui); font-style: normal; }

/* ---------- gift art ---------- */
.art { position: relative; display: grid; place-items: center; }
.art-img { width: 100%; height: 100%; object-fit: cover; }
.art-mono { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 4px; color: #fff; background: radial-gradient(circle at 35% 30%, var(--g), var(--g2) 70%, #000 140%); }
.art-mono .ic { width: 42%; height: 42%; opacity: .9; } .art-mono b { font: 600 11px/1 var(--disp); opacity: .8; }
.art-thumb { width: 56px; height: 56px; border-radius: 16px; overflow: hidden; flex: none; background: color-mix(in srgb, var(--g) 22%, #121016); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
/* hero art: GiftFX scene full-bleed (it melts into the page), fallback image as a rounded tile */
.art-stage { height: 206px; margin: -14px -18px 0; }
.art-hero { height: 290px; margin: 0 -16px; }
.art-stage .gfx-hero, .art-hero .gfx-hero { min-height: 0; }
/* the scene's own dark edges fade into the living backdrop instead of ending on a hard line */
.art-hero .gfx-hero { -webkit-mask-image: radial-gradient(70% 56% at 50% 50%, #000 56%, transparent 100%); mask-image: radial-gradient(70% 56% at 50% 50%, #000 56%, transparent 100%); }
.art-stage .gfx-hero { -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
.art-stage > .art-img, .art-hero > .art-img, .art-stage > .art-mono, .art-hero > .art-mono { width: 200px; height: 200px; margin: 18px auto 0; border-radius: 36px; box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--g) 70%, transparent), inset 0 0 0 1px rgba(255, 255, 255, .1); }
.art-hero > .art-img { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
/* coin markets (UTYA): the token's own logo, a transparent sticker. Thumbs: on a soft disc of its colours; stage / hero: no tile, the logo
   stands free on a halo drawn behind it inside its own box (static image: only the hero float that Gift fallbacks already use) */
.art-coin > .art-img { object-fit: contain; padding: 8%; }
.art-thumb.art-coin { background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--g) 42%, #2a1b0a) 0%, color-mix(in srgb, var(--g2) 20%, #15110f) 78%); }
.art-stage.art-coin > .art-img, .art-hero.art-coin > .art-img { padding: 7%; border-radius: 0; box-shadow: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--g) 30%, transparent) 0%, color-mix(in srgb, var(--g2) 12%, transparent) 62%, transparent 100%); }

/* ---------- home: gift stage ---------- */
.stage { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 6px; scrollbar-width: none; }
.stage::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 84%; scroll-snap-align: center; border-radius: var(--r3); overflow: hidden; text-align: start; padding: 14px 18px 18px; isolation: isolate;
  background: linear-gradient(180deg, color-mix(in srgb, var(--g) 22%, rgba(16, 14, 20, .82)) 0%, rgba(16, 14, 20, .88) 74%); border: 1px solid color-mix(in srgb, var(--g) 34%, transparent);
  box-shadow: 0 24px 44px -26px color-mix(in srgb, var(--g) 60%, #000), var(--hi); }
.slide-glow { position: absolute; z-index: -1; inset: -20% -10% 30%; background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--g2) 45%, transparent), transparent 70%); }
.slide-info { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.st-name { font: 600 22px/1.15 var(--disp); letter-spacing: -.01em; }
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-pricebox { display: inline-flex; align-items: center; font-size: 22px; }
.st-price { font: 600 28px/1.1 var(--disp); letter-spacing: -.02em; }
.st-cta { flex: none; height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 99px; font-weight: 800; font-size: 14px; color: var(--ink); background: linear-gradient(150deg, var(--gold), var(--amber) 60%, var(--orange)); box-shadow: 0 8px 20px -8px rgba(249, 178, 26, .8), inset 0 1px 0 rgba(255, 255, 255, .5); }
.dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line2); transition: transform .25s, background .25s; }
.dots i.on { background: var(--gold); transform: scaleX(2.2); }

.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 22px 2px 10px; }
.sec-h h2 { font: 600 18px/1.2 var(--disp); letter-spacing: -.01em; }
.sec-h > span { color: var(--mute); font-size: 13px; display: inline-flex; align-items: center; }

.mlist { display: flex; flex-direction: column; gap: 8px; }
.mrow { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px 10px 10px; border-radius: var(--r2); text-align: start; transition: transform .15s;
  background: linear-gradient(100deg, color-mix(in srgb, var(--g) 14%, var(--card)), var(--card) 46%); border: 1px solid var(--line); box-shadow: var(--hi); }
.mrow:active, .slide:active, .nft:active { transform: scale(.98); }
.mr-mid { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 5px; }
.mr-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-sub { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--dim); font-size: 12px; font-weight: 700; }
/* Coins section (UTYA) under the Gifts: same row, its own colour edge + a small NEW tag in the token's yellow */
.mrow.is-coin { border-color: color-mix(in srgb, var(--g) 30%, var(--line)); background: linear-gradient(100deg, color-mix(in srgb, var(--g) 20%, var(--card)), var(--card) 52%); }
.mr-new { display: inline-block; margin-inline-start: 8px; padding: 3px 6px 2px; border-radius: 6px; vertical-align: 3px; font: 700 9.5px/1 var(--disp); font-style: normal; letter-spacing: .04em;
  color: #241503; background: linear-gradient(135deg, var(--g), var(--g2)); box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--g2) 60%, transparent); }
.oi { flex: none; width: 26px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--up) var(--l), var(--dn) var(--l)); opacity: .85; }
.fund.up { color: var(--up); } .fund.dn { color: var(--dn); }
.fund small { margin-right: 4px; color: var(--mute); font-size: 11.5px; font-weight: 700; }
.spark { width: 56px; height: 30px; flex: none; }
.spark svg { width: 100%; height: 100%; overflow: visible; } .spark.up { color: var(--up); } .spark.dn { color: var(--dn); }
.mr-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 76px; }
.mr-end b { font: 600 15px/1.1 var(--disp); }
.chg { display: inline-flex; align-items: center; gap: 1px; font-weight: 800; font-size: 13px; padding: 2px 7px 2px 3px; border-radius: 8px; }
.chg .ic { width: 15px; height: 15px; } .chg.up { color: var(--up); background: rgba(47, 216, 154, .1); } .chg.dn { color: var(--dn); background: rgba(255, 93, 115, .1); }
.stale { font-size: 11px; font-weight: 800; color: var(--warn); background: rgba(255, 181, 71, .12); padding: 2px 7px; border-radius: 6px; }
.foot { color: var(--mute); font-size: 12.5px; text-align: center; margin: 22px 12px 0; line-height: 1.5; }
.fl-up { animation: flup .7s; } .fl-dn { animation: fldn .7s; } .fl-up2 { animation: flup2 .7s; } .fl-dn2 { animation: fldn2 .7s; }
/* twin keyframes: a new flash swaps the animation name, which restarts it without a forced layout */
@keyframes flup { 0% { color: var(--up); } } @keyframes fldn { 0% { color: var(--dn); } } @keyframes flup2 { 0% { color: var(--up); } } @keyframes fldn2 { 0% { color: var(--dn); } }

/* ---------- trade page ---------- */
.trade { padding-top: 0; }
.hero { position: relative; margin: 0 -16px; padding: calc(var(--sat) + 8px) 16px 18px; text-align: center; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--g) 16%, transparent) 0%, transparent 62%); }
.hero-glow { position: absolute; z-index: -1; left: 50%; top: 40px; width: 360px; height: 360px; margin-left: -180px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--g2) 50%, transparent), transparent 66%); }
.hero-bar { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 4px; }
.icbtn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line2); color: var(--txt); box-shadow: var(--hi); transition: transform .12s, background .2s; }
.icbtn:active { transform: scale(.94); background: rgba(255, 255, 255, .1); }
.icbtn.sm { width: 36px; height: 36px; border-radius: 12px; } .icbtn .ic { width: 20px; height: 20px; }
.tick { font: 600 13px/1 var(--disp); letter-spacing: .02em; color: rgba(255, 246, 232, .8); }
.livedot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--up); padding: 7px 11px; border-radius: 99px; background: var(--glass); border: 1px solid rgba(47, 216, 154, .22); }
.livedot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.hero-name { font: 600 26px/1.1 var(--disp); letter-spacing: -.015em; margin-top: 12px; }
.hero-px { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; font-size: 30px; }
.tr-px { font: 600 34px/1 var(--disp); letter-spacing: -.03em; }
.hero-px .chg { font-size: 14px; margin-inline-start: 10px; }
.hero-note { color: var(--dim); font-size: 12px; margin-top: 6px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.stat { padding: 11px 13px; border-radius: var(--r1); background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat > span { color: var(--mute); font-size: 12px; font-weight: 700; }
.stat.wide { grid-column: 1 / -1; }
.stat-v { display: flex; align-items: center; gap: 8px; } .stat-v b { font: 600 15px/1 var(--disp); }
.clock { color: var(--mute); font-size: 13px; font-weight: 700; }
.oibar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--up) var(--l), var(--dn) var(--l)); position: relative; }
.oil { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 800; }
.sticky-tabs { position: sticky; top: 0; z-index: 5; margin: 14px -16px 10px; padding: 8px 16px; }
/* only the control itself is glass: no opaque band across the backdrop */
.sticky-tabs .seg { background: rgba(11, 10, 14, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .8), var(--hi); }
.chartwrap { border-radius: var(--r2); background: rgba(12, 10, 15, .86); border: 1px solid var(--line); box-shadow: var(--hi); padding: 8px 6px 4px; }
.chart-tools { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 6px; }
.chart { height: 280px; }
.tbody:empty { display: none; }
.tpos { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dock-pad { height: 28px; }
.dock { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: 0; width: min(520px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 12px 16px calc(var(--sab) + 12px); background: rgba(11, 10, 14, .88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
/* content fades out above the dock instead of running into the buttons */
.dock::before { content: ''; position: absolute; left: 0; right: 0; bottom: calc(100% + 1px); height: 28px; background: linear-gradient(transparent, rgba(11, 10, 14, .5)); pointer-events: none; }
.bigbtn { height: 64px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: #fff; transition: transform .12s; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.bigbtn b { font: 600 19px/1.1 var(--disp); } .bigbtn span { font-size: 12.5px; font-weight: 700; opacity: .85; }
.bigbtn:active { transform: scale(.97); }
/* market closed by the owner: the Long / Short pair gives way to one calm note (closing stays on the position card) */
.dock-off { grid-column: 1 / -1; min-height: 64px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 18px; border-radius: 20px;
  color: var(--warn); background: rgba(255, 181, 71, .08); border: 1px solid rgba(255, 181, 71, .24); font-size: 14px; font-weight: 700; line-height: 1.35; text-align: center; }
.dock-off .ic { width: 20px; height: 20px; flex: none; }
.bigbtn.long { background: linear-gradient(160deg, #3cecaa, #12a873); color: #04261a; box-shadow: 0 12px 26px -12px rgba(47, 216, 154, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.bigbtn.short { background: linear-gradient(160deg, #ff7889, #e2364f); box-shadow: 0 12px 26px -12px rgba(255, 93, 115, .9), inset 0 1px 0 rgba(255, 255, 255, .35); }

/* segmented controls */
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 16px; background: rgba(8, 7, 11, .66); border: 1px solid var(--line); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); }
.sg { flex: 1; height: 40px; border-radius: 12px; font-weight: 800; font-size: 14.5px; color: var(--mute); transition: background .2s, color .2s; }
.sg:not(.on):active { background: rgba(255, 255, 255, .05); }
.sg.on { color: var(--txt); background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px var(--line2), 0 2px 8px -2px rgba(0, 0, 0, .5); }
.seg.tf { padding: 3px; border-radius: 12px; } .seg.tf .sg { height: 30px; min-width: 44px; font-size: 13px; border-radius: 9px; }
.seg.mini { border-radius: 12px; padding: 3px; } .seg.mini .sg { height: 32px; font-size: 13px; padding: 0 12px; border-radius: 9px; }
.seg.wide { margin-bottom: 10px; }
.seg.tabs .sg.on { color: var(--ink); background: linear-gradient(145deg, var(--gold), var(--amber)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 14px -8px rgba(249, 178, 26, .9); }
.seg.lev .sg { height: 48px; font: 600 16px/1 var(--disp); }
.seg.lev .sg.on { color: var(--ink); background: linear-gradient(145deg, var(--gold), var(--amber)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 14px -8px rgba(249, 178, 26, .9); }
.sideseg .sg { height: 50px; font: 600 17px/1 var(--disp); }
.sideseg .sg.long.on { background: linear-gradient(160deg, #3cecaa, #12a873); color: #04261a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 18px -10px rgba(47, 216, 154, .9); }
.sideseg .sg.short.on { background: linear-gradient(160deg, #ff7889, #e2364f); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -10px rgba(255, 93, 115, .9); }

/* showcase */
.nftgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nftgrid > .empty, .nftgrid > .skel { grid-column: 1 / -1; }
/* up to 60 listings + 40 sales: rows off screen are skipped by the renderer (their size is remembered once drawn) */
.nftgrid > .nft { content-visibility: auto; contain-intrinsic-size: auto 170px; }
.sales > .sale { content-visibility: auto; contain-intrinsic-size: auto 62px; }
.sec-n { margin-inline-start: 8px; color: var(--dim); font: 700 13px/1 var(--ui); font-variant-numeric: tabular-nums; }
.nft { display: flex; flex-direction: column; gap: 2px; padding: 6px 6px 9px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); text-align: start; transition: transform .15s; }
.nft-img { aspect-ratio: 1; border-radius: 13px; overflow: hidden; background: color-mix(in srgb, var(--g) 18%, #121016); margin-bottom: 5px; }
.nft-img img, .sale-img img, .pz-img img, .pod-gift img, .lbr-gift img { width: 100%; height: 100%; object-fit: cover; }
.nft-img .art-thumb { width: 100%; height: 100%; border-radius: 0; }
.nft-num { font-size: 12px; color: var(--mute); font-weight: 700; padding: 0 3px; }
.nft-px { font: 600 13.5px/1.2 var(--disp); display: flex; align-items: center; padding: 0 3px; }
.nft-v { font-size: 11px; color: var(--mute); font-weight: 700; padding: 0 3px; }
.sales { display: flex; flex-direction: column; gap: 6px; }
.sale { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); }
.sale-img { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: none; }
.sale-img .art-thumb { width: 44px; height: 44px; }
.sale-mid { flex: 1; display: flex; flex-direction: column; } .sale-mid span { color: var(--mute); font-size: 12.5px; }
.sale-px { font: 600 14px/1 var(--disp); display: flex; align-items: center; }
.skel { height: 120px; border-radius: var(--r2); margin-bottom: 8px; background: linear-gradient(100deg, var(--card) 40%, var(--card2) 50%, var(--card) 60%) 0 0 / 300% 100%; animation: sk 1.4s linear infinite; }
.skel.tall { height: 220px; }
@keyframes sk { to { background-position: -150% 0; } }
.card { padding: 16px; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); }
.info p { color: var(--mute); font-size: 14.5px; line-height: 1.55; margin-bottom: 10px; }
.levtable { margin: 6px 0 12px; border-radius: var(--r1); overflow: hidden; border: 1px solid var(--line); }
.lt-h, .lt-r { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; padding: 9px 12px; font-size: 14px; }
.lt-h { color: var(--dim); font-size: 12px; font-weight: 800; background: rgba(0, 0, 0, .25); }
.lt-r + .lt-r { border-top: 1px solid var(--line); } .lt-r b { font-family: var(--disp); font-weight: 600; } .lt-r span { font-weight: 800; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; font-size: 14.5px; }
.kv > span { color: var(--mute); } .kv > b { font-weight: 800; text-align: end; }
.kv.up > b { color: var(--up); } .kv.dn > b { color: var(--dn); }
.tv { display: inline-flex; align-items: center; font-weight: 800; }

/* ---------- position card ---------- */
.pos { position: relative; padding: 14px; border-radius: var(--r2); overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, color-mix(in srgb, var(--g) 14%, var(--card)), var(--card) 58%); border: 1px solid var(--line); box-shadow: var(--hi); }
.pos::before { content: ''; position: absolute; z-index: -1; inset: 0 0 auto auto; width: 160px; height: 160px; border-radius: 50%; transform: translate(40%, -45%); opacity: .3; }
.pos.win::before { background: radial-gradient(circle, var(--up), transparent 70%); } .pos.lose::before { background: radial-gradient(circle, var(--dn), transparent 70%); }
.pos-top { display: flex; align-items: center; gap: 12px; }
.pos-art .art-thumb { width: 52px; height: 52px; }
.pos-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; } .pos-name b { font-weight: 800; font-size: 16px; }
.side { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 7px; white-space: nowrap; display: inline-block; vertical-align: 1px; }
.side.long { color: var(--up); background: rgba(47, 216, 154, .13); } .side.short { color: var(--dn); background: rgba(255, 93, 115, .13); }
.pos-pnl { display: flex; flex-direction: column; align-items: flex-end; } .pos-pnl b { font: 600 22px/1.1 var(--disp); letter-spacing: -.02em; } .pos-pnl span { font-weight: 800; font-size: 14px; }
.pos-pnl.up { color: var(--up); } .pos-pnl.dn { color: var(--dn); }
.track { position: relative; height: 10px; margin: 18px 4px 6px; border-radius: 5px; background: rgba(255, 255, 255, .06); }
.tr-loss, .tr-win { position: absolute; top: 0; bottom: 0; }
.tr-loss { left: 0; width: var(--e); border-radius: 5px 0 0 5px; background: linear-gradient(90deg, #ff3d5a, rgba(255, 93, 115, .25)); }
.tr-win { left: var(--e); right: 0; border-radius: 0 5px 5px 0; background: linear-gradient(90deg, rgba(47, 216, 154, .2), #2fd89a 80%, var(--gold)); }
.tr-entry { position: absolute; left: var(--e); top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--txt); opacity: .6; border-radius: 1px; }
.tr-mark { position: absolute; inset: 0; transform: translateX(var(--m)); transition: transform .6s ease; pointer-events: none; }
.tr-mark::after { content: ''; position: absolute; left: 0; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #fff; border: 4px solid var(--g);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .35), 0 0 18px color-mix(in srgb, var(--g) 80%, transparent); }
.tr-lbl { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--mute); padding: 0 2px; }
.tr-lbl .mid { color: var(--txt); }
.pos-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; margin-top: 8px; }
.pos-grid .kv { font-size: 13.5px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.pos-act { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; margin-top: 14px; }
.pos-act .btn { height: 44px; font-size: 14px; padding: 0 10px; }

/* buttons */
/* button system: gold = main action ($BPL), mint/coral = trade side, glass = secondary, outline = strong secondary (close a position), danger = cancel.
   All: 44px+ touch target, pressed scale, one disabled look, a spinner while the server answers (.busy). */
.btn { position: relative; height: 46px; padding: 0 14px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 800; font-size: 14.5px; white-space: nowrap; transition: transform .12s, background .2s, opacity .2s; }
.btn:active, .confirm:active { transform: scale(.97); }
.btn:disabled { opacity: .4; }
.btn.ghost { background: rgba(255, 255, 255, .07); border: 1px solid var(--line2); box-shadow: var(--hi); }
.btn.ghost:active { background: rgba(255, 255, 255, .12); }
.btn.close { color: var(--gold); background: rgba(255, 216, 74, .1); border: 1px solid rgba(255, 216, 74, .5); box-shadow: inset 0 1px 0 rgba(255, 236, 170, .12); }
.btn.close:active { background: rgba(255, 216, 74, .18); }
.btn.danger { color: #ffb3bf; background: rgba(255, 93, 115, .1); border: 1px solid rgba(255, 93, 115, .38); }
.btn.danger:active { background: rgba(255, 93, 115, .2); }
.btn.busy, .confirm.busy { color: transparent !important; }
.btn.busy::after, .confirm.busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.confirm.gold.busy::after, .confirm.close.busy::after, .confirm.long.busy::after, .btn.gold.busy::after { border-color: rgba(0, 0, 0, .2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.sm { height: 38px; font-size: 13.5px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn .ic, .confirm .ic { width: 18px; height: 18px; }
.confirm { position: relative; width: 100%; height: 58px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; font: 600 17px/1 var(--disp); color: var(--ink); transition: transform .12s, opacity .2s; }
.confirm.long { background: linear-gradient(160deg, #3cecaa, #12a873); color: #04261a; box-shadow: 0 14px 30px -14px rgba(47, 216, 154, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.confirm.short { background: linear-gradient(160deg, #ff7889, #e2364f); color: #fff; box-shadow: 0 14px 30px -14px rgba(255, 93, 115, .9), inset 0 1px 0 rgba(255, 255, 255, .35); }
.confirm.gold, .confirm.close { background: linear-gradient(150deg, var(--gold), var(--amber) 55%, var(--orange)); box-shadow: 0 14px 30px -14px rgba(249, 178, 26, .9), inset 0 1px 0 rgba(255, 255, 255, .5); }
.confirm:disabled { opacity: .38; box-shadow: none; }
.confirm.busy, .btn.busy { opacity: .85; }
.row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.row2 .btn { height: 58px; border-radius: 18px; }

/* ---------- sheets ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(4, 3, 8, .64); opacity: 0; transition: opacity .25s; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg.on { opacity: 1; }
.sheet { width: min(520px, 100%); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px calc(var(--sab) + 18px); border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #1c1922, #0f0d12 42%); border: 1px solid var(--line2); border-bottom: 0; box-shadow: 0 -20px 50px -10px rgba(0, 0, 0, .7), var(--hi);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .9, .25, 1); }
.sheet-bg.on .sheet { transform: none; }
.grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto 12px; }
.sheet h2 { font: 600 21px/1.2 var(--disp); text-align: center; margin-bottom: 6px; }
.sheet > * + * { margin-top: 12px; }
.sheet > .grab + * { margin-top: 0; }
.tk-head { display: flex; align-items: center; gap: 12px; }
.tk-head > div:nth-child(2) { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; } .tk-head b { font-weight: 800; font-size: 17px; }
.tk-head .muted { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; }
.tk-lbl { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tk-lbl label { font-weight: 800; font-size: 14px; color: var(--mute); }
.avail { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--mute); font-weight: 700; } .avail b { color: var(--txt); }
.tk-amt { display: flex; flex-direction: column; gap: 8px; }
.amtwrap { display: flex; align-items: center; height: 68px; padding: 0 16px; border-radius: 18px; background: rgba(0, 0, 0, .34); border: 1px solid var(--line2); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4); transition: border-color .2s, box-shadow .2s; }
.amtwrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 216, 74, .1); }
.amt-in { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--txt); font: 600 30px/1 var(--disp); letter-spacing: -.02em; }
.amt-in::placeholder { color: var(--dim); }
.amt-cur { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--mute); }
.chips { display: flex; gap: 8px; }
.chip { flex: 1; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line2); font-weight: 800; font-size: 14px; color: var(--txt); transition: transform .12s, background .15s; }
.chip:active { background: rgba(255, 216, 74, .15); border-color: rgba(255, 216, 74, .4); transform: scale(.96); }
.chip.gold { flex: none; padding: 0 14px; margin-top: 8px; color: var(--ink); background: linear-gradient(145deg, var(--gold), var(--amber)); border: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.field { width: 100%; height: 52px; padding: 0 14px; border-radius: 14px; background: rgba(0, 0, 0, .32); border: 1px solid var(--line2); color: var(--txt); font: 600 18px/1 var(--disp); outline: 0; }
.fieldwrap { display: flex; align-items: center; gap: 4px; font-size: 20px; } .fieldwrap .field { flex: 1; }
.limitrow { display: flex; flex-direction: column; gap: 8px; } .limitrow label { font-weight: 800; font-size: 14px; color: var(--mute); }
.prev { border-radius: 18px; padding: 4px 14px 8px; background: rgba(0, 0, 0, .26); border: 1px solid var(--line); }
.prev .tr-lbl { margin-top: 12px; }
.prev-track .track { margin-top: 18px; }
.prev-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; margin-top: 6px; }
.prev-grid .kv { font-size: 13.5px; padding: 6px 0; flex-direction: column; align-items: flex-start; gap: 1px; }
.prev-grid .kv > span { font-size: 12px; font-weight: 700; }
.tmsg:empty { display: none; }
.tmsg { padding: 11px 14px; border-radius: 14px; font-size: 14px; font-weight: 700; line-height: 1.45; }
.tmsg.bad { color: #ffc2ca; background: rgba(255, 93, 115, .12); border: 1px solid rgba(255, 93, 115, .25); }
.tmsg.warn { color: #ffe0a8; background: rgba(255, 181, 71, .1); border: 1px solid rgba(255, 181, 71, .25); }
.tmsg .chip { display: flex; align-items: center; }
.ticket .tk-head .art-thumb { width: 52px; height: 52px; }
.bigpnl { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; border-radius: 20px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.bigpnl span { color: var(--mute); font-weight: 700; font-size: 13px; } .bigpnl b { font: 600 34px/1.1 var(--disp); letter-spacing: -.02em; color: var(--txt); } .bigpnl b small { font-size: 15px; color: var(--mute); } .bigpnl em { font-style: normal; font-weight: 800; font-size: 14px; }
.bigpnl.up em { color: var(--up); } .bigpnl.dn em { color: var(--dn); }
.tp-box { padding: 12px; border-radius: 18px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.tp-box.up { border-color: rgba(47, 216, 154, .22); } .tp-box.dn { border-color: rgba(255, 93, 115, .22); }
.tp-box.up label { color: var(--up); } .tp-box.dn label { color: var(--dn); }
.est { font-weight: 800; font-size: 14px; } .est.up { color: var(--up); } .est.dn { color: var(--dn); }
.dep-hero { display: grid; place-items: center; padding-top: 6px; } .dep-hero .coin.big { width: 76px; height: 76px; }
.safe { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--mute); font-size: 12.5px; font-weight: 700; text-align: start; line-height: 1.4; margin-top: 14px; padding: 0 6px; }
.safe .ic { color: var(--up); width: 16px; height: 16px; }

/* share card (fallback when the PnlCard module is missing) */
.pnlcard-wrap { display: grid; place-items: center; }
.pnlimg { width: 100%; height: auto; border-radius: 22px; }
.pnlcard { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden; isolation: isolate; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(170deg, color-mix(in srgb, var(--g) 45%, #121016), #0b0a0d 72%); border: 1px solid var(--line2); }
.pc-glow { position: absolute; z-index: -1; inset: -10% -10% 35%; background: radial-gradient(circle, color-mix(in srgb, var(--g2) 55%, transparent), transparent 65%); }
.pnlcard .art-hero { position: absolute; top: 18px; left: 50%; width: 200px; height: 200px; margin-left: -100px; }
.pc-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pc-brand { display: inline-flex; gap: 6px; align-items: center; font: 600 12px/1 var(--disp); color: var(--gold); } .pc-brand .ic { width: 16px; height: 16px; }
.pc-name { font: 600 20px/1.1 var(--disp); }
.pc-pct { font: 700 52px/1 var(--disp); letter-spacing: -.04em; }
.pnlcard.is-up .pc-pct, .pnlcard.is-up .pc-bpl { color: var(--up); } .pnlcard.is-dn .pc-pct, .pnlcard.is-dn .pc-bpl { color: var(--dn); }
.share-row:has(> [hidden]) { grid-template-columns: 1fr; }
.pc-bpl { font-weight: 800; font-size: 17px; }
.pc-px { display: flex; gap: 22px; color: var(--mute); font-size: 12.5px; font-weight: 700; } .pc-px span { display: flex; flex-direction: column; } .pc-px b { color: var(--txt); font: 600 14px/1.3 var(--disp); }

/* ---------- portfolio ---------- */
.pf-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 0 8px; }
.pf-head > span:first-child { color: var(--mute); font-weight: 700; font-size: 13.5px; }
.pf-pnl { font: 600 34px/1.15 var(--disp); letter-spacing: -.03em; } .pf-pnl.up { color: var(--up); } .pf-pnl.dn { color: var(--dn); }
.pf-head > span:last-child { color: var(--dim); font-size: 13px; font-weight: 700; }
.pf-body { display: flex; flex-direction: column; gap: 10px; }
.ord { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); }
.ord-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; } .ord-mid b { font-size: 15px; font-weight: 800; } .ord-mid em { font-style: normal; }
.hist { display: flex; flex-direction: column; gap: 6px; }
.hi { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); }
.hi .art-thumb { width: 44px; height: 44px; border-radius: 13px; }
.hi-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--card2); color: var(--mute); flex: none; } .hi-ic.up { color: var(--up); }
.hi-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .hi-mid b { font-size: 14.5px; font-weight: 800; } .hi-mid span { font-size: 12.5px; }
.hi-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12.5px; } .hi-end b { font: 600 15px/1.1 var(--disp); }
.st { font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--card2); color: var(--mute); }
.st-credited, .st-paid { color: var(--up); background: rgba(47, 216, 154, .1); } .st-review, .st-held { color: var(--warn); background: rgba(255, 181, 71, .1); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 20px; color: var(--mute); text-align: center; border-radius: var(--r2); background: rgba(13, 11, 17, .55); border: 1px dashed var(--line2); }
.empty > .ic { width: 40px; height: 40px; color: var(--amber); opacity: .8; }

/* ---------- wallet ---------- */
.wcard { position: relative; overflow: hidden; isolation: isolate; padding: 22px 18px 18px; border-radius: var(--r3); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(240, 138, 18, .3), transparent 60%), linear-gradient(180deg, rgba(26, 23, 32, .9), rgba(14, 12, 18, .92)); border: 1px solid rgba(255, 216, 74, .26); box-shadow: 0 24px 50px -28px rgba(240, 138, 18, .55), var(--hi); }
.wc-shine { position: absolute; z-index: -1; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 236, 170, .1) 50%, transparent 65%); }
.wcard .coin.big { width: 72px; height: 72px; margin-bottom: 6px; }
.wc-l { color: var(--mute); font-weight: 700; font-size: 13.5px; }
.wc-v { font: 600 38px/1.1 var(--disp); letter-spacing: -.03em; } .wc-v small { font-size: 16px; color: var(--mute); }
.wc-split { display: flex; gap: 24px; margin-top: 6px; color: var(--mute); font-size: 12.5px; font-weight: 700; } .wc-split span { display: flex; flex-direction: column; } .wc-split b { color: var(--txt); font: 600 15px/1.3 var(--disp); }
.wcard .row2 { width: 100%; grid-template-columns: 1.4fr 1fr; }
.buyrow { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 14px; border-radius: var(--r2); background: linear-gradient(100deg, rgba(255, 216, 74, .1), var(--card) 55%); border: 1px solid rgba(255, 216, 74, .2); box-shadow: var(--hi); text-align: start; transition: transform .12s; }
.buyrow:active, .evbanner:active, .realcta:active { transform: scale(.98); }
.buyrow .coin { width: 36px; height: 36px; } .buyrow > div { flex: 1; display: flex; flex-direction: column; } .buyrow span { color: var(--mute); font-size: 13px; } .buyrow > .ic { color: var(--gold); }
.refcard { margin-top: 18px; padding: 4px 16px 16px; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); }
.refcard .sec-h { margin-top: 14px; } .refcard > p { font-size: 14px; line-height: 1.5; }
.reflink { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 6px 6px 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.reflink span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 13.5px; color: var(--gold); }
.refstats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.refstats > div { display: flex; flex-direction: column; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .2); } .refstats b { font: 600 20px/1.2 var(--disp); } .refstats span { color: var(--mute); font-size: 12.5px; font-weight: 700; }

/* ---------- leaderboard ---------- */
.lbfund { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 20px 18px 16px; border-radius: var(--r3);
  background: linear-gradient(180deg, rgba(26, 23, 32, .9), rgba(14, 12, 18, .92)); border: 1px solid rgba(255, 216, 74, .26); box-shadow: var(--hi); }
.fund-glow { position: absolute; z-index: -1; inset: -40% -20% 30%; background: radial-gradient(circle, rgba(0, 152, 234, .26), transparent 60%); }
.fund-l { color: var(--mute); font-weight: 700; font-size: 13.5px; }
.fund-v { display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 4px 0 6px; } .fund-v b { font: 700 44px/1 var(--disp); letter-spacing: -.03em; }
.lbfund p { color: var(--mute); font-size: 13.5px; line-height: 1.45; max-width: 34ch; margin: 0 auto; }
.fund-parts { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.fund-parts > span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 99px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--mute); white-space: nowrap; }
.fund-parts b { display: inline-flex; align-items: center; color: var(--txt); font-weight: 800; }
.demo-flag { margin: -2px 0 12px; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: #ffe0a8; background: rgba(255, 181, 71, .08); border: 1px dashed rgba(255, 181, 71, .35); text-align: center; }
.fund-end { display: inline-flex; gap: 6px; margin-top: 12px; padding: 7px 14px; border-radius: 99px; background: rgba(0, 0, 0, .3); font-size: 13px; font-weight: 700; color: var(--mute); } .fund-end .clock { color: var(--gold); }
.podium { display: grid; grid-template-columns: 1fr 1.18fr 1fr; align-items: end; gap: 8px; overflow-x: clip; }   /* the side glows stay inside the podium */
.pod { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.pod-gift { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 8px; isolation: isolate; }
.pod-img { position: relative; }
.pod-img img, .pod-img .art-thumb { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 22px 34px -14px color-mix(in srgb, var(--g) 70%, #000), 0 0 0 1px rgba(255, 255, 255, .12); }
.p1 .pod-img img, .p1 .pod-img .art-thumb { width: 136px; height: 136px; border-radius: 34px; box-shadow: 0 26px 44px -16px rgba(255, 190, 40, .55), 0 0 0 2px rgba(255, 216, 74, .55); }
.pod-val { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 99px; white-space: nowrap;
  font: 600 13px/1 var(--disp); color: var(--txt); background: rgba(18, 10, 5, .92); border: 1px solid var(--line2); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .8); }
.p1 .pod-val { font-size: 15px; padding: 6px 12px; color: var(--ink); background: linear-gradient(145deg, var(--gold), var(--amber)); border: 0; }
.pod-n { font-size: 11px; color: var(--dim); font-weight: 700; margin-top: -4px; }
.pod-glow { position: absolute; z-index: -1; top: -20%; left: 50%; width: 160px; height: 160px; margin-left: -80px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--g2) 45%, transparent), transparent 65%); }
.pod-gift .pod-num { margin-top: 14px; } .pod-num { font-size: 12px; color: var(--mute); font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pod-base { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 12px; border-radius: 18px 18px 10px 10px; background: var(--card2); border: 1px solid var(--line); }
.p1 .pod-base { padding-top: 18px; padding-bottom: 22px; background: linear-gradient(180deg, rgba(255, 216, 74, .22), rgba(255, 216, 74, .04)); border-color: rgba(255, 216, 74, .35); }
.p2 .pod-base { padding-bottom: 14px; } .p3 .pod-base { padding-top: 10px; }
.pod-rk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 15px/1 var(--disp); color: var(--ink); background: linear-gradient(145deg, #e9edf2, #9aa5b1); }
.p1 .pod-rk { background: linear-gradient(145deg, var(--gold), var(--orange)); width: 36px; height: 36px; font-size: 17px; } .p3 .pod-rk { background: linear-gradient(145deg, #f2b27a, #a35a2a); }
.pod-name { font-size: 13.5px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-base .up { font: 600 13px/1.2 var(--disp); }
.pod-ton { display: flex; align-items: center; font-size: 12px; font-weight: 800; color: var(--mute); }
.prizerow { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.pz { flex: 1 0 104px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px; border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--g) 12%, var(--card)), var(--card)); border: 1px solid var(--line); box-shadow: var(--hi); font-size: 12.5px; }
.pz-img { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; } .pz span { color: var(--mute); font-weight: 700; } .pz em { font-style: normal; font-weight: 800; font-size: 12px; white-space: nowrap; } .pz b { display: flex; align-items: center; font: 600 13px/1 var(--disp); }
.lbl { display: flex; flex-direction: column; gap: 6px; }
.lbr { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); }
.lbr-rk { width: 30px; text-align: center; font: 600 15px/1 var(--disp); color: var(--mute); }
.lbr-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .lbr-mid b { font-weight: 800; font-size: 15px; } .lbr-mid span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbr-gift { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex: none; }
.lbr-gift .art-thumb { width: 34px; height: 34px; border-radius: 10px; }
.lbr-pnl { font: 600 15px/1 var(--disp); }
.lb-me { margin-bottom: 8px; }
.lbr.me { background: linear-gradient(90deg, rgba(255, 216, 74, .18), rgba(20, 17, 24, .95) 60%); border-color: rgba(255, 216, 74, .4); }
.lbr.me .lbr-rk { color: var(--gold); }

/* ---------- launch event ---------- */
.nav.n5 { grid-template-columns: repeat(5, 1fr); } .nav.n5 .nv { font-size: 11px; }
.nav.n6 { grid-template-columns: repeat(6, 1fr); padding-inline: 4px; } .nav.n6 .nv { font-size: 10.5px; min-width: 0; } .nav.n6 .nv span:not(.ic) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 1px; letter-spacing: -.015em; }
.bonusnote { display: flex; align-items: center; gap: 10px; } .bonusnote span { flex: 1; } .bonusnote .btn { height: 34px; flex: none; font-size: 13px; }
.ic.flip { transform: scaleX(-1); }
.evbanner { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 12px; padding: 12px 14px 12px 12px; border-radius: var(--r2); text-align: start; transition: transform .12s;
  background: linear-gradient(110deg, rgba(240, 138, 18, .34), rgba(60, 36, 14, .78) 50%, rgba(16, 14, 20, .86)); border: 1px solid rgba(255, 216, 74, .38); box-shadow: var(--hi); }
.evbanner::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 240, 190, .16) 45%, transparent 60%); transform: translateX(-100%); animation: sheen 4.5s ease-in-out infinite; }
@keyframes sheen { 60%, 100% { transform: translateX(100%); } }
.evb-gifts { display: flex; flex: none; }
.evb-gifts > span { width: 34px; height: 34px; border-radius: 11px; overflow: hidden; box-shadow: 0 0 0 2px #121016; }
.evb-gifts > span + span { margin-inline-start: -12px; }
.evb-gifts .art-thumb { width: 34px; height: 34px; border-radius: 11px; }
.evb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .evb-txt b { font: 600 14px/1.2 var(--disp); } .evb-txt span { font-size: 12.5px; color: var(--mute); font-weight: 700; } .evb-txt em { font-style: normal; color: var(--gold); }
.evbanner > .ic { color: var(--gold); }
.evhero { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 92px 16px 18px; border-radius: var(--r3);
  background: radial-gradient(90% 70% at 50% 0%, rgba(240, 138, 18, .34), transparent 70%), linear-gradient(180deg, rgba(26, 23, 32, .9), rgba(14, 12, 18, .93)); border: 1px solid rgba(255, 216, 74, .3); box-shadow: var(--hi); }
.evh-glow { position: absolute; z-index: -1; left: 50%; top: -60px; width: 320px; height: 320px; margin-left: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 216, 74, .28), transparent 65%); }
.evh-gifts { position: absolute; top: 14px; left: 0; right: 0; height: 70px; }
.evg { position: absolute; top: 0; left: 50%; width: 62px; height: 62px; border-radius: 18px; overflow: hidden; box-shadow: 0 14px 26px -12px rgba(0, 0, 0, .8), 0 0 0 2px rgba(255, 216, 74, .35); }
.evg .art-thumb { width: 62px; height: 62px; border-radius: 18px; }
.evg.g0 { transform: translateX(-112px) translateY(10px) rotate(-12deg); } .evg.g1 { transform: translateX(-50%) scale(1.12); z-index: 1; } .evg.g2 { transform: translateX(50px) translateY(10px) rotate(12deg); }
.evh-l { display: block; margin-top: 8px; color: var(--mute); font-weight: 800; font-size: 13.5px; }
.evh-pool { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 4px 0 4px; } .evh-pool .coin.big { width: 44px; height: 44px; }
.evh-pool b { font: 700 40px/1 var(--disp); letter-spacing: -.03em; background: linear-gradient(180deg, #fff3c4, var(--gold) 45%, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.evhero > p { color: var(--mute); font-size: 13.5px; line-height: 1.45; max-width: 32ch; margin: 0 auto; }
.cdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.cd { display: flex; flex-direction: column; align-items: center; padding: 10px 0 8px; border-radius: 14px; background: rgba(0, 0, 0, .32); border: 1px solid var(--line); }
.cd b { font: 600 24px/1 var(--disp); } .cd span { font-size: 11.5px; color: var(--mute); font-weight: 700; margin-top: 4px; }
.evme { margin-top: 14px; } .evme .sec-h { margin-top: 0; } .evme .sec-h > span { color: var(--gold); font-weight: 800; }
.evstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.evstats > div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); } .evstats b { font: 600 20px/1.2 var(--disp); } .evstats span { font-size: 12px; color: var(--mute); font-weight: 700; }
.evstats .q b { color: var(--up); }
.evbar { height: 8px; border-radius: 4px; margin: 12px 2px 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.evbar i { display: block; height: 100%; width: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--up), var(--gold)); transform-origin: left; transform: scaleX(calc(var(--p) / 100%)); }
.pend { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pend-h { font-size: 13px; color: var(--mute); font-weight: 800; }
.pfr { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); }
.pf-ava { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; }
.pfr b { font-size: 14.5px; } .pfr ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.pfr li { font-size: 13px; color: var(--mute); font-weight: 600; padding-inline-start: 20px; position: relative; }
.pfr li::before { content: ''; position: absolute; left: 0; top: 3px; width: 12px; height: 12px; border-radius: 4px; border: 2px solid var(--warn); }
.evme .confirm { margin-top: 12px; }
.evlist { display: flex; flex-direction: column; border-radius: var(--r2); overflow: hidden; border: 1px solid var(--line); }
.evr { display: grid; grid-template-columns: 34px 1fr 54px 78px; align-items: center; gap: 8px; padding: 10px 12px; font-size: 14px; background: rgba(16, 14, 20, .78); }
.evr + .evr { border-top: 1px solid var(--line); }
.evr.head { background: rgba(0, 0, 0, .3); font-size: 11.5px; color: var(--dim); font-weight: 800; padding-top: 8px; padding-bottom: 8px; }
.evr-rk { font: 600 14px/1 var(--disp); color: var(--mute); text-align: center; }
.evr-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.evr-pts { text-align: center; font-weight: 800; color: var(--up); } .evr.head .evr-pts { color: var(--dim); }
.evr-prize { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font: 600 13px/1 var(--disp); } .evr.head .evr-prize { font: inherit; }
.evr.top1 { background: linear-gradient(90deg, rgba(255, 216, 74, .2), var(--card) 70%); } .evr.top1 .evr-rk { color: var(--gold); }
.evr.top2 { background: linear-gradient(90deg, rgba(220, 228, 236, .12), var(--card) 70%); } .evr.top3 { background: linear-gradient(90deg, rgba(242, 178, 122, .14), var(--card) 70%); }
.evr.me { background: linear-gradient(90deg, rgba(255, 216, 74, .22), rgba(20, 17, 24, .95) 70%); box-shadow: inset 3px 0 0 var(--gold); } .evr.me .evr-rk { color: var(--gold); }
.evrules { margin-top: 14px; } .evrules h2 { font: 600 16px/1.2 var(--disp); margin-bottom: 8px; }
.evrules ul { margin: 0; padding-inline-start: 18px; color: var(--mute); font-size: 13.5px; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }

/* ---------- buy $BPL ---------- */
.buy .hero-bar { margin-bottom: 0; }
.buyhero { position: relative; isolation: isolate; text-align: center; padding: 18px 0 18px; }
.bh-glow { position: absolute; z-index: -1; left: 50%; top: -20px; width: 340px; height: 260px; margin-left: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(249, 178, 26, .32), transparent 65%); }
.coin.xl { width: 104px; height: 104px; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(240, 138, 18, .55)); animation: float 6s ease-in-out infinite; }
.bh-orbit { position: absolute; inset: 0; z-index: -1; }
.bo { position: absolute; width: 48px; height: 48px; border-radius: 15px; overflow: hidden; opacity: .92; box-shadow: 0 12px 22px -10px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .12); }
.bo .art-thumb { width: 48px; height: 48px; border-radius: 15px; }
.bo.o0 { left: 8%; top: 18px; transform: rotate(-14deg); } .bo.o1 { right: 9%; top: 10px; transform: rotate(10deg) scale(.9); } .bo.o2 { left: 16%; top: 98px; transform: rotate(8deg) scale(.78); } .bo.o3 { right: 15%; top: 92px; transform: rotate(-8deg) scale(.82); }
.buyhero h1 { font: 600 26px/1.15 var(--disp); margin-top: 12px; letter-spacing: -.015em; }
.bh-price { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 12px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); font-size: 13.5px; color: var(--mute); font-weight: 700; }
.bh-price b { color: var(--txt); font-weight: 800; } .bh-price .ton { margin-inline-start: 0; }
.bx { display: flex; flex-direction: column; gap: 10px; }
.bx-box { padding: 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); display: flex; flex-direction: column; gap: 10px; }
.bx-box.get { background: linear-gradient(160deg, rgba(255, 216, 74, .08), var(--card)); }
.bx-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .bx-top > span { color: var(--mute); font-weight: 800; font-size: 13.5px; }
.bx-main { display: flex; align-items: center; gap: 10px; height: 52px; }
.bx-main .amt-in, .amt-out { flex: 1; min-width: 0; font: 600 32px/1 var(--disp); letter-spacing: -.02em; color: var(--txt); background: none; border: 0; outline: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt-out.ld { opacity: .4; }
.tok { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px 0 8px; border-radius: 99px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); font-weight: 800; }
.tok .ton { width: 24px; height: 24px; margin: 0; } .tok .coin { width: 24px; height: 24px; }
.bx-wallet { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; font-weight: 800; font-size: 13px; color: var(--gold); background: rgba(255, 216, 74, .08); border: 1px solid rgba(255, 216, 74, .3); }
.bx-wallet.on { color: var(--txt); background: var(--card2); border-color: var(--line); } .bx-wallet .ic { width: 16px; height: 16px; }
.bx-arrow { display: grid; place-items: center; width: 40px; height: 40px; margin: -20px auto; z-index: 1; border-radius: 14px; background: #1b1820; border: 1px solid var(--line2); color: var(--gold); }
.bx-rows { padding: 4px 14px 8px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.bx-rows .kv { border-bottom: 1px solid var(--line); } .bx-rows .kv:last-of-type { border-bottom: 0; }
.imp.ok { color: var(--up); } .imp.warn { color: var(--warn); } .imp.bad, .imp.block { color: var(--dn); }
.kv.tax > b { color: var(--warn); }
.taxnote { font-size: 12.5px; color: var(--dim); line-height: 1.45; padding: 2px 0 4px; }
.confirm.big { height: 62px; font-size: 18px; }
.okcard { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 18px 18px; border-radius: var(--r3); text-align: center;
  background: linear-gradient(180deg, rgba(26, 23, 32, .92), rgba(14, 12, 18, .94)); border: 1px solid rgba(255, 216, 74, .35); }
.ok-glow { position: absolute; z-index: -1; inset: -30% -20% 40%; background: radial-gradient(circle, rgba(47, 216, 154, .25), transparent 60%); }
.okcard h2 { font: 600 22px/1.2 var(--disp); }
.ok-amt { font: 700 40px/1 var(--disp); color: var(--up); letter-spacing: -.03em; } .ok-amt small { font-size: 16px; color: var(--mute); }
.home .buyrow { margin-top: 14px; }

/* ---------- $BPL in dollars: a quiet second voice under / beside a BPL amount. Never coloured (the BPL figure carries win/loss),
   always smaller and lighter than the figure it explains, the same face everywhere (Manrope, tabular figures). ---------- */
.usd { display: block; font: 600 11.5px/1.3 var(--ui); letter-spacing: 0; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.usd.in { display: inline; margin-inline-start: 5px; font-size: 11px; }
.kv > b .usd { margin-top: 1px; } .prev-grid .kv { justify-content: flex-start; } .prev-grid .kv > b { text-align: start; }
.bal-sub { display: inline-flex; align-items: center; gap: 5px; } .balpill .usd { font-size: 10.5px; line-height: 1; margin: 0; }
/* DEMO tag + dollars widen the pill: on phones the decorative brand mark gives way so the + button stays on screen */
@media (max-width: 430px) { html[data-mode="demo"] .top .brand { display: none; } }
.pos-pnl .usd, .ms-bal .usd { margin-top: 1px; font-size: 11.5px; font-weight: 600; color: var(--dim); }
.hi-end .usd, .lbr-end .usd { font-size: 11px; }
.lbr-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.bigpnl .usd { font-size: 13px; color: var(--mute); }
.pf-head .usd { font-size: 12.5px; }
.ms-bal b { text-align: end; }
.amtwrap { position: relative; }
.amt-usd { position: absolute; inset-inline-start: 16px; bottom: 8px; pointer-events: none; }
.amtwrap:has(.amt-usd:not([hidden])) .amt-in { padding-bottom: 14px; }
.bx-box > .usd { margin-top: -8px; font-size: 12px; }
.wc-usd { font-size: 13.5px; color: var(--mute); margin-top: -2px; }
.wc-split .usd { font-size: 11px; }
.evh-usd { font-size: 13px; color: var(--mute); margin: -2px 0 4px; }
.evr-prize { flex-direction: column; align-items: flex-end; gap: 2px; } .evr-prize > span:first-child { display: inline-flex; align-items: center; gap: 4px; } .evr-prize .usd { font-size: 10.5px; }
.evstats .usd { font-size: 11px; }
/* outcome of the ticket: what the margin becomes at each end of the track */
.tr-out { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 12.5px; font-weight: 800; }
.tr-out .usd { color: var(--dim); }
/* the $BPL price: "1 BPL = $0.000013 · 0.0000042 TON" */
.pxline { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: 12.5px; font-weight: 700; color: var(--dim); }
.pxline b { color: var(--txt); font-weight: 800; } .pxline i { font-style: normal; opacity: .55; } .pxline .ton { margin-inline-start: 4px; } .pxline .chg { font-size: 12px; }
.pxline.bh-price { display: inline-flex; margin-top: 8px; font-size: 13px; color: var(--mute); }

/* ---------- DEMO / REALE ---------- */
:root { --demo: #8f7cff; --demo2: #5b8cff; }
html[data-mode="demo"] body::after { content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(143, 124, 255, .55); border-radius: 0; }
html[data-mode="demo"] body::before { background: radial-gradient(120% 60% at 50% -10%, rgba(143, 124, 255, .2), transparent 60%), var(--ink); }
.modesw { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line2); box-shadow: var(--hi); flex: none; }
.ms { height: 34px; padding: 0 12px; border-radius: 99px; font: 600 12px/1 var(--disp); letter-spacing: .02em; color: var(--mute); transition: background .2s, color .2s; }
.ms.demo.on { color: #fff; background: linear-gradient(140deg, var(--demo), var(--demo2)); box-shadow: 0 6px 16px -6px rgba(143, 124, 255, .9); }
.ms.real.on { color: var(--ink); background: linear-gradient(145deg, var(--gold), var(--amber)); box-shadow: 0 6px 16px -6px rgba(249, 178, 26, .9); }
.modesw.sm .ms { height: 32px; padding: 0 10px; font-size: 11.5px; }
.top { gap: 8px; } .top .brand { flex: none; }
.bal-v { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; gap: 2px; }
.demotag { display: inline-block; font: 700 9.5px/1 var(--disp); letter-spacing: .08em; color: #fff; padding: 3px 6px; border-radius: 6px; background: linear-gradient(140deg, var(--demo), var(--demo2)); vertical-align: middle; }
.demotag.in { font-size: 8.5px; padding: 2px 5px; }
.demotag.big { font-size: 13px; padding: 6px 12px; border-radius: 10px; box-shadow: 0 10px 24px -10px rgba(143, 124, 255, .9); }
html[data-mode="demo"] .balpill { border-color: rgba(143, 124, 255, .55); background: rgba(143, 124, 255, .12); }
html[data-mode="demo"] .balplus { background: linear-gradient(140deg, var(--demo), var(--demo2)); color: #fff; }
html[data-mode="demo"] .nv.on { color: #b9adff; background: rgba(143, 124, 255, .14); }
.tags { display: inline-flex; gap: 6px; align-items: center; }
.tk-mode { margin-inline-start: auto; align-self: flex-start; font: 700 11px/1 var(--disp); letter-spacing: .06em; padding: 6px 9px; border-radius: 8px; }
.tk-mode.demo { color: #fff; background: linear-gradient(140deg, var(--demo), var(--demo2)); } .tk-mode.real { color: var(--ink); background: linear-gradient(145deg, var(--gold), var(--amber)); }
html[data-mode="demo"] .sheet { border-color: rgba(143, 124, 255, .45); background: linear-gradient(180deg, #1f1830, #150d10 40%); }
.confirm.demo, .btn.demo { color: #fff; background: linear-gradient(140deg, var(--demo), var(--demo2)); box-shadow: 0 14px 30px -14px rgba(143, 124, 255, .9); }
.btn.gold { color: var(--ink); background: linear-gradient(150deg, var(--gold), var(--amber) 60%, var(--orange)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 20px -10px rgba(249, 178, 26, .9); }
.toast.demo { border-color: rgba(143, 124, 255, .7); } .toast.real { border-color: rgba(255, 216, 74, .7); }
.wcard.demo { background: radial-gradient(120% 90% at 50% 0%, rgba(143, 124, 255, .35), transparent 60%), linear-gradient(180deg, #1f1830, #150d10); border-color: rgba(143, 124, 255, .4); }
.wcard.demo .demotag.big { margin-bottom: 8px; } .wcard.demo > p { font-size: 13px; margin: 8px 0 12px; }
.realcta { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 14px; border-radius: var(--r2); background: linear-gradient(110deg, rgba(255, 216, 74, .14), var(--card)); border: 1px solid rgba(255, 216, 74, .3); }
.realcta > div { flex: 1; display: flex; flex-direction: column; gap: 3px; } .realcta b { font-weight: 800; } .realcta span { font-size: 12.5px; color: var(--mute); } .realcta em { font-style: normal; color: var(--txt); font-weight: 800; }
.modesheet { text-align: center; } .ms-ill { display: grid; place-items: center; padding-top: 6px; } .ms-ill .coin.big { width: 76px; height: 76px; }
.ms-bal { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); } .ms-bal span { color: var(--mute); font-weight: 700; } .ms-bal b { font-weight: 800; }
.pc-wm { position: absolute; z-index: 2; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font: 700 64px/1 var(--disp); letter-spacing: .1em; color: rgba(255, 255, 255, .14); border: 4px solid rgba(255, 255, 255, .14); padding: 6px 18px; border-radius: 16px; pointer-events: none; }
.hero-name { display: flex; flex-direction: column; align-items: center; gap: 4px; } .hero-name .tick { font-size: 11.5px; color: var(--mute); letter-spacing: .04em; }
/* coach marks */
.coach { position: fixed; inset: 0; z-index: 95; }
.coach-hole { position: fixed; border-radius: 22px; box-shadow: 0 0 0 9999px rgba(6, 5, 10, .8), 0 0 0 2px var(--demo), 0 0 28px rgba(143, 124, 255, .6); pointer-events: none; }
.coach-tip { position: fixed; left: 16px; right: 16px; max-width: 488px; margin: 0 auto; padding: 16px; border-radius: 20px; background: #211a33; border: 1px solid rgba(143, 124, 255, .55); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .8); animation: tin .3s; }
.coach-n { font: 600 11.5px/1 var(--disp); color: #b9adff; letter-spacing: .04em; } .coach-tip b { display: block; font: 600 18px/1.2 var(--disp); margin: 6px 0 4px; } .coach-tip p { color: var(--mute); font-size: 14px; line-height: 1.45; }
.coach-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; } .coach-act .btn.gold { background: linear-gradient(140deg, var(--demo), var(--demo2)); color: #fff; }
@media (max-width: 370px) { .brand { display: none; } }

/* ---------- toast / boot ---------- */
.toast { position: fixed; z-index: 80; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); left: 50%; top: calc(var(--sat) + 12px); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 13px 18px; border-radius: 16px; font-weight: 800; font-size: 14.5px;
  background: rgba(28, 24, 32, .96); border: 1px solid var(--line2); box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .8); animation: tin .3s cubic-bezier(.2, .9, .25, 1); transition: opacity .3s, transform .3s; }
.toast.ok { border-color: rgba(47, 216, 154, .45); } .toast.bad { border-color: rgba(255, 93, 115, .5); } .toast.warn { border-color: rgba(255, 186, 74, .6); }
.toast.out { opacity: 0; transform: translate(-50%, -10px); }
@keyframes tin { from { opacity: 0; transform: translate(-50%, -14px); } }
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; color: var(--mute); }

@media (max-width: 360px) { .st-price { font-size: 24px; } .tr-px { font-size: 28px; } .spark { display: none; } }
.shot *, .shot *::before, .shot *::after { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- PvP wheel entry on the Markets home (the wheel screen styles itself: wheel/wheel.css, lazy) ---------- */
.wh-home { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 16px; padding: 12px 14px 12px 12px; border-radius: var(--r2); text-align: start; transition: transform .15s;
  background: linear-gradient(100deg, rgba(249, 178, 26, .16), var(--card) 58%); border: 1px solid rgba(255, 216, 74, .28); box-shadow: var(--hi); }
.wh-home:active { transform: scale(.98); }
.wh-home-ill { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 3px #f6b52c, 0 0 0 4px #7a4208, 0 8px 18px -6px rgba(0, 0, 0, .8);
  background: conic-gradient(from -30deg, #f2a93b 0 22%, #1fb5a8 0 39%, #3d8ff2 0 58%, #e0527a 0 73%, #8cc152 0 86%, #c95cc4 0); }
.wh-home-ill::after { content: ''; position: absolute; inset: 34%; border-radius: 50%; background: #16131a; border: 2px solid #ffd84a; }
.wh-home-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wh-home-t b { font: 600 16px/1.2 var(--disp); } .wh-home-t span { color: var(--mute); font-size: 13px; }
.wh-home > .ic { color: var(--gold); }
/* BGIFT Share entry (bgift/ styles itself, lazy): pearl BGIFT token with a gold BPL coin coming out of it */
.wh-home + .bgf-home { margin-top: 10px; }
.bgf-home { background: linear-gradient(100deg, rgba(122, 172, 240, .18), var(--card) 58%); border-color: rgba(159, 203, 255, .3); }
.bgf-ill { position: relative; flex: none; width: 52px; height: 52px; }
.bgf-tok { width: 46px; height: 46px; filter: drop-shadow(0 6px 10px rgba(20, 40, 80, .7)); }
.bgf-bpl { position: absolute; right: -2px; bottom: -1px; width: 26px; height: 26px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)); }
.bgf-home > .ic { color: #9fcbff; }

/* ---------- Gift deposit: entry card (wallet + deposit sheet) and its sheet. Violet "wrapping" next to the gold BPL rows; the one motif
   is a gold satin ribbon crossing behind the real Gift art, like a wrapped present ---------- */
.gdrow, .gdsheet { --gv: #b892ff; --rib: linear-gradient(90deg, rgba(255, 216, 74, 0), rgba(255, 216, 74, .3) 28%, rgba(255, 243, 196, .55) 50%, rgba(255, 216, 74, .3) 72%, rgba(255, 216, 74, 0)); }
.gdrow { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 10px 14px 10px 8px; border-radius: var(--r2); text-align: start;
  background: linear-gradient(100deg, rgba(184, 146, 255, .17), var(--card) 62%); border: 1px solid rgba(184, 146, 255, .28); box-shadow: var(--hi); transition: transform .12s; }
.gdrow::before, .gdrow::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
.gdrow::before { inset-inline-start: 43px; top: 0; bottom: 0; width: 14px; background: var(--rib); }
.gdrow::after { inset-inline: 0; top: calc(50% - 7px); height: 14px; background: linear-gradient(180deg, rgba(255, 216, 74, 0), rgba(255, 216, 74, .26) 30%, rgba(255, 243, 196, .45) 50%, rgba(255, 216, 74, .26) 70%, rgba(255, 216, 74, 0));
  -webkit-mask-image: linear-gradient(90deg, #000 18%, transparent 46%); mask-image: linear-gradient(90deg, #000 18%, transparent 46%); }
[dir="rtl"] .gdrow::after { -webkit-mask-image: linear-gradient(270deg, #000 18%, transparent 46%); mask-image: linear-gradient(270deg, #000 18%, transparent 46%); }
.gdrow:active { transform: scale(.98); }
.gdrow > div:not(.gstack) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gdrow b { font: 600 16px/1.2 var(--disp); } .gdrow span { color: var(--mute); font-size: 13px; } .gdrow > .ic { color: var(--gv); }
.sheet .gd-slot:empty { display: none; } .sheet .gdrow { margin-top: 0; }
/* three real Gifts fanned out (GiftFX stills on their own backdrops) */
.gstack { position: relative; flex: none; width: 86px; height: 58px; }
.gstack .art-thumb { position: absolute; top: 8px; width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .75), 0 0 0 1.5px rgba(255, 255, 255, .16); }
.gstack .art-thumb:nth-child(1) { left: 2px; transform: rotate(-12deg); }
.gstack .art-thumb:nth-child(2) { left: 22px; top: 4px; z-index: 2; transform: scale(1.1); }
.gstack .art-thumb:nth-child(3) { left: 42px; transform: rotate(12deg); }
.gstack.big { width: 184px; height: 118px; }
.gstack.big .art-thumb { top: 18px; width: 84px; height: 84px; border-radius: 24px; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .8), 0 0 0 2px rgba(255, 255, 255, .16); }
.gstack.big .art-thumb:nth-child(1) { left: 4px; } .gstack.big .art-thumb:nth-child(2) { left: 50px; top: 8px; } .gstack.big .art-thumb:nth-child(3) { left: 96px; }
/* sheet */
.gd-hero { position: relative; isolation: isolate; display: grid; place-items: center; padding: 2px 0 4px; margin-inline: -16px; overflow: hidden; }
.gd-hero::before, .gd-hero::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
.gd-hero::before { left: calc(50% - 9px); top: 0; bottom: 0; width: 18px; background: var(--rib); }
.gd-hero::after { left: 0; right: 0; top: calc(50% - 9px); height: 18px; background: linear-gradient(180deg, rgba(255, 216, 74, 0), rgba(255, 216, 74, .28) 30%, rgba(255, 243, 196, .5) 50%, rgba(255, 216, 74, .28) 70%, rgba(255, 216, 74, 0));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.gd-acc { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(184, 146, 255, .3); box-shadow: var(--hi); }
.gd-acc > span { color: var(--mute); font-size: 13px; font-weight: 700; }
.gd-acc-row { display: flex; align-items: center; gap: 10px; }
.gd-acc-v { flex: 1; min-width: 0; font: 600 21px/1.2 var(--disp); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.gd-acc .confirm { height: 54px; font-size: 16px; }
.gd-acc .confirm { padding: 0 16px; } .gd-acc .confirm span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet > .gd-steps, .sheet > .gd-rules, .sheet > .gd-list { margin-top: 14px; }
.sheet > .gd-h { margin-top: 24px; font: 600 16px/1.2 var(--disp); }
.gd-steps, .gd-rules { list-style: none; margin: 0; padding: 0; }
.gd-steps { counter-reset: gds; }
.gd-steps li { counter-increment: gds; position: relative; padding-inline-start: 40px; padding-bottom: 16px; font-size: 14.5px; line-height: 1.45; min-height: 26px; }
.gd-steps li:last-child { padding-bottom: 0; }
.gd-steps li::before { content: counter(gds); position: absolute; inset-inline-start: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 700 12.5px/1 var(--disp); color: var(--ink); background: linear-gradient(145deg, var(--gold), var(--amber)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.gd-steps li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 12.5px; top: 29px; bottom: 3px; width: 1px; background: linear-gradient(var(--line2), transparent); }
.gd-rules { display: flex; flex-direction: column; gap: 9px; }
.gd-rules li { position: relative; padding-inline-start: 22px; color: var(--mute); font-size: 13.5px; line-height: 1.45; }
.gd-rules li::before { content: ''; position: absolute; inset-inline-start: 4px; top: .5em; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: var(--gv); }
.gd-list { display: flex; flex-direction: column; gap: 8px; }
.gd-dep { padding: 10px 12px 10px 10px; } .gd-dep .hi-mid span { font-size: 12.5px; }
.gd-pic { width: 46px; height: 46px; border-radius: 14px; overflow: hidden; flex: none; display: grid; place-items: center; color: var(--gv); background: rgba(184, 146, 255, .14); }
.gd-pic img { width: 100%; height: 100%; object-fit: cover; } .gd-pic .ic { width: 22px; height: 22px; }
.gd-r { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; } .gd-r b { font-size: 13.5px; font-weight: 800; color: var(--up); white-space: nowrap; }
.gd-st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; border: 1px solid; font-size: 12px; font-weight: 800; white-space: nowrap; }
.gd-st.pending { color: #ffe0a8; background: rgba(255, 181, 71, .1); border-color: rgba(255, 181, 71, .3); }
.gd-st.pending::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: gd-blink 1.4s ease-in-out infinite; }
.gd-st.credited { color: #a8f5d6; background: rgba(47, 216, 154, .12); border-color: rgba(47, 216, 154, .32); }
.gd-st.review { color: #dccbff; background: rgba(184, 146, 255, .13); border-color: rgba(184, 146, 255, .32); }
.gd-st.rejected { color: #ffc2ca; background: rgba(255, 93, 115, .12); border-color: rgba(255, 93, 115, .3); }
@keyframes gd-blink { 50% { opacity: .25; } }
.gd-empty { padding: 18px 16px; border-radius: 16px; border: 1px dashed var(--line2); color: var(--mute); font-size: 13.5px; text-align: center; line-height: 1.45; }

/* ===================== Button finish v3: flat enamel (13/11, owner) =====================
   Replaces "button finish v2" (end of public/app.css, ~line 702-719) and the old per-button gradients/halos.
   One model for every button: ONE colour (a 2-stop shift you barely see), a 2px darker foot = the only depth, NO white top shine,
   NO coloured halo, NO glow ring. Sizes, radii, colours and the existing classes stay the same.
   States (all types):  rest | :active = sinks 1px, foot disappears | :focus-visible = 2px white ring, 2px offset
                        :disabled (not busy) = neutral grey, never a faded colour | .busy = keeps its colour, spinner, no text
   Spacing scale used: 4 / 8 / 12 / 16 / 24. Touch targets >= 44px (the 34-38px visual buttons get a 44px hit area via ::before). */

:root {
  --b-gold: #ffd23f; --b-gold2: #f9b21a; --b-gold-foot: rgba(150, 70, 0, .5); --b-gold-ink: #1a1206;
  --b-long: #34dea0;  --b-long2: #22c98a;  --b-long-foot: rgba(0, 80, 50, .5);  --b-long-ink: #04170f;
  --b-short: #ff6b7f; --b-short2: #f04a62; --b-short-foot: rgba(110, 0, 20, .45);
  --b-demo: #8a78fa;  --b-demo2: #6f62ee;  --b-demo-foot: rgba(30, 10, 90, .45);
  --b-glass: rgba(255, 255, 255, .07); --b-glass-on: rgba(255, 255, 255, .12); --b-ring: rgba(255, 255, 255, .13);
}

/* ---- 1. filled: gold (main action) ---- */
.confirm.gold, .confirm.close, .btn.gold, .chip.gold, .st-cta, .balplus, .pa-dep.low, .tk-row.s-ready .tk-btn, .v3-gold {
  color: var(--b-gold-ink); background: linear-gradient(180deg, var(--b-gold), var(--b-gold2)); border: 0;
  box-shadow: inset 0 -2px 0 var(--b-gold-foot); }
/* ---- 2. filled: trade sides ---- */
.confirm.long, .v3-long { color: var(--b-long-ink); background: linear-gradient(180deg, var(--b-long), var(--b-long2)); box-shadow: inset 0 -2px 0 var(--b-long-foot); }
.confirm.short, .v3-short { color: #fff; background: linear-gradient(180deg, var(--b-short), var(--b-short2)); box-shadow: inset 0 -2px 0 var(--b-short-foot); }
/* ---- 3. filled: DEMO (violet stays DEMO-only) ---- */
.btn.demo, .ms.demo.on, html[data-mode="demo"] .balplus, .coach-act .btn.gold { color: #fff; background: linear-gradient(180deg, var(--b-demo), var(--b-demo2)); box-shadow: inset 0 -2px 0 var(--b-demo-foot); }
/* ---- 4. outline (gold): secondary action that still belongs to $BPL (Entra, Close position, task CTA) ---- */
.btn.close, .tk-btn, .v3-outline { color: var(--gold); background: rgba(255, 216, 74, .06); border: 0; box-shadow: inset 0 0 0 1.5px rgba(255, 216, 74, .55); }
.btn.danger { color: #ffb3bf; background: rgba(255, 93, 115, .08); border: 0; box-shadow: inset 0 0 0 1.5px rgba(255, 93, 115, .45); }
/* ---- 5. ghost (glass): neutral secondary ---- */
.btn.ghost, .pa-dep, .v3-ghost { color: var(--txt); background: var(--b-glass); border: 0; box-shadow: inset 0 0 0 1px var(--b-ring); }
/* ---- 6. icon buttons (round/square, icon only): back, close sheet, copy, +, TON chip ---- */
.icbtn, .reflink button, .v3-icon { background: var(--b-glass); border: 0; box-shadow: inset 0 0 0 1px var(--b-ring); }
/* ---- 7. chips + segmented ---- */
.chip, .v3-chip { background: var(--b-glass); border: 0; box-shadow: inset 0 0 0 1px var(--b-ring); }
.sg.on, .v3-seg .on { color: var(--txt); background: var(--b-glass-on); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.seg.tabs .sg.on, .seg.lev .sg.on, .ms.real.on, .v3-seg.gold .on { color: var(--b-gold-ink); background: var(--b-gold); box-shadow: inset 0 -2px 0 var(--b-gold-foot); }
/* ---- 8. bottom bar: active tab = gold text + quiet gold tint, no ring/glow ---- */
.nv.on, .v3-nv.on { color: var(--gold); background: rgba(255, 216, 74, .1); box-shadow: none; }
html[data-mode="demo"] .nv.on { color: #b9adff; background: rgba(143, 124, 255, .14); }

/* ---- states ---- */
.btn, .confirm, .chip, .sg, .balplus, .pa-dep, .tk-btn, .icbtn, .tcb, [class*="v3-"] { transition: transform .08s, box-shadow .08s, background-color .15s; }
.confirm:active, .btn:active, .chip:active, .balplus:active, .pa-dep:active, .tk-btn:active,
.v3-gold:active, .v3-long:active, .v3-short:active, .v3-ghost:active, .v3-outline:active, .v3-icon:active, .v3-chip:active { transform: translateY(1px); }
.confirm.gold:active, .confirm.long:active, .confirm.short:active, .btn.gold:active, .balplus:active, .v3-gold:active, .v3-long:active, .v3-short:active { box-shadow: none; }
.btn.ghost:active, .chip:active, .pa-dep:active, .v3-ghost:active, .v3-chip:active, .v3-icon:active { background: var(--b-glass-on); }
.btn.close:active, .tk-btn:active, .v3-outline:active { background: rgba(255, 216, 74, .14); }
:is(.btn, .confirm, .chip, .sg, .balplus, .pa-dep, .tk-btn, .nv, .icbtn, .tcb, [class*="v3-"]):focus-visible { outline: 2px solid rgba(255, 255, 255, .92); outline-offset: 2px; }
/* disabled: one neutral look everywhere */
:is(.confirm, .btn, .chip, .tk-btn, .pa-dep, [class*="v3-"]):disabled:not(.busy), .v3-disabled {
  opacity: 1; color: var(--dim); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); transform: none; filter: none; }
/* loading: keeps its colour, text hidden, spinner in the ink colour of that button */
.btn.busy, .confirm.busy, .v3-busy { color: transparent !important; opacity: 1; pointer-events: none; }
.btn.busy::after, .confirm.busy::after, .v3-busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
:is(.confirm.gold, .confirm.close, .confirm.long, .btn.gold, .v3-gold, .v3-long):is(.busy, .v3-busy)::after { border-color: rgba(0, 0, 0, .18); border-top-color: var(--b-gold-ink); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.busy::after, .confirm.busy::after, .v3-busy::after { animation-duration: 1.6s; } }
/* hit area: small visual buttons still get 44px */
.pa-dep, .tk-btn, .chip, .balplus { position: relative; }
.pa-dep::before, .tk-btn::before, .balplus::before { content: ''; position: absolute; inset: -6px -2px; }

/* ===================== (13/11) TON Connect in the header, Friends, BGIFT Pot ===================== */
:root { --bz: #9fd0ff; --bz2: #3f8cff; --bzd: rgba(63, 140, 255, .16); --hot: #ff8a3d; --hot2: #ff4f6e; }
/* header: TON Connect chip (icon only under 390 px when not connected; "…xtgA" when connected) */
.tcb { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; min-width: 44px; padding: 0 13px 0 11px; border-radius: 99px;
  background: var(--glass); border: 1px solid rgba(0, 152, 234, .45); box-shadow: var(--hi); font: 800 12.5px/1 var(--ui); color: #cfeaff; transition: transform .12s; }
.tcb:active { transform: scale(.95); }
.tcb-ic { position: relative; display: grid; place-items: center; width: 20px; height: 20px; }
.tonm { display: block; } .tonm svg { display: block; width: 100%; height: 100%; }
.tcb .tonm { width: 19px; height: 19px; }
.tcb.on { border-color: rgba(47, 216, 154, .45); color: var(--txt); padding-inline-end: 11px; }
.tcb.on .tcb-ic::after { content: ''; position: absolute; right: -2px; bottom: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 2px #0f0d13; }
.tcb-a { font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.tcb.busy .tcb-ic { animation: pulse 1s ease-in-out infinite; }
.top { gap: 6px; } .top .tcb { margin-inline-start: auto; }
@media (max-width: 389px) { .tcb:not(.on) { padding: 0 6px; } .tcb:not(.on) .tcb-l { display: none; } .tcb-h { display: none; } .tcb.on { padding-inline-end: 9px; } }
.tcsheet { text-align: center; }
.tcs-ill { display: grid; place-items: center; } .tcs-ill .tonm { width: 52px; height: 52px; }
.tcs-addr { padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); font: 700 13.5px/1.5 var(--ui); word-break: break-all; color: #cfeaff; }

/* nav: a small dot on Friends while the launch event runs */
.nv-ping { position: absolute; top: 7px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px #121016; }

/* avatars (initial on a colour from the name) */
.ava { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; font: 700 13px/1 var(--disp); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18); }
.ava.lg { width: 42px; height: 42px; font-size: 16px; }
/* the Telegram profile photo over the letter (public/app.js ava(), GET av/<key>.jpg): same circle, nothing moves when it loads or fails */
.ava { position: relative; overflow: hidden; }
.ava > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ava.has-ph { text-shadow: none; }
.ava.has-ph::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .14); pointer-events: none; }
.ava.lb { width: 34px; height: 34px; font-size: 13px; margin-left: -6px; }
.pod-who { position: relative; display: block; margin-bottom: 4px; }
.ava.pod { width: 44px; height: 44px; font-size: 17px; }
.p1 .ava.pod { width: 52px; height: 52px; font-size: 20px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18), 0 0 0 2px rgba(255, 216, 74, .6); }
.pod-who .pod-rk, .p1 .pod-who .pod-rk { position: absolute; right: -7px; bottom: -3px; width: 22px; height: 22px; font-size: 12px; box-shadow: 0 0 0 2px var(--card2); }
/* a prize picture that failed to load (expired link): the gift mark in the tile, never the alt text */
.prize-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--mute); background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03) 70%); }
.prize-ph .ic { width: 46%; height: 46%; max-width: 40px; max-height: 40px; }
.pod-img .prize-ph { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); } .p1 .pod-img .prize-ph { width: 136px; height: 136px; border-radius: 34px; }

/* ---------- Friends (#/ref) ---------- */
.rf-hero { position: relative; overflow: hidden; isolation: isolate; padding: 20px 16px 16px; border-radius: var(--r3); text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255, 216, 74, .2), transparent 62%), var(--card); border: 1px solid rgba(255, 216, 74, .24); box-shadow: var(--hi); }
.rf-ill { position: relative; display: flex; justify-content: center; margin-bottom: 12px; }
.rf-a { width: 46px; height: 46px; font-size: 18px; box-shadow: 0 0 0 3px #17141b; } .rf-a + .rf-a { margin-inline-start: -12px; }
.rf-pct { position: absolute; left: calc(50% + 38px); top: -6px; padding: 5px 8px; border-radius: 99px; font: 700 13px/1 var(--disp); color: var(--ink); background: linear-gradient(150deg, var(--gold), var(--orange)); box-shadow: 0 6px 14px -6px rgba(249, 178, 26, .9); transform: rotate(8deg); }
.rf-hero h1 { font: 600 21px/1.22 var(--disp); letter-spacing: -.01em; max-width: 19ch; margin: 0 auto; text-wrap: balance; }
.rf-hero > p { margin: 8px auto 0; max-width: 34ch; color: var(--mute); font-size: 14px; line-height: 1.45; }
.rf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.rf-stats > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.rf-stats span:first-child { color: var(--mute); font-size: 12.5px; font-weight: 700; }
.rf-stats b { display: inline-flex; align-items: center; gap: 6px; font: 600 22px/1.1 var(--disp); }
.rf-stats b .coin { width: 20px; height: 20px; } .rf-stats b .ic { width: 20px; height: 20px; color: var(--gold); }
.rf-link { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.rf-cap { font-weight: 800; font-size: 13.5px; color: var(--mute); padding-inline-start: 2px; }
.rf-link .reflink { margin: 0; width: 100%; text-align: start; }
.rf-link .reflink .icbtn { flex: none; }
.rf-ev { margin: 14px 0 0; }
.rf-how { margin-top: 22px; }
.rf-how h2, .rf-list h2 { font: 600 18px/1.2 var(--disp); margin: 0 2px 10px; }
.rf-how ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rf-how li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.rs-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; font: 700 14px/1 var(--disp); color: var(--gold); background: rgba(255, 216, 74, .1); border: 1px solid rgba(255, 216, 74, .25); }
.rs-t { display: flex; flex-direction: column; gap: 2px; } .rs-t b { font-size: 15px; } .rs-t small { color: var(--mute); font-size: 13px; line-height: 1.4; }
.rf-list .sec-h { margin-top: 22px; } .rf-list .sec-h h2 { margin: 0; }
.rf-list ul { list-style: none; margin: 0; padding: 4px 12px; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); }
.rf-list li { display: flex; align-items: center; gap: 11px; padding: 10px 0; } .rf-list li + li { border-top: 1px solid var(--line); }
.rl-n { flex: 1; min-width: 0; display: flex; flex-direction: column; } .rl-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rl-n small { color: var(--dim); font-size: 12px; font-weight: 700; }
.rl-v { text-align: end; } .rl-v b { color: var(--up); font-weight: 800; } .rl-v b small { color: var(--mute); font-weight: 700; } .rl-v > small { color: var(--dim); font-size: 12px; font-weight: 700; }
/* Friends: BGIFT Share referral boost (strip under the stats + one tag per friend) */
.rf-boost { display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 10px; padding: 11px 12px; border-radius: 16px; text-align: start; color: inherit; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.rf-boost.on { border-color: rgba(255, 216, 74, .34); }
.rf-boost .rfb-tok { flex: none; width: 34px; height: 34px; object-fit: contain; }
.rfb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .rfb-t b { font-weight: 800; } .rf-boost.on .rfb-t b { color: var(--gold); }
.rfb-t small { color: var(--mute); font-size: 12px; font-weight: 600; line-height: 1.35; }
.rf-boost > .ic { flex: none; color: var(--mute); }
.rl-n small.rl-bg { margin-top: 2px; } .rl-n small.rl-bg.ok { color: var(--gold); }
/* wallet: one row to Friends */
.refrow .rr-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: var(--gold); background: rgba(255, 216, 74, .1); }
.refrow .rr-ic .ic { width: 20px; height: 20px; }
.potrow { background: linear-gradient(100deg, var(--bzd), var(--card) 58%); border-color: rgba(159, 208, 255, .28); } .potrow > .ic { color: var(--bz); }

/* ---------- BGIFT Pot: Home card ---------- */
.bgtok { display: block; flex: none; object-fit: contain; }
.pot-home { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 13px 12px 13px 12px; border-radius: var(--r2); text-align: start; transition: transform .15s;
  background: radial-gradient(90% 140% at 0% 50%, rgba(63, 140, 255, .3), transparent 60%), linear-gradient(100deg, rgba(63, 140, 255, .14), var(--card) 70%); border: 1px solid rgba(159, 208, 255, .38); box-shadow: var(--hi), 0 12px 30px -18px rgba(63, 140, 255, .8); }
.pot-home:active { transform: scale(.98); }
.pot-home + .wh-home { margin-top: 10px; }
.phm-ill { flex: none; display: grid; place-items: center; width: 50px; height: 50px; }
.phm-tok { width: 50px; height: 50px; filter: drop-shadow(0 6px 10px rgba(20, 40, 80, .7)); }
.phm-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .phm-t b { font: 600 16px/1.2 var(--disp); } .phm-sub { color: var(--mute); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.phm-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: end; }
.phm-amt { font: 600 14px/1.1 var(--disp); color: var(--bz); white-space: nowrap; } .phm-amt small { font: 700 10px/1 var(--ui); color: var(--mute); }
.phm-usd { font: 800 12.5px/1.1 var(--ui); color: var(--txt); } .phm-usd:empty { display: none; }
.phm-clk { display: inline-flex; font: 700 12px/1 var(--ui); color: var(--mute); font-variant-numeric: tabular-nums; } .phm-clk:empty { display: none; }
.phm-clk i, .ph-time i { font-style: normal; display: inline-block; width: .64em; text-align: center; } .phm-clk i.sep, .ph-time i.sep { width: .32em; }
.pot-home > .ic { color: var(--bz); flex: none; }
.pot-home.is-hot { border-color: rgba(255, 138, 61, .6); background: radial-gradient(90% 140% at 0% 50%, rgba(255, 110, 70, .3), transparent 60%), linear-gradient(100deg, rgba(255, 110, 70, .14), var(--card) 70%); }
.pot-home.is-hot .phm-clk { color: var(--hot); } .pot-home.is-hot .phm-sub { color: #ffc29a; }

/* ---------- BGIFT Pot: screen ---------- */
.pot-hero { position: relative; overflow: hidden; isolation: isolate; padding: 16px 16px 14px; border-radius: var(--r3); border: 1px solid rgba(159, 208, 255, .3);
  background: linear-gradient(180deg, rgba(20, 28, 48, .92), rgba(14, 12, 20, .9) 62%); box-shadow: var(--hi), 0 20px 40px -24px rgba(63, 140, 255, .7); }
.ph-wash { position: absolute; z-index: -1; inset: -30% -20% auto; height: 70%; background: radial-gradient(closest-side, rgba(63, 140, 255, .38), transparent); pointer-events: none; transition: opacity .6s; }
.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ph-top h1 { font: 600 15px/1 var(--disp); color: var(--bz); letter-spacing: .01em; }
.ph-meta { display: inline-flex; align-items: center; gap: 6px; }
.ph-round, .ph-cnt { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 99px; font: 800 12px/1 var(--ui); color: var(--mute); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); white-space: nowrap; }
.ph-round:empty { display: none; } .ph-cnt { color: var(--txt); } .ph-cnt .ic { width: 13px; height: 13px; color: var(--gold); }
.ph-pot { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 14px; }
.ph-cap { position: relative; display: inline-flex; align-items: center; gap: 8px; color: var(--mute); font-weight: 800; font-size: 13px; }
.ph-arr { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font: 800 11.5px/1 var(--ui); color: #05301f; background: linear-gradient(150deg, #6ff5c2, #2fd89a); }
.ph-arr.in { animation: arrin .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes arrin { from { opacity: 0; transform: translateY(6px) scale(.8); } }
.ph-amt { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; font: 700 clamp(30px, 10vw, 40px)/1.05 var(--disp); letter-spacing: -.02em; color: #fff; white-space: nowrap; }
.ph-amt small { align-self: flex-end; margin-bottom: .3em; font: 700 13px/1 var(--ui); color: var(--bz); letter-spacing: .02em; }
.ph-tok { width: 1.15em; height: 1.15em; filter: drop-shadow(0 8px 14px rgba(20, 50, 110, .8)); }
.ph-n { font-variant-numeric: tabular-nums; }
.ph-usd { margin-top: 6px; font: 600 clamp(22px, 7vw, 27px)/1.1 var(--disp); color: var(--gold); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ph-n.up, .ph-usd.up { animation: potup 1.4s ease-out; }
@keyframes potup { 0%, 45% { color: var(--up); } }
.ph-px { margin-top: 4px; font: 700 11.5px/1.3 var(--ui); color: var(--dim); } .ph-pxat::before { content: ', '; }
.ph-bar { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ph-track { flex: 1; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.ph-track i { display: block; height: 100%; border-radius: 3px; transform-origin: left; background: linear-gradient(90deg, var(--bz2), var(--bz)); transition: transform .9s cubic-bezier(.2, .9, .25, 1); }
[dir="rtl"] .ph-track i { transform-origin: right; }
.ph-rec { flex: none; font: 800 11.5px/1 var(--ui); color: var(--mute); white-space: nowrap; }
.ph-bar.rec .ph-track i { background: linear-gradient(90deg, var(--gold), var(--orange)); } .ph-bar.rec .ph-rec { color: var(--gold); }
/* the countdown */
.ph-clock { display: flex; flex-direction: column; align-items: center; margin-top: 14px; padding: 12px 12px 14px; border-radius: 20px; background: rgba(0, 0, 0, .34); border: 1px solid var(--line); }
.ph-lbl { font-weight: 800; font-size: 13px; color: var(--mute); display: inline-flex; align-items: center; gap: 7px; }
.ph-time { display: inline-flex; margin-top: 4px; font: 700 clamp(44px, 14.5vw, 56px)/1 var(--disp); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.ph-time.bump { animation: bump .45s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes bump { 30% { transform: translateY(-5px) scale(1.07); } }
.ph-fuse { width: 100%; height: 6px; margin-top: 12px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.ph-fuse-i { display: block; height: 100%; border-radius: 3px; transform-origin: left; background: linear-gradient(90deg, var(--bz2), #fff); transition: transform 1s linear; }
[dir="rtl"] .ph-fuse-i { transform-origin: right; }
/* last 15 minutes: warm, the digits beat once a second (transform/opacity only) */
.pot-hero[data-ph="hot"] { border-color: rgba(255, 138, 61, .65); background: linear-gradient(180deg, rgba(52, 22, 16, .94), rgba(16, 11, 14, .92) 62%); box-shadow: var(--hi), 0 20px 44px -22px rgba(255, 90, 60, .85); }
.pot-hero[data-ph="hot"] .ph-wash { background: radial-gradient(closest-side, rgba(255, 110, 60, .42), transparent); }
.pot-hero[data-ph="hot"] .ph-clock { border-color: rgba(255, 138, 61, .45); background: rgba(40, 10, 8, .5); }
.pot-hero[data-ph="hot"] .ph-lbl { color: #ffc29a; }
.pot-hero[data-ph="hot"] .ph-lbl::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--hot2); animation: pulse .9s ease-in-out infinite; }
.pot-hero[data-ph="hot"] .ph-time { color: #ffd2b0; animation: beat 1s ease-in-out infinite; }
.pot-hero[data-ph="hot"] .ph-time.bump { animation: bump .45s cubic-bezier(.2, 1.5, .4, 1), beat 1s ease-in-out .45s infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.045); } }
.pot-hero[data-ph="hot"] .ph-fuse-i { background: linear-gradient(90deg, var(--hot2), var(--hot), #ffe2b0); }
.pot-hero[data-ph="ended"] .ph-time, .pot-hero[data-ph="off"] .ph-time, .pot-hero[data-ph="idle"] .ph-time { color: var(--mute); }
.pot-hero[data-ph="ended"] .ph-lbl { color: var(--gold); font-size: 14px; }
.pot-hero[data-ph="off"] { border-color: var(--line2); }
/* last bidder */
.ph-last { position: relative; overflow: hidden; display: flex; align-items: center; gap: 11px; margin-top: 10px; padding: 10px 12px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.pl-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .pl-t small { color: var(--mute); font-size: 12px; font-weight: 800; }
.pl-t b { font: 600 17px/1.15 var(--disp); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-ago { flex: none; color: var(--dim); font-size: 12px; font-weight: 800; }
.pl-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--gold); background: rgba(255, 216, 74, .1); border: 1px dashed rgba(255, 216, 74, .4); }
.ph-last.empty .pl-t b { font-size: 15px; }
.ph-last.me { border-color: rgba(255, 216, 74, .55); background: linear-gradient(100deg, rgba(255, 216, 74, .16), rgba(255, 255, 255, .04)); }
.ph-last.me .pl-t small { color: var(--gold); }
.ph-last::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255, 236, 170, .42), rgba(255, 216, 74, .12)); opacity: 0; pointer-events: none; }
.ph-last.flash::after { animation: lflash .9s ease-out; }
.ph-last.flash .pl-t b { animation: lname .45s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes lflash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lname { from { opacity: 0; transform: translateY(8px); } }
/* bid */
.pot-act { margin-top: 14px; }
.pot-cta { height: 64px; font-size: 19px; }
.pot-cta .ic { width: 20px; height: 20px; }
.pot-cta.lead:disabled { opacity: 1; color: var(--gold) !important; background: rgba(255, 216, 74, .1) !important; box-shadow: inset 0 0 0 1.5px rgba(255, 216, 74, .5) !important; }
.pa-sub { margin-top: 8px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--mute); line-height: 1.4; }
.pa-sub.me { color: var(--gold); }
.pa-bal { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 8px 8px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.pa-l { flex: 1; color: var(--mute); font-size: 13.5px; font-weight: 700; }
.pa-bal b { display: inline-flex; align-items: center; gap: 6px; font: 600 15px/1 var(--disp); }
.pa-dep { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 11px; border-radius: 11px; font-weight: 800; font-size: 13px; color: var(--txt); background: rgba(255, 255, 255, .07); border: 1px solid var(--line2); }
.pa-dep .ic { width: 15px; height: 15px; }
.pa-dep.low { color: var(--ink); background: linear-gradient(150deg, var(--gold), var(--amber)); border-color: transparent; }
.pa-bal.low { border-color: rgba(255, 181, 71, .45); }
.pa-mine { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.pa-mine > div { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); text-align: center; }
.pa-mine b { font: 600 16px/1.1 var(--disp); } .pa-mine span { color: var(--dim); font-size: 11.5px; font-weight: 800; line-height: 1.2; }
/* cards: live bids, arrivals, winners, rules */
.pot-card { margin-top: 14px; padding: 4px 14px 8px; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); box-shadow: var(--hi); }
.pc-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 0 6px; }
.pc-h h2 { font: 600 16.5px/1.2 var(--disp); } .pc-h > span { color: var(--mute); font-size: 12.5px; font-weight: 700; text-align: end; }
.pc-live { display: inline-flex; align-items: center; gap: 6px; color: var(--up) !important; } .pc-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: pulse 1.6s ease-in-out infinite; }
.pb-list, .pf-list, .pw-list, .pr-list { list-style: none; margin: 0; padding: 0; }
.pb-list li, .pf-list li, .pw-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.pb-list li + li, .pf-list li + li, .pw-list li + li { border-top: 1px solid var(--line); }
.pb-list li > b { flex: 1; min-width: 0; font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-list li.top > b { color: var(--gold); }
.pb-lead { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; font: 800 11px/1 var(--ui); color: var(--gold); background: rgba(255, 216, 74, .1); border: 1px solid rgba(255, 216, 74, .3); }
.pb-lead .ic { width: 12px; height: 12px; }
.pb-ago { flex: none; color: var(--dim); font-size: 12px; font-weight: 800; white-space: nowrap; }
.pb-list li.in { animation: rowin .42s cubic-bezier(.2, .9, .25, 1); }
@keyframes rowin { from { opacity: 0; transform: translateY(-10px); } }
.pb-empty { justify-content: center; color: var(--dim); font-weight: 700; font-size: 14px; }
.pb-more { display: block; width: 100%; padding: 10px 0 6px; font-weight: 800; font-size: 13.5px; color: var(--bz); }
.pf-tok { width: 30px; height: 30px; }
.pf-a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .pf-a b { color: var(--up); font-weight: 800; } .pf-a b small { color: var(--mute); } .pf-a > small { color: var(--dim); font-size: 12px; font-weight: 700; }
.pw-n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .pw-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pw-n small { color: var(--dim); font-size: 12px; font-weight: 700; }
.pw-v { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; } .pw-v b { font-weight: 800; color: var(--bz); } .pw-v b small { color: var(--mute); font-weight: 700; } .pw-v > small { color: var(--dim); font-size: 12px; font-weight: 700; }
.pw-list li.top .pw-n b { color: var(--gold); }
.pc-empty { padding: 6px 0 10px; color: var(--dim); font-size: 14px; font-weight: 700; }
.pr-list { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }
.pr-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; line-height: 1.45; }
.pr-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--bz); background: var(--bzd); }
.pr-ic .ic { width: 16px; height: 16px; } .pr-ic .coin { width: 18px; height: 18px; }
/* coming soon / error */
.pot-soon { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 18px 18px; border-radius: var(--r3); text-align: center;
  background: radial-gradient(100% 70% at 50% 0%, rgba(63, 140, 255, .28), transparent 65%), var(--card); border: 1px solid rgba(159, 208, 255, .28); }
.pot-soon > .skel { width: 100%; }
.ps-ill { display: grid; place-items: center; } .ps-tok { width: 84px; height: 84px; filter: drop-shadow(0 14px 24px rgba(20, 50, 110, .8)); }
.pot-soon h1 { font: 600 22px/1.2 var(--disp); }
.ps-t { display: inline-flex; height: 28px; align-items: center; padding: 0 12px; border-radius: 99px; color: var(--bz); background: var(--bzd); border: 1px solid rgba(159, 208, 255, .3); font-size: 13px; }
.pot-soon > p { color: var(--mute); font-size: 14px; line-height: 1.5; max-width: 32ch; }
.pot-soon .pr-list { width: 100%; text-align: start; margin-top: 6px; }
/* bid confirm + win sheets */
.potsheet, .potwin { text-align: center; }
.pz-ill { display: grid; place-items: center; } .pz-tok { width: 64px; height: 64px; filter: drop-shadow(0 10px 18px rgba(20, 50, 110, .8)); }
.pz-rows { padding: 4px 14px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); text-align: start; }
.pz-rows .kv + .kv { border-top: 1px solid var(--line); }
.pw-burst { position: relative; display: grid; place-items: center; height: 110px; }
.pw-burst::before { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 216, 74, .45), transparent); }
.pw-tok { position: relative; width: 92px; height: 92px; filter: drop-shadow(0 14px 24px rgba(20, 50, 110, .8)); animation: float 5s ease-in-out infinite; }
.pw-crown { position: absolute; top: 0; left: calc(50% + 18px); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink); background: linear-gradient(150deg, var(--gold), var(--orange)); transform: rotate(14deg); box-shadow: 0 6px 14px -6px rgba(249, 178, 26, .9); }
.pw-crown .ic { width: 20px; height: 20px; }
.pw-amt { display: block; font: 700 34px/1.1 var(--disp); color: #fff; } .pw-amt small { font: 700 14px/1 var(--ui); color: var(--bz); }
.pw-usd { display: block; margin-top: 2px !important; font: 600 20px/1.2 var(--disp); color: var(--gold); }
.pw-card { width: 100%; border-radius: 16px; border: 1px solid var(--line2); }
@media (prefers-reduced-motion: reduce) { .pot-hero[data-ph="hot"] .ph-time, .ph-time.bump, .pb-list li.in, .ph-last.flash::after, .ph-last.flash .pl-t b, .ph-arr.in, .pw-tok, .pc-live i { animation: none; } }
.phm-clk i, .ph-time i { width: .68em; } .phm-clk i.sep, .ph-time i.sep { width: .34em; }
.pc-h h2 { flex: none; } .pc-h > span { min-width: 0; }
@media (max-width: 389px) { .top { gap: 5px; } .modesw .ms { padding: 0 9px; font-size: 11.5px; } .tcb:not(.on) { padding: 0 4px; height: 40px; min-width: 40px; } .tcb.on { height: 40px; padding-inline-start: 4px; } .balpill { gap: 6px; padding-inline-start: 8px; } }
/* home pot card, 2 lines: title + timer chip / pot BGIFT + $ (+ one short line) */
.phm-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.phm-clk { height: 24px; align-items: center; padding: 0 8px; border-radius: 99px; color: var(--txt); background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
.pot-home.is-hot .phm-clk { color: #ffd2b0; background: rgba(255, 79, 110, .18); border-color: rgba(255, 138, 61, .5); }
.phm-v { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.phm-amt { font-size: 18px; color: #fff; } .phm-amt small { color: var(--bz); }
.phm-usd { font: 600 14px/1.1 var(--disp); color: var(--gold); }
.phm-sub { font-size: 12.5px; }
.pot-home { align-items: center; }
/* connected wallet chip: the TON icon with the green dot on phones; "…pZ0R" from 420 px, the full short address from 470 px (the menu always shows it whole) */
@media (max-width: 419px) { .tcb.on { padding: 0 4px; } .tcb.on .tcb-a { display: none; } }
@media (max-width: 469px) { .tcb-h { display: none; } }
/* room for the TON chip: the decorative gift mark leaves the header under 470 px; in DEMO on small phones the pill keeps the DEMO tag, not the $ of practice BPL */
@media (max-width: 469px) { .top .brand { display: none; } }
@media (max-width: 389px) { html[data-mode="demo"] .balpill .bal-sub .usd { display: none; } }
.ph-time, .phm-clk { direction: ltr; unicode-bidi: isolate; }   /* a countdown always reads 19:42:08, also in Arabic / Hebrew / Persian */
/* (13/11, owner) bar with 7 places: Markets, Positions, Ranking, Event, Friends, Tasks, Wallet. Wider bar on phones, 22 px icons, 10 px labels;
   a label longer than its place is shrunk by app.js (nav fit), never cut */
.nav.n7 { grid-template-columns: repeat(7, minmax(0, 1fr)); padding-inline: 3px; gap: 0; }
.nav.n7 .nv { min-width: 0; padding: 8px 0 7px; gap: 3px; font-size: 10px; }
.nav.n7 .nv .ic { width: 22px; height: 22px; }
.nav.n7 .nv span:not(.ic) { display: block; max-width: 100%; padding: 0 1px; overflow: hidden; white-space: nowrap; letter-spacing: -.02em; line-height: 1.15; }
@media (max-width: 400px) { .nav.n7 { width: calc(100% - 12px); border-radius: 22px; } }
.nav.n7 .nv-dot { left: calc(50% + 6px); }
/* (13/11) Event page with no event running: same hero, a gift in a gold ring, one line, a way to Friends; the last ranking below marked "Finished" */
.evhero.evnone { padding-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.evn-ic { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; color: var(--gold); background: radial-gradient(circle at 50% 35%, rgba(255, 216, 74, .22), rgba(255, 216, 74, .06)); box-shadow: inset 0 0 0 1.5px rgba(255, 216, 74, .4), 0 12px 28px -14px rgba(249, 178, 26, .8); }
.evn-ic .ic { width: 36px; height: 36px; }
.evhero.evnone h1 { font: 600 21px/1.2 var(--disp); max-width: 18ch; text-wrap: balance; }
.evhero.evnone .btn { margin-top: 4px; }
.evn-done { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px !important; font-weight: 800; color: var(--mute); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); white-space: nowrap; }

/* ---- token logo inside a button (owner 13/11): a button that names a token shows that token's ORIGINAL logo, not a glyph ----
   ga/bpl.png (BPL), bgift/token.webp (BGIFT, the logo the app already uses), bgift/gram.svg (GRAM). 20 px (22 px on big buttons),
   centred with the text by the button's flex row, no shadow. Busy = hidden with the text; disabled = grey like the label. */
.btn-tok { display: block; flex: none; width: 20px; height: 20px; object-fit: contain; border-radius: 50%; filter: none; box-shadow: none; }
.confirm.big .btn-tok, .bg-btn.big .btn-tok, .big2 .btn-tok { width: 22px; height: 22px; }
.chip .btn-tok, .tk-btn .btn-tok, .btn.sm .btn-tok { width: 18px; height: 18px; }
.chip.gold { display: inline-flex; align-items: center; gap: 6px; }
.tk-btn { display: inline-flex; align-items: center; gap: 6px; }
:is(.busy, .v3-busy) .btn-tok { visibility: hidden; }
:disabled:not(.busy) .btn-tok { filter: grayscale(1); opacity: .45; }

/* ===================== BGIFT Pot compatto (13/11, owner) =====================
   Idea: one hero card holds everything needed to play (pot, timer, last bidder, bid button, balance) and fits above the fold on a
   390x750 phone; the rest is ONE card with tabs (Live / Vincitori / Arrivi / Regole). Spacing scale 4/8/12/16. Tokens unchanged,
   original token art unchanged (bgift/token.webp, ga/bpl.png). */

/* ---- hero: tighter rhythm ---- */
.pot-hero { padding: 12px 12px 12px; border-radius: 24px; }
.ph-top h1 { font-size: 14px; }
.ph-round, .ph-cnt { height: 24px; padding: 0 8px; font-size: 11.5px; }
.ph-pot { margin-top: 8px; }
.ph-cap { font-size: 12px; }
.ph-amt { margin-top: 2px; gap: 8px; font-size: clamp(28px, 9vw, 34px); }
.ph-amt small { font-size: 12px; }
.ph-usdrow { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.ph-usd { margin-top: 0; font-size: 18px; }
.ph-next { margin: 0; display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 99px; color: var(--up); background: rgba(47, 216, 154, .1); font-size: 11px; }
.ph-next .ic { width: 11px; height: 11px; } .ph-next small { color: var(--dim); }
.ph-bar { margin-top: 8px; gap: 8px; } .ph-track { height: 4px; } .ph-rec { font-size: 11px; }
/* timer: still the loudest thing on the card, in a slimmer box */
.ph-clock { margin-top: 8px; padding: 8px 12px 10px; border-radius: 16px; }
.ph-lbl { font-size: 12px; }
.ph-time { margin-top: 2px; font-size: clamp(36px, 11.5vw, 44px); }
.ph-fuse { margin-top: 8px; height: 4px; }
/* last bidder: one 48px row */
.ph-last { margin-top: 8px; padding: 6px 10px 6px 6px; gap: 10px; border-radius: 14px; }
.ph-last .ava.lg { width: 36px; height: 36px; font-size: 14px; }
.pl-t { gap: 0; } .pl-t small { font-size: 11px; } .pl-t b { font-size: 15px; }
.pl-ic { width: 36px; height: 36px; } .ph-last.empty .pl-t b { font-size: 14px; }
/* bid: inside the hero, balance as a plain line under the button (no extra card) */
.pot-hero .pot-act { margin-top: 12px; }
.confirm.big.pot-cta { height: 56px; padding: 0 12px; font-size: 15.5px; line-height: 1.15; border-radius: 16px; text-align: center; }
.pa-sub { margin-top: 8px; font-size: 12.5px; line-height: 1.35; }
.pa-bal { margin-top: 8px; padding: 0 0 0 4px; min-height: 44px; border: 0; background: none; }
.pa-bal.low { border: 0; } .pa-bal.low .pa-l { color: var(--warn); }
.pa-l { font-size: 12.5px; }
.pa-bal b { font-size: 14px; }
.pa-dep { height: 36px; padding: 0 12px; border-radius: 12px; }
.pa-payto { margin-top: 0; font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* my numbers: one quiet strip, three cells split by hairlines */
.pot-body > .pa-mine { margin-top: 8px; gap: 0; border-radius: 16px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.pot-body > .pa-mine > div { padding: 8px 4px; border: 0; border-radius: 0; background: none; gap: 2px; }
.pot-body > .pa-mine > div + div { border-inline-start: 1px solid var(--line); }
.pot-body > .pa-mine b { font-size: 15px; } .pot-body > .pa-mine span { font-size: 11px; }
/* ONE card with tabs instead of four stacked cards */
.pt-box { margin-top: 8px; padding: 8px 12px 4px; }
.pot-seg { width: 100%; } .pot-seg .sg { flex: 1 1 auto; min-width: 0; padding: 0 8px; height: 36px; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
@media (max-width: 400px) { .pot-seg .sg { padding: 0 6px; font-size: 12px; letter-spacing: -.01em; } }
.pt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); animation: pulse 1.6s ease-in-out infinite; }
.pt-pane { display: none; padding-top: 4px; } .pt-pane.on { display: block; } .pt-pane[hidden] { display: none !important; }
.pt-cap { padding: 8px 0 2px; color: var(--dim); font-size: 12px; font-weight: 700; }
.pt-box .pb-list li, .pt-box .pf-list li, .pt-box .pw-list li { min-height: 48px; padding: 6px 0; }
.pt-box .pb-list li > b { font-size: 14px; }
.pt-box .pf-tok { width: 28px; height: 28px; }
.pb-more { min-height: 44px; padding: 0; }
.pt-box .pr-list { gap: 8px; padding: 10px 0 6px; } .pt-box .pr-list li { font-size: 13px; line-height: 1.4; }
.pt-box .pr-ic { width: 26px; height: 26px; }
.pt-box .ph-px { margin: 0 0 10px; padding-top: 8px; border-top: 1px solid var(--line); text-align: start; }
@media (prefers-reduced-motion: reduce) { .pt-dot { animation: none; } }

/* ---- Home card: two lines while a round runs ---- */
.pot-home { padding: 10px 12px; }
.pot-home .phm-ill, .pot-home .phm-tok { width: 44px; height: 44px; }
.pot-home.is-run .phm-sub { display: none; }
.pt-box .pb-list li.top { margin-bottom: 0; }

/* ---- low-power tier (public/lowfx.js: weak phone, Data Saver or slow frames measured; analisi/PERF_ANDROID.md) ----
   Same layout and colours, fewer per-frame costs: the glass bars drop the live blur (a slightly more opaque fill instead, the content under
   them was already dimmed to ~80%), the Gift cards take a new model's colour at once instead of a 1.2 s retint (each retint frame repainted
   the whole card: most of the Home raster time), the living background keeps 5 motes and 4 decor drawings and stops its pattern drift. */
html.lowfx .nav { background: rgba(13, 11, 17, .95); -webkit-backdrop-filter: none; backdrop-filter: none; }
html.lowfx .sticky-tabs .seg { background: rgba(11, 10, 14, .95); -webkit-backdrop-filter: none; backdrop-filter: none; }
html.lowfx .dock { background: rgba(11, 10, 14, .97); -webkit-backdrop-filter: none; backdrop-filter: none; }
html.lowfx .toast { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.lowfx .slide, html.lowfx .hero, html.lowfx .pod, html.lowfx .pz, html.lowfx .pos, html.lowfx .evg, html.lowfx .bo { transition: none; }
html.lowfx .bgx-pat { animation: none; }
html.lowfx .bgx-mote:nth-of-type(n+7), html.lowfx .bgx-dec:nth-of-type(n+5) { display: none; }
