/* =========================================================================
   PAGES area — wallet, history, top, invite.
   Shared page primitives first (.pg, .pcard, .tile), then per view.
   Illustrations live in img/pages-*.svg (light from upper-left).
   ========================================================================= */

/* ---------- page frame ---------- */
.pg { position: relative; }
.pg .pagehead { margin: var(--s-1) 0 var(--s-4); }
.pg .pagehead .h1 { font-size: var(--fs-2xl); font-weight: 700; }
.pg .pagehead__sub { margin-top: 6px; }
.pg__pane[hidden] { display: none !important; }


/* ---------- card used across pages ---------- */
.pcard {
  position: relative;
  padding: var(--s-4);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, #1f1f23, var(--surface-1) 70%);
  border: 1px solid var(--line); border-top-color: var(--line-top);
  box-shadow: var(--hl-top), var(--shadow-1);
}

/* icon tile: tinted square with inner top light */
.tile {
  --tile: 44px; --tile-c: var(--violet-300); --tile-bg: rgba(132, 104, 246, 0.16); --tile-line: rgba(160, 139, 255, 0.22);
  flex: none; width: var(--tile); height: var(--tile);
  display: grid; place-items: center;
  border-radius: var(--r-md);
  color: var(--tile-c);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tile-bg) 100%, rgba(255, 255, 255, 0.06)), var(--tile-bg));
  border: 1px solid var(--tile-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 6px rgba(0, 0, 0, 0.25);
}
.tile .ic { width: 22px; height: 22px; --ic-fill: 0.2; }
.tile--sm { --tile: 36px; border-radius: var(--r-sm); }
.tile--sm .ic { width: 18px; height: 18px; }
.tile--gold { --tile-c: var(--gold-400); --tile-bg: rgba(255, 203, 71, 0.13); --tile-line: rgba(255, 203, 71, 0.22); }
.tile--green { --tile-c: var(--green-400); --tile-bg: rgba(34, 197, 120, 0.13); --tile-line: rgba(79, 227, 154, 0.2); }
.tile--red { --tile-c: var(--red-400); --tile-bg: rgba(255, 71, 87, 0.12); --tile-line: rgba(255, 107, 120, 0.2); }
.tile--blue { --tile-c: var(--blue-400); --tile-bg: rgba(29, 143, 255, 0.13); --tile-line: rgba(76, 180, 255, 0.22); }
.tile--neutral { --tile-c: var(--text-2); --tile-bg: rgba(255, 255, 255, 0.05); --tile-line: var(--line-strong); }

/* empty-state illustration image */
.empty__img { width: 132px; height: auto; }
.empty__img--wide { width: 196px; }

/* =========================================================================
   WALLET
   ========================================================================= */

