/* ============================================================= *
 *  VertixaTrade — terminal theme
 *  Dark trading UI · teal accent · mono numerics
 * ============================================================= */

:root {
  --bg-0: #0a0e13;
  --bg-1: #10151c;
  --bg-2: #151c25;
  --bg-3: #1b232e;
  --border: #232d39;
  --border-2: #2c3846;
  --text: #e7edf3;
  --muted: #7e8a99;
  --muted-2: #5c6673;

  --up: #2A94F3;
  --up-dim: rgba(42, 148, 243, 0.14);
  --down: #f6465d;
  --down-dim: rgba(246, 70, 93, 0.14);
  --accent: #2A94F3;
  --accent-2: #1878d6;
  --accent-dim: rgba(42, 148, 243, 0.14);
  --warn: #f0b90b;
  --warn-soft: #ffcf5a;

  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 12px;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  color-scheme: dark;
}

/* ---------- light theme (opt-in via Settings → Appearance) ---------- */
:root[data-theme="light"] {
  --bg-0: #eceff4;
  --bg-1: #ffffff;
  --bg-2: #f1f4f8;
  --bg-3: #e4e9f0;
  --border: #e1e6ee;
  --border-2: #cbd3df;
  --text: #0f1720;
  --muted: #5a6675;
  --muted-2: #8a95a4;

  --up: #1f7fe0;
  --up-dim: rgba(31, 127, 224, 0.12);
  --down: #e23a52;
  --down-dim: rgba(226, 58, 82, 0.12);
  --accent: #1f7fe0;
  --accent-2: #1568c0;
  --accent-dim: rgba(31, 127, 224, 0.12);
  --warn: #9a6b00;
  --warn-soft: #8a5a00;

  --shadow: 0 14px 40px rgba(23, 37, 60, 0.16);
  color-scheme: light;
}
:root[data-theme="light"] body {
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(31, 127, 224, 0.07), transparent 60%),
    radial-gradient(820px 460px at -10% 112%, rgba(31, 127, 224, 0.05), transparent 55%),
    var(--bg-0);
}
:root[data-theme="light"] .btn--primary,
:root[data-theme="light"] .btn--deposit { color: #ffffff; }
:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #aeb8c6; background-clip: padding-box; }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(42, 148, 243, 0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(18, 130, 209, 0.05), transparent 55%),
    var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
.is-hidden { display: none !important; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* thin, subtle scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3d4a5a; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; user-select: none; }
.brand__mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #5ab6ff);
  box-shadow: 0 0 18px rgba(42, 148, 243, 0.5);
  position: relative;
}
.brand__mark::after {
  content: ""; position: absolute; inset: 6px 6px auto 6px; height: 3px;
  border-radius: 2px; background: #052038;
  box-shadow: 0 5px 0 rgba(6, 35, 27, 0.55);
}
.brand__name { font-weight: 800; letter-spacing: -0.02em; font-size: 17px; }
.brand__name span { color: var(--accent); }
.brand__logo { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; display: block; }
.brand--lg .brand__mark { width: 34px; height: 34px; border-radius: 10px; }
.brand--lg .brand__logo { width: 38px; height: 38px; border-radius: 9px; }
.brand--lg .brand__name { font-size: 24px; }

/* animated word-flip logo (Clash Display) */
.brand__name { font-family: 'Clash Display', var(--font); font-weight: 700; }
.brand .flip { display: inline-block; height: 1.2em; overflow: hidden; vertical-align: bottom; color: var(--accent); }
.brand .flip ul { margin: 0; padding: 0; list-style: none; animation: flipwords 9s infinite; }
.brand .flip li { height: 1.2em; line-height: 1.2em; }
@keyframes flipwords {
  0%,18%{transform:translateY(0);} 22%,40%{transform:translateY(-1.2em);}
  44%,62%{transform:translateY(-2.4em);} 66%,84%{transform:translateY(-3.6em);}
  88%,100%{transform:translateY(-4.8em);}
}

/* ---------- buttons ---------- */
.btn {
  border-radius: 9px; font-weight: 700; font-size: 13px;
  padding: 10px 16px; transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--block { width: 100%; }
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04233f; }
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--deposit { background: var(--accent); color: #04233f; padding: 9px 18px; }
.btn--deposit:hover { filter: brightness(1.06); }
.btn--reset { background: transparent; border: 1px solid var(--border-2); color: var(--muted); padding: 6px 10px; font-size: 11px; }
.btn--reset:hover { color: var(--text); border-color: var(--muted); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 9px; background: var(--bg-2);
  border: 1px solid var(--border); color: var(--muted); font-size: 16px;
}
.icon-btn:hover { color: var(--down); border-color: var(--down); }

/* ============================================================= *
 *  Auth
 * ============================================================= */
.auth-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background:
    radial-gradient(1000px 500px at 50% -5%, rgba(42, 148, 243, 0.10), transparent 60%),
    var(--bg-0);
}
.auth-card {
  width: 380px; max-width: calc(100vw - 40px);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border); border-radius: 18px;
  padding: 30px 28px; box-shadow: var(--shadow);
}
.auth-card .brand { justify-content: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.auth-tabs { display: flex; background: var(--bg-0); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 9px; border-radius: 7px; font-weight: 700; font-size: 13px; color: var(--muted); }
.auth-tab.is-active { background: var(--bg-3); color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; color: var(--muted); font-weight: 600; }
.field input {
  background: var(--bg-0); border: 1px solid var(--border-2); border-radius: 9px;
  padding: 12px 13px; color: var(--text); font-size: 14px; outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.field[data-only="register"] { display: none; }
.auth-form.mode-register .field[data-only="register"] { display: flex; }
.auth-error { color: var(--down); font-size: 12.5px; min-height: 16px; margin: -4px 0 0; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 12px; margin: 18px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-foot { width: 380px; max-width: calc(100vw - 40px); color: var(--muted-2); font-size: 12px; text-align: center; line-height: 1.5; }
/* multi-step auth (email verification + password reset) */
.auth-step__title { margin: 2px 0 7px; font-size: 18px; font-weight: 800; color: var(--text); text-align: center; }
.auth-step__sub { margin: 0 auto 18px; max-width: 300px; font-size: 13.5px; line-height: 1.6; color: var(--muted); text-align: center; }
.auth-step__sub b { color: var(--text); font-weight: 700; }
.auth-alt { margin-top: 15px; text-align: center; font-size: 13px; color: var(--muted-2); }
.auth-alt[data-only] { margin-top: 12px; }
.auth-form.mode-register ~ .auth-alt[data-only="login"] { display: none; }   /* "Forgot password?" shows on the login tab only */
.auth-link { background: none; border: none; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; padding: 3px 4px; }
.auth-link:hover { text-decoration: underline; }
/* register-only terms acknowledgement */
.auth-terms { display: none; margin: 2px auto 2px; max-width: 300px; font-size: 11.5px; line-height: 1.55; color: var(--muted-2); text-align: center; }
.auth-form.mode-register .auth-terms { display: block; }
.auth-terms a { color: var(--accent); font-weight: 600; }
.auth-terms a:hover { text-decoration: underline; }
.code-input { text-align: center; letter-spacing: 10px; font-family: var(--mono); font-size: 22px !important; font-weight: 700; }
.code-input::placeholder { letter-spacing: 8px; }

/* ============================================================= *
 *  App shell
 * ============================================================= */
.app { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- top bar ---------- */
.topbar {
  height: 58px; flex: 0 0 58px;
  display: flex; align-items: center; gap: 18px;
  padding: 0 16px; background: var(--bg-1); border-bottom: 1px solid var(--border);
  z-index: 10;
}
.topbar__left { flex: 0 0 auto; }
.topbar__actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.topbar .wallet { margin-left: auto; }   /* push wallet + actions to the right on desktop */

.atab {
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
  padding: 7px 13px; border-radius: 9px; background: var(--bg-2);
  border: 1px solid transparent; min-width: 96px; transition: border-color .15s, background .15s;
}
.atab:hover { background: var(--bg-3); }
.atab.is-active { border-color: var(--accent); background: var(--bg-3); }
.atab__row { display: flex; align-items: center; gap: 8px; width: 100%; justify-content: space-between; }
.atab__name { font-weight: 700; font-size: 12.5px; }
.atab__payout { font-size: 10.5px; color: var(--accent); font-weight: 700; }
.atab__price { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.atab__price.up { color: var(--up); }
.atab__price.down { color: var(--down); }

.wallet { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; }
.wallet__meta { display: flex; flex-direction: column; line-height: 1.15; }
.wallet__label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.wallet__value { font-family: var(--mono); font-weight: 700; font-size: 15px; }

/* ---------- workspace ---------- */
.workspace { flex: 1 1 auto; display: flex; min-height: 62vh; }

/* Hover-expanding overlay sidebar.
   The rail keeps a FIXED 60px in-flow footprint; the panel is absolutely
   positioned and grows to 250px ON TOP of the chart, so hover never reflows. */
.rail {
  flex: 0 0 60px;            /* fixed in-flow width — never changes on hover */
  position: relative;
  z-index: 5;
  background: transparent;   /* the panel paints the actual surface */
}
.rail__panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 60px;               /* collapsed */
  overflow: hidden;          /* clips the labels while collapsed */
  display: flex; flex-direction: column;
  padding: 14px 0;
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: width .2s cubic-bezier(.4,0,.2,1),
              box-shadow .2s ease,
              border-color .2s ease;
  z-index: 50;
}
.rail:hover .rail__panel,
.rail:focus-within .rail__panel {
  width: 250px;              /* expanded overlay */
  box-shadow: 8px 0 30px -8px rgba(0,0,0,.6);
  border-right-color: var(--border-2);
}

/* Brand header */
.rail__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 19px 16px;
}
.rail__logo {
  flex: 0 0 26px; width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent); color: #fff;
}
.rail__logo svg { width: 16px; height: 16px; display: block; }
.rail__brandtext {
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text); white-space: nowrap;
  opacity: 0; transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}

/* Nav */
.rail__nav { display: flex; flex-direction: column; gap: 8px; }
.rail__item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 19px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--muted); text-align: left; white-space: nowrap;
  transition: background .15s, color .15s;
}
.rail__item:hover { background: var(--bg-3); color: var(--text); }
.rail__item.is-active { background: var(--accent-dim); color: var(--accent); }
.rail__item.is-active:hover { color: var(--accent); }
.rail__item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.rail__icon {
  flex: 0 0 22px; width: 22px; height: 22px;
  display: grid; place-items: center;
}
.rail__icon svg { width: 22px; height: 22px; display: block; }

.rail__label {
  font-size: 14px; font-weight: 500; line-height: 1;
  white-space: nowrap;
  opacity: 0; transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.rail:hover .rail__brandtext,
.rail:focus-within .rail__brandtext,
.rail:hover .rail__label,
.rail:focus-within .rail__label { opacity: 1; transform: none; }

/* Footer profile — pinned to the bottom */
.rail__profile {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}
.rail__av {
  flex: 0 0 28px; width: 28px; height: 28px;
  font-size: 12px; margin: 0 -3px;   /* keep the 22px icon column visually aligned */
}

/* ---------- chart ---------- */
.chart-area { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg-0); }
.chart-head { display: flex; align-items: center; gap: 20px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.chart-asset { display: flex; align-items: center; gap: 10px; }
.chart-asset__name { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.chart-asset__payout { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-dim); padding: 3px 8px; border-radius: 6px; }
.chart-price { display: flex; align-items: baseline; gap: 10px; }
.chart-price > span:first-child { font-family: var(--mono); font-size: 20px; font-weight: 700; }
.chart-price__chg { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted); }
.chart-price__chg.up { color: var(--up); }
.chart-price__chg.down { color: var(--down); }
.chart-asset__icon { display: inline-grid; place-items: center; }
.chart-asset__icon .tok { width: 30px; height: 30px; border-radius: 50%; font-size: 13px; }
.chart-asset__meta { display: flex; align-items: center; gap: 8px; }

/* asset logos (inline SVG, clipped round) */
.alogo { display: inline-block; line-height: 0; border-radius: 50%; overflow: hidden; background: var(--bg-2); }
.alogo svg { display: block; width: 100%; height: 100%; }
.alogo__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chart-asset__icon .alogo { width: 30px; height: 30px; }

/* ---------- asset dropdown (searchable symbol picker) ---------- */
.chart-asset-wrap { position: relative; }
.chart-asset {
  cursor: pointer; padding: 5px 9px 5px 7px; border-radius: 10px;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.chart-asset:hover { background: var(--bg-2); border-color: var(--border); }
.chart-asset[aria-expanded="true"] { background: var(--bg-2); border-color: var(--accent); }
.chart-asset__chev { width: 15px; height: 15px; color: var(--muted); transition: transform .18s ease; flex: 0 0 auto; }
.chart-asset[aria-expanded="true"] .chart-asset__chev { transform: rotate(180deg); color: var(--accent); }

.asset-dd {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  width: 340px; max-width: min(340px, calc(100vw - 24px));
  background: var(--bg-1); border: 1px solid var(--border-2); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  animation: ddIn .14s ease;
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.asset-dd__search {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.asset-dd__search svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 auto; }
.asset-dd__search input {
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font-size: 13.5px; font-weight: 600;
}
.asset-dd__search input::placeholder { color: var(--muted-2); font-weight: 500; }
.asset-dd__list { max-height: 340px; overflow-y: auto; padding: 6px; }
.dd-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 9px; text-align: left; transition: background .12s;
}
.dd-row:hover { background: var(--bg-2); }
.dd-row.is-active { background: var(--accent-dim); }
.dd-row__star { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; cursor: pointer; }
.dd-row__star:hover { background: var(--bg-3); }
.dd-row__star .star-ic { width: 15px; height: 15px; fill: none; stroke: var(--muted-2); stroke-width: 1.6; stroke-linejoin: round; transition: .12s; }
.dd-row__star:hover .star-ic { stroke: #f5b301; }
.dd-row__star.is-fav .star-ic { fill: #f5b301; stroke: #f5b301; }
.dd-row__logo { flex: 0 0 auto; }
.dd-row__logo .alogo { width: 24px; height: 24px; }
.dd-row__sym { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; }
.dd-row__sym b { font-weight: 800; color: var(--text); }
.dd-row__q { color: var(--muted); font-weight: 600; }
.dd-row__price { font-size: 12.5px; color: var(--text); text-align: right; transition: color .2s; }
.dd-row__price.up { color: var(--up); }
.dd-row__price.down { color: var(--down); }
.dd-row__chg {
  flex: 0 0 auto; min-width: 58px; text-align: right;
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--muted);
}
.dd-row__chg.up { color: var(--up); }
.dd-row__chg.down { color: var(--down); }
.dd-empty { padding: 22px; text-align: center; color: var(--muted-2); font-size: 13px; }
.chart-stats { display: flex; gap: 20px; }
.cstat { display: flex; flex-direction: column; line-height: 1.25; }
.cstat span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.cstat b { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.chart-round { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.chart-round span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.chart-round b { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--accent); }
.chart-toggle { margin-left: auto; display: flex; background: var(--bg-2); border-radius: 8px; padding: 3px; }
@media (max-width: 720px) { .chart-stats { display: none; } .chart-round { margin-left: auto; } }
.chart-toggle button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.chart-toggle button svg { width: 15px; height: 15px; display: block; }
.chart-toggle button.is-active { background: var(--bg-3); color: var(--text); }

/* ---------- timeframe strip (Tick / 5s … 1d) + chart settings gear ---------- */
.chart-tf { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--bg-0); }
/* period selector: a centered segmented control (30s / 1m / 3m / 5m) */
.tf-list { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 3px; }
/* Round countdown hosted in the timeframe strip (replaced the duplicate 30s/1m selector).
   The wrapper always occupies the row so the help/gear buttons don't shift when the bar hides. */
.tf-round { display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; padding: 3px;
  min-height: 36px; }   /* 30px bar + 2x3px padding (border-box): keeps the strip 53px tall when the bar is hidden (Auto-Trade), so the chart top edge never jumps */
.chart-tf .hl-period { margin: 0; height: 30px; padding: 0 14px; border-radius: 8px; font-size: 12.5px; }
.tf-list::-webkit-scrollbar { display: none; }
.tf-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 54px; height: 30px; padding: 0 14px; border-radius: 8px; font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; line-height: 1; color: var(--muted); transition: color .12s, background .12s, box-shadow .12s; }
.tf-btn:hover { color: var(--text); background: var(--bg-2); }
.tf-btn.is-active { color: #fff; background: var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .28); }
.tf-sep { flex: 0 0 auto; width: 1px; height: 18px; background: var(--border); margin: 0 2px; }

.tf-gear-wrap { position: relative; flex: 0 0 auto; }
.tf-gear { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; color: var(--muted); transition: color .12s, background .12s; }
.tf-gear:hover, .tf-gear.is-open { color: var(--text); background: var(--bg-2); }
.tf-gear svg { width: 16px; height: 16px; display: block; }

.tf-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 262px; padding: 8px; background: var(--bg-1); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 18px 44px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 2px; }
.tf-menu.is-hidden { display: none; }
.tf-check { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; cursor: pointer; user-select: none; }
.tf-check:hover { background: var(--bg-2); }
.tf-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.tf-box { flex: 0 0 auto; width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--border-2); background: var(--bg-3); position: relative; transition: background .12s, border-color .12s; }
.tf-check input:checked + .tf-box { background: var(--up); border-color: var(--up); }
.tf-box::after { content: ""; position: absolute; left: 6px; top: 2.5px; width: 4.5px; height: 9px; border: solid #042038; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .12s; }
.tf-check input:checked + .tf-box::after { transform: rotate(45deg) scale(1); }
.tf-check__label { font-size: 13px; font-weight: 600; color: var(--text); }
.tf-check input:focus-visible + .tf-box { outline: 2px solid var(--accent); outline-offset: 2px; }

.chart-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chart { flex: 1; min-height: 0; }

/* ---------- community sentiment gauge (above the Up/Down buttons) ---------- */
.chart-sentiment {
  display: flex; align-items: center; gap: 10px; padding: 7px 13px; margin-top: auto;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px;
  font-family: var(--mono); pointer-events: none;
}
.cs-label { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.cs-label b { font-size: 13px; letter-spacing: -.01em; }
.cs-label svg { width: 12px; height: 12px; display: block; }
.cs-up { color: var(--up); }
.cs-down { color: var(--down); }
.cs-bar { position: relative; flex: 1 1 auto; min-width: 40px; height: 7px; border-radius: 999px; background: var(--down); overflow: hidden; }
.cs-bar__up { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: var(--up); transition: width .6s cubic-bezier(.4, 0, .2, 1); }

/* ---------- ticket ---------- */
.ticket {
  flex: 0 0 300px; background: var(--bg-1); border-left: 1px solid var(--border);
  padding: 14px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto;
}
/* Up Down uses no last-trades tape → give its ticket (VS board) more room, extending left into the chart (desktop only; mobile stacking below is untouched) */
@media (min-width: 1025px) { .ticket.is-udwide { flex-basis: 440px; } }
.ticket__tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); }
.ticket__tab { padding: 4px 0 12px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ticket__tab.is-active { color: var(--text); border-bottom-color: var(--up); }
.ticket__pane { display: flex; flex-direction: column; gap: 16px; flex: 1; min-height: 0; }
.ticket__group { display: flex; flex-direction: column; gap: 9px; }
.ticket__label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ticket__label .cur-lbl { color: var(--accent); }
.amount-usd { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--text); opacity: .78; white-space: nowrap; }