/* balance card: warm charcoal with the coin stack on the right */
.wcard {
  position: relative; overflow: hidden;
  min-height: 160px;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-2xl);
  background:
    radial-gradient(120% 90% at 92% 30%, rgba(255, 190, 70, 0.22), rgba(255, 190, 70, 0) 55%),
    radial-gradient(80% 60% at 0% 0%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, #2a2620 0%, #1d1b1a 45%, #161518 100%);
  border: 1px solid rgba(255, 214, 120, 0.12); border-top-color: rgba(255, 230, 170, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.1), 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px -16px rgba(245, 166, 35, 0.35);
}
.wcard::before {
  /* fine guilloche-like lines, very faint */
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: repeating-radial-gradient(circle at 100% 120%, rgba(255, 220, 150, 0.05) 0 1px, transparent 1px 9px);
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 80%); mask-image: linear-gradient(90deg, transparent 20%, #000 80%);
}
.wcard__shine {
  position: absolute; inset: -40% auto -40% -60%; width: 45%; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 245, 220, 0.12), transparent);
  transform: translateX(0) rotate(18deg); opacity: 0;
}
.wcard.is-shine .wcard__shine { animation: wshine 1.4s var(--ease-inout) 0.25s both; }
@keyframes wshine { 0% { opacity: 0; transform: translateX(0) rotate(18deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateX(420%) rotate(18deg); } }
.wcard__art {
  position: absolute; z-index: 1; right: -14px; top: 50%; width: 172px; height: auto;
  transform: translateY(-46%);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.wcard__body { position: relative; z-index: 3; display: flex; flex-direction: column; min-height: 126px; }
.wcard__brand {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px 0 5px; border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 214, 120, 0.16);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2xs); letter-spacing: 0.08em; color: var(--gold-300);
}
.wcard__bal {
  margin-top: var(--s-3);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-4xl); line-height: 1.05; letter-spacing: -0.03em;
  color: #fff8ea;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  max-width: 62%;
  overflow-wrap: anywhere;
}
.wcard__bal .num.is-counting-up { color: var(--gold-300); }
.wcard__foot { margin-top: auto; padding-top: var(--s-3); display: flex; flex-wrap: wrap; gap: 6px; }
.wcard__tag {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px;
  border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 240, 215, 0.72); font-size: var(--fs-2xs); font-weight: 750; white-space: nowrap;
}
.wcard__tag b { color: #fff3dc; font-weight: 800; }

.wallet__seg { margin: var(--s-4) 0; }
.wcard__tag .cmark { margin-right: 1px; }
.wcard__tag--promo { color: rgba(255, 214, 236, 0.8); background: rgba(255, 92, 160, 0.12); border-color: rgba(255, 122, 176, 0.22); }
.wcard__tag--promo .ic { width: 13px; height: 13px; color: #ff9cc4; --ic-stroke: 2; }

/* ---------- coin / network marks (js/views/wallet-coins.js) ---------- */
.cmark { --cm: 36px; position: relative; flex: none; display: inline-block; width: var(--cm); height: var(--cm); }
.cmark > svg { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.cmark::after {
  /* rim light on the disc */
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(120% 90% at 30% 12%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 52%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.18);
}
.cmark__net {
  position: absolute; z-index: 1; right: -3px; bottom: -3px;
  width: calc(var(--cm) * 0.46); height: calc(var(--cm) * 0.46); min-width: 14px; min-height: 14px;
  border-radius: 50%; box-shadow: 0 0 0 2px var(--surface-1);
}
.cmark__net svg { display: block; width: 100%; height: 100%; }

/* ---------- inputs used across the wallet ---------- */
.wfield { display: flex; flex-direction: column; gap: var(--s-2); }
.wfield__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); min-height: 20px; }
.wfield__label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 650; }
.wfield__opt { color: var(--text-3); font-size: var(--fs-xs); font-weight: 650; }
.wdin {
  position: relative; display: flex; align-items: center; gap: var(--s-2);
  min-height: 52px; padding: 0 6px 0 var(--s-3);
  background: var(--bg-0);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.wdin:focus-within { border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--primary-tint), inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.wdin.is-error { border-color: rgba(255, 107, 120, 0.55); }
.wdin.is-error:focus-within { box-shadow: 0 0 0 3px var(--red-tint), inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.wdin.is-shake { animation: wshake 360ms var(--ease-standard); }
@keyframes wshake { 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }
.wdin__lead { flex: none; display: grid; place-items: center; }
.wdin__input {
  flex: 1; min-width: 0; height: 50px; padding: 0 var(--s-1);
  background: none; border: 0; outline: none; color: var(--text);
  font-family: var(--font-text); font-size: var(--fs-md); font-weight: 650;
}
.wdin__input::placeholder { color: var(--text-3); font-family: var(--font-text); font-weight: 600; letter-spacing: 0; }
.wdin__input.num { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 650; letter-spacing: -0.01em; }
.wdin__unit { flex: none; color: var(--text-3); font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.04em; padding-right: var(--s-1); }
.wdin__max {
  flex: none; height: 34px; padding: 0 var(--s-3); border-radius: var(--r-sm);
  background: var(--surface-3); color: var(--violet-300);
  border: 1px solid var(--line); border-top-color: var(--line-top);
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.06em;
}
.wdin--addr { align-items: flex-start; padding-right: var(--s-3); }
.wdin__area {
  height: auto; min-height: 58px; padding: 13px var(--s-1) 11px; resize: none;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 1.45; word-break: break-all;
}
.wdin--area { padding: 0 var(--s-3); }
.wdin__ok {
  flex: none; margin-top: 15px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; color: #04140b; background: var(--green-500);
  transform: scale(0.4); opacity: 0; transition: transform var(--dur-ui) var(--ease-spring), opacity var(--dur-fast);
}
.wdin__ok .ic { width: 14px; height: 14px; --ic-stroke: 2.6; }
.wdin.is-ok .wdin__ok { transform: none; opacity: 1; }
.whint {
  display: flex; align-items: flex-start; gap: 6px; min-height: 16px;
  color: var(--text-3); font-size: var(--fs-xs); font-weight: 650; line-height: 1.35;
}
.whint:empty { display: none; }
.whint .ic { width: 14px; height: 14px; margin-top: 1px; --ic-stroke: 2; }
.whint.is-error { color: var(--red-400); }

/* ---------- deposit: Telegram Stars ---------- */
.stars {
  display: flex; flex-direction: column; gap: var(--s-4);
  background:
    radial-gradient(110% 70% at 0% 0%, rgba(255, 203, 71, 0.09), rgba(255, 203, 71, 0) 60%),
    linear-gradient(180deg, #1f1f23, var(--surface-1) 70%);
}
.stars__mini svg { width: 18px; height: 18px; color: var(--gold-400); }
.stars .whint { margin-top: calc(var(--s-2) * -1); }
.stars__sum {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) 0 0; border-top: 1px dashed var(--line-strong);
}
.stars__sumk { color: var(--text-2); font-size: var(--fs-sm); font-weight: 650; }
.stars__sumv {
  display: inline-flex; align-items: center; gap: 6px; --coin: 20px;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); letter-spacing: -0.02em;
}
.stars__sumv small { font-family: var(--font-text); font-size: var(--fs-xs); font-weight: 800; color: var(--text-3); letter-spacing: 0.04em; margin-left: 2px; }

/* deposit status (after the invoice) */
.dstat {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3); border-radius: var(--r-md);
  background: var(--bg-0); border: 1px solid var(--line);
}
.dstat[hidden] { display: none; }
.dstat__ic {
  flex: none; width: 32px; height: 32px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--surface-3); color: var(--text-2);
}
.dstat__ic .ic { width: 18px; height: 18px; --ic-stroke: 2; --ic-fill: 0.18; }
.dstat__title { font-weight: 800; font-size: var(--fs-sm); line-height: 1.3; }
.dstat__title:only-child { min-height: 32px; display: flex; align-items: center; }
.dstat__text { margin-top: 2px; color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; }
.dstat__text b { color: var(--text); font-weight: 800; }
.dstat__spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
.dstat--info .dstat__ic { background: var(--blue-tint); color: var(--blue-400); }
.dstat--wait { border-color: rgba(255, 203, 71, 0.18); }
.dstat--wait .dstat__ic { background: rgba(255, 203, 71, 0.14); color: var(--gold-400); }
.dstat--ok { border-color: rgba(79, 227, 154, 0.22); background: linear-gradient(180deg, rgba(34, 197, 120, 0.08), rgba(34, 197, 120, 0.02)); }
.dstat--ok .dstat__ic { background: var(--green-500); color: #04140b; }
.dstat--ok .dstat__title { color: var(--green-400); }
.dstat--err { border-color: rgba(255, 107, 120, 0.22); }
.dstat--err .dstat__ic { background: var(--red-tint); color: var(--red-400); }

.dstat__act { margin-top: var(--s-3); display: flex; gap: var(--s-2); }

/* ---------- deposit: method picker ---------- */
.dsel { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.dsel__opt {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); min-width: 0;
  padding: var(--s-3);
  border-radius: var(--r-lg); text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--line); border-top-color: var(--line-top);
  box-shadow: var(--hl-top);
  transition: background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.dsel__ic { flex: none; display: flex; align-items: center; }
.dsel__ic--crypto .cmark + .cmark { margin-left: -11px; }
.dsel__ic--crypto .cmark + .cmark > svg { box-shadow: 0 0 0 2px var(--surface-1), 0 2px 6px rgba(0, 0, 0, 0.35); }
.dsel__ic--star {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: #fff6d8;
  background: radial-gradient(120% 90% at 30% 10%, #ffe28a, #f5a623 55%, #c96f06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 4px rgba(120, 50, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.35);
}
.dsel__ic--star svg { width: 17px; height: 17px; filter: drop-shadow(0 1px 1px rgba(120, 50, 0, 0.45)); }
.dsel__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; }
.dsel__txt b { font-size: var(--fs-md); font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsel__txt span { color: var(--text-3); font-size: var(--fs-xs); font-weight: 650; white-space: nowrap; }
.dsel__dot {
  position: absolute; top: var(--s-3); right: var(--s-3); width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}
.dsel__opt.is-active .dsel__txt span { color: var(--text-2); }
.dsel__opt.is-active .dsel__dot { border-color: transparent; background: var(--dot); box-shadow: inset 0 0 0 4px var(--dot-in), 0 0 0 1px var(--dot); }
.dsel__opt[data-dep-method='crypto'] { --dot: var(--blue-400); --dot-in: #0d2338; }
.dsel__opt[data-dep-method='stars'] { --dot: var(--gold-400); --dot-in: #33260a; }
.dsel__opt[data-dep-method='crypto'].is-active {
  background: linear-gradient(180deg, rgba(29, 143, 255, 0.16), rgba(29, 143, 255, 0.05));
  border-color: rgba(76, 180, 255, 0.45); border-top-color: rgba(150, 210, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(200, 230, 255, 0.1), 0 0 0 1px rgba(29, 143, 255, 0.18), 0 8px 18px -10px rgba(29, 143, 255, 0.6);
}
.dsel__opt[data-dep-method='crypto'].is-active .dsel__ic--crypto .cmark + .cmark > svg { box-shadow: 0 0 0 2px #142334, 0 2px 6px rgba(0, 0, 0, 0.35); }
.dsel__opt[data-dep-method='stars'].is-active {
  background: linear-gradient(180deg, rgba(255, 203, 71, 0.15), rgba(255, 203, 71, 0.05));
  border-color: rgba(255, 203, 71, 0.45); border-top-color: rgba(255, 224, 138, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.1), 0 0 0 1px rgba(255, 203, 71, 0.18), 0 8px 18px -10px rgba(245, 166, 35, 0.55);
}
[data-dep-pane][hidden] { display: none; }

/* ---------- deposit: crypto (CryptoBot) ---------- */
.dcr {
  display: flex; flex-direction: column; gap: var(--s-4);
  background:
    radial-gradient(110% 70% at 0% 0%, rgba(29, 143, 255, 0.1), rgba(29, 143, 255, 0) 60%),
    linear-gradient(180deg, #1f1f23, var(--surface-1) 70%);
}
.dcr .wdin:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-tint), inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.dcr .wdin.is-error { border-color: rgba(255, 107, 120, 0.55); }
.dcr .whint { margin-top: calc(var(--s-2) * -1); }
.dcr__sum {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-3) 0 0; border-top: 1px dashed var(--line-strong);
}
.dcr__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 28px; }
.dcr__k { flex: none; color: var(--text-2); font-size: var(--fs-sm); font-weight: 650; }
.dcr__pay { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; text-align: right; }
.dcr__amt { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-size: var(--fs-sm); font-weight: 800; white-space: nowrap; }
.dcr__amt .cmark > svg { box-shadow: none; }
.dcr__or { color: var(--text-3); font-size: var(--fs-xs); font-weight: 650; }
.dcr__dash { color: var(--text-3); font-weight: 700; }
.dcr__foot { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: calc(var(--s-1) * -1); color: var(--text-3); font-size: var(--fs-xs); font-weight: 600; line-height: 1.45; }

/* ---------- withdraw form ---------- */
.wdform { display: flex; flex-direction: column; gap: var(--s-4); }
.wdform--sk { gap: var(--s-3); }
.wdm { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.wdm__opt {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0;
  min-height: 62px; padding: var(--s-2) var(--s-3) var(--s-2) 10px;
  border-radius: var(--r-md); text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line); border-top-color: var(--line-top);
  box-shadow: var(--hl-top);
}
.wdm__opt .cmark__net { box-shadow: 0 0 0 2px var(--surface-2); }
.wdm__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wdm__coin { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-md); letter-spacing: -0.01em; line-height: 1.15; }
.wdm__net { color: var(--text-3); font-size: var(--fs-2xs); font-weight: 750; line-height: 1.25; }
.wdm__check {
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--violet-500);
  transform: scale(0.4); opacity: 0; transition: transform var(--dur-ui) var(--ease-spring), opacity var(--dur-fast);
}
.wdm__check .ic { width: 12px; height: 12px; --ic-stroke: 2.8; }
.wdm__opt.is-active {
  background: linear-gradient(180deg, rgba(132, 104, 246, 0.2), rgba(132, 104, 246, 0.08));
  border-color: rgba(160, 139, 255, 0.5); border-top-color: rgba(195, 181, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(132, 104, 246, 0.25), 0 8px 18px -10px rgba(109, 80, 232, 0.8);
}
.wdm__opt.is-active .cmark__net { box-shadow: 0 0 0 2px #2a2443; }
.wdm__opt.is-active .wdm__net { color: var(--violet-300); }
.wdm__opt.is-active .wdm__check { transform: none; opacity: 1; }
.wdm__note {
  display: flex; align-items: flex-start; gap: 6px; margin-top: calc(var(--s-2) * -1);
  color: var(--blue-400); font-size: var(--fs-xs); font-weight: 650; line-height: 1.4;
}
.wdm__note[hidden] { display: none; }
.wdm__note .ic { width: 14px; height: 14px; margin-top: 1px; flex: none; }
.wdform__block[hidden] { display: none; }
.wdform.is-blocked .wfield, .wdform.is-blocked .wq { opacity: 0.55; }

/* notices (rates down / request pending / load error) */
.wnote {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3); border-radius: var(--r-md);
  background: var(--bg-0); border: 1px solid var(--line-strong);
}
.wnote > .ic { flex: none; width: 20px; height: 20px; align-self: flex-start; margin-top: 1px; --ic-fill: 0.2; }
.wnote .grow { display: flex; flex-direction: column; gap: 2px; }
.wnote b { font-weight: 800; font-size: var(--fs-sm); line-height: 1.3; }
.wnote .grow > span { color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; }
.wnote .btn { flex: none; }
.wnote--gold { border-color: rgba(255, 203, 71, 0.22); background: linear-gradient(180deg, rgba(255, 203, 71, 0.08), rgba(255, 203, 71, 0.02)); }
.wnote--gold > .ic { color: var(--gold-400); }
.wnote--red { border-color: rgba(255, 107, 120, 0.22); background: linear-gradient(180deg, rgba(255, 71, 87, 0.08), rgba(255, 71, 87, 0.02)); }
.wnote--red > .ic { color: var(--red-400); }
.wnote--block { padding: var(--s-4); border-radius: var(--r-xl); }

/* live quote */
.wq {
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-0); border: 1px solid var(--line);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: border-color var(--dur-ui), opacity var(--dur-ui);
}
.wq__main {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: 58px; padding: var(--s-3) var(--s-4);
}
.wq__k { color: var(--text-2); font-size: var(--fs-sm); font-weight: 650; white-space: nowrap; }
.wq__v {
  display: inline-flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; gap: 0 6px; min-width: 0; text-align: right;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); letter-spacing: -0.02em; line-height: 1.15;
}
.wq__coin { display: inline-flex; flex-direction: column; align-items: flex-end; font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); letter-spacing: 0; }
.wq__dash { color: var(--text-3); }
.wq__muted { font-family: var(--font-text); font-size: var(--fs-sm); font-weight: 700; color: var(--text-3); letter-spacing: 0; }
.wq.is-live { border-color: rgba(79, 227, 154, 0.2); }
.wq.is-live .wq__v > .num { color: var(--green-400); }
.wq__rows { padding: var(--s-2) var(--s-4) var(--s-3); border-top: 1px dashed var(--line-strong); display: flex; flex-direction: column; gap: 6px; }
.wq__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-xs); font-weight: 650; color: var(--text-3); }
.wq__row > .num { color: var(--text-2); font-weight: 750; text-align: right; }
.wq__sub { color: var(--text-3); font-weight: 650; margin-left: 2px; }

.wdform__foot { display: flex; align-items: flex-start; gap: var(--s-2); margin-top: calc(var(--s-1) * -1); color: var(--text-3); font-size: var(--fs-xs); font-weight: 600; line-height: 1.45; }

/* ---------- my requests ---------- */
.pg--wallet .section-head { margin: var(--s-6) var(--s-1) var(--s-3); }
.wlist { display: flex; flex-direction: column; gap: var(--s-2); }
.wreq {
  padding: var(--s-3) var(--s-4) var(--s-3) var(--s-3);
  border-radius: var(--r-xl);
  background: var(--surface-1);
  border: 1px solid var(--line); border-top-color: var(--line-top);
  box-shadow: var(--hl-top), var(--shadow-1);
}
.wreq__top { display: flex; align-items: center; gap: var(--s-3); }
.wreq__top .grow { display: flex; flex-direction: column; gap: 3px; }
.wreq__title { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-md); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wreq__sub { display: flex; align-items: center; color: var(--text-3); font-size: var(--fs-2xs); font-weight: 700; white-space: nowrap; min-width: 0; overflow: hidden; }
.wreq__sub .hrow__dot { margin: 0 5px; }
.wreq__badge { flex: none; align-self: flex-start; margin-top: 2px; height: 22px; font-size: var(--fs-2xs); }
.wreq__rows {
  margin: var(--s-3) 0 0 calc(38px + var(--s-3)); padding: var(--s-2) 0 0;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.wreq__rows > div, .wconf__list > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.wreq__rows dt { color: var(--text-3); font-size: var(--fs-xs); font-weight: 650; }
.wreq__rows dd { margin: 0; color: var(--text-2); font-size: var(--fs-xs); font-weight: 750; text-align: right; min-width: 0; }
.wreq__addr { font-size: 12px; word-break: normal; white-space: nowrap; }
.wreq__note {
  display: flex; align-items: flex-start; gap: var(--s-2);
  margin: var(--s-2) 0 0 calc(38px + var(--s-3)); padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm); background: var(--bg-0); border: 1px solid var(--line);
}
.wreq__note > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wreq__note b { font-size: var(--fs-2xs); font-weight: 800; color: var(--text-3); letter-spacing: 0.02em; }
.wreq__note span { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); line-height: 1.4; overflow-wrap: anywhere; }
.wreq__note--admin { border-color: rgba(160, 139, 255, 0.18); background: rgba(132, 104, 246, 0.06); }
.wreq__note--admin > .ic, .wreq__note--admin b { color: var(--violet-300); }
.wreq__foot {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--s-3);
  margin: var(--s-3) 0 0 calc(38px + var(--s-3));
}
.wreq--pending { border-color: rgba(255, 203, 71, 0.16); border-top-color: rgba(255, 224, 138, 0.24); }
.wreq--cancelled .wreq__title, .wreq--rejected .wreq__title { color: var(--text-3); }
.wreq--cancelled .cmark, .wreq--rejected .cmark { filter: saturate(0.4) brightness(0.8); }