/* time grid with per-expiry payouts */
.time-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.time-grid button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); transition: .12s; }
.time-grid button b { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); }
.time-grid button .tp { font-size: 11px; font-weight: 700; color: var(--up); }
.time-grid button:hover { border-color: var(--border-2); }
.time-grid button.is-active { background: var(--bg-3); border-color: var(--up); }

/* amount field with 1/2 & 2x */
.amount-field { display: flex; align-items: center; gap: 8px; background: var(--bg-0); border: 1px solid var(--border-2); border-radius: 11px; padding: 6px 8px 6px 14px; }
.amount-cur { color: var(--muted); font-family: var(--mono); font-size: 16px; }
.amount-field input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-family: var(--mono); font-weight: 700; font-size: 20px; -moz-appearance: textfield; }
.amount-field input::-webkit-outer-spin-button, .amount-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-quick { display: flex; gap: 6px; }
.amount-quick button { padding: 7px 11px; border-radius: 8px; background: var(--bg-3); color: var(--muted); font-weight: 700; font-size: 12px; font-family: var(--mono); transition: .12s; }
.amount-quick button:hover { background: var(--border-2); color: var(--text); }

/* payout box */
.payout-box { display: flex; align-items: center; justify-content: space-between; background: var(--up-dim); border: 1px solid rgba(42, 148, 243, 0.25); border-radius: 11px; padding: 12px 14px; }
.payout-profit { font-family: var(--mono); font-weight: 700; font-size: 18px; color: var(--up); }
.payout-meta { font-family: var(--mono); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.payout-meta b { color: var(--text); font-weight: 700; }
.payout-meta i { color: var(--border-2); font-style: normal; }
.payout-meta span { color: var(--up); font-weight: 700; }

/* angled Up / Down split */
.trade-split { display: flex; height: 56px; border-radius: 13px; overflow: hidden; margin-top: auto; }
.trade-split .trade-btn { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 16px; border: none; box-shadow: none; border-radius: 0; cursor: pointer; transition: filter .15s; }
.trade-split .trade-btn:active { transform: none; }
.trade-split .trade-btn:hover { filter: brightness(1.07); }
.trade-split .trade-btn svg { width: 20px; height: 20px; }
.trade-split .trade-btn--up { background: linear-gradient(135deg, var(--up), #1878d6); color: #042038; clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%); padding-right: 20px; }
.trade-split .trade-btn--down { background: linear-gradient(135deg, var(--down), #e23752); color: #2b0409; clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%); margin-left: -22px; padding-left: 20px; }
/* period-mode High/Low: the High/Low pair transforms into ONE full-width red Cancel while a bet is queued for the next period */
.trade-split .trade-btn--cancel { flex-direction: column; gap: 2px; background: linear-gradient(135deg, #ef4a5f, #b31331); color: #fff; }
.trade-split .trade-btn--cancel .trade-btn__note { font-size: 11px; font-weight: 700; opacity: .9; }
.queued-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; background: rgba(240,180,40,.18); color: #f0b428; vertical-align: middle; }
tr.is-queued { opacity: .85; }
.tleft.is-queued { color: #f0b428; font-weight: 700; }

/* Wingo-style shared period bar (High/Low period mode) */
.hl-period { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 9px; padding: 8px 12px; border-radius: 11px;
  background: rgba(43,124,255,.10); border: 1px solid rgba(43,124,255,.28); font-weight: 800; font-size: 13px; letter-spacing: .2px; color: #7fb0ff; }
.hl-period__dot { width: 8px; height: 8px; border-radius: 50%; background: #2b7cff; box-shadow: 0 0 0 0 rgba(43,124,255,.55); animation: hlPulse 1.6s ease-out infinite; }
.hl-period__txt { font-variant-numeric: tabular-nums; }
.hl-period.is-locked { background: rgba(240,180,40,.12); border-color: rgba(240,180,40,.34); color: #f0b428; }
.hl-period.is-locked .hl-period__dot { background: #f0b428; animation: none; }
@keyframes hlPulse { 0% { box-shadow: 0 0 0 0 rgba(43,124,255,.55); } 70% { box-shadow: 0 0 0 7px rgba(43,124,255,0); } 100% { box-shadow: 0 0 0 0 rgba(43,124,255,0); } }
.trade-btn.is-locked { opacity: .45; filter: grayscale(.35); pointer-events: none; }

/* copy trade placeholder */
.copy-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 30px 16px; color: var(--muted); }
.copy-empty__ic { font-size: 34px; color: var(--accent); }
.copy-empty h4 { margin: 4px 0 0; font-size: 16px; color: var(--text); }
.copy-empty p { margin: 0; font-size: 13px; line-height: 1.6; }

/* ---------- dock ---------- */
.dock { flex: 0 0 auto; background: var(--bg-1); border-top: 1px solid var(--border); display: flex; flex-direction: column; overflow: visible; }
.dock__head { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--border); }
.dock__tab { padding: 8px 14px; font-size: 12.5px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; }
.dock__tab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.dock__badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bg-3); font-family: var(--mono); font-size: 11px; margin-left: 4px; }
.dock__body { flex: 1 1 auto; min-height: 0; overflow-x: auto; overflow-y: visible; position: relative; }   /* horizontal scroll at ALL widths so wide tables (Live Trades 9-col, min-width 860px) never clip on tablets instead of only <=768px */
.dock__pane { display: none; }
.dock__pane.is-active { display: block; }
.dock__empty { padding: 26px; text-align: center; color: var(--muted-2); font-size: 13px; }

.trades { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.trades thead th { position: sticky; top: 0; background: var(--bg-1); text-align: left; padding: 8px 14px; color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
.trades td { padding: 9px 14px; border-bottom: 1px solid var(--bg-2); font-family: var(--mono); }
.trades tr:hover td { background: var(--bg-2); }
.dir-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 11px; }
.dir-pill.up { background: var(--up-dim); color: var(--up); }
.dir-pill.down { background: var(--down-dim); color: var(--down); }
.res { font-weight: 700; }
.res.win { color: var(--up); }
.res.lose { color: var(--down); }
.res.tie { color: var(--muted); }
.tleft { color: var(--accent); font-weight: 700; }

/* live-trade feed + leaderboard */
.dock__live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up); margin-left: 5px; vertical-align: middle; box-shadow: 0 0 0 0 rgba(42, 148, 243, 0.5); animation: livepulse 1.6s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(42, 148, 243, 0.5); } 70% { box-shadow: 0 0 0 6px rgba(42, 148, 243, 0); } 100% { box-shadow: 0 0 0 0 rgba(42, 148, 243, 0); } }
.live-open { color: var(--warn); font-weight: 700; font-size: 11px; }
.rank { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--bg-3); font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--muted); }
.rank-1 { background: linear-gradient(135deg, #f5d442, #c99a12); color: #3a2c00; }
.rank-2 { background: linear-gradient(135deg, #cfd6de, #9aa3ad); color: #20262c; }
.rank-3 { background: linear-gradient(135deg, #e0955a, #b06a2e); color: #2a1503; }

/* leaderboard filters + table */
.lb-filters { display: flex; gap: 8px; padding: 12px 14px 6px; position: sticky; top: 0; background: var(--bg-1); z-index: 2; }
.lb-select { background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 30px 8px 12px; border-radius: 9px; cursor: pointer; outline: none; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237e8a99' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
.lb-select:hover { border-color: var(--accent); }
.lb-select option { background: var(--bg-2); color: var(--text); }
.lb-table td .trader__name { font-weight: 600; }
.lb-table td b { font-weight: 700; }
/* live bets feed — Game · User · Time · Amount · Multiplier · Result (VTXA) */
.lb-feed thead th.num, .lb-feed td.num { text-align: right; }
.lb-feed th, .lb-feed td { white-space: nowrap; }
.feed-game { display: flex; align-items: center; gap: 10px; min-width: 0; }
.feed-thumb { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex: 0 0 26px; background: var(--bg-3); }
.feed-thumb--bin { display: inline-grid; place-items: center; color: var(--accent); }
/* house-game rows show the traded asset's coin icon (reuses .alogo), sized to the feed thumb slot */
.feed-game .alogo { width: 26px; height: 26px; flex: 0 0 26px; display: inline-grid; place-items: center; }
.feed-game .alogo__img, .feed-game .alogo svg { width: 26px; height: 26px; border-radius: 50%; display: block; }
/* Live Trades symbol cell shows the real coin logo (reuses .alogo), sized like the old .tok chip */
.sym .alogo { width: 20px; height: 20px; flex: 0 0 20px; display: inline-grid; place-items: center; }
.sym .alogo__img, .sym .alogo svg { width: 20px; height: 20px; border-radius: 50%; display: block; }
.feed-game__name { font-family: var(--font); font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.feed-user { font-family: var(--font); font-weight: 600; }
.feed-user--hidden { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.feed-user--hidden svg { flex: 0 0 auto; opacity: .85; }
.feed-mult { color: var(--muted); font-weight: 700; }
.lb-feed td.up { color: var(--up); font-weight: 700; }
.lb-feed td.down { color: var(--down); }
/* new bets stream in from the top with a brief highlight (opacity+bg animate reliably on <td>) */
@keyframes feedIn { 0% { opacity: 0; background: var(--accent-dim); } 100% { opacity: 1; background: transparent; } }
.feed-row--new td { animation: feedIn .5s ease; }
.vt-row--toggle { display: flex; align-items: center; justify-content: space-between; cursor: default; }

/* avatars + trader / symbol cells */
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 11px; color: #fff; overflow: hidden; flex: 0 0 26px; background-size: cover; background-position: center; }
.trader { display: flex; align-items: center; gap: 9px; }
.trader__name { font-weight: 600; font-family: var(--font); }
.sym { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tok { width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; font-weight: 800; font-size: 10px; color: #fff; flex: 0 0 20px; }
.side { font-weight: 700; }
.side.buy { color: var(--up); }
.side.sell { color: var(--down); }
.c-muted { color: var(--muted); }
.trades--live { min-width: 860px; }

/* topbar avatar button */
.avatar-btn { padding: 0; border-radius: 50%; line-height: 0; }
.avatar-btn .av { width: 34px; height: 34px; flex-basis: 34px; font-size: 13px; border: 2px solid var(--border-2); box-sizing: border-box; }
.avatar-btn:hover .av { border-color: var(--accent); }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 220px; padding: 13px 16px; border-radius: 11px; background: var(--bg-3);
  border: 1px solid var(--border-2); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; animation: toastIn .25s ease;
}
.toast.win { border-left: 3px solid var(--up); }
.toast.lose { border-left: 3px solid var(--down); }
.toast.tie { border-left: 3px solid var(--muted); }
.toast.warn { border-left: 3px solid #f5b301; background: linear-gradient(180deg, rgba(245,179,1,.12), var(--bg-3)); }
.toast__amt { margin-left: auto; font-family: var(--mono); font-weight: 700; }
.toast__amt.win { color: var(--up); }
.toast__amt.lose { color: var(--down); }
.toast.warn .toast__amt, .toast__amt.warn { color: #f5b301; }
.dep-status--warn { display: block; background: rgba(245,179,1,.10); border: 1px solid rgba(245,179,1,.35); color: #f5b301; border-radius: 10px; padding: 9px 11px; font-weight: 600; line-height: 1.5; }
.dep-status--warn b { color: #f5b301; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ============================================================= *
 *  Responsive  (desktop layout is untouched above 1024px)
 * ============================================================= */

/* ---- Tablet / small laptop: tighten the ticket (KEEP the icon rail — it is the only nav above 768px) ---- */
@media (max-width: 1024px) {
  .ticket { flex-basis: 250px; }
  .chart-head { gap: 14px; padding: 11px 14px; }
}

/* ---- Phones / narrow tablets: stack the workspace vertically ---- */
@media (max-width: 768px) {
  /* let the terminal grow and the PAGE scroll instead of locking to 100vh */
  html, body { height: auto; }
  body { overflow-x: hidden; overflow-y: auto; }
  .app { height: auto; min-height: 100vh; }
  .rail { display: none; }   /* rail off only on true mobile; the bottom nav + FABs take over at <=768px */

  /* topbar wraps: brand + account on row 1, asset tabs as a full-width strip below */
  .topbar {
    height: auto; flex: 0 0 auto;
    flex-wrap: wrap; gap: 10px; padding: 9px 12px;
    position: sticky; top: 0;
  }
  .topbar__left    { order: 1; }
  .topbar__actions { order: 2; margin-left: auto; gap: 8px; }
  /* the wallet drops to its own full-width row below brand + actions */
  .topbar .wallet  { order: 3; flex: 1 1 100%; margin-left: 0; justify-content: space-between; }
  .btn--deposit    { padding: 8px 14px; }

  /* stack chart over ticket over dock */
  .workspace  { flex-direction: column; min-height: 0; }
  .rail       { display: none; }

  .chart-area { flex: 0 0 auto; }

  /* mobile stack order: chart → Trade/Auto-Trade ticket → order book (the ticket sits ABOVE the mbook,
     which is later in the DOM; the High/Low buttons stay pinned to the bottom via .trade-split fixed) */
  .chart-area { order: 1; }
  .ticket     { order: 2; }
  .mbook      { order: 3; }

  /* chart header: one tidy row — asset left, price + chart-type on the right */
  .chart-head { flex-wrap: nowrap; align-items: center; gap: 8px; }
  .chart-round { display: none; }                       /* hide session timer on phones */
  .chart-asset__name { font-size: 15px; }
  .chart-asset__icon .tok, .chart-asset__icon .alogo { width: 26px; height: 26px; }
  .chart-price { margin-left: auto; gap: 6px; min-width: 0; }
  .chart-price > span:first-child { font-size: 15px; }
  .chart-price__chg { font-size: 11px; }
  .chart-toggle { margin-left: 0; padding: 2px; flex: 0 0 auto; }
  .chart-toggle button { padding: 6px 8px; }
  .chart-toggle button span { display: none; }          /* icons only — saves the second row */
  .chart-toggle button svg { width: 16px; height: 16px; }

  /* chart height leaves room for the trade controls; Up/Down is pinned (see below) */
  .chart-wrap { flex: 0 0 auto; }
  #chart      { flex: 0 0 auto; height: 50vh; min-height: 340px; }

  /* dock tabs: never wrap the badge — scroll horizontally instead of cramming.
     flex:0 0 auto is CRITICAL: the dock is a fixed-height flex column, so without it the
     head defaults to flex-shrink:1 and gets crushed below its natural height when the pane
     (Live Trades) is tall — and because overflow-x:auto forces overflow-y to compute to
     auto, the crushed head CLIPS its tabs (the "cut off" look) and the active tab's blue
     underline survives as a detached sliver (the "floating blue strip"). Pinning the head
     to its content height fixes both, at every dock height / phone size; the body (flex:1 1
     auto, min-height:0) absorbs all height changes and scrolls internally. */
  .dock__head { flex: 0 0 auto; overflow-x: auto; scrollbar-width: none; }
  .dock__head::-webkit-scrollbar { display: none; }
  .dock__tab { white-space: nowrap; flex: 0 0 auto; padding: 12px 14px; font-size: 12px; }
  .amount-quick button { padding: 11px 13px; }   /* ≥40px tap target on phones */

  /* Live Trades + Leaderboard: 9/5-column tables don't fit a phone. Drop the fixed
     min-width and hide secondary columns so the essentials fill the screen (no clipping). */
  .trades--live { min-width: 0; }
  .dock .trades td, .dock .trades thead th { padding: 9px 10px; font-size: 12px; }
  .dock .trades .trader { gap: 7px; min-width: 0; }
  .dock .trades .trader__name, .dock .trades .sym span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* Live Trades → Trader · Symbol · Side · Profit (hide Currency/Amount/Entry/Exit/Yield = cols 4–8) */
  #pane-live .trades th:nth-child(n+4):nth-child(-n+8),
  #pane-live .trades td:nth-child(n+4):nth-child(-n+8) { display: none; }
  /* Leaderboard bets feed → Game · User · Amount · Result (hide Time = col 3, Multiplier = col 5) */
  #pane-leaderboard .trades th:nth-child(3), #pane-leaderboard .trades td:nth-child(3),
  #pane-leaderboard .trades th:nth-child(5), #pane-leaderboard .trades td:nth-child(5) { display: none; }
  /* Columns hug their content on the left (Trader/Symbol/Side) and the PROFIT column absorbs
     the remaining width on the right. Short masked names no longer leave a big gap before the
     symbol — it's a clean "who · what · side ————— profit" feed row. */
  #pane-live .trades, #pane-leaderboard .trades { table-layout: auto; width: 100%; }
  #pane-live .trades th, #pane-live .trades td,
  #pane-leaderboard .trades th, #pane-leaderboard .trades td { white-space: nowrap; }
  #pane-live .trades th:nth-child(9), #pane-live .trades td:nth-child(9) { width: 100%; text-align: right; }
  #pane-leaderboard .trades th:nth-child(6), #pane-leaderboard .trades td:nth-child(6) { text-align: right; }
  #pane-leaderboard .trades th:nth-child(2), #pane-leaderboard .trades td:nth-child(2) { width: 100%; }   /* User absorbs the slack */
  #pane-live .trades .trader__name, #pane-leaderboard .trades .feed-game__name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }

  /* Scroll the dock CONTENT inside its fixed height so the tables' position:sticky headers
     stick under the tabs. With overflow:visible they escape to the page viewport and collide
     with the dock tab bar (the "clash" on Live Trades / Leaderboard). */
  .dock__body { overflow-y: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }   /* auto (not hidden): Positions/History keep all 6 cols → let the table scroll to reveal the Left/Result columns instead of clipping them */
  /* Clear separation so the tab bar and the table's column-header don't read as one cramped block.
     The margin is OUTSIDE the scroll container, so it's a real, always-visible gap under the tabs. */
  /* Spacing to the column header comes from margin-bottom (OUTSIDE the head), NOT
     padding-bottom. Any padding-bottom here pushes the active tab's blue underline up off
     the divider so it floats as a detached blue strip — keep padding-bottom 0 so the
     underline stays flush on the divider, and use margin for the gap below it. */
  .dock__head { padding-bottom: 0; margin-bottom: 20px; }
  .dock .trades thead th { padding-top: 4px; padding-bottom: 11px; }
  /* Kill the sticky header on mobile. position:sticky pins inconsistently across mobile
     browsers inside the scroll container — on some it slides the column header UP over the
     tab bar as the list scrolls, which is why Live Trades looked cramped next to the empty,
     never-scrolling History tab. Static makes the header sit at a fixed 20px below the tabs
     and scroll away cleanly with the (short) list — identical behaviour to History. */
  .dock .trades thead th { position: static; }
  /* Leaderboard has TWO sticky rows (filters + thead) that both pin to top:0 and overlap —
     drop the filter row out of the sticky flow so only the column header sticks. */
  #pane-leaderboard .lb-filters { position: static; }

  /* ticket becomes a full-width panel below the chart — compact so the chart stays dominant */
  .ticket {
    flex: 0 0 auto; width: 100%;
    border-left: none; border-top: 1px solid var(--border);
    flex-direction: column; gap: 11px; overflow: visible; padding: 12px 14px 16px;
  }
  .ticket__pane  { gap: 11px; }
  .ticket__tabs  { gap: 18px; }
  .time-grid     { gap: 6px; }
  .time-grid button      { padding: 7px 4px; gap: 2px; }
  .time-grid button b    { font-size: 13px; }
  .time-grid button .tp  { font-size: 10px; }
  .amount-field  { padding: 4px 7px 4px 12px; }
  .amount-field input { font-size: 18px; }
  .payout-box    { padding: 10px 13px; }
  .payout-profit { font-size: 16px; }
  .chart-sentiment { padding: 6px 12px; margin-top: 8px; }  /* small gap below the payout */

  /* Up/Down stay thumb-friendly but not oversized */
  .ticket__actions { margin-top: 4px; }
  .trade-split { height: 54px; }
  .trade-btn   { height: 54px; font-size: 17px; }

  /* dock FILLS the viewport below the sticky topbar (its own internal scroll keeps wide tables in-bounds);
     was a fixed 300px which left dead space above the bottom nav on tall phones */
  .dock { flex: 0 0 auto; height: calc(100dvh - 128px); min-height: 320px; }         /* fills to just above the bottom nav (no dead strip) */
  body.vt-tradebar .dock { height: calc(100dvh - 206px); }                            /* High/Low pinned bet-bar is visible → leave room for it */

  /* asset dropdown becomes a full-width sheet dropping under the chart header */
  .chart-head { position: relative; }
  .chart-asset-wrap { position: static; }
  .asset-dd {
    position: absolute; left: 0; right: 0; top: 100%;
    width: auto; max-width: none; border-radius: 0 0 14px 14px;
    border-left: none; border-right: none;
  }
  .asset-dd__list { max-height: 60vh; }
}

/* ---- Small phones ---- */
@media (max-width: 520px) {
  .topbar { gap: 8px; padding: 8px 10px; }
  .brand__name { font-size: 15px; }
  .wallet { padding: 4px 5px 4px 10px; gap: 8px; }
  .wallet__value { font-size: 13px; }
  .btn--deposit { padding: 7px 12px; font-size: 12px; }
  .icon-btn { width: 34px; height: 34px; }
  .avatar-btn .av { width: 32px; height: 32px; flex-basis: 32px; }

  .chart-head   { gap: 8px; padding: 10px 12px; }
  #chart        { flex: 0 0 auto; height: 48vh; min-height: 320px; }

  .ticket { padding: 12px 12px 16px; }
  .stepper__btn { width: 44px; height: 44px; }
  .atab { min-width: 82px; }
  .dock { height: calc(100dvh - 118px); min-height: 300px; }
  body.vt-tradebar .dock { height: calc(100dvh - 196px); }
}

/* ============================================================= *
 *  Mobile app shell — app top bar · bottom nav · payments sheet
 * ============================================================= */
.m-top, .m-nav { display: none; }

/* payments bottom sheet (available on any size; triggered by mobile chrome) */
.pay-sheet { position: fixed; inset: 0; z-index: 130; display: none; }
.pay-sheet.is-open { display: block; }
.pay-sheet::before { content: ""; position: absolute; inset: 0; background: rgba(4, 8, 12, .55); animation: fadeIn .2s ease; }
.pay-sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg-1); border-top: 1px solid var(--border-2);
  border-radius: 22px 22px 0 0; padding: 8px 16px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .5); animation: sheetUp .28s cubic-bezier(.4, 0, .2, 1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.pay-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px 14px; }
.pay-sheet__head h3 { margin: 0; font-size: 20px; font-weight: 800; }
.pay-x { width: 34px; height: 34px; border-radius: 9px; color: var(--muted); font-size: 15px; display: grid; place-items: center; }
.pay-x:hover { background: var(--bg-2); color: var(--text); }
.pay-item {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 17px 16px; margin-bottom: 10px; border-radius: 13px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: 14.5px;
}
.pay-item svg { width: 20px; height: 20px; position: absolute; left: 18px; }
.pay-item:hover { border-color: var(--border-2); }
.pay-item--primary { background: linear-gradient(135deg, var(--up), #1878d6); color: #042038; border: none; }
.pay-reset { display: block; width: 100%; margin-top: 6px; padding: 12px; color: var(--muted); font-size: 12.5px; font-weight: 700; text-align: center; }
.pay-reset:hover { color: var(--down); }

/* ---------------- Bonus collection (floating button + sheet) ---------------- */
.bonus-fab { display: none; }
.bonus-fab-wrap { display: none; }   /* bonus-FAB shell — mobile only */
.bonus-tab { display: none; }   /* collapsed bonus-FAB edge tab — mobile only (shown via .is-shown in the mobile media block) */
.bonus-sheet { position: fixed; inset: 0; z-index: 131; display: none; }
.bonus-sheet.is-open { display: block; }
.bonus-sheet::before { content: ""; position: absolute; inset: 0; background: rgba(4, 8, 12, .6); animation: fadeIn .2s ease; }
.bonus-sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 84vh; overflow-y: auto;
  background: linear-gradient(180deg, #16203a 0%, var(--bg-1) 46%);
  border-top: 1px solid rgba(245, 179, 1, .28); border-radius: 24px 24px 0 0;
  padding: 6px 15px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 54px rgba(0, 0, 0, .58); animation: sheetUp .3s cubic-bezier(.4, 0, .2, 1);
}
.bonus-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 14px; }
.bonus-sheet__title { display: flex; align-items: center; gap: 12px; }
.bonus-sheet__title img { width: 44px; height: 44px; border-radius: 50%; filter: drop-shadow(0 3px 9px rgba(0, 0, 0, .45)); }
.bonus-sheet__title h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.bonus-sheet__title p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.bonus-x { width: 34px; height: 34px; border-radius: 10px; color: var(--muted); font-size: 15px; display: grid; place-items: center; }
.bonus-x:hover { background: var(--bg-2); color: var(--text); }
.bonus-list { display: flex; flex-direction: column; gap: 11px; padding: 2px 0 4px; }
/* Desktop: float the bonus sheet as a centered card instead of a full-width bottom sheet. */
@media (min-width: 769px) {
  .bonus-sheet__panel { left: 50%; right: auto; width: 460px; max-width: calc(100vw - 32px); bottom: 4vh; border-radius: 22px; max-height: 88vh; transform: translateX(-50%); animation: bonusPop .24s cubic-bezier(.4, 0, .2, 1); }
}
@keyframes bonusPop { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.bcard {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; padding: 13px 14px;
  border-radius: 16px; background: var(--bg-2); border: 1px solid var(--border);
  position: relative; overflow: hidden; transition: transform .12s ease, border-color .15s ease;
}
.bcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bc-accent, #f5b301); }
.bcard:not(.is-soon):hover { border-color: var(--border-2); }
.bcard:not(.is-soon):active { transform: scale(.985); }
.bcard__coin {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #4a3200;
  background: radial-gradient(circle at 33% 27%, var(--bc-a, #ffd968), var(--bc-b, #f2a100) 84%);
  box-shadow: 0 4px 13px rgba(0, 0, 0, .38), inset 0 1px 1px rgba(255, 255, 255, .5);
}
.bcard__coin svg { width: 23px; height: 23px; stroke: #4a3200; }
.bcard__coin--img { background: none; box-shadow: none; }
.bcard__coin--img img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block; }
.bcard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bcard__reward { font-size: 15.5px; font-weight: 800; color: var(--bc-accent, #f5b301); line-height: 1.15; }
.bcard__title { font-size: 13px; font-weight: 700; color: var(--text); }
.bcard__sub { font-size: 11px; color: var(--muted); line-height: 1.35; }
.bcard__cta {
  flex: 0 0 auto; padding: 9px 17px; border-radius: 21px; font-size: 12.5px; font-weight: 800; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), #1878d6); color: #fff; box-shadow: 0 4px 12px rgba(42, 148, 243, .3);
}
.bcard.is-soon { opacity: .72; }
.bcard.is-soon .bcard__cta { background: var(--bg-3); color: var(--muted-2); box-shadow: none; }
.bcard.is-claimed .bcard__cta { background: rgba(18, 209, 142, .16); color: var(--up); box-shadow: none; }
.bcard--gold   { --bc-accent: #f5b301; --bc-a: #ffd968; --bc-b: #f2a100; }
.bcard--blue   { --bc-accent: #2A94F3; --bc-a: #8ecbff; --bc-b: #1878d6; }
.bcard--green  { --bc-accent: #12d18e; --bc-a: #74f0c4; --bc-b: #0a9e69; }
.bcard--purple { --bc-accent: #a98bff; --bc-a: #cbb9ff; --bc-b: #7a53e0; }

/* ---------------- Daily Attendance panel ---------------- */
#vt-att-body, #vt-award-body { padding: 14px 14px 28px; max-width: 520px; margin: 0 auto; }
.att-hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 20px 18px 18px; margin-bottom: 16px;
  background: radial-gradient(120% 140% at 90% -10%, #5a3df0 0%, #3358e6 40%, #1c2b6b 100%); color: #fff;
  box-shadow: 0 12px 30px rgba(30, 40, 120, .45);
}
.att-hero__badge { position: absolute; right: 14px; top: 12px; font-size: 46px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); opacity: .95; }
.att-hero__badge img { width: 58px; height: 58px; border-radius: 13px; display: block; }
.att-hero__t { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.att-hero__s { font-size: 12px; opacity: .82; margin-top: 4px; max-width: 74%; line-height: 1.5; }
.att-hero__row { display: flex; gap: 26px; margin-top: 16px; }
.att-hero__k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.att-hero__v { font-size: 22px; font-weight: 800; margin-top: 1px; }
.att-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.att-tile {
  position: relative; border-radius: 14px; padding: 13px 8px 11px; text-align: center;
  background: var(--bg-2); border: 1px solid var(--border); transition: transform .12s ease;
}
.att-tile__amt { font-size: 14.5px; font-weight: 800; color: #f5b301; }
.att-tile__coin {
  width: 40px; height: 40px; margin: 8px auto 7px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #4a3200; font-family: var(--mono, monospace);
  background: radial-gradient(circle at 33% 27%, #ffd968, #f2a100 84%); box-shadow: 0 3px 9px rgba(0,0,0,.3), inset 0 1px 1px rgba(255,255,255,.5);
}
.att-tile__coin svg { width: 20px; height: 20px; }
.att-tile__day { font-size: 11px; color: var(--muted); font-weight: 600; }
.att-tile--big { grid-column: span 3; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px; }
.att-tile--big .att-tile__coin { margin: 0; width: 46px; height: 46px; font-size: 20px; }
.att-tile--big .att-tile__amt { font-size: 18px; }
.att-tile.is-done { opacity: .7; }
.att-tile.is-done .att-tile__coin { background: radial-gradient(circle at 33% 27%, #6ef0c2, #0a9e69 84%); color: #063; }
.att-tile.is-next { border-color: #f5b301; box-shadow: 0 0 0 1px #f5b301, 0 8px 20px rgba(245,179,1,.28); animation: attPulse 2s ease-in-out infinite; }
.att-tile.is-locked { opacity: .5; }
.att-tile.is-locked .att-tile__coin { background: var(--bg-3); color: var(--muted-2); box-shadow: none; }
@keyframes attPulse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.att-claim { margin-top: 16px; font-weight: 800; }
.att-claim:disabled { opacity: .5; }
/* Deposit-unlock lock banner (shared by Attendance + Activity Award panels) */
/* Compact deposit-to-unlock notice on the bonus panels (attendance + weekly) — tells a locked player the requirement without the old full-width banner */
.bonus-gate-note { margin: 12px 0 2px; padding: 10px 12px; text-align: center; font-size: 12.5px; font-weight: 600; color: #f5b301; background: rgba(245,179,1,.08); border: 1px solid rgba(245,179,1,.28); border-radius: 10px; }
.att-hist { margin-top: 18px; }
.att-hist__t { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); margin-bottom: 6px; }
.att-hist__row { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.att-hist__row b { color: var(--up); }

/* ---------------- Activity Award panel ---------------- */
.aw-hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 20px 18px; margin-bottom: 8px; color: #fff;
  background: radial-gradient(120% 150% at 92% -20%, #ffb443 0%, #ff7a29 42%, #c23c12 100%);
  box-shadow: 0 12px 30px rgba(180, 70, 20, .4);
}
.aw-hero__badge { position: absolute; right: 14px; top: 14px; font-size: 44px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.aw-hero__badge img { width: 58px; height: 58px; border-radius: 13px; display: block; }
.aw-hero__t { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.aw-hero__s { font-size: 12px; opacity: .9; margin-top: 5px; max-width: 78%; line-height: 1.5; }
.aw-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); margin: 18px 2px 9px; font-weight: 700; }
.aw-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px; padding: 15px; margin-bottom: 11px; }
.aw-card__hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.aw-tag { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 8px; color: #fff; }
.aw-tag--weekly { background: linear-gradient(135deg, #ef5da8, #b23c8f); }
.aw-tag--daily { background: linear-gradient(135deg, #12d18e, #0a9e69); }
.aw-status { font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.aw-status.is-on { color: var(--up); }
.aw-card__goal { font-size: 13px; color: var(--text); font-weight: 600; display: flex; align-items: baseline; gap: 6px; }
.aw-card__goal b { color: #f5b301; }
.aw-card__goal b.aw-game { color: var(--text); }
.aw-reward { margin-left: auto; color: var(--up); font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.aw-bar { height: 8px; border-radius: 6px; background: var(--bg-0, #0a0e13); overflow: hidden; margin: 10px 0 6px; border: 1px solid var(--border); }
.aw-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #12d18e); transition: width .5s ease; }
.aw-card__prog { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.aw-card__prog span { color: var(--muted-2); font-weight: 500; }
.aw-cta { width: 100%; padding: 12px; border-radius: 11px; font-size: 13px; font-weight: 800; border: none; cursor: pointer; }
.aw-cta.is-ready { background: linear-gradient(135deg, #f5b301, #f2820a); color: #3a2600; box-shadow: 0 6px 16px rgba(245,179,1,.32); }
.aw-cta.is-go { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.aw-cta.is-go:hover { background: rgba(42,148,243,.12); }
.aw-cta.is-claimed { background: rgba(18,209,142,.15); color: var(--up); }
/* Weekly board — 7 daily missions (one per game), each with its own wager target */
.awd-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0 4px; }
.awd-tile { display: flex; flex-direction: column; gap: 5px; padding: 10px 11px; border-radius: 11px; background: var(--bg-0, #0a0e13); border: 1px solid var(--border); }
.awd-tile.is-done { border-color: rgba(18, 209, 142, .4); background: rgba(18, 209, 142, .07); }
.awd-tile__top { display: flex; align-items: center; justify-content: space-between; }
.awd-tile__day { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); }
.awd-tile__game { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.2; min-height: 29px; }
.awd-tile__chk { width: 16px; height: 16px; border-radius: 50%; background: var(--up); color: #043; font-size: 10px; font-weight: 900; display: grid; place-items: center; }
.awd-tile__bar { height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.awd-tile__bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #12d18e); }
.awd-tile__prog { font-size: 10px; font-weight: 700; color: var(--muted); }

/* ---------------- Status Perks panel ---------------- */
#vt-status-body { padding: 12px 14px 30px; max-width: 560px; margin: 0 auto; }
.sp-hero { text-align: center; padding: 6px 8px 16px; }
.sp-hero__badges { display: flex; justify-content: center; align-items: flex-end; margin-bottom: 12px; }
.sp-hb { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 -5px; filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .45)); }
.sp-hb svg { width: 42px; height: 42px; }
.sp-hb--green { color: #2fd36b; transform: rotate(-13deg); }
.sp-hb--blue { color: #2A94F3; transform: rotate(-5deg); }
.sp-hb--purple { color: #a24bff; transform: rotate(5deg); }
.sp-hb--gold { color: #f2b31c; width: 54px; height: 54px; transform: rotate(13deg); }
.sp-hb--gold svg { width: 50px; height: 50px; }
.sp-hero__t { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.sp-hero__s { font-size: 12.5px; color: var(--muted); margin: 6px auto 0; line-height: 1.5; max-width: 92%; }
.sp-summary { background: linear-gradient(135deg, rgba(42, 148, 243, .13), var(--bg-2)); border: 1px solid var(--border-2); border-radius: 16px; padding: 16px; margin-bottom: 18px; }
.sp-summary__row { display: flex; align-items: center; gap: 12px; }
.sp-summary__id { flex: 1; min-width: 0; }
.sp-summary__k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
.sp-summary__v { font-size: 18px; font-weight: 800; }
.sp-summary__dep { text-align: right; font-size: 16px; font-weight: 800; color: var(--up); white-space: nowrap; }
.sp-summary__dep span { display: block; font-size: 10px; font-weight: 500; color: var(--muted-2); }
.sp-bar { height: 8px; border-radius: 6px; background: var(--bg-0, #0a0e13); border: 1px solid var(--border); overflow: hidden; margin: 14px 0 8px; }
.sp-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #12d18e); transition: width .5s ease; }
.sp-summary__next { font-size: 12.5px; color: var(--muted); }
.sp-summary__next b { color: var(--text); }
.sp-summary__next--top { color: var(--up); font-weight: 700; }
.sp-badge { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; }
.sp-badge svg { width: 34px; height: 34px; }
.sp-badge--green { color: #2fd36b; } .sp-badge--blue { color: #2A94F3; } .sp-badge--purple { color: #a24bff; } .sp-badge--gold { color: #f2b31c; }
.sp-cards { display: flex; flex-direction: column; gap: 12px; }
.sp-card { position: relative; background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px; padding: 15px; }
.sp-card.is-current { border-color: var(--sp-c, var(--accent)); box-shadow: 0 0 0 1px var(--sp-c, var(--accent)), 0 8px 22px rgba(0, 0, 0, .35); }
.sp-card.is-locked { opacity: .6; }
.sp-card--green { --sp-c: #2fd36b; } .sp-card--blue { --sp-c: #2A94F3; } .sp-card--purple { --sp-c: #a24bff; } .sp-card--gold { --sp-c: #f2b31c; }
.sp-card__hd { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.sp-card__name { font-size: 17px; font-weight: 800; }
.sp-card__tag { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted-2); padding: 3px 9px; border-radius: 8px; background: var(--bg-3); white-space: nowrap; }
.sp-card__tag--cur { background: var(--sp-c, var(--accent)); color: #04121f; }
.sp-card__tag--done { background: rgba(18, 209, 142, .15); color: var(--up); }
.sp-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-perks li { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.sp-check { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; color: var(--sp-c, var(--up)); }
.sp-faq { margin: 20px 0 6px; }
.sp-faq details { border-bottom: 1px solid var(--border); }
.sp-faq summary { list-style: none; cursor: pointer; padding: 14px 2px; font-size: 13.5px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after { content: '⌄'; font-size: 17px; line-height: 1; color: var(--muted-2); transition: transform .2s ease; }
.sp-faq details[open] summary::after { transform: rotate(180deg); }
.sp-faq p { margin: 0 2px 14px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.sp-cta { margin-top: 18px; font-weight: 800; }
@keyframes bonusFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes bonusPulse { 0% { box-shadow: 0 0 0 0 rgba(245, 179, 1, .5); } 100% { box-shadow: 0 0 0 15px rgba(245, 179, 1, 0); } }

@media (max-width: 768px) {
  .topbar { display: none !important; }

  .m-top {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    background: var(--bg-1); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
  }
  .m-top__btn { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: var(--bg-2); border: 1px solid var(--border); }
  .m-top__avatar { padding: 0; overflow: hidden; }
  .m-top__avatar .av { width: 100%; height: 100%; flex-basis: auto; border-radius: 50%; }
  .m-top__pay { background: linear-gradient(135deg, var(--accent), #1878d6); color: #fff; border: none; }
  .m-top__pay svg { width: 21px; height: 21px; }
  .m-top__bal { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.18; }
  .m-top__bal b { font-family: var(--mono); font-size: 17px; font-weight: 800; }
  .m-top__demo { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--up); font-weight: 700; }
  .m-top__demo svg { width: 12px; height: 12px; }

  .m-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: var(--bg-1); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .m-nav__btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--muted); font-size: 10px; font-weight: 700; }
  .m-nav__btn svg { width: 22px; height: 22px; }
  .m-nav__btn.is-active { color: var(--accent); }

  .app { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }                  /* default: room for the fixed bottom nav only (no wasted strip on non-trade views) */
  body.vt-tradebar .app { padding-bottom: calc(150px + env(safe-area-inset-bottom)); } /* + the pinned High/Low bet-bar when it's actually visible */
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.vt-tradebar .toasts { bottom: calc(150px + env(safe-area-inset-bottom)); }

  /* Pin the primary Up/Down action to the bottom so it is ALWAYS reachable while
     the chart + controls scroll above it — sits just above the fixed bottom nav.
     (Only the visible manual pane has .trade-split; the auto pane hides it.) */
  .trade-split {
    position: fixed; left: 0; right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    z-index: 44;                                    /* just below the m-nav (45) */
    margin: 0; padding: 9px 14px;
    background: var(--bg-1); border-top: 1px solid var(--border);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, .34);
  }

  /* thumb-friendly chart timeframe + toggle targets (were ~26px) */
  .tf-btn { min-height: 40px; padding: 9px 12px; }   /* meet the ~40px touch-target minimum on mobile */
  .chart-toggle button { padding: 11px 12px; }
}

/* ============================================================= *
 *  Profile + Settings slide-in panel
 * ============================================================= */
.vt-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(4, 8, 12, 0.55);
  opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease;
}
.vt-overlay.is-open { opacity: 1; visibility: visible; }

.vt-sheet {
  position: absolute; top: 0; right: 0; height: 100%;
  width: 400px; max-width: 100vw;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border-left: 1px solid var(--border); box-shadow: -18px 0 50px rgba(0, 0, 0, 0.5);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}
.vt-overlay.is-open .vt-sheet { transform: translateX(0); }

/* stacked views */
.vt-view {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  transform: translateX(100%); transition: transform .26s cubic-bezier(.4, 0, .2, 1);
}
.vt-view.is-active { transform: translateX(0); }
#vt-view-profile { transform: translateX(0); } /* root sits under the slide */

.vt-vhead {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 12px; border-bottom: 1px solid var(--border);
}
.vt-vtitle { flex: 1; margin: 0; font-size: 16px; font-weight: 800; text-align: center; }
.vt-spacer { flex: 1; }
.vt-icobtn {
  width: 38px; height: 38px; border-radius: 10px; background: var(--bg-2);
  border: 1px solid var(--border); color: var(--muted);
  display: inline-grid; place-items: center; font-size: 16px; position: relative; flex: 0 0 auto;
}
.vt-icobtn:hover { color: var(--text); border-color: var(--border-2); }
.vt-icobtn svg { width: 18px; height: 18px; }
.vt-bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--down); color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--bg-1);
}
.vt-bell-badge[data-count="0"] { display: none; }

.vt-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }

/* profile top */
.vt-profile-top { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 18px; }
.vt-avatar { position: relative; padding: 0; border-radius: 50%; line-height: 0; }
.vt-avatar .av { width: 84px; height: 84px; flex-basis: 84px; font-size: 30px; border: 2px solid var(--border-2); }
.vt-avatar:hover .av { border-color: var(--accent); }
.vt-avatar-cam {
  position: absolute; right: 0; bottom: 2px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #04233f; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; border: 2px solid var(--bg-1);
}
.vt-name { font-size: 19px; font-weight: 800; }
.vt-idrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.vt-copy {
  width: 26px; height: 26px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--muted); display: inline-grid; place-items: center; flex: 0 0 auto;
}
.vt-copy:hover { color: var(--accent); border-color: var(--accent); }
.vt-copy svg { width: 13px; height: 13px; }

/* promo cards */
.vt-promos { display: flex; gap: 10px; margin-bottom: 18px; }
.vt-promo { flex: 1; display: flex; flex-direction: column; gap: 7px; align-items: center; }
.vt-promo span { font-size: 11px; color: var(--muted); font-weight: 600; text-align: center; }
.vt-promo__art { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); display: grid; place-items: center; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.vt-promo__art svg { width: 42%; height: 42%; color: #fff; opacity: .96; filter: drop-shadow(0 2px 6px rgba(0,0,0,.32)); }
.vt-promo--live { cursor: pointer; }
.vt-promo--live:hover .vt-promo__art { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(18,209,142,.32); }
.vt-promo--live:hover span { color: var(--text); }
.vt-promo--soon { cursor: pointer; }
.vt-promo--soon .vt-promo__art { opacity: .82; }
.vt-promo--soon:hover .vt-promo__art { transform: translateY(-2px); }
/* Featured First Deposit Bonus — gold-highlighted so it stands out from the other promos */
#promo-fdb .vt-promo__art { box-shadow: 0 4px 18px rgba(245, 179, 1, .42); }
#promo-fdb .vt-promo__art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, rgba(245, 179, 1, .16), transparent 68%); pointer-events: none; }
#promo-fdb.vt-promo--live:hover .vt-promo__art { box-shadow: 0 8px 26px rgba(245, 179, 1, .55); }
#promo-fdb span { color: #f5b301; font-weight: 800; }
#promo-fdb.vt-promo--live:hover span { color: #ffd968; }
.vt-promo__art--a { background: linear-gradient(135deg, #2a7fe6, #0e3f8f); }
.vt-promo__art--b { background: linear-gradient(135deg, #12d18e, #0e7f8f); }
.vt-promo__art--c { background: linear-gradient(135deg, #a86bf0, #5b2a9e); }
.vt-promo__art--img { background: transparent; border: none; }
.vt-promo__art--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vt-promo__badge { position: absolute; top: 7px; right: 7px; background: rgba(0,0,0,.42); color: #fff; font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 999px; }
.vt-promo__soon { position: absolute; top: 7px; right: 7px; background: rgba(0,0,0,.42); color: rgba(255,255,255,.8); font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }

/* status */
.vt-status {
  position: relative; overflow: hidden; cursor: pointer;
  background: linear-gradient(135deg, rgba(245, 179, 1, .11), var(--bg-2) 58%);
  border: 1px solid rgba(245, 179, 1, .32); border-radius: 14px; padding: 14px 15px; margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25); transition: border-color .18s ease, transform .12s ease;
}
.vt-status::after { content: ''; position: absolute; right: -32px; top: -32px; width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 179, 1, .16), transparent 70%); pointer-events: none; }
.vt-status:hover { border-color: rgba(245, 179, 1, .55); }
.vt-status:active { transform: scale(.99); }
.vt-status__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; position: relative; }
.vt-status__lead { display: flex; align-items: center; gap: 9px; min-width: 0; }
.vt-status__badge { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: #4a3200; background: radial-gradient(circle at 33% 27%, #ffd968, #f2a100 82%); box-shadow: 0 2px 7px rgba(242, 163, 0, .45), inset 0 1px 1px rgba(255, 255, 255, .55); }
.vt-status__badge svg { width: 17px; height: 17px; }
.vt-status__name { font-weight: 800; font-size: 14px; letter-spacing: -.2px; }
.vt-status__pct { font-family: var(--mono); font-weight: 800; font-size: 13px; color: #f5b301; }
.vt-bar { height: 8px; border-radius: 6px; background: var(--bg-0); overflow: hidden; border: 1px solid rgba(255, 255, 255, .05); }
.vt-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #f2a100, #ffd968); box-shadow: 0 0 9px rgba(245, 179, 1, .55); transition: width .5s ease; }
.vt-status__hint { margin-top: 9px; font-size: 12px; color: var(--muted); position: relative; }
.vt-status__hint b { color: #f5b301; }

/* menu rows */
.vt-menu { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.vt-menu--logout { margin-top: 10px; }
.vt-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 14px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 600; transition: background .12s, border-color .12s;
}
.vt-row:hover { background: var(--bg-3); border-color: var(--border-2); }
.vt-row__ic { font-size: 17px; width: 22px; flex: 0 0 auto; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.vt-row__ic svg { width: 18px; height: 18px; }
.vt-row__label { flex: 1; }
.vt-row__chev { color: var(--muted-2); font-size: 18px; }
.vt-row__val { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.vt-row__check { color: var(--accent); font-weight: 800; opacity: 0; }
.vt-row.is-picked .vt-row__check { opacity: 1; }
.vt-row.is-picked { border-color: var(--accent); }
.vt-row--danger { color: var(--down); justify-content: center; font-weight: 700; }
.vt-row--danger:hover { border-color: var(--down); }
.vt-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; margin: 6px 2px 10px; }

/* fields */
.vt-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.vt-field > span { font-size: 12px; color: var(--muted); font-weight: 700; }
.vt-field input {
  background: var(--bg-0); border: 1px solid var(--border-2); border-radius: 10px;
  padding: 12px 13px; color: var(--text); font-size: 14px; outline: none; transition: border-color .15s;
}
.vt-field input:focus { border-color: var(--accent); }
.vt-field input:read-only { color: var(--muted); background: var(--bg-1); }
.vt-save { margin-top: 6px; }
.vt-note { font-size: 12px; color: var(--muted-2); margin: 12px 2px 0; }
.vt-note--lead { margin: 0 2px 16px; font-size: 13px; color: var(--muted); }

/* toggle rows + switch */
.vt-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 8px; }
.vt-toggle-name { font-size: 14px; font-weight: 700; }
.vt-toggle-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.vt-switch { position: relative; width: 44px; height: 26px; flex: 0 0 auto; }
.vt-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vt-switch span { position: absolute; inset: 0; border-radius: 20px; background: var(--bg-0); border: 1px solid var(--border-2); transition: background .18s, border-color .18s; }
.vt-switch span::after { content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .18s, background .18s; }
.vt-switch input:checked + span { background: var(--accent-dim); border-color: var(--accent); }
.vt-switch input:checked + span::after { transform: translate(18px, -50%); background: var(--accent); }

/* verification */
.vt-verify-card { text-align: center; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 26px 18px; margin-bottom: 16px; }
.vt-verify-ic { font-size: 40px; }
.vt-verify-status { font-size: 17px; font-weight: 800; margin: 10px 0 6px; }
.vt-verify-status.pending { color: var(--warn); }
.vt-verify-status.verified { color: var(--up); }
.vt-verify-status.rejected { color: var(--down); }
.vt-verify-desc { font-size: 12.5px; color: var(--muted); }
.vt-verify-reason { margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--down); background: var(--down-dim); border-radius: 8px; padding: 8px 10px; }

/* verification — 3-step flow */
.vt-verify-hero { text-align: center; padding: 8px 6px 18px; }
.vt-steps { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 4px 16px; margin-bottom: 14px; }
.vt-step { display: flex; align-items: flex-start; gap: 13px; padding: 14px 0; }
.vt-step:not(:last-child) { border-bottom: 1px solid var(--border); }
.vt-step__ic { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; background: var(--bg-3, #0e1524); color: var(--muted); border: 1px solid var(--border); }
.vt-step.is-done .vt-step__ic { background: var(--accent); color: #fff; border-color: transparent; font-size: 0; }
.vt-step.is-done .vt-step__ic::after { content: "✓"; font-size: 15px; font-weight: 700; line-height: 1; }
.vt-step.is-active .vt-step__ic { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.vt-step__body { flex: 1; min-width: 0; padding-top: 2px; }
.vt-step__title { font-weight: 700; font-size: 14px; }
.vt-step__sub { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.vt-step__badge { margin-left: auto; align-self: center; font-size: 11px; font-weight: 700; color: var(--muted-2); white-space: nowrap; }
.vt-step.is-done .vt-step__badge { color: var(--up); }
.vt-step.is-active .vt-step__badge { color: var(--accent); }

/* KYC upload form */
.vt-kyc-intro { font-size: 12.5px; line-height: 1.55; color: var(--muted); background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.vt-kyc-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 6px; }
.vt-upload { position: relative; aspect-ratio: 3 / 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--bg-2); border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); cursor: pointer; background-size: cover; background-position: center; overflow: hidden; padding: 8px; text-align: center; transition: border-color .15s, background-color .15s; }
.vt-upload:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 7; }
.vt-upload:hover { border-color: var(--accent); }
.vt-upload__ic { font-size: 26px; line-height: 1; }
.vt-upload__lbl { font-size: 12px; font-weight: 600; }
.vt-upload__lbl em { color: var(--muted-2); font-style: normal; font-weight: 500; }
.vt-upload.has-img { border-style: solid; border-color: var(--up); }
.vt-upload.has-img .vt-upload__ic, .vt-upload.has-img .vt-upload__lbl { display: none; }
.vt-upload.has-img::after { content: "✓ Change"; position: absolute; right: 7px; bottom: 7px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(8, 15, 26, .78); border-radius: 6px; padding: 3px 8px; }
.vt-upload.is-loading { opacity: .6; pointer-events: none; }
.vt-kyc-err { min-height: 16px; margin: 8px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--down); }

/* 2fa */
.vt-2fa-box { margin-top: 16px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: flex; gap: 16px; align-items: center; }
.vt-2fa-qr { width: 92px; height: 92px; border-radius: 8px; flex: 0 0 auto; background: #fff; }
.vt-2fa-secret { font-size: 12px; color: var(--muted); line-height: 1.8; }
.vt-2fa-secret b { font-family: var(--mono); font-size: 13px; color: var(--text); letter-spacing: .06em; word-break: break-all; }

/* segments */
.vt-segment { display: flex; gap: 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 5px; margin-bottom: 16px; }
.vt-segment--wrap { flex-wrap: wrap; }
.vt-segment button { flex: 1; min-width: 56px; padding: 10px 0; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.vt-segment button:hover { color: var(--text); }
.vt-segment button.is-active { background: var(--accent-dim); color: var(--accent); }

/* accent swatches */
.vt-swatches { display: flex; gap: 12px; }
.vt-swatch { width: 38px; height: 38px; border-radius: 50%; background: var(--sw); border: 2px solid transparent; box-shadow: 0 0 0 2px var(--bg-0) inset; transition: border-color .12s; }
.vt-swatch.is-active { border-color: var(--text); }

/* copy boxes (referral) */
.vt-copybox { display: flex; align-items: center; gap: 8px; background: var(--bg-0); border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 12px; }
.vt-copybox code { flex: 1; font-family: var(--mono); font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-ref-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.vt-ref-lead { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* Affiliate — "My Team" (wide rail panel) */
.vt-team { max-width: 940px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; --tm-gold:#F5B23E; --tm-gold-dim:#B78A44; --tm-pos:#2FD08A; }
.vt-tm__hero { border: 1px solid var(--border); border-radius: 18px; padding: 22px; text-align: center; background: radial-gradient(140% 130% at 88% -20%, rgba(42,148,243,.18), transparent 55%), linear-gradient(160deg, var(--bg-2), var(--bg-1)); }
.vt-tm__eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.vt-tm__bal { font-size: 42px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; color: var(--tm-gold); margin: 8px 0 5px; font-variant-numeric: tabular-nums; }
.vt-tm__soon { font-size: 12.5px; color: var(--muted); }
.vt-tm__soon b { color: var(--tm-gold-dim); }
.vt-tm__wd { margin-top: 15px; }
.vt-tm__wd:disabled { opacity: .5; cursor: not-allowed; }
.vt-tm__tierline { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.vt-tm__tier { display: inline-flex; align-items: center; gap: 5px; background: rgba(245,178,62,.14); color: var(--tm-gold); border: 1px solid rgba(245,178,62,.34); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.vt-tm__tier b { color: var(--text); }
.vt-tm__next { font-size: 12px; color: var(--muted); }
.vt-tm__invite { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.vt-tm__invite .vt-field { margin-bottom: 0; }
.vt-tm__period { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; z-index: 40; }
.vt-tm__seg { display: flex; background: var(--bg-1); border: 1px solid var(--border); border-radius: 11px; padding: 3px; }
.vt-tm__seg button { appearance: none; border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; color: var(--muted); padding: 8px 16px; border-radius: 8px; }
.vt-tm__seg button.on { background: var(--accent); color: #fff; }
.vt-tm__datewrap { position: relative; }
.vt-tm__datefield { display: flex; align-items: center; gap: 8px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 11px; padding: 9px 12px; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.vt-tm__datefield > svg { width: 15px; height: 15px; color: var(--muted); }
.vt-tm__datefield .chev { width: 13px; height: 13px; color: var(--muted); }
.vt-cal { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 286px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; box-shadow: 0 22px 55px -18px rgba(0,0,0,.7); display: none; }
.vt-cal.show { display: block; }
.vt-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.vt-cal__cap { font-size: 13.5px; font-weight: 800; color: var(--text); }
.vt-cal__nav { width: 30px; height: 30px; display: grid; place-items: center; background: transparent; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); cursor: pointer; }
.vt-cal__nav:hover { color: var(--text); border-color: var(--accent); }
.vt-cal__nav svg { width: 15px; height: 15px; }
.vt-cal__wk { display: grid; grid-template-columns: repeat(7,1fr); margin-bottom: 2px; }
.vt-cal__wk span { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; padding: 5px 0; }
.vt-cal__grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.vt-cal .cd { aspect-ratio: 1; display: grid; place-items: center; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; border-radius: 9px; cursor: pointer; }
.vt-cal .cd:hover { background: var(--bg-2); }
.vt-cal .cd.out { color: var(--muted); opacity: .4; cursor: default; }
.vt-cal .cd.out:hover { background: transparent; }
.vt-cal .cd.today { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.vt-cal .cd.sel, .vt-cal .cd.sel:hover { background: var(--accent); color: #fff; font-weight: 700; }
.vt-cal__months { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.vt-cal .cm { padding: 12px 0; border: 0; background: var(--bg-1); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; border-radius: 9px; cursor: pointer; }
.vt-cal .cm:hover { background: var(--bg-2); }
.vt-cal .cm.sel, .vt-cal .cm.sel:hover { background: var(--accent); color: #fff; }
.vt-tm__earned { display: flex; align-items: baseline; justify-content: space-between; background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.vt-tm__earned .el { font-size: 13px; color: var(--muted); font-weight: 600; }
.vt-tm__yc { display: flex; align-items: baseline; justify-content: space-between; background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.vt-tm__yc span { font-size: 13px; color: var(--muted); font-weight: 600; }
.vt-tm__yc b { font-size: 22px; font-weight: 800; color: var(--tm-gold, #F5B23E); font-variant-numeric: tabular-nums; }
.vt-rfs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.vt-rfs__col { padding: 0 16px 14px; }
.vt-rfs__col + .vt-rfs__col { border-left: 1px solid var(--border); }
.vt-rfs__h { font-size: 13px; font-weight: 800; text-align: center; padding: 9px 6px; margin: 0 -16px 14px; background: var(--accent, #2A94F3); color: #fff; }
.vt-rfs__s { text-align: center; margin-bottom: 12px; }
.vt-rfs__s b { display: block; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.vt-rfs__s b.pos { color: var(--tm-pos, #2FD08A); }
.vt-rfs__s b.gold { color: var(--tm-gold, #F5B23E); }
.vt-rfs__s span { font-size: 12.5px; color: var(--muted); }
.vt-tr { display: flex; flex-direction: column; gap: 4px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.vt-tr__row { display: grid; grid-template-columns: 54px 1fr 1fr 1fr; gap: 8px; align-items: center; padding: 7px 6px; border-radius: 8px; font-size: 13px; }
.vt-tr__row:not(.vt-tr__head):not(.vt-tr__total) { background: var(--bg-2); }
.vt-tr__head { font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 700; padding-bottom: 2px; }
.vt-tr__head span:not(:first-child), .vt-tr__row span:not(.vt-tr__lv) { text-align: right; }
.vt-tr__lv { font-weight: 800; }
.vt-tr__bets { font-variant-numeric: tabular-nums; }
.vt-tr__rate { color: var(--accent, #2A94F3); font-weight: 700; font-variant-numeric: tabular-nums; }
.vt-tr__comm { color: var(--tm-gold, #F5B23E); font-weight: 700; font-variant-numeric: tabular-nums; }
.vt-tr__total { border-top: 1px solid var(--border); margin-top: 2px; font-weight: 800; }
.vt-tr__total .vt-tr__comm { font-size: 15px; }
.vt-tr__cap { font-size: 11px; color: var(--muted); padding: 6px 6px 0; line-height: 1.4; }
.vt-tm__earned .er { display: flex; align-items: baseline; gap: 9px; }
.vt-tm__earned .ea { font-size: 24px; font-weight: 800; color: var(--tm-gold); font-variant-numeric: tabular-nums; }
.vt-tm__earned .ea.zero { color: var(--muted); }
.vt-tm__earned .en { font-size: 11.5px; color: var(--muted); }
.vt-tm__lh { margin: 4px 2px -4px; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; }
#vt-tm-list { display: flex; flex-direction: column; gap: 10px; }
.vt-tm__r { display: flex; align-items: center; gap: 13px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 14px 15px; }
.vt-tm__r .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.vt-tm__r .dot.ok { background: var(--tm-pos); box-shadow: 0 0 0 3px rgba(47,208,138,.16); }
.vt-tm__r .dot.no { background: var(--muted); box-shadow: 0 0 0 3px rgba(140,160,188,.14); }
.vt-tm__r .who { flex: 1; min-width: 0; }
.vt-tm__r .uid { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text); }
.vt-tm__r .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.vt-tm__r .sub b { color: var(--text); font-weight: 700; }
.vt-tm__r .st { display: inline-flex; align-items: center; gap: 4px; }
.vt-tm__r .st.cleared { color: var(--tm-pos); }
.vt-tm__r .st.clearing { color: var(--tm-gold-dim); }
.vt-tm__r .st svg { width: 11px; height: 11px; }
.vt-tm__r .earn { text-align: right; flex: 0 0 auto; }
.vt-tm__r .amt { font-size: 18px; font-weight: 800; color: var(--tm-gold); font-variant-numeric: tabular-nums; }
.vt-tm__r .amt.pend { color: var(--tm-gold-dim); }
.vt-tm__r .amt.dim { color: var(--muted); }
.vt-tm__r .elbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 1px; }
.vt-tm__empty { text-align: center; padding: 34px 18px; background: var(--bg-1); border: 1px dashed var(--border); border-radius: 14px; }
.vt-tm__empty .et { font-size: 14px; font-weight: 700; color: var(--muted); }
.vt-tm__empty .es { font-size: 12px; color: var(--muted); margin-top: 4px; }
.vt-tm__foot { text-align: center; color: var(--muted); font-size: 11.5px; line-height: 1.6; padding: 2px 6px; }
.vt-tm__foot b { color: var(--text); }

/* boost */
.vt-boost { text-align: center; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 28px 18px; margin-bottom: 16px; }
.vt-boost-cube { font-size: 48px; }
/* Live position overlay on the chart — entry line + countdown/amount badge (open trades only) */
#pos-overlay { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.pos-line { position: absolute; height: 0; border-top: 2px dotted; transform: translateY(-50%); opacity: .95; }
.pos-line.up { border-color: var(--up); }
.pos-line.down { border-color: var(--down); }
.pos-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(6, 12, 20, .55); }
.pos-dot.up { background: var(--up); }
.pos-dot.down { background: var(--down); }
.pos-badge { position: absolute; transform: translate(-100%, -50%); display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 8px; font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; color: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.pos-badge.up { background: linear-gradient(180deg, #3597e6, #1f6fc0); }
.pos-badge.down { background: linear-gradient(180deg, #f6465d, #cc2c40); }
.pos-badge__t { font-variant-numeric: tabular-nums; }
.pos-badge__a { padding-left: 6px; border-left: 1px solid rgba(255, 255, 255, .38); opacity: .96; }

/* ---------- DETRADE High/Low gold skin (scoped: .chart-area.is-detrade) ---------- */
.chart-area.is-detrade #pos-overlay .pos-line { border-color: #E74C3C !important; }   /* red entry line; the countdown+stake badge stays */
.chart-area.is-detrade #pos-overlay .pos-dot  { background: #E74C3C !important; }
.chart-area.is-detrade .chart-price > span:first-child { color: #fff; }                 /* white price readout */
.chart-area.is-detrade #chart-toggle { display: none; }                                /* High/Low is always the continuous line — the Candles/Lines toggle is inert here */

#hl-gauge { display: none; position: absolute; top: 0; bottom: 0; right: 0; width: 54px;
            pointer-events: none; z-index: 5; font-family: var(--mono); }
.chart-area.is-detrade #hl-gauge { display: block; }
.hl-g__strip { position: absolute; right: 3px; top: 9%; bottom: 9%; width: 4px; border-radius: 3px; }
.hl-g__up { position: absolute; left: 0; right: 0; top: 0; height: 50%; background: #1d9e56; border-radius: 3px 3px 0 0; }
.hl-g__dn { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; background: #c93b30; border-radius: 0 0 3px 3px; }
.hl-g__handle { position: absolute; right: -3px; top: 50%; width: 11px; height: 5px; border-radius: 3px;
                background: #b3bec1; transform: translateY(-50%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.hl-g__lbl { position: absolute; right: 9px; font-size: 10px; font-weight: 800; letter-spacing: .02em;
             padding: 1px 4px; border-radius: 4px; background: rgba(16, 21, 28, .82); }
.hl-g__lbl--up { top: 6%; color: #2db467; }
.hl-g__lbl--dn { bottom: 6%; color: #E74C3C; }

/* Casino Games — reference-style: red-badge headers, trending carousel, responsive grid + live counts */
.vt-cat { margin-bottom: 22px; }
.vt-cat__head { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; margin: 6px 0 12px; color: var(--text); }
.vt-cat__badge { flex: 0 0 auto; display: inline-flex; align-items: center; }
.vt-cat__badge svg { width: 19px; height: 19px; }
.vt-cat__title { flex: 1 1 auto; }
.vt-cat__all { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: 12px; font-weight: 700; line-height: 1; color: var(--up, #2A94F3); background: rgba(42,148,243,.12); border: 1px solid rgba(42,148,243,.4); padding: 5px 11px; border-radius: 999px; cursor: pointer; -webkit-appearance: none; transition: background .12s, transform .08s; }
.vt-cat__all:hover { background: rgba(42,148,243,.2); }
.vt-cat__all:active { transform: scale(.94); }
.vt-cat__all svg { width: 12px; height: 12px; }
/* ---- All-Games browser (opened from "All N ›"): back header + search + provider tabs + grid ---- */
.vt-ag__bar { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; }
.vt-ag__back { display: inline-flex; align-items: center; gap: 2px; font: inherit; font-size: 13px; font-weight: 700; color: var(--text); background: none; border: none; padding: 4px 6px 4px 0; margin: 0; cursor: pointer; -webkit-appearance: none; }
.vt-ag__back svg { width: 15px; height: 15px; }
.vt-ag__back:active { transform: scale(.96); }
.vt-ag__title { flex: 1 1 auto; font-weight: 800; font-size: 18px; color: var(--text); }
.vt-ag__count { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--up, #2A94F3); background: rgba(42, 148, 243, .14); border: 1px solid rgba(42, 148, 243, .35); padding: 3px 9px; border-radius: 999px; }
.vt-ag__search { display: flex; align-items: center; gap: 8px; background: var(--bg-0); border: 1px solid var(--border-2); border-radius: 12px; padding: 0 12px; margin-bottom: 12px; transition: border-color .12s; }
.vt-ag__search:focus-within { border-color: var(--up, #2A94F3); }
.vt-ag__sic { flex: 0 0 auto; width: 16px; height: 16px; color: var(--muted); }
.vt-ag__search input { flex: 1 1 auto; background: none; border: none; outline: none; color: var(--text); font: inherit; font-size: 14px; padding: 11px 0; }
.vt-ag__search input::placeholder { color: var(--muted-2); }
.vt-ag__tabs { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 16px; }
.vt-ag__tabs::-webkit-scrollbar { display: none; }
.vt-ag__tab { flex: 0 0 auto; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--bg-2); border: 1px solid var(--border); padding: 7px 14px; border-radius: 999px; cursor: pointer; -webkit-appearance: none; white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.vt-ag__tab:hover { color: var(--text); }
.vt-ag__tab.is-active { color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-color: transparent; }
.vt-ag__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px 10px; }
.vt-ag__card .vt-game__thumb { height: auto; aspect-ratio: 4 / 5; border-radius: 12px; }
.vt-ag__live { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 1px; }
.vt-ag__live i { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #24c07a; box-shadow: 0 0 0 3px rgba(36, 192, 122, .18); }
.vt-ag__live b { color: var(--text); font-weight: 800; }
.vt-ag__live em { font-style: normal; }
.vt-ag__empty { grid-column: 1 / -1; text-align: center; padding: 30px 0; }
/* Reference-style card: art with the game name overlaid, blue RTP pill below. 3 across. */
.vt-casino-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vt-game { display: flex; flex-direction: column; gap: 6px; padding: 0; border: none; background: transparent; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.vt-game__thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--bg-2); box-shadow: 0 4px 14px rgba(0, 0, 0, .28); transition: transform .12s, box-shadow .12s; }
.vt-game:hover .vt-game__thumb, .vt-game:active .vt-game__thumb { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .42); }
.vt-game__ph { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 24px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.vt-game__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vt-game__scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 44%; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .82)); pointer-events: none; }
.vt-game__name { position: absolute; left: 8px; right: 8px; bottom: 8px; color: #fff; font-weight: 800; font-size: 12px; line-height: 1.12; text-transform: uppercase; letter-spacing: .3px; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.vt-game__ribbon { position: absolute; left: 7px; right: 7px; top: 7px; text-align: center; background: linear-gradient(180deg, #ffc93c, #e8990d); color: #3a2500; font-size: 8.5px; font-weight: 800; padding: 3px 4px; border-radius: 6px; text-transform: uppercase; letter-spacing: .3px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.vt-game__rtp { display: block; text-align: center; font-size: 10.5px; font-weight: 700; color: #d8e8ff; background: linear-gradient(180deg, #2f6fd6, #235bb0); padding: 5px 4px; border-radius: 8px; letter-spacing: .2px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.vt-game__rtp b { color: #fff; font-weight: 800; }
.vt-game__players { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: var(--muted); padding: 3px 4px; }
.vt-game__players i { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #24c07a; box-shadow: 0 0 0 3px rgba(36, 192, 122, .16); }
.vt-game__players b { color: var(--text); font-weight: 800; }
.vt-game__players em { font-style: normal; color: var(--muted); font-weight: 600; }

/* Activity / Promotions center — banner cards (list) + rich detail */
#vt-activity-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 860px) { #vt-activity-list { grid-template-columns: repeat(3, 1fr); } #vt-activity-list .vt-act-card { aspect-ratio: 16 / 10; } }
.vt-act-card { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; aspect-ratio: 20 / 9; background: var(--bg-2); cursor: pointer; color: inherit; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); transition: transform .12s, box-shadow .12s; }
.vt-act-card:hover, .vt-act-card:active { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .42); }
.vt-act-card__ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; background: linear-gradient(135deg, #123a6b, #0b1f3a 60%, #1a2a52); }
.vt-act-card__phtitle { color: #eaf2ff; font-weight: 800; font-size: 18px; line-height: 1.15; text-align: center; text-transform: uppercase; letter-spacing: .4px; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.vt-act-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* detail */
.vt-act-hero { margin: -2px -2px 14px; border-radius: 12px; overflow: hidden; }
.vt-act-hero img { display: block; width: 100%; height: auto; }
.vt-act-content { color: var(--text); font-size: 14px; line-height: 1.6; }
.vt-act-content h2, .vt-act-content h3 { font-size: 18px; font-weight: 800; margin: 4px 0 10px; color: var(--text); }
.vt-act-content h4 { font-size: 14px; font-weight: 800; margin: 18px 0 8px; color: var(--accent); text-transform: uppercase; letter-spacing: .3px; }
.vt-act-content p { margin: 0 0 12px; color: var(--muted); }
.vt-act-content strong { color: var(--text); }
.vt-act-content ul { margin: 0 0 12px; padding-left: 18px; color: var(--muted); }
.vt-act-content li { margin: 0 0 7px; }
.vt-act-content .vt-act-note { color: var(--warn-soft); font-weight: 600; }
.vt-act-content a { color: var(--accent); text-decoration: underline; word-break: break-all; }
.vt-act-content div { color: var(--muted); margin: 0 0 12px; }   /* contentEditable wraps loose text in <div>; match <p> */
.vt-act-content img { display: block; max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }   /* inline WebP images from the rich editor — never overflow the sheet */
/* admin rich-text is arbitrary HTML — long tokens/URLs, wide tables & fixed-width embeds must never force a mobile side-scroll */
.vt-act-content { overflow-wrap: anywhere; word-break: break-word; }
.vt-act-content iframe, .vt-act-content video, .vt-act-content embed { display: block; max-width: 100%; margin: 12px 0; border: 0; border-radius: 10px; }
.vt-act-content pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; }
.vt-act-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vt-boost-count { font-size: 15px; margin: 8px 0 6px; color: var(--muted); }
.vt-boost-count b { font-family: var(--mono); font-size: 26px; color: var(--text); }
.vt-boost-desc { font-size: 12.5px; color: var(--muted); }

/* bell list */
.vt-notif { display: flex; gap: 12px; padding: 13px 14px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 8px; }
.vt-notif__ic { font-size: 18px; flex: 0 0 auto; }
.vt-notif__body { flex: 1; }
.vt-notif__title { font-size: 13.5px; font-weight: 700; }
.vt-notif__text { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.vt-notif__time { font-size: 11px; color: var(--muted-2); margin-top: 4px; }
.vt-notif.is-unread { border-color: var(--accent); }

@media (max-width: 440px) {
  .vt-sheet { width: 100vw; border-left: none; }
}
/* Customer Service = ONE view (#vt-view-cs); the chat is inner content toggled by .cs-chatting (NOT a
   separate stacked .vt-view, which mis-positioned). Welcome + chat therefore always render aligned. */
.cs-back { display: none; }
#vt-view-cs.cs-chatting .cs-back { display: inline-grid; }
.cs-chat-area { display: none; flex: 1; min-height: 0; flex-direction: column; }
#vt-view-cs.cs-chatting .cs-welcome { display: none; }
#vt-view-cs.cs-chatting .cs-chat-area { display: flex; }
/* "End chat" pill — only shown while chatting; sits between the title and the close X */
.cs-end { display: none; flex: 0 0 auto; margin-left: auto; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(0,0,0,.08); background: #f5efe2; color: #6b6470; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.cs-end:hover { background: #ffe1e1; border-color: rgba(246,70,93,.35); color: #d5344a; }
#vt-view-cs.cs-chatting .cs-end { display: inline-flex; align-items: center; }
/* centered grey system line in the message list (e.g. "chat ended") */
.cs-sys { align-self: center; max-width: 82%; margin: 8px auto 4px; padding: 6px 12px; border-radius: 10px; background: #f3eee4; color: #6b6470; font-size: 12px; line-height: 1.4; text-align: center; }
/* "you're in the queue" card shown while the ticket waits for an agent to accept */
.cs-wait { align-self: center; width: 100%; max-width: 300px; margin: 6px auto 12px; background: #fff7dd; border: 1px solid #f3e2a6; border-radius: 14px; padding: 16px; text-align: center; }
.cs-wait__ring { width: 26px; height: 26px; margin: 0 auto 9px; border-radius: 50%; border: 3px solid #f0d98a; border-top-color: #f5a800; animation: csSpin .8s linear infinite; }
.cs-wait__t { font-size: 14.5px; font-weight: 800; color: #3d2a00; }
.cs-wait__s { font-size: 12px; line-height: 1.45; color: #6b6470; margin-top: 5px; }
@keyframes csSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cs-wait__ring { animation: none; } }
/* in-widget "End this chat?" confirmation — covers the CS view (.vt-view is position:absolute inset:0) */
.cs-confirm { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(20, 14, 4, .34); opacity: 0; transition: opacity .16s; }
.cs-confirm.show { opacity: 1; }
.cs-confirm__card { width: 100%; max-width: 300px; background: #fff; border-radius: 16px; padding: 20px 18px 16px; box-shadow: 0 18px 48px rgba(0, 0, 0, .32); text-align: center; transform: translateY(6px) scale(.98); transition: transform .16s; }
.cs-confirm.show .cs-confirm__card { transform: translateY(0) scale(1); }
.cs-confirm__t { font-size: 16px; font-weight: 800; color: #26202b; margin-bottom: 6px; }
.cs-confirm__b { font-size: 13px; line-height: 1.5; color: #6b6470; margin-bottom: 16px; }
.cs-confirm__row { display: flex; gap: 10px; }
.cs-confirm__btn { flex: 1; padding: 11px 12px; border-radius: 11px; font-size: 13.5px; font-weight: 800; cursor: pointer; border: 1px solid transparent; transition: filter .12s, background .12s; }
.cs-confirm__btn--cancel { background: #f2ece0; color: #5a5560; border-color: rgba(0, 0, 0, .06); }
.cs-confirm__btn--cancel:hover { background: #e9e1d1; }
.cs-confirm__btn--end { background: linear-gradient(135deg, #f6465d, #d61f3a); color: #fff; box-shadow: 0 6px 16px rgba(214, 31, 58, .3); }
.cs-confirm__btn--end:hover { filter: brightness(1.05); }
/* Phones + tablets (<=859px): FULL-SCREEN. Desktop (>=860px): compact floating widget, bottom-right. */
@media (max-width: 859px) {
  .vt-overlay:has(.cs-view.is-active) .vt-sheet { top: 0; bottom: auto; left: 0; right: 0; width: 100%; max-width: 100%; height: 100%; border-radius: 0; border: none; }
}
@media (min-width: 860px) {
  .vt-overlay:has(.cs-view.is-active) { background: rgba(4, 8, 12, 0.42); }
  .vt-overlay:has(.cs-view.is-active) .vt-sheet {
    top: auto; bottom: 22px; right: 22px; left: auto;
    width: 400px; max-width: 400px; height: min(660px, calc(100vh - 96px));
    border-radius: 18px; border: 1px solid rgba(0, 0, 0, 0.06); box-shadow: 0 26px 64px rgba(0, 0, 0, 0.45);
  }
}
/* belt-and-suspenders: hard-hide any non-active view while CS is open, so nothing can ever bleed through */
.vt-overlay:has(.cs-view.is-active) .vt-view:not(.is-active) { visibility: hidden; }

/* Desktop: Arcade + Activity render IN-PAGE — fill the content area right of the rail and below the
   top bar (both stay visible & interactive). No dimmed drawer sliding over the chart. */
@media (min-width: 860px) {
  body.vt-lobby .dock { display: none; }   /* the in-page lobby covers the content area — hide the trades dock behind it */
  body.vt-lobby .rail { z-index: 90; }     /* keep the rail above the in-page lobby */
  body.vt-lobby .rail__panel { width: 250px; box-shadow: 8px 0 30px -8px rgba(0, 0, 0, .55); border-right-color: var(--border-2); }   /* fixed expanded sidebar (no hover needed) */
  body.vt-lobby .rail__label, body.vt-lobby .rail__brandtext { opacity: 1; transform: none; }
  .vt-overlay.is-wide #vt-casino-grid { max-width: 1480px; margin: 0 auto; }   /* cap width so 6 cards aren't oversized on wide screens */
  .vt-overlay.is-wide { top: var(--ov-top, 56px); left: var(--ov-left, 64px); background: transparent; }
  .vt-overlay.is-wide .vt-sheet { position: absolute; inset: 0; width: 100%; max-width: none; border-left: none; box-shadow: none; transform: none; background: var(--bg-0); }
  .vt-overlay.is-wide .vt-view { background: var(--bg-0); }
  .vt-overlay.is-wide .vt-vhead { padding-left: 24px; padding-right: 20px; }
  .vt-overlay.is-wide #vt-view-casino .vt-scroll,
  .vt-overlay.is-wide #vt-view-activity .vt-scroll { padding-left: 24px; padding-right: 24px; }
  .vt-overlay.is-wide .vt-casino-grid { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 14px; }
  .vt-overlay.is-wide #vt-view-activity .vt-scroll { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-content: start; }
}

/* ============================ AUTO-TRADE BOT ============================ */
.ab { display: flex; flex-direction: column; gap: 12px; padding: 2px; }
.ab__signal { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); font-size: 12.5px; }
.ab__sig-lead { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.ab__sig-asset { font-weight: 700; color: var(--text); }
.ab__sig-dir { margin-left: auto; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--muted); }
.ab__sig-dir.up { color: var(--up); } .ab__sig-dir.down { color: var(--down); }
.ab__sig-conf { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.ab__lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.ab__hint { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
.ab__field { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); margin-top: 6px; }
.ab__field input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px; }
.ab__field--sm { padding: 8px 10px; margin-top: 6px; }
.ab__field--sm input { font-size: 13px; }
.ab__unit { color: var(--muted-2); font-size: 11px; font-weight: 700; }
.ab__chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; margin-top: 6px; }
.ab__chips button { padding: 8px 0; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); font-weight: 700; font-size: 12px; cursor: pointer; transition: .14s; }
.ab__chips button:hover { border-color: var(--border-2); }
.ab__chips button.on { background: var(--accent-dim); border-color: transparent; color: var(--accent); }
.ab__strat { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.ab__opt { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; transition: .14s; }
.ab__opt:hover { border-color: var(--border-2); }
.ab__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.ab__radio { flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-2); margin-top: 2px; position: relative; transition: .14s; }
.ab__opt input:checked ~ .ab__radio { border-color: var(--accent); }
.ab__opt input:checked ~ .ab__radio::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--accent); }
.ab__opt:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.ab__opt-txt b { font-size: 13.5px; display: block; color: var(--text); }
.ab__opt-txt small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; line-height: 1.35; }
.ab__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ab__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); text-align: center; }
.ab__stats b { display: block; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px; color: var(--text); }
.ab__stats b.up { color: var(--up); } .ab__stats b.down { color: var(--down); }
.ab__stats span { color: var(--muted); font-size: 10.5px; }
.ab__go { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 14px; border-radius: 12px; border: none; cursor: pointer; font-weight: 800; font-size: 15px; color: #042038; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 24px rgba(42, 148, 243, .3); transition: .15s; }
.ab__go:hover { filter: brightness(1.06); }
.ab__go .ab__dot { width: 9px; height: 9px; border-radius: 50%; background: #042038; opacity: .5; }
.ab__go.is-on { background: linear-gradient(135deg, var(--down), #c62f45); color: #fff; box-shadow: 0 8px 24px rgba(246, 70, 93, .3); }
.ab__go.is-on .ab__dot { background: #fff; opacity: 1; animation: abpulse 1s infinite; }
@keyframes abpulse { 50% { opacity: .25; } }
.ab__status { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.ab__warn { margin: 0; color: var(--muted-2); font-size: 11px; line-height: 1.5; }

/* ============================ LAST-TRADES TAPE ============================ */
.tape { flex: 0 0 232px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--bg-1); border-left: 1px solid var(--border); }
.tape__head { padding: 13px 16px; font-weight: 800; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.tape__cols { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 9px 16px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--muted-2); }
.tape__cols span:nth-child(2), .tape__cols span:nth-child(3) { text-align: right; }
.tape__rows { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 4px; }
.tape__rows::-webkit-scrollbar { width: 7px; }
.tape__row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 3px 16px; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; animation: tapein .18s ease; }
.tape__row span:nth-child(2) { text-align: right; color: var(--text); }
.tape__row span:nth-child(3) { text-align: right; color: var(--muted); }
.tape__row.buy  span:first-child { color: var(--up); }
.tape__row.sell span:first-child { color: var(--down); }
@keyframes tapein { from { opacity: 0; transform: translateY(-3px); } }
.tape__pressure { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }
.tape__tag { font-weight: 800; font-size: 12px; }
.tape__tag--b { color: var(--up); } .tape__tag--s { color: var(--down); }
.tape__pressure b { font-family: var(--mono); font-size: 11.5px; font-weight: 700; }
.tape__pressure b.up { color: var(--up); } .tape__pressure b.down { color: var(--down); }
.tape__bar { flex: 1; height: 6px; border-radius: 4px; background: rgba(246, 70, 93, .38); overflow: hidden; }
.tape__bar i { display: block; height: 100%; width: 50%; border-radius: 4px; background: var(--up); transition: width .3s ease; }
@media (max-width: 1024px) { .tape { display: none; } }

/* ============================================================= *
 *  Order book — mobile-only bid/ask depth ladder under the chart
 * ============================================================= */
.mbook { display: none; }
.mbook__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.mbook__title { font-weight: 800; font-size: 13.5px; color: var(--text); }
.mbook__pressure { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; }
.mbook__pressure b { font-family: var(--mono); font-weight: 700; }
.mbook__pressure b.up { color: var(--up); }
.mbook__pressure b.down { color: var(--down); }
.mbook__pbar { width: 46px; height: 5px; border-radius: 3px; background: rgba(246, 70, 93, .35); overflow: hidden; }
.mbook__pbar i { display: block; height: 100%; width: 50%; background: var(--up); border-radius: 3px; transition: width .3s ease; }
.mbook__toggle { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--muted); background: transparent; border: none; }
.mbook__toggle svg { width: 18px; height: 18px; transition: transform .2s ease; }
.mbook.is-collapsed .mbook__toggle svg { transform: rotate(-90deg); }
.mbook.is-collapsed .mbook__body { display: none; }
.mbook__cols { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding: 7px 14px 5px; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--muted-2); }
.mbook__cols span:nth-child(2), .mbook__cols span:nth-child(3) { text-align: right; }
.mbook__row { position: relative; display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding: 3px 14px; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.mbook__depth { position: absolute; top: 1px; bottom: 1px; right: 0; width: 0; border-radius: 3px 0 0 3px; transition: width .35s ease; }
.mbook__row--ask .mbook__depth { background: rgba(246, 70, 93, .14); }
.mbook__row--bid .mbook__depth { background: rgba(42, 148, 243, .14); }
.mbook__row > span { position: relative; z-index: 1; }
.mbook__row--ask .mbook__px { color: var(--down); }
.mbook__row--bid .mbook__px { color: var(--up); }
.mbook__sz { text-align: right; color: var(--text); }
.mbook__tot { text-align: right; color: var(--muted); }
.mbook__mid { display: flex; align-items: baseline; gap: 10px; padding: 6px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.mbook__last { font-family: var(--mono); font-size: 16px; font-weight: 800; color: var(--text); }
.mbook__last.up { color: var(--up); }
.mbook__last.down { color: var(--down); }
.mbook__spread { margin-left: auto; font-size: 11px; color: var(--muted); }
.mbook__spread i { font-style: normal; font-family: var(--mono); color: var(--text); }
@media (max-width: 768px) {
  .mbook { display: block; width: 100%; background: var(--bg-1); border-top: 1px solid var(--border); }
}

/* ---------- dual-account switcher (Demo/Real top-bar dropdown) ---------- */
.wallet__meta { border-radius: 8px; padding: 2px 6px; margin: -2px -6px; transition: background .12s; }
.wallet__meta:hover { background: var(--bg-2); }
.acct-switch {
  position: fixed; z-index: 4000; width: 280px; max-width: calc(100vw - 16px);
  background: var(--bg-1); border: 1px solid var(--border-2); border-radius: 14px;
  padding: 8px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-6px); transition: opacity .14s ease, transform .14s ease;
}
.acct-switch.is-open { opacity: 1; transform: translateY(0); }
.acct-switch__hd { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 8px; }
.acct-switch__opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px; margin: 2px 0; border: 1.5px solid transparent; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; text-align: left; font-family: inherit; }
.acct-switch__opt:hover { background: var(--bg-2); }
.acct-switch__opt.is-active { border-color: var(--accent); background: var(--accent-dim); }
.acct-switch__k { display: flex; flex-direction: column; min-width: 0; }
.acct-switch__k b { font-size: 14px; font-weight: 700; }
.acct-switch__k small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.acct-switch__v { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acct-switch__reset { width: 100%; margin-top: 6px; padding: 9px; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12.5px; font-family: inherit; }
.acct-switch__reset:hover { color: var(--text); border-color: var(--accent); }

/* Account chip = the single entry point: deposit / withdraw / switch all live in its dropdown */
.wallet { cursor: pointer; user-select: none; transition: border-color .12s, background .12s; }
.wallet:hover { border-color: var(--muted); }
.wallet__caret { color: var(--muted); flex: 0 0 auto; margin-left: 1px; transition: transform .16s ease; }
.wallet.is-open .wallet__caret { transform: rotate(180deg); }
#reset-btn { display: none !important; }   /* folded into the account dropdown */
.acct-switch__actions { display: flex; gap: 8px; margin-top: 8px; }
.acct-switch__act { flex: 1; padding: 11px 10px; border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; border: 1px solid transparent; transition: filter .12s, border-color .12s, color .12s; }
.acct-switch__act--dep { background: var(--accent); color: #04233f; }
.acct-switch__act--dep:hover { filter: brightness(1.06); }
.acct-switch__act--wd { background: transparent; border-color: var(--border-2); color: var(--text); }
.acct-switch__act--wd:hover { border-color: var(--accent); color: var(--accent); }
:root[data-theme="light"] .acct-switch__act--dep { color: #ffffff; }

/* ---------- Refer & Earn — "How it works" explainer ---------- */
.vt-help { padding: 6px 2px 28px; }
.vt-help__lead { font-size: 14.5px; line-height: 1.55; color: var(--text); margin: 6px 0 2px; }
.vt-help__lead b { color: var(--accent); }
.vt-help__h { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin: 22px 0 10px; font-weight: 800; }
.vt-help__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.vt-help__steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.vt-help__steps li b { color: var(--text); font-weight: 700; }
.vt-help__n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.vt-help__p { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; }
.vt-help__p b { color: var(--text); }
.vt-help__list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.vt-help__list b { color: var(--text); font-weight: 700; }
.vt-help__fine { margin: 22px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted-2); border-top: 1px solid var(--border); padding-top: 14px; }
/* Refer & Earn explainer — commission tier ladder (rendered from the live /admin config) */
.vt-tl { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 2px; }
/* My Team → per-level (LV1..LV6) earnings breakdown; reuses the .vt-tl tier-ladder rows */
.vt-tm__levels { overflow-x: auto; }
.vt-tm__levels .vt-tl__need { white-space: nowrap; }
.vt-tm__levels .vt-tm__foot { text-align: left; padding-top: 4px; }
.vt-tl__row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); }
.vt-tl__row.is-cur { border-color: var(--accent); background: var(--accent-dim); }
.vt-tl__name { font-weight: 700; color: var(--text); font-size: 13.5px; }
.vt-tl__need { color: var(--muted); font-size: 12px; }
.vt-tl__rate { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }

/* How-to-play — candlestick pattern reference grid (colours match the live chart) */
.hc-up { color: #12d18e; }
.hc-dn { color: #f6465d; }
.howto-candles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 14px; }
.hc { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 6px; text-align: center; }
.hc svg { width: 100%; height: 52px; display: block; }
.hc__name { font-size: 11px; font-weight: 700; color: var(--text); margin-top: 6px; line-height: 1.2; }
.hc__note { font-size: 9.5px; color: var(--muted); margin-top: 2px; line-height: 1.25; }
.hc[data-g="reversal-bull"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, #12d18e 34%, transparent); }
.hc[data-g="reversal-bear"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, #f6465d 34%, transparent); }

/* ============================ CUSTOMER SUPPORT — golden-yellow support-widget ============================ */
/* A deliberately LIGHT, warm golden-yellow support experience (welcome + chat) — a friendly widget that
   stands apart from the dark trading terminal. Yellow surfaces carry DARK text/icons for readability.
   Committed to this single look regardless of the app theme. */
.cs-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #f6465d; border: 2px solid var(--bg-1); pointer-events: none; }   /* unread stays red = notification */

/* desktop rail — golden stand-out treatment so players notice + reach support */
.rail__item--cs { position: relative; border-radius: 12px; margin-top: 6px;
  background: linear-gradient(135deg, rgba(245,168,0,.16), transparent);
  border: 1px solid #f5a800; animation: cs-glow 3s ease-in-out infinite; }
.rail__item--cs .rail__icon { color: #f5a800; }
.rail__item--cs .rail__label { color: #f5a800; font-weight: 800; }
.rail__item--cs.is-active { background: linear-gradient(135deg, #ffce3a, #f5a800); border-color: #f5a800; }
.rail__item--cs.is-active .rail__icon, .rail__item--cs.is-active .rail__label { color: #3d2a00; }
.rail__item--cs .cs-dot { top: 4px; right: 8px; }
@keyframes cs-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(245,168,0,0); } 50% { box-shadow: 0 0 0 4px rgba(245,168,0,.22); } }

/* mobile floating action button (sits above the pinned trade bar + dock) */
.cs-fab { display: none; }
.cs-fab-wrap { display: none; }   /* support-FAB shell — mobile only */
.cs-tab { display: none; }        /* collapsed support-FAB edge tab — mobile only (shown via .is-shown in the mobile media block) */
@keyframes cs-pulse { 0%,100% { box-shadow: 0 8px 22px rgba(245,168,0,.42); transform: scale(1); } 50% { box-shadow: 0 10px 30px rgba(245,168,0,.72); transform: scale(1.06); } }

/* ---- both CS views are a light widget (override the dark vt-sheet) ---- */
.vt-view.cs-view { background: linear-gradient(180deg, #ffffff 52%, #fff7dd 100%); color: #26202b; }
.cs-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #f1ead7; }
.cs-head__id { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.cs-online { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.16); flex: 0 0 auto; }
.cs-head__meta { min-width: 0; }
.cs-head__title { margin: 0; font-size: 15.5px; font-weight: 800; color: #191320; line-height: 1.15; }
.cs-head__sub { font-size: 11.5px; color: #6b6470; margin-top: 1px; }
.cs-x, .cs-back { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #f5efe2; border: none; color: #6b6470; display: inline-grid; place-items: center; cursor: pointer; transition: background .12s, color .12s; }
.cs-x svg, .cs-back svg { width: 16px; height: 16px; }
.cs-x:hover, .cs-back:hover { background: #ece3d3; color: #191320; }

/* ---- welcome / intro ---- */
.cs-welcome { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 18px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; text-align: center; -webkit-overflow-scrolling: touch; }
.cs-hero { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 20px 0 18px; color: #5a3d00;
  background: radial-gradient(circle at 32% 28%, #ffd968, #f2a100 80%);
  box-shadow: 0 14px 30px rgba(242,163,0,.42), 0 0 0 8px rgba(245,168,0,.1); }
.cs-hero svg { width: 38px; height: 38px; }
.cs-welcome__h { margin: 0 0 8px; font-size: 21px; font-weight: 800; color: #17121b; letter-spacing: -.01em; }
.cs-welcome__p { margin: 0 0 20px; max-width: 300px; font-size: 13.5px; line-height: 1.55; color: #6b6470; }
.cs-feats { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.cs-feat { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 1px solid #f2ead4; border-radius: 14px; padding: 13px 14px; box-shadow: 0 2px 10px rgba(20,15,0,.03); }
.cs-feat__ic { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(245,168,0,.15); color: #b57e00; }
.cs-feat__ic svg { width: 18px; height: 18px; }
.cs-feat__t { font-size: 13.5px; font-weight: 600; color: #2a2230; }
.cs-cta { width: 100%; margin-top: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: none; border-radius: 15px; padding: 16px 18px; cursor: pointer;
  background: linear-gradient(150deg, #ffce3a, #f5a800); color: #3d2a00;
  font-size: 14.5px; font-weight: 800; box-shadow: 0 12px 26px rgba(242,163,0,.38); transition: transform .12s, box-shadow .12s; }
.cs-cta:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(242,163,0,.46); }
.cs-cta svg { width: 19px; height: 19px; flex: 0 0 auto; }

/* ---- live chat (light) ---- */
.cs-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 9px; -webkit-overflow-scrolling: touch; }
.cs-hello { color: #6b6470; text-align: center; padding: 34px 22px; line-height: 1.6; font-size: 14px; margin: auto 0; }
.cs-bubble { max-width: 80%; padding: 10px 13px; border-radius: 16px; font-size: 14px; }
.cs-bubble__t { white-space: pre-wrap; word-break: break-word; line-height: 1.42; }
.cs-bubble__meta { font-size: 10px; opacity: .8; margin-top: 3px; }
.cs-bubble--user { align-self: flex-end; background: linear-gradient(150deg, #ffce3a, #f5a800); color: #3d2a00; border-bottom-right-radius: 5px; }
.cs-bubble--user .cs-bubble__meta { color: #6a4e00; }
.cs-bubble--admin { align-self: flex-start; background: #f2f0ec; color: #26202b; border-bottom-left-radius: 5px; }
.cs-bubble--admin .cs-bubble__meta { color: #8f8878; }
.cs-input { flex: 0 0 auto; display: flex; gap: 8px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #f1ead7; background: #fff; }
.cs-text { flex: 1; min-width: 0; background: #f8f4ea; border: 1px solid #ece4d3; border-radius: 13px; color: #1b1420; padding: 12px 14px; font: inherit; font-size: 14px; }
.cs-text::placeholder { color: #a89f8a; }
.cs-text:focus { outline: none; border-color: #f5a800; background: #fff; }
.cs-send { flex: 0 0 auto; width: 46px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(150deg, #ffce3a, #f5a800); color: #3d2a00; border: none; border-radius: 13px; cursor: pointer; }
.cs-send:hover { filter: brightness(1.04); }
/* attach (paperclip) button — icon only, sits before the text field */
.cs-attach { flex: 0 0 auto; width: 42px; display: inline-flex; align-items: center; justify-content: center; background: #f8f4ea; border: 1px solid #ece4d3; border-radius: 13px; color: #8a7f68; cursor: pointer; transition: color .12s, background .12s, border-color .12s; }
.cs-attach:hover { color: #f5a800; border-color: #f5a800; background: #fff; }
/* pending attachment chip above the composer */
.cs-att-pending { flex: 0 0 auto; padding: 8px 12px 0; }
.cs-att-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; background: #fff7dd; border: 1px solid #f3e2a6; border-radius: 11px; padding: 5px 6px 5px 8px; }
.cs-att-chip img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; flex: 0 0 auto; }
.cs-att-chip__ico { font-size: 16px; flex: 0 0 auto; }
.cs-att-chip__name { font-size: 12px; color: #5a3d00; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.cs-att-chip__x { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: none; background: transparent; color: #8a7f68; font-size: 17px; line-height: 1; cursor: pointer; }
.cs-att-chip__x:hover { background: #f3e2a6; color: #5a3d00; }
/* rendered attachments inside chat bubbles */
.cs-att-img { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; margin-bottom: 4px; cursor: zoom-in; }
.cs-att-file { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; background: rgba(0, 0, 0, .05); border-radius: 10px; padding: 8px 11px; margin-bottom: 4px; color: inherit; font-weight: 600; font-size: 13px; }
.cs-att-file:hover { background: rgba(0, 0, 0, .09); }
.cs-att-file__ico { font-size: 15px; }
.cs-att-file__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
/* full-screen image lightbox */
.cs-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, .82); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.cs-lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }

@media (max-width: 768px) {
  /* WRAP is the fixed shell; the ✕ lives beside the button inside it. The button keeps its own pulse. */
  .cs-fab-wrap {
    display: block; position: fixed; right: 16px; bottom: calc(150px + env(safe-area-inset-bottom));
    width: 56px; height: 56px; z-index: 46;
  }
  .cs-fab-wrap.is-collapsed { display: none; }
  .cs-fab {
    display: flex; align-items: center; justify-content: center;
    position: relative; width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
    background: radial-gradient(circle at 32% 28%, #ffd968, #f2a100 82%);
    box-shadow: 0 8px 24px rgba(242,163,0,.5);
    animation: cs-pulse 2.4s ease-in-out infinite;
  }
  .cs-fab svg { width: 26px; height: 26px; stroke: #5a3d00; }
  .cs-fab .cs-dot { top: -1px; right: -1px; border-color: #0a0e13; }
  /* small ✕ — sibling button at the support FAB's top-LEFT corner (clear of the red unread dot at top-right). Hit-area = visible circle only. */
  .cs-fab__x {
    position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 50%; padding: 0;
    display: grid; place-items: center; background: #10151c; color: #fff; border: 2px solid var(--bg-1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .5); cursor: pointer; z-index: 3;
  }
  .cs-fab__x svg { width: 10px; height: 10px; display: block; }
  .cs-fab__x:active { transform: scale(.9); }
  /* collapsed support edge tab — same gold sticker as the bonus tab, sits just below it, keeps the unread dot */
  .cs-tab {
    flex-direction: column; align-items: center; gap: 1px; position: fixed; right: calc(100% - 100vw); bottom: calc(158px + env(safe-area-inset-bottom));
    padding: 5px 4px 6px 4px; border: none; cursor: pointer; z-index: 46;
    border-radius: 13px 0 0 13px; background: radial-gradient(circle at 30% 28%, #ffd968, #f2a100 86%);
    box-shadow: -3px 5px 15px rgba(0, 0, 0, .45); animation: bonusTabIn .28s ease both;
  }
  .cs-tab.is-shown { display: inline-flex; }
  .cs-tab__chev { display: grid; place-items: center; color: #5a3d00; }
  .cs-tab__chev svg { width: 13px; height: 13px; display: block; }
  .cs-tab__ico { display: grid; place-items: center; color: #5a3d00; }
  .cs-tab__ico svg { width: 17px; height: 17px; display: block; }
  .cs-tab .cs-dot { top: 1px; right: 1px; width: 8px; height: 8px; border-color: #f2a100; }

  /* Bonus FAB — stacked above the support FAB (150px), same right rail. The WRAP is the fixed/animated shell; the ✕ lives beside the FAB inside it so both bob together. */
  .bonus-fab-wrap {
    display: block; position: fixed; right: 16px; bottom: calc(216px + env(safe-area-inset-bottom));
    width: 58px; height: 58px; z-index: 46;
    filter: drop-shadow(0 7px 16px rgba(0, 0, 0, .5)); animation: bonusFloat 3.2s ease-in-out infinite;
  }
  .bonus-fab-wrap.is-collapsed { display: none; }
  .bonus-fab {
    display: grid; place-items: center; position: relative;
    width: 58px; height: 58px; padding: 0; border: none; background: transparent; cursor: pointer;
  }
  .bonus-fab img { width: 58px; height: 58px; border-radius: 50%; display: block; }
  .bonus-fab__ring { position: absolute; inset: 0; border-radius: 50%; animation: bonusPulse 2.2s ease-out infinite; pointer-events: none; }
  .bonus-fab__tag {
    position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
    background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg-1);
  }
  /* small ✕ — sibling button at the FAB's top-LEFT corner (clear of the red "1" badge). Hit-area = the visible circle only, so it can't steal taps meant to OPEN the gift. */
  .bonus-fab__x {
    position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 50%; padding: 0;
    display: grid; place-items: center; background: #10151c; color: #fff; border: 2px solid var(--bg-1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .5); cursor: pointer; z-index: 3;
  }
  .bonus-fab__x svg { width: 10px; height: 10px; display: block; }
  .bonus-fab__x:active { transform: scale(.9); }

  /* collapsed edge tab (reference look): a small gold sticker peeking from the right edge; the chevron pulls the FAB back out. */
  .bonus-tab {
    flex-direction: column; align-items: center; gap: 1px; position: fixed; right: calc(100% - 100vw);
    bottom: calc(206px + env(safe-area-inset-bottom))   /* sits just above the CS tab (158px) so the two form a tight pair */;
    padding: 5px 4px 6px 4px; border: none; cursor: pointer; z-index: 46;
    border-radius: 13px 0 0 13px; background: radial-gradient(circle at 30% 28%, #ffd968, #f2a100 86%);
    box-shadow: -3px 5px 15px rgba(0, 0, 0, .45); animation: bonusTabIn .28s ease both;
  }
  .bonus-tab.is-shown { display: inline-flex; }
  .bonus-tab__chev { display: grid; place-items: center; color: #5a3d00; }
  .bonus-tab__chev svg { width: 13px; height: 13px; display: block; }
  .bonus-tab__ico { width: 17px; height: 17px; border-radius: 50%; display: block; }
  .bonus-tab:active { transform: translateX(2px); }
}
@keyframes bonusTabIn { from { transform: translateX(70%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============ Trading Cup (monthly trading tournament) ============ */
/* Entry card under the Basic-status widget — premium GOLD accent (platform base is blue) */
.tc-card { position: relative; display: flex; align-items: center; gap: 11px; margin: 12px 0 4px; padding: 12px 13px; border-radius: 14px; cursor: pointer; background: linear-gradient(135deg, rgba(245,179,1,.10), rgba(245,179,1,.03)), var(--bg-2); border: 1px solid rgba(245,179,1,.28); box-shadow: 0 6px 18px rgba(245,179,1,.10); transition: transform .12s ease, box-shadow .2s, border-color .2s; overflow: hidden; }
.tc-card:hover { transform: translateY(-1px); border-color: rgba(245,179,1,.5); box-shadow: 0 10px 26px rgba(245,179,1,.22); }
.tc-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 88% -10%, rgba(255,217,104,.16), transparent 60%); pointer-events: none; }
.tc-card__ic { position: relative; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: radial-gradient(circle at 33% 27%, #ffd968, #f2a100 84%); box-shadow: 0 3px 9px rgba(0,0,0,.3), inset 0 1px 1px rgba(255,255,255,.5); }
.tc-card__ic svg { width: 22px; height: 22px; color: #3a2600; }
.tc-card__body { position: relative; flex: 1 1 auto; min-width: 0; }
.tc-card__title { font-size: 13px; font-weight: 800; color: var(--text); letter-spacing: .1px; }
.tc-card__sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-card__sub b { color: #f5b301; font-weight: 800; }
.tc-card__bar { height: 5px; border-radius: 4px; background: rgba(255,255,255,.09); margin-top: 6px; overflow: hidden; }
.tc-card__bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f5b301, #ffd968); box-shadow: 0 0 8px rgba(245,179,1,.5); }
.tc-card__cta { position: relative; flex: 0 0 auto; align-self: center; font-size: 11.5px; font-weight: 800; color: #3a2600; background: linear-gradient(135deg, #f5b301, #f2820a); padding: 6px 12px; border-radius: 9px; box-shadow: 0 4px 12px rgba(245,179,1,.3); white-space: nowrap; }
.tc-card.is-ended .tc-card__ic { filter: grayscale(.4) opacity(.85); }
.tc-card.is-ended .tc-card__cta { background: var(--bg-3); color: var(--muted); box-shadow: none; }
.tc-card.is-verify .tc-card__cta { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04233f; }

/* Panel */
#tc-body { padding-bottom: 8px; }
.tc-hero { position: relative; text-align: center; padding: 20px 16px 18px; border-radius: 16px; background: radial-gradient(120% 140% at 50% -20%, rgba(245,179,1,.14), transparent 60%), var(--bg-2); border: 1px solid rgba(245,179,1,.22); overflow: hidden; }
.tc-hero__badge { width: 62px; height: 62px; margin: 0 auto 10px; border-radius: 18px; display: grid; place-items: center; background: radial-gradient(circle at 33% 27%, #ffd968, #f2a100 84%); box-shadow: 0 8px 22px rgba(245,179,1,.4), inset 0 1px 1px rgba(255,255,255,.55); }
.tc-hero__badge svg { width: 34px; height: 34px; color: #3a2600; }
.tc-hero__name { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: .2px; }
.tc-hero__sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tc-pool { margin: 14px auto 4px; }
.tc-pool__k { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.tc-pool__v { font-size: 34px; font-weight: 800; line-height: 1.05; background: linear-gradient(180deg, #ffe08a, #f5b301 70%, #f2820a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 2px 12px rgba(245,179,1,.25); }
.tc-pool__g { font-size: 11px; color: var(--muted); margin-top: 3px; }
.tc-meta { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.tc-meta__c { flex: 1 1 0; max-width: 110px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 11px; padding: 8px 6px; }
.tc-meta__c b { display: block; font-size: 14.5px; font-weight: 800; color: var(--text); }
.tc-meta__c i { font-style: normal; font-size: 10.5px; color: var(--muted); }

.tc-join-lead { margin: 14px 2px 2px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.tc-join-lead b { color: #f5b301; font-weight: 800; }

.tc-you { display: flex; align-items: center; gap: 14px; margin: 14px 0 2px; padding: 13px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); }
.tc-you__ring { position: relative; flex: 0 0 auto; width: 62px; height: 62px; }
.tc-ring { width: 62px; height: 62px; transform: rotate(-90deg); }
.tc-ring__bg { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 6; }
.tc-ring__fg { fill: none; stroke: url(#tcg); stroke: #f5b301; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.tc-you__ringtxt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #f5b301; }
.tc-you__stats { flex: 1 1 auto; min-width: 0; }
.tc-you__lead { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.tc-you__lead b { color: #f5b301; }
.tc-you__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; padding: 3px 0; color: var(--muted); }
.tc-you__row b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.tc-you__row b.is-up { color: #2fd36b; } .tc-you__row b.is-down { color: var(--down); }

.tc-sec-t { margin: 18px 2px 9px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.tc-pzs { display: grid; gap: 10px; }
.tc-pz { background: var(--bg-2); border: 1px solid var(--border); border-radius: 13px; padding: 11px 12px; }
.tc-pz__hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.tc-pz__hd span { font-size: 12.5px; font-weight: 800; color: var(--text); }
.tc-pz__hd i { font-style: normal; font-size: 11px; color: #f5b301; font-weight: 700; }
.tc-pz__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; padding: 3px 0; color: var(--muted); }
.tc-pz__row b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.tc-pz__more { font-size: 11px; color: var(--muted-2); margin-top: 4px; }

.tc-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tc-tab { flex: 1 1 0; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: .15s; }
.tc-tab.is-active { border-color: rgba(245,179,1,.5); background: rgba(245,179,1,.10); color: #f5b301; }
.tc-board { display: grid; gap: 5px; }
.tc-lb__row { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.tc-lb__rk { flex: 0 0 34px; font-size: 12px; font-weight: 800; color: #f5b301; font-variant-numeric: tabular-nums; }
.tc-lb__nm { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-lb__v { flex: 0 0 auto; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tc-lb__v.is-up { color: #2fd36b; } .tc-lb__v.is-down { color: var(--down); }

.tc-action { margin: 16px 0 4px; }
.tc-gold-btn { background: linear-gradient(135deg, #f5b301, #f2820a) !important; color: #3a2600 !important; box-shadow: 0 6px 16px rgba(245,179,1,.34); }
.tc-btn-ghost { background: var(--bg-3); color: var(--text); border: 1px solid var(--border); }
.tc-in { text-align: center; font-size: 13px; font-weight: 700; color: #2fd36b; padding: 12px; background: rgba(47,211,107,.08); border: 1px solid rgba(47,211,107,.28); border-radius: 12px; }
.tc-confirm { text-align: center; }
.tc-confirm__t { font-size: 13px; color: var(--text); margin-bottom: 11px; }
.tc-confirm__t b { color: #f5b301; }
.tc-confirm__btns { display: flex; gap: 9px; }
.tc-confirm__btns .btn { flex: 1 1 0; }

.tc-win { text-align: center; margin: 14px 0 2px; padding: 15px; border-radius: 14px; font-size: 16px; font-weight: 800; color: #3a2600; background: radial-gradient(circle at 50% 0%, #ffe08a, #f5b301 75%, #f2820a); box-shadow: 0 8px 22px rgba(245,179,1,.4); }
.tc-win span { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: #5a3d00; }
.tc-note-void { margin: 14px 0 2px; padding: 13px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); background: var(--bg-2); border: 1px solid var(--border); }

.tc-faq { margin-top: 18px; }
.tc-faq details { background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 4px 12px; margin-bottom: 8px; }
.tc-faq summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--text); padding: 8px 0; list-style: none; }
.tc-faq summary::-webkit-details-marker { display: none; }
.tc-faq summary::after { content: "+"; float: right; color: #f5b301; font-weight: 800; }
.tc-faq details[open] summary::after { content: "–"; }
.tc-faq p { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0 0 9px; }
.tc-faq p b { color: var(--text); }

/* ---- a11y: visible keyboard focus on the most-used inputs (stake + Auto-Trade), and respect reduced-motion ---- */
.amount-field:focus-within, .ab__field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(59, 130, 246, .35); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============================================================= *
 *  Up Down — round-based up/down game (second /platform game)
 * ============================================================= */
.game-tabs { display: flex; gap: 6px; padding: 14px 12px 0; overflow: visible; }
.game-tab { position: relative; appearance: none; border: 1px solid var(--border); background: var(--bg-1); color: var(--muted); font: 700 12.5px/1 var(--font, inherit); letter-spacing: .02em; padding: 9px 18px; border-radius: 9px 9px 0 0; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
/* "New!" badge floating above the Up Down tab — draws attention to the new game */
.game-tab__new { position: absolute; top: -9px; right: -7px; z-index: 3; font: 800 8.5px/1 var(--font, inherit); text-transform: uppercase; letter-spacing: .03em; color: #3a2600; padding: 3px 5px; border-radius: 6px; background: linear-gradient(135deg, #ffd968, #f5b301); box-shadow: 0 3px 8px rgba(245, 179, 1, .5); pointer-events: none; animation: gtNewPulse 1.8s ease-in-out infinite; }
@keyframes gtNewPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) { .game-tab__new { animation: none; } }
/* Tap Trading opens its own standalone page, so its tab is an <a>, not a .game-tab
   (app.js binds every .game-tab to setGame() and would break on an unknown key).
   Same look, different class. */
.game-link { position: relative; display: inline-flex; align-items: center; border: 1px solid var(--border); background: var(--bg-1); color: var(--muted); font: 700 12.5px/1 var(--font, inherit); letter-spacing: .02em; padding: 9px 18px; border-radius: 9px 9px 0 0; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.game-link:hover { color: var(--text); }
.game-tab:hover { color: var(--text); }
.game-tab.is-active { background: var(--bg-0); color: var(--text); border-color: var(--border); border-bottom-color: transparent; box-shadow: inset 0 2px 0 var(--accent); }

.ud-wrap { display: flex; flex-direction: column; gap: 8px; padding: 6px 10px 8px; min-height: 0; flex: 1 1 auto; }
.ud-wrap.is-hidden { display: none; }

/* Up Wins / orb / Down Wins header */
.ud-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ud-head__mid { display: flex; align-items: center; gap: 22px; }
.ud-inv { display: flex; flex-direction: column; gap: 9px; min-width: 118px; }
.ud-inv--down { align-items: flex-end; text-align: right; }
.ud-inv__row { display: flex; flex-direction: column; gap: 1px; }
.ud-inv__row > span { font-size: 11px; color: var(--muted); }
.ud-inv__row > b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ud-inv--up .ud-inv__row > b { color: #12d18e; }
.ud-inv--down .ud-inv__row > b { color: #ff5b6a; }
@media (max-width: 768px) { .ud-inv { display: none; } }   /* keep the stake/return columns on tablets & small laptops (769-1024px) — the ud-head has room */
.ud-win { display: flex; flex-direction: column; gap: 2px; }
.ud-win--down { align-items: flex-end; text-align: right; }
.ud-win__lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 11px; border-radius: 999px; }
.ud-win--up .ud-win__lbl { color: #05130d; background: #12d18e; }
.ud-win--down .ud-win__lbl { color: #1a0708; background: #ff5b6a; }
.ud-win__pct { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ud-win--up .ud-win__pct { color: #12d18e; }
.ud-win--down .ud-win__pct { color: #ff5b6a; }
.ud-orb { width: 82px; height: 82px; flex: none; border-radius: 50%; border: 4px solid #12d18e; display: flex; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 0 26px rgba(18,209,142,.4); background: radial-gradient(circle, rgba(18,209,142,.16), transparent 70%); }
.ud-orb i { width: 4px; height: 20px; border-radius: 2px; background: #12d18e; animation: udBar 1s ease-in-out infinite; }
.ud-orb i:nth-child(2){ animation-delay: .1s } .ud-orb i:nth-child(3){ animation-delay: .2s } .ud-orb i:nth-child(4){ animation-delay: .3s } .ud-orb i:nth-child(5){ animation-delay: .4s } .ud-orb i:nth-child(6){ animation-delay: .25s } .ud-orb i:nth-child(7){ animation-delay: .15s }
@keyframes udBar { 0%,100% { transform: scaleY(.4) } 50% { transform: scaleY(1.35) } }
/* center element: a filling countdown ring (first 15s) that swaps to the green orb waveform (last 15s) */
.ud-center { position: relative; width: 96px; height: 96px; flex: none; display: flex; align-items: center; justify-content: center; }
.ud-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ud-ring__bg { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 8; }
.ud-ring__fg { fill: none; stroke: #ff5b6a; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 282.74; stroke-dashoffset: 282.74; filter: drop-shadow(0 0 6px rgba(255,91,106,.55)); }
.ud-ring__txt { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.ud-ring__txt b { font-size: 30px; font-weight: 800; color: #ff5b6a; font-variant-numeric: tabular-nums; }
.ud-ring__txt span { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }
.ud-center.is-count .ud-orb { display: none; }
.ud-center.is-idle .ud-ring, .ud-center.is-idle .ud-ring__txt { display: none; }

/* the split line chart */
.ud-chart { position: relative; flex: 1 1 auto; min-height: 600px; border-radius: 0; overflow: hidden; background: var(--bg-0); border: none; }
.ud-chart canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ud-tag { position: absolute; transform: translateY(-50%); background: #f5e050; color: #211f00; border-radius: 8px; padding: 5px 11px; font-weight: 800; box-shadow: 0 6px 16px rgba(0,0,0,.35); pointer-events: none; z-index: 3; display: flex; flex-direction: column; line-height: 1.15; }
.ud-tag span { font-size: 10px; font-weight: 700; opacity: .75; text-transform: uppercase; letter-spacing: .04em; }
.ud-tag b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ud-tag--start { left: 10px; }
.ud-tag--live { right: 10px; text-align: right; }
.ud-lock { position: absolute; left: 14px; top: 12px; z-index: 4; }
.ud-lock.is-hidden { display: none; }
.ud-lock b { display: block; font-size: 16px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.ud-lock span { font-size: 12.5px; color: rgba(255,255,255,.8); }

/* stats + recent-round pills */
.ud-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ud-stats { display: flex; gap: 14px; }
.ud-stat { display: flex; flex-direction: column; gap: 1px; }
.ud-stat span { font-size: 10.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; }
.ud-stat b { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.ud-results { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ud-pill { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.ud-pill svg { width: 26px; height: 26px; display: block; }
.ud-pill.up { background: rgba(18,209,142,.14); border: 1px solid rgba(18,209,142,.42); color: #12d18e; }
.ud-pill.down { background: rgba(255,91,106,.14); border: 1px solid rgba(255,91,106,.42); color: #ff5b6a; }

/* ticket betting pane */
#pane-updown .ud-round { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ud-round__hd { display: flex; flex-direction: column; gap: 2px; }
.ud-round__hd b { font-size: 14px; font-weight: 800; color: var(--text); }
.ud-round__phase { font-size: 11.5px; color: var(--muted); }
.ud-round__timer { font-size: 26px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.ud-round__bar { height: 6px; border-radius: 999px; background: var(--bg-3); overflow: hidden; margin-bottom: 14px; }
.ud-round__bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.ud-invest { display: flex; flex-direction: column; gap: 6px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; background: var(--bg-1); }
.ud-invest__row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.ud-invest__row b { font-size: 14px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.ud-invest__row b.up { color: #12d18e; }
.ud-bets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 47; }   /* above the support FAB (z-index 46) so a tap on the Down button in the overlap band places the bet, not opens chat */
.ud-bet { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 10px; border: none; border-radius: 12px; font-size: 16px; font-weight: 800; color: #fff; cursor: pointer; transition: transform .06s, filter .15s, opacity .15s; }
.ud-bet svg { width: 20px; height: 20px; }
.ud-bet--up { background: linear-gradient(180deg, #17d998, #0fb87f); }
.ud-bet--down { background: linear-gradient(180deg, #ff6673, #ef4a58); }
.ud-bet:active { transform: scale(.97); }
.ud-bet.is-off { opacity: .4; pointer-events: none; filter: grayscale(.4); }
.ud-hint { margin-top: 12px; font-size: 11.5px; color: var(--muted-2); text-align: center; line-height: 1.5; }

/* Up Down — stake-tier quick-select chips */
.ud-tiers { display: flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.ud-tier { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; transition: background .12s, border-color .12s; }
.ud-tier:hover { border-color: var(--muted); }
.ud-tier > b { font-size: 14px; font-weight: 800; color: var(--text); }
.ud-tier > span { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.ud-tier.is-active { background: #248BEA; border-color: #248BEA; }
.ud-tier.is-active > b { color: #fff; }
.ud-tier.is-active > span { color: rgba(255, 255, 255, .82); }
/* Desktop only (tiers sit in the ~250-440px ticket pane): keep each chip single-line so a too-narrow pane
   wraps them to clean full-width rows instead of squashing the range text onto two lines. Mobile is unaffected
   because there the chips live in #ud-wrap, not #pane-updown. */
#pane-updown .ud-tier { white-space: nowrap; }

/* Up Down — VS fake-trader board */
.udvs { margin-bottom: 14px; }
/* live sentiment GAUGE (Up green fills from left, Down red from right; the split animates with player lean) */
.udvs__bar { padding: 0; border: none; background: none; margin-bottom: 10px; }
.udvs__gauge { position: relative; height: 30px; border-radius: 999px; overflow: hidden; background: linear-gradient(90deg, rgba(255, 91, 106, .5), #ff5b6a 88%); box-shadow: inset 0 0 0 1px var(--border); }
.udvs__gfill { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: linear-gradient(90deg, #12d18e 12%, rgba(18, 209, 142, .92)); box-shadow: 3px 0 11px rgba(0, 0, 0, .32); transition: width .25s cubic-bezier(.4, 0, .2, 1); }
.udvs__glabel { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 5px; font-weight: 800; font-size: 12.5px; color: #fff; z-index: 2; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); pointer-events: none; }
.udvs__glabel--up { left: 13px; }
.udvs__glabel--down { right: 13px; }
.udvs__glabel b { font-variant-numeric: tabular-nums; }
.udvs__side--up { color: #12d18e; } .udvs__side--down { color: #ff5b6a; }   /* kept for the light-theme selector below (legacy) */
.udvs__cols { display: flex; gap: 8px; min-height: 208px; }
.udvs__cols.is-slid { gap: 0; }
.udvs__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 9px; padding: 11px 11px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: flex-grow .55s cubic-bezier(.4, 0, .2, 1), opacity .4s ease, padding .5s ease, border-color .3s ease; }
.udvs__col--up { background: linear-gradient(180deg, rgba(18, 209, 142, .15), rgba(18, 209, 142, .03)); }
.udvs__col--down { background: linear-gradient(180deg, rgba(255, 91, 106, .15), rgba(255, 91, 106, .03)); }
.udvs__chead { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.udvs__cn { font-weight: 800; font-size: 12.5px; color: var(--text); white-space: nowrap; }
.udvs__ct { font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.udvs__col--up .udvs__ct { color: #12d18e; }
.udvs__col--down .udvs__ct { color: #ff5b6a; }
.udvs__traders { display: flex; flex-wrap: wrap; gap: 9px 10px; align-content: flex-start; }
.udvs__chip { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 40px; animation: udchip .3s ease both; }
@keyframes udchip { from { opacity: 0; transform: translateY(-4px) scale(.82); } }
.udvs__av { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 19px; line-height: 1; background: var(--bg-3); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .06); }
.udvs__amt { font-size: 10.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
/* the player's OWN "You" chip — highlighted so it stands out from the fake traders */
.udvs__chip--you { width: 46px; padding: 3px 2px; border-radius: 10px; background: rgba(59, 130, 246, .1); box-shadow: 0 0 0 1px rgba(59, 130, 246, .55), 0 3px 10px rgba(59, 130, 246, .22); }
.udvs__chip--you .udvs__av { box-shadow: inset 0 0 0 2px var(--accent, #3b82f6); background: rgba(59, 130, 246, .18); }
.udvs__chip--you .udvs__amt { color: var(--text); }
.udvs__you { font-size: 8.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent, #3b82f6); }
.udc__av--you { box-shadow: inset 0 0 0 2px var(--accent, #3b82f6) !important; background: rgba(59, 130, 246, .2); }
/* result view (Winner / Loser) */
.udvs__res { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; animation: udres .32s ease both; }
@keyframes udres { from { opacity: 0; transform: scale(.9); } }
.udvs__rn { font-size: 30px; font-weight: 900; line-height: 1; }
.udvs__rlabel { font-size: 17px; font-weight: 800; }
.udvs__rt { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.udvs__col--won .udvs__rn, .udvs__col--won .udvs__rlabel, .udvs__col--won .udvs__rt { color: #12d18e; }
.udvs__col--lost .udvs__rn, .udvs__col--lost .udvs__rlabel, .udvs__col--lost .udvs__rt { color: #ff5b6a; }
.udvs__col--won { border-color: rgba(18, 209, 142, .5); }
.udvs__col--lost { border-color: rgba(255, 91, 106, .32); }
/* slide → winner only */
.udvs__col.is-gone { flex-grow: 0; opacity: 0; padding-left: 0; padding-right: 0; border-width: 0; }
.udvs__col.is-solo { flex-grow: 1; }
/* light theme: darken the board green/red so text stays legible on the near-white column fills */
:root[data-theme="light"] .udvs__side--up, :root[data-theme="light"] .udvs__col--up .udvs__ct,
:root[data-theme="light"] .udvs__col--won .udvs__rn, :root[data-theme="light"] .udvs__col--won .udvs__rlabel, :root[data-theme="light"] .udvs__col--won .udvs__rt { color: #0a9e69; }
:root[data-theme="light"] .udvs__side--down, :root[data-theme="light"] .udvs__col--down .udvs__ct,
:root[data-theme="light"] .udvs__col--lost .udvs__rn, :root[data-theme="light"] .udvs__col--lost .udvs__rlabel, :root[data-theme="light"] .udvs__col--lost .udvs__rt { color: #d1213a; }

/* ---- compact VS board (Detrade-style; rendered always, shown only <768px — see the mobile block) ---- */
.udvs__compact { position: relative; display: none; flex-direction: row; align-items: stretch; min-height: 74px; }
/* middle vertical divider — sits on the EXACT 50% boundary between the Up (left) / Down (right) columns, so it
   always falls in the gap between the two avatar groups (never cuts an avatar), whatever the per-side counts.
   Betting board only (the result/solo states already show the green→red split). */
.udvs__compact:not(.is-result)::before { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1px; transform: translateX(-50%); background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .18) 22%, rgba(255, 255, 255, .18) 78%, transparent); pointer-events: none; }
/* betting: each side is an equal 50% column — total pinned to the OUTER edge, players + avatars pushed toward the CENTER line */
.udc__col2 { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.udc__col2.up { padding-right: 14px; }
.udc__col2.down { padding-left: 14px; }
.udc__l { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; overflow: hidden; }
.udc__tot { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.udc__tot.up { color: #12d18e; }
.udc__tot.down { color: #ff5b6a; }
.udc__pl { font-size: 12px; font-weight: 700; white-space: nowrap; }
.udc__pl.up { color: #12d18e; }
.udc__pl.down { color: #ff5b6a; }
.udc__grp { display: flex; gap: 3px; overflow: hidden; }
.udc__col2.up .udc__grp { justify-content: flex-end; }
.udc__col2.down .udc__grp { justify-content: flex-start; }
.udc__av { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; line-height: 1; background: var(--bg-3); }
.udc__grp.up .udc__av { box-shadow: inset 0 0 0 2px rgba(18, 209, 142, .55); }
.udc__grp.down .udc__av { box-shadow: inset 0 0 0 2px rgba(255, 91, 106, .55); }

/* the player's own Up Down trade history (in the ticket pane, like High Low's History) */
.ud-mytrades { margin-top: 16px; }
.ud-mt__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ud-mt__head > span:first-child { font-size: 13px; font-weight: 800; color: var(--text); }
.ud-mt__cols { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); }
.ud-mt__empty { font-size: 12px; color: var(--muted); padding: 10px 0; }
.ud-mt__list { display: flex; flex-direction: column; gap: 5px; }
.ud-mt__row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 9px; background: var(--bg-1); border: 1px solid var(--border); }
.ud-mt__dir { font-size: 12.5px; font-weight: 800; }
.ud-mt__dir.up { color: #12d18e; }
.ud-mt__dir.down { color: #ff5b6a; }
.ud-mt__amt { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ud-mt__res { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.ud-mt__res.win { color: #12d18e; }
.ud-mt__res.lose { color: #ff5b6a; }
.ud-mt__res.tie { color: var(--muted); }
/* result → Winner / Loser on a green→red gradient (green sits on the winning side) */
.udvs__compact.is-result { flex-direction: row; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 12px; min-height: 76px; }
.udvs__compact.is-result.win-up { background: linear-gradient(90deg, rgba(18, 209, 142, .24), rgba(255, 91, 106, .04) 60%, rgba(255, 91, 106, .2)); }
.udvs__compact.is-result.win-down { background: linear-gradient(90deg, rgba(255, 91, 106, .2), rgba(18, 209, 142, .04) 40%, rgba(18, 209, 142, .24)); }
.udvs__compact.is-result.is-solo { justify-content: center; background: radial-gradient(120% 170% at 50% 50%, rgba(18, 209, 142, .18), rgba(18, 209, 142, .03)); }
.udc__col { flex: 1 1 0; display: flex; flex-direction: column; gap: 3px; }
.udvs__compact.is-result .udc__col.up { align-items: flex-start; text-align: left; }
.udvs__compact.is-result .udc__col.down { align-items: flex-end; text-align: right; }
.udvs__compact.is-solo .udc__col { flex: 0 1 auto; align-items: center; text-align: center; }
.udc__col b { font-size: 15px; font-weight: 800; }
.udc__col span { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.udc__col.won b, .udc__col.won span { color: #12d18e; }
.udc__col.lost b, .udc__col.lost span { color: #ff5b6a; }

/* coin chip inside the Up Down amount field + the "Available … +" line (match the reference) */
.amount-coin { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 5px 9px 5px 6px; border-radius: 9px; background: var(--bg-3); }
.amount-coin__dot { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #04231a; background: radial-gradient(circle at 33% 27%, #3ff0b0, #12b57e 82%); }
.amount-coin b { font-size: 12px; font-weight: 800; color: var(--text); }
.ud-avail { display: flex; align-items: center; justify-content: space-between; margin: 10px 2px 14px; font-size: 12.5px; color: var(--muted); }
.ud-avail__v { display: flex; align-items: center; gap: 9px; }
.ud-avail__v b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.ud-avail__add { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: none; background: #12d18e; color: #04231a; font-size: 17px; font-weight: 800; line-height: 1; cursor: pointer; transition: filter .12s; }
.ud-avail__add:hover { filter: brightness(1.08); }

@media (max-width: 900px) {
  .ud-win__pct { font-size: 32px; }
  .ud-center { width: 74px; height: 74px; }
  .ud-orb { width: 62px; height: 62px; }
  .ud-ring__txt b { font-size: 23px; }
  .ud-stats { gap: 12px; }
}

/* ---- Up Down on phones: the 600px chart + the wide header don't fit — reflow to the viewport ---- */
@media (max-width: 768px) {
  .ud-wrap { padding: 6px 8px 10px; gap: 10px; }
  .ud-chart { flex: 0 0 auto; height: 46vh; min-height: 340px; }   /* not the desktop 600px */
  .ud-head { gap: 8px; }
  .ud-head__mid { width: 100%; gap: 12px; justify-content: space-between; }
  .ud-win__pct { font-size: 30px; }
  /* MOBILE ONLY: centre the stats + recent-results strip (desktop keeps the left-stats / right-results space-between) */
  .ud-foot { justify-content: center; }
  .ud-stats { width: 100%; justify-content: center; }
  .ud-stat { align-items: center; text-align: center; }
  .ud-results { width: 100%; justify-content: center; }
  /* Up Down ticket → the reference's compact board: drop the tall two-column view + the "Up VS Down" bar */
  .udvs__cols { display: none; }   /* keep the sentiment gauge (.udvs__bar) on mobile too — only the tall desktop columns hide */
  .udvs__compact { display: flex; }
  .udvs { margin-bottom: 12px; }
}
@media (max-width: 520px) {
  .ud-chart { height: 42vh; min-height: 300px; }
  .ud-head__mid { gap: 6px; }
  .ud-win__lbl { font-size: 10px; letter-spacing: .04em; padding: 2px 8px; }
  .ud-win__pct { font-size: 23px; }
  .ud-center { width: 58px; height: 58px; }
  .ud-orb { width: 50px; height: 50px; border-width: 3px; }
  .ud-orb i { height: 16px; }
  .ud-ring__txt b { font-size: 18px; }
  .ud-ring__txt span { font-size: 8.5px; }
  .ud-stats { gap: 10px; }
  .ud-stat span { font-size: 9.5px; }
  .ud-pill { width: 32px; height: 32px; }
  .ud-pill svg { width: 23px; height: 23px; }
  /* stake-tier chips + VS board share the width evenly instead of overflowing */
  .ud-tiers { gap: 6px; }
  .ud-tier { padding: 8px 6px; gap: 5px; }   /* flex-fill + centering now live on the base rule */
  .ud-tier > b { font-size: 12.5px; }
  .ud-tier > span { font-size: 10.5px; }
  .udvs__cols { min-height: 176px; }
  .udvs__chip { width: 36px; }
  .udvs__av { width: 30px; height: 30px; font-size: 16px; }
  .udc__av { width: 24px; height: 24px; font-size: 13px; }   /* 5 avatars (5·24+4·3=132px) fit each 50% column strip on ≤355px phones — no clip */
  .udvs__traders { gap: 8px; }
}