/* ---------- sheets: confirm / submitted / cancel ---------- */
.wconf__hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--s-1) 0 var(--s-4); }
.wconf__k { margin-top: var(--s-3); color: var(--text-2); font-size: var(--fs-sm); font-weight: 650; }
.wconf__v { margin-top: 2px; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-3xl); letter-spacing: -0.03em; line-height: 1.1; }
.wconf__v .num { color: var(--green-400); }
.wconf__net { margin-top: 6px; color: var(--text-3); font-size: var(--fs-xs); font-weight: 700; }
.wconf__list {
  margin: 0; padding: var(--s-1) var(--s-4);
  border-radius: var(--r-lg); background: var(--bg-0); border: 1px solid var(--line);
}
.wconf__list > div { padding: 10px 0; }
.wconf__list > div + div { border-top: 1px solid var(--line); }
.wconf__list dt { flex: none; color: var(--text-3); font-size: var(--fs-sm); font-weight: 650; }
.wconf__list dd { margin: 0; min-width: 0; text-align: right; font-size: var(--fs-sm); font-weight: 750; }
.wconf__list dd small { display: block; margin-top: 1px; color: var(--text-3); font-size: var(--fs-xs); font-weight: 650; }
.wconf__addr { flex-direction: column; align-items: stretch !important; gap: 6px !important; }
.wconf__addr dd { text-align: left; font-size: 13px; line-height: 1.5; color: var(--text); font-weight: 500; }
.wconf__memo { overflow-wrap: anywhere; }
.wconf__warn {
  display: flex; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-3);
  color: var(--gold-300); font-size: var(--fs-xs); font-weight: 650; line-height: 1.4;
}
.wconf__warn .ic { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--gold-400); }
.wdone { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--s-4) var(--s-2) var(--s-1); }
.wdone__art { margin-bottom: var(--s-5); }
.wdone__title { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; }
.wdone__text { margin-top: var(--s-2); max-width: 32ch; color: var(--text-2); font-size: var(--fs-sm); line-height: var(--lh-body); }
.wdone__text b { color: var(--text); font-weight: 800; white-space: nowrap; }
.wcancel { display: flex; flex-direction: column; gap: var(--s-4); }
.wcancel__text { color: var(--text-2); font-size: var(--fs-sm); line-height: var(--lh-body); }
.wcancel__text b { color: var(--text); font-weight: 800; }
.wcancel .wdin__area { font-family: var(--font-text); font-size: var(--fs-md); font-weight: 600; min-height: 84px; }

/* =========================================================================
   HISTORY
   ========================================================================= */
.hfilter { margin-bottom: var(--s-4); }
.hfilter .seg__item { height: 36px; }

.sk--gap { margin-top: var(--s-3); }

/* day groups: inset grouped list */
.hgroup + .hgroup { margin-top: var(--s-5); }
.hgroup__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); padding: 0 var(--s-1) var(--s-2); }
.hgroup__title { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 650; letter-spacing: -0.005em; color: var(--text); }
.hgroup__title::first-letter { text-transform: uppercase; }
.hgroup__net { font-size: var(--fs-xs); font-weight: 800; }
.hgroup__list {
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--line); border-top-color: var(--line-top);
  box-shadow: var(--hl-top), var(--shadow-1);
}
.hrow {
  position: relative; display: flex; align-items: center; gap: var(--s-3);
  min-height: 64px; padding: var(--s-3) var(--s-4);
}
.hrow + .hrow::before { content: ''; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line); }
.hrow[data-go] { cursor: pointer; }
.hrow.is-pressed { transform: none; filter: none; background: rgba(255, 255, 255, 0.035); }
.hrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hrow__title { font-weight: 750; font-size: var(--fs-md); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow__sub { display: flex; align-items: center; gap: 0; color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; min-width: 0; }
.hrow__sub b { font-weight: 800; margin-left: 4px; }
.hrow__sub b:not(.t-pos) { color: var(--text); }
.hrow__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); margin: 0 6px; flex: none; }
.hrow__badge { height: 18px; padding: 0 6px; font-size: var(--fs-2xs); }
.hrow__trail { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.hrow__trail .amt { font-size: var(--fs-md); }
.hrow__tsub { color: var(--text-3); font-size: var(--fs-2xs); font-weight: 700; white-space: nowrap; }
.hrow.is-muted .hrow__title, .hrow.is-muted .amt { color: var(--text-3); }
.amt.is-struck .num { text-decoration: line-through; text-decoration-thickness: 1px; }
.hrow .tile--violet { --tile-c: var(--violet-300); }

.hnone {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  padding: var(--s-8) var(--s-4); color: var(--text-3); font-size: var(--fs-sm); font-weight: 650;
  border: 1px dashed var(--line-strong); border-radius: var(--r-xl);
}
.hnone .ic { width: 28px; height: 28px; }
.hnone .btn { margin-top: var(--s-2); }
.hnone .btn .ic { width: 17px; height: 17px; }
.hrow__title .hrow__dot { display: inline-block; vertical-align: middle; margin: 0 7px; background: var(--text-3); }
.hrow__stars { display: inline-flex; align-items: center; gap: 3px; vertical-align: -2px; color: var(--gold-300); }
.hrow__stars .ic { width: 15px; height: 15px; color: var(--gold-400); --ic-fill: 1; }
.hrow .tile--gold .ic { --ic-fill: 0.35; }

/* =========================================================================
   TOP (leaderboard)
   ========================================================================= */
.podium {
  position: relative;
  display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: var(--s-2);
  padding-top: var(--s-6);
  margin-bottom: var(--s-4);
}
.podium__col { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.podium__who {
  display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0;
  padding-bottom: var(--s-3);
  animation: pop var(--dur-slow) var(--ease-spring) both;
}
.podium__col--2 .podium__who { animation-delay: 260ms; }
.podium__col--1 .podium__who { animation-delay: 380ms; }
.podium__col--3 .podium__who { animation-delay: 320ms; }
.podium__av { position: relative; margin-bottom: var(--s-2); }
.podium__av .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ring, #c9d0de), 0 10px 24px -6px rgba(0, 0, 0, 0.6); }
.podium__col--1 { --ring: #ffcb47; }
.podium__col--2 { --ring: #cfd6e4; }
.podium__col--3 { --ring: #e09a68; }
.podium__crown {
  position: absolute; left: 50%; top: -34px; width: 54px; height: auto; z-index: 2;
  transform: translateX(-50%) rotate(-8deg);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
}
.podium__name { max-width: 100%; font-weight: 750; font-size: var(--fs-sm); text-align: center; padding: 0 2px; }
.podium__col--1 .podium__name { font-size: var(--fs-md); }
.podium__amt { margin-top: 2px; }
.podium__amt .amt { font-size: var(--fs-sm); }

.podium__step {
  position: relative; width: 100%;
  height: var(--step-h, 64px);
  display: grid; place-items: start center; padding-top: var(--s-3);
  border-radius: var(--r-lg) var(--r-lg) var(--r-xs) var(--r-xs);
  background:
    linear-gradient(180deg, var(--step-tint, rgba(255, 255, 255, 0.05)), transparent 75%),
    linear-gradient(180deg, #26262b, #1a1a1d);
  border: 1px solid var(--line); border-top-color: var(--step-top, var(--line-top));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 24px -12px rgba(0, 0, 0, 0.6);
  transform-origin: 50% 100%;
  animation: step-grow 560ms var(--ease-standard) both;
}
.podium__step::after {
  /* fade the pedestal into the page */
  content: ''; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 40%;
  background: linear-gradient(180deg, transparent, var(--bg)); border-radius: inherit; pointer-events: none;
}
@keyframes step-grow { from { transform: scaleY(0.2); opacity: 0; } }
.podium__col--1 .podium__step { --step-h: 92px; --step-tint: rgba(255, 203, 71, 0.13); --step-top: rgba(255, 224, 138, 0.35); animation-delay: 120ms; }
.podium__col--2 .podium__step { --step-h: 70px; --step-tint: rgba(207, 214, 228, 0.09); --step-top: rgba(225, 230, 240, 0.25); }
.podium__col--3 .podium__step { --step-h: 56px; --step-tint: rgba(224, 154, 104, 0.1); --step-top: rgba(240, 180, 140, 0.25); animation-delay: 60ms; }
.podium__rank {
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-2xl); line-height: 1;
  background: linear-gradient(180deg, #fff, var(--ring)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.podium__col--1 .podium__rank { font-size: var(--fs-3xl); }
.podium__col.is-me .podium__name { color: var(--violet-300); }
.podium__free {
  width: 60px; height: 60px; border-radius: 50%; margin-bottom: var(--s-2);
  border: 1.5px dashed var(--line-strong); background: rgba(255, 255, 255, 0.02);
}
.podium__col--1 .podium__free { width: 76px; height: 76px; }
.podium__col.is-free { --ring: #55555e; }
.podium--sk .podium__who { animation: none; }
.podium--sk .podium__who > .sk:first-child { border-radius: 50% !important; }

/* ranked list */
.tlist {
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--line); border-top-color: var(--line-top);
  box-shadow: var(--hl-top), var(--shadow-1);
}
.trow { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-2) var(--s-4) var(--s-2) var(--s-3); }
.trow + .trow::before { content: ''; position: absolute; top: 0; left: 88px; right: 0; height: 1px; background: var(--line); }
.trow__rank { width: 24px; flex: none; text-align: center; font-family: var(--font-display); font-weight: 650; font-size: var(--fs-sm); color: var(--text-3); }
.trow__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-2); }
.trow__name { font-weight: 700; font-size: var(--fs-md); }
.trow .amt { font-size: var(--fs-sm); }
.trow.is-me { background: linear-gradient(90deg, rgba(132, 104, 246, 0.14), rgba(132, 104, 246, 0.04)); }
.trow.is-me .trow__rank { color: var(--violet-300); }

/* "you" card, sticks above the tab bar */
.tme {
  position: sticky; bottom: var(--s-2); z-index: 2;
  display: flex; align-items: center; gap: var(--s-3);
  margin-top: var(--s-4); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
  border-radius: var(--r-xl);
  background: rgba(38, 32, 66, 0.92);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(160, 139, 255, 0.24); border-top-color: rgba(195, 181, 255, 0.34);
  box-shadow: var(--hl-top), var(--shadow-3);
}
.tme__rank { font-family: var(--font-display); font-weight: 750; font-size: var(--fs-md); color: var(--violet-300); min-width: 20px; text-align: center; }
.tme__main { flex: 1; min-width: 0; }
.tme__title { font-weight: 750; font-size: var(--fs-sm); }
.tme--out { background: rgba(30, 30, 34, 0.92); border-color: var(--line-strong); border-top-color: rgba(255, 255, 255, 0.14); }

/* =========================================================================
   INVITE
   ========================================================================= */
.pg__stack > * + * { margin-top: var(--s-3); }
.ihero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--s-5) var(--s-5) var(--s-5);
  border-radius: var(--r-2xl);
  background:
    radial-gradient(70% 45% at 50% 22%, rgba(255, 210, 110, 0.2), rgba(255, 210, 110, 0) 70%),
    radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 55%),
    linear-gradient(170deg, #5639cc 0%, #3b229f 48%, #22125e 100%);
  border: 1px solid rgba(195, 181, 255, 0.28); border-top-color: rgba(230, 222, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 48px -20px rgba(109, 80, 232, 0.7);
}
.ihero > * { position: relative; z-index: 1; }
.ihero__art { width: 232px; height: auto; margin: -4px 0 var(--s-1); filter: drop-shadow(0 18px 22px rgba(20, 8, 70, 0.45)); }
.ihero__title {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); line-height: var(--lh-snug); letter-spacing: -0.02em;
  color: #fff; text-wrap: balance;
}
.ihero__text { margin-top: var(--s-2); max-width: 32ch; color: rgba(240, 236, 255, 0.78); font-size: var(--fs-sm); line-height: var(--lh-body); text-wrap: pretty; }
.ihero__note { margin-top: var(--s-4); color: rgba(240, 236, 255, 0.7); font-size: var(--fs-xs); font-weight: 700; }
.ihero__link {
  width: 100%; display: flex; align-items: center; gap: var(--s-1);
  margin: var(--s-5) 0 var(--s-3); padding: 0 var(--s-1) 0 var(--s-4); height: 48px;
  border-radius: var(--r-md);
  background: rgba(14, 6, 48, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}
.ihero__url { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-2); color: #fff; font-weight: 700; font-size: var(--fs-sm); text-align: left; }
.ihero__url .ic { width: 16px; height: 16px; color: var(--violet-300); }
.ihero__copy { --ib: 40px; color: rgba(255, 255, 255, 0.85); }
.ihero__copy.is-done { color: var(--green-400); }
.btn--light {
  color: #2a1873;
  background: linear-gradient(180deg, #ffffff, #ece8ff);
  box-shadow: inset 0 -2px 0 rgba(42, 24, 115, 0.1), 0 8px 20px -8px rgba(20, 8, 70, 0.7), 0 2px 4px rgba(20, 8, 70, 0.3);
}
.btn--light .ic { --ic-fill: 0.18; }

/* stats */
.istats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.istat {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-4); border-radius: var(--r-xl);
  background: var(--surface-1);
  border: 1px solid var(--line); border-top-color: var(--line-top);
  box-shadow: var(--hl-top);
}
.istat__k { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-xs); font-weight: 750; }
.istat__v { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); letter-spacing: -0.02em; color: var(--text-3); }
.istat__v .amt { color: var(--text-3); }
.istat__v .coin { filter: grayscale(0.6) brightness(0.8); }

.wcard__bal[data-len='l'] { font-size: var(--fs-3xl); }
.wcard__bal[data-len='xl'] { font-size: var(--fs-2xl); }

/* sticky day headers (stick just under the topbar) */
.pg--history .hgroup__head {
  position: sticky; top: calc(var(--s-2) * -1); z-index: 2;
  margin: 0 calc(var(--gutter) * -1); padding: var(--s-3) calc(var(--gutter) + var(--s-1)) var(--s-2);
  transition: background-color var(--dur-fast) var(--ease-standard);
}
.pg--history .hgroup__head.is-stuck { background-color: rgba(21, 21, 23, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pg--history .hgroup__head::after { opacity: 0; transition: opacity var(--dur-fast); }
.pg--history .hgroup__head.is-stuck::after { opacity: 1; }
.pg--history .hgroup__head::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; pointer-events: none;
  background: linear-gradient(180deg, rgba(21, 21, 23, 0.7), rgba(21, 21, 23, 0));
}
.pg--history .hgroup + .hgroup { margin-top: var(--s-3); }

/* invite: gift stage */
.ihero__stage { position: relative; width: 100%; height: 178px; display: grid; place-items: center; margin-top: -4px; }
.ihero__stage .ihero__art { position: relative; z-index: 1; margin: 0; }

.istat__unit { margin-left: 6px; font-family: var(--font-text); font-size: var(--fs-sm); font-weight: 700; color: var(--text-3); letter-spacing: 0; }
.istats.is-live .istat__v,
.istats.is-live .istat__v .amt { color: var(--text); }
.istats.is-live .istat__v .coin { filter: none; }
