:root {
  --bg: #0b0b0d;
  --bg2: #121214;
  --bg3: #1c1c1e;
  --card: #1c1c1e;
  --card2: #2c2c2e;
  --text: #f5f5f7;
  --muted: #8e8e93;
  --line: rgba(255,255,255,.08);
  --accent: #0a84ff;
  --accent2: #64d2ff;
  --gold: #ffd60a;
  --gold2: #ff9f0a;
  --green: #30d158;
  --danger: #ff453a;
  --ok: #30d158;
  --purple: #bf5af2;
  --tab-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --font: "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, Consolas, monospace; }

#app {
  min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 8px);
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background:
    radial-gradient(1200px 400px at 50% -10%, rgba(88, 40, 160, .22), transparent 60%),
    var(--bg);
}

.page { display: none; min-height: calc(100vh - var(--tab-h)); animation: pageIn .22s ease; }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: .4; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  height: 52px;
  background: rgba(11,11,13,.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  font-weight: 650;
  letter-spacing: .02em;
}
.topbar .back {
  position: absolute; left: 10px;
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(44,44,46,.9); border: 0; color: var(--text);
  padding: 6px 10px; border-radius: 999px; cursor: pointer; font-size: 14px;
}
.topbar .right { position: absolute; right: 12px; color: var(--muted); }
.topbar-action {
  position: absolute; right: 12px;
  width: 34px; height: 34px; border-radius: 10px; border: 0;
  background: rgba(44,44,46,.95); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.topbar-action.on {
  background: rgba(10,132,255,.25);
  color: #7cc4ff;
  box-shadow: inset 0 0 0 1px rgba(10,132,255,.45);
}

/* Cards / lists */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 16px;
  box-shadow: var(--shadow);
}
.muted { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: 0; border-radius: 12px; padding: 13px 16px;
  background: linear-gradient(180deg, #2f95ff, #0a84ff);
  color: #fff; font-weight: 650; cursor: pointer; width: 100%;
  box-shadow: 0 6px 18px rgba(10,132,255,.28);
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn.ghost {
  background: var(--card2); color: var(--text);
  box-shadow: none; border: 1px solid var(--line);
}
.btn.gold {
  background: linear-gradient(135deg, #ffe08a, #e8b923 45%, #c99212);
  color: #1a1200; box-shadow: 0 8px 20px rgba(232,185,35,.25);
}
.btn.danger { background: transparent; color: var(--danger); box-shadow: none; }
.btn.sm { width: auto; padding: 7px 12px; font-size: 12px; border-radius: 9px; box-shadow: none; }

.field { margin: 12px 0; }
.field label {
  display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 600;
  letter-spacing: .04em;
}
.field input, .field select {
  width: 100%; background: #111113; border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px; outline: none; transition: border .15s;
}
.field input:focus { border-color: rgba(10,132,255,.7); }

.list-group {
  margin: 12px 16px; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
}
.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; border-bottom: 1px solid var(--line);
  background: transparent; cursor: pointer; gap: 12px;
  transition: background .12s;
}
.list-row:last-child { border-bottom: 0; }
.list-row:active { background: rgba(255,255,255,.04); }
.list-row .left { display: flex; align-items: center; gap: 12px; }
.list-row .ico {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: 14px;
  background: rgba(255,255,255,.06);
}
.list-row .chev { color: #636366; font-size: 18px; font-weight: 300; }
.list-row .val { color: var(--muted); font-size: 14px; }

/* Bottom tabs - glass pill */
.tabs-bottom {
  position: fixed; left: 50%; bottom: calc(10px + var(--safe-bottom));
  transform: translateX(-50%); z-index: 40;
  width: min(420px, calc(100% - 24px));
  height: 58px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(28,28,30,.72);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
  padding: 4px;
}
.tabs-bottom button {
  background: none; border: 0; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; font-weight: 600; cursor: pointer; border-radius: 999px;
}
.tabs-bottom button.active {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.tabs-bottom svg { width: 20px; height: 20px; }

/* Lobby */
.ann-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px 0; color: var(--muted); font-size: 13px;
}
.ann-head .left { display: flex; align-items: center; gap: 6px; }
.banner {
  margin: 10px 16px 14px; border-radius: 18px; overflow: hidden;
  min-height: 168px; position: relative;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,214,10,.25), transparent 35%),
    linear-gradient(135deg, #3b1d6e 0%, #1a1033 40%, #0f172a 100%);
  border: 1px solid rgba(255,215,120,.18);
  box-shadow: var(--shadow);
  padding: 18px;
}
.banner h3 {
  margin: 0 0 8px; font-size: 22px;
  background: linear-gradient(90deg, #ffe9a8, #ffd60a, #ff9f0a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800;
}
.banner p { margin: 0; color: #d7d7e2; font-size: 13px; line-height: 1.55; max-width: 70%; }
.banner .dots {
  position: absolute; right: 14px; top: 12px; font-size: 12px; color: #a1a1aa;
  background: rgba(0,0,0,.25); padding: 3px 8px; border-radius: 999px;
}
.banner .mascot {
  position: absolute; right: -6px; bottom: -8px; font-size: 84px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.4));
  transform: rotate(-8deg); opacity: .95; pointer-events: none;
}
.section-title {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 16px 10px; font-weight: 700;
}
.section-title .badge {
  font-size: 11px; color: var(--muted); background: var(--card2);
  padding: 3px 8px; border-radius: 999px;
}
.game-card {
  margin: 0 16px 16px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(165deg, #24143f, #121018 55%, #0d0d12);
  border: 1px solid rgba(191,90,242,.22);
  box-shadow: var(--shadow);
}
.game-card .art {
  height: 190px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative;
  background:
    radial-gradient(circle at 50% 70%, rgba(255,214,10,.18), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent);
}
.game-card .art .logo12 {
  font-size: 72px; font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, #fff6c8, #ffd60a 40%, #b8860b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; letter-spacing: -2px;
}
.game-card .art .sub {
  margin-top: 2px; font-weight: 800; color: #ffd60a; letter-spacing: .3em; font-size: 14px;
}
.game-card .art .bull { font-size: 42px; margin-top: 6px; }
.game-card .meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px; background: rgba(0,0,0,.28); border-top: 1px solid var(--line);
}

/* Wallet */
.balance-hero {
  margin: 16px; padding: 26px 20px; border-radius: 18px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.18), transparent 30%),
    linear-gradient(135deg, #0a84ff, #5e5ce6 55%, #bf5af2);
  text-align: center; box-shadow: 0 12px 32px rgba(10,132,255,.25);
}
.balance-hero .label { opacity: .9; font-size: 13px; }
.balance-hero .amt { font-size: 40px; font-weight: 800; margin: 8px 0; letter-spacing: -.02em; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px; }

/* Chat */
.chat-page {
  flex-direction: column;
  height: calc(100dvh - var(--tab-h) - 18px);
  max-height: calc(100vh - var(--tab-h) - 18px);
  padding-bottom: 0 !important;
  position: relative;
  overflow: hidden;
}
.chat-page.active { display: flex !important; }
.chat-page .topbar,
.chat-page .pin,
.chat-page .chat-dock { flex-shrink: 0; }

.pin {
  background: rgba(28,28,30,.95); color: #ffd60a; font-size: 12px;
  padding: 8px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.pin::before { content: "📢"; }

.chat-main {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-stream {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 12px 12px 16px;
  display: flex; flex-direction: column; gap: 12px;
  background: #0b0b0d;
}

.msg { display: flex; gap: 8px; max-width: 86%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .av {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3c, #1c1c1e);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}
.msg .bubble {
  background: #2c2c2e; padding: 8px 12px; border-radius: 14px 14px 14px 4px;
  font-size: 14px;
}
.msg.me .bubble {
  background: linear-gradient(180deg, #2f95ff, #0a84ff);
  border-radius: 14px 14px 4px 14px;
}
.msg.system { align-self: center; max-width: 92%; }
.msg.system .bubble {
  background: rgba(255,255,255,.05); color: var(--muted); font-size: 12px;
  text-align: center; border-radius: 999px; padding: 6px 12px;
}
.msg .name { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.msg.bet .bubble {
  background: #fff; color: #111; font-weight: 800; font-size: 17px;
  min-width: 96px; text-align: center; padding: 12px 16px;
  border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.fab-side {
  position: absolute; right: 10px; top: 12px;
  display: flex; flex-direction: column; gap: 8px; z-index: 5;
  pointer-events: none;
}
.fab-side button {
  pointer-events: auto;
  width: 48px; min-height: 48px; border-radius: 14px;
  border: 1px solid rgba(255,214,10,.3);
  background: linear-gradient(180deg, #f5d78e, #b8860b);
  color: #2a1b00; font-size: 9px; font-weight: 800; cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 6px 4px; line-height: 1.1;
}
.fab-side button span { font-size: 16px; }

.chat-dock {
  border-top: 1px solid var(--line);
  background: #121214;
  z-index: 6;
}
.bet-bar {
  padding: 7px 12px;
  font-size: 11px; color: #ffd60a; text-align: center;
  background: rgba(255,214,10,.06);
  letter-spacing: .02em;
}
.composer {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 12px 10px;
}
.composer.hidden { display: none !important; }
.composer input {
  flex: 1; background: #1c1c1e; border: 1px solid var(--line);
  border-radius: 22px; padding: 10px 14px; outline: none; font-size: 14px;
}
.composer button {
  border: 0; background: var(--accent); color: #fff; border-radius: 20px;
  padding: 0 14px; height: 38px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}

.declare-dock {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 12px;
}
.declare-dock.hidden { display: none !important; }
.declare-dock-title { font-weight: 800; color: var(--gold); font-size: 13px; }
.declare-dock .btn.sm { min-width: 84px; }

.sheet-mask {
  position: absolute; inset: 0; background: rgba(0,0,0,.55); z-index: 20;
}
.sheet-mask.hidden { display: none !important; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: 78%;
  background: #16161a;
  border-radius: 18px 18px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -12px 40px rgba(0,0,0,.45);
  display: flex; flex-direction: column;
  animation: sheetUp .22s ease;
}
.sheet.hidden { display: none !important; }
@keyframes sheetUp {
  from { transform: translateY(24px); opacity: .6; }
  to { transform: none; opacity: 1; }
}
.sheet-handle {
  width: 40px; height: 4px; border-radius: 999px; background: #3a3a3c;
  margin: 8px auto 0;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 8px; border-bottom: 1px solid var(--line);
}
.sheet-close {
  border: 0; background: #2c2c2e; color: #fff; width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer;
}
.sheet-body {
  overflow-y: auto; padding: 12px 16px 20px; -webkit-overflow-scrolling: touch;
}
.declare-row { display: flex; gap: 8px; }
.declare-row select, .declare-row input {
  flex: 1; background: #1c1c1e; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; outline: none;
}
.declare-remark {
  width: 100%; margin: 8px 0; background: #1c1c1e; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; outline: none;
}
.file-pick {
  display: block; margin-top: 6px; padding: 12px; border-radius: 10px;
  border: 1px dashed rgba(255,214,10,.45); color: #ffe9a8;
  font-size: 13px; text-align: center; cursor: pointer;
  background: rgba(255,214,10,.04);
}
.file-pick.required { border-color: rgba(255,214,10,.55); }
.file-pick input { display: none; }
.pkt-preview { margin-top: 8px; }
.pkt-preview img { max-width: 100%; max-height: 120px; border-radius: 10px; border: 1px solid var(--line); }
.pkt-preview.hidden { display: none; }
.tng-payee-card {
  background: linear-gradient(135deg, #2a1a14, #1a1528);
  border: 1px solid rgba(255,159,10,.35);
  border-radius: 12px; padding: 12px; margin: 0;
}
.tng-payee-label { font-size: 11px; color: #c4a484; margin-bottom: 4px; letter-spacing: .06em; }
.tng-payee-name { font-weight: 700; }
.tng-payee-id {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 6px; color: var(--gold); font-family: ui-monospace, Consolas, monospace; font-size: 14px;
}
/* Me */
.me-head {
  display: flex; align-items: center; gap: 14px; padding: 22px 16px 10px;
}
.me-head .av {
  width: 68px; height: 68px; border-radius: 50%;
  background: linear-gradient(135deg, #5e5ce6, #bf5af2);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  overflow: hidden; border: 2px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 24px rgba(94,92,230,.35);
}
.me-head .av img { width: 100%; height: 100%; object-fit: cover; }

/* Invite */
.invite-hero {
  text-align: center; padding: 8px 0 4px;
}
.invite-hero .av {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px;
  background: linear-gradient(135deg, #5e5ce6, #0a84ff);
  display: grid; place-items: center; font-size: 28px;
}
.invite-hero .name { font-weight: 700; font-size: 17px; }
.uid-row {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; margin-top: 4px;
}
.qr-box {
  width: 196px; height: 196px; margin: 18px auto 10px;
  background: #fff; border-radius: 16px; padding: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  display: grid; place-items: center;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }

.rate-list { margin: 0; padding: 0; list-style: none; }
.rate-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 2px; border-bottom: 1px solid var(--line);
}
.rate-list li:last-child { border-bottom: 0; }
.rate-ico {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; flex-shrink: 0;
}
.rate-ico.gold { background: rgba(255,214,10,.15); color: var(--gold); }
.rate-ico.green { background: rgba(48,209,88,.15); color: var(--green); }
.rate-ico.blue { background: rgba(10,132,255,.15); color: var(--accent); }
.rate-list b.pct { font-weight: 800; }
.rate-list b.pct.gold { color: var(--gold); }
.rate-list b.pct.green { color: var(--green); }
.rate-list b.pct.blue { color: var(--accent2); }

.notice {
  background: rgba(10,132,255,.12);
  color: #9ec9ff; border: 1px solid rgba(10,132,255,.2);
  border-radius: 12px; padding: 12px 14px; margin: 12px 16px;
  font-size: 13px; line-height: 1.55;
  display: flex; gap: 10px; align-items: flex-start;
}
.notice::before {
  content: "i"; flex-shrink: 0;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  margin-top: 1px;
}

/* Promo dashboard */
.promo-amt-wrap { text-align: center; padding: 18px 0 8px; }
.promo-amt-wrap .ccy { color: var(--muted); font-size: 12px; }
.promo-amt-wrap .num { font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.flow-rows { margin-top: 8px; }
.flow-rows .row {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-top: 1px solid var(--line); font-size: 14px;
}
.flow-rows .row span:last-child { font-weight: 700; }
.promo-foot {
  display: grid; grid-template-columns: 1fr 1fr; margin-top: 8px;
  border-top: 1px solid var(--line);
}
.promo-foot > div { text-align: center; padding: 14px 8px; }
.promo-foot > div:first-child { border-right: 1px solid var(--line); }
.promo-foot b { display: block; font-size: 22px; margin-top: 4px; }
.date-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card2); border-radius: 999px; padding: 4px 8px; font-size: 12px;
}

/* Chips / funds */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px;
  background: var(--card2); color: var(--muted); border: 0; cursor: pointer;
  font-size: 13px; font-weight: 600;
}
.chip.on { background: #fff; color: #000; }

.fund-filter {
  margin: 10px 16px 0;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: fundFilterIn .18s ease;
}
.fund-filter.hidden { display: none !important; }
@keyframes fundFilterIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.fund-search {
  display: flex; gap: 8px; align-items: center;
}
.fund-search input {
  flex: 1; background: #111113; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; outline: none;
}
.fund-dates {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px;
}
.fund-date-field label {
  display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px;
}
.fund-date-field input {
  width: 100%; background: #111113; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 10px; color: var(--text);
  color-scheme: dark;
}
.fund-filter-actions {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.fund-meta {
  padding: 8px 16px 0; font-size: 12px;
}

.empty {
  text-align: center; color: var(--muted); padding: 56px 16px;
}
.empty .ico {
  width: 64px; height: 64px; margin: 0 auto 12px;
  border: 2px solid #3a3a3c; border-radius: 12px;
  display: grid; place-items: center; font-size: 28px; opacity: .55;
}

/* Segmented */
.segment {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 12px 16px; padding: 4px; background: var(--card);
  border-radius: 12px; border: 1px solid var(--line);
}
.segment button {
  border: 0; background: transparent; color: var(--muted);
  padding: 10px; border-radius: 10px; font-weight: 650; cursor: pointer;
}
.segment button.on {
  background: rgba(10,132,255,.12);
  color: #fff; border: 1px solid rgba(10,132,255,.45);
}

/* Login */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(94,92,230,.35), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255,159,10,.12), transparent 40%),
    var(--bg);
}
.login-wrap h1 {
  font-size: 30px; margin: 0 0 8px;
  background: linear-gradient(90deg, #ffe9a8, #ffd60a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 900;
}
.login-wrap .sub { color: var(--muted); margin-bottom: 28px; text-align: center; }
.login-card { width: 100%; max-width: 380px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(0,0,0,.88); color: #fff; padding: 11px 16px;
  border-radius: 12px; z-index: 99; font-size: 13px; display: none;
  max-width: 84%; border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.toast.show { display: block; animation: fade .2s ease; }
@keyframes fade {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.kyc-guide {
  margin: 12px 16px; border-radius: 14px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
}
.kyc-guide .mock {
  background: linear-gradient(180deg, #0a84ff, #0066cc);
  padding: 16px; color: #fff; min-height: 120px;
}
.kyc-guide .mock .box {
  display: inline-block; border: 2px solid #ff453a; border-radius: 6px;
  padding: 4px 8px; margin: 4px 0; background: rgba(255,255,255,.1);
}
.kyc-guide .tips { padding: 12px 14px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* Switch / radio / avatar */
.switch {
  position: relative; display: inline-block; width: 46px; height: 28px;
}
.switch input { display: none; }
.switch span {
  position: absolute; inset: 0; background: #3a3a3c; border-radius: 999px;
  transition: .2s; cursor: pointer;
}
.switch span::before {
  content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }

.radio-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 4px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.radio-row:last-of-type { border-bottom: 0; }
.radio-row input { accent-color: var(--accent); width: 18px; height: 18px; }

.avatar-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.avatar-grid button {
  aspect-ratio: 1; border-radius: 14px; border: 2px solid transparent;
  background: var(--card2); font-size: 28px; cursor: pointer;
}
.avatar-grid button.on { border-color: var(--accent); background: rgba(10,132,255,.15); }

.doc-body { white-space: pre-wrap; line-height: 1.7; font-size: 14px; color: #c7c7cc; }

/* 快捷操作 */
.quick-actions { padding: 0 10px 6px; }
.quick-row { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-row.hidden { display: none !important; }
.qbtn {
  border: 1px solid rgba(255,214,10,.28);
  background: rgba(255,214,10,.08);
  color: #ffd60a;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.qbtn.ghost {
  border-color: var(--line);
  background: #1c1c1e;
  color: #c7c7cc;
}

/* 结算结果卡 */
.msg.result-card { align-self: stretch; max-width: 100%; margin: 8px 0; }
.msg.result-card .bubble {
  width: 100%;
  background: linear-gradient(160deg, #1a1630 0%, #12141c 100%);
  border: 1px solid rgba(232,200,114,.35);
  border-radius: 14px;
  padding: 12px;
  text-align: left;
}
.result-card .rc-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; color: var(--gold); font-weight: 800; font-size: 13px;
}
.result-card .rc-banker {
  background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px 10px;
  font-size: 12px; margin-bottom: 8px; color: #ddd;
}
.result-card .rc-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-top: 1px solid rgba(255,255,255,.06);
  font-size: 12px;
}
.result-card .rc-win { color: #30d158; font-weight: 700; }
.result-card .rc-lose { color: #ff453a; font-weight: 700; }
.result-card .rc-push { color: #ffd60a; font-weight: 700; }

/* 营业/维护遮罩 */
.access-gate {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.access-gate.hidden { display: none !important; }
.access-gate-card {
  width: min(360px, 100%);
  background: #16161a;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.access-gate-ico { font-size: 42px; margin-bottom: 8px; }
.access-gate-card h2 { margin: 0 0 8px; font-size: 20px; }
.access-gate-card p { margin: 0 0 18px; font-size: 13px; line-height: 1.6; }

/* 玩法页 */
.rules-hero {
  margin: 12px 16px;
  padding: 18px 16px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 80% 20%, rgba(232,200,114,.25), transparent 40%),
    linear-gradient(135deg, #2a1f4d, #12141c 60%);
  border: 1px solid rgba(232,200,114,.25);
}
.rules-badge {
  display: inline-block;
  font-weight: 900;
  font-size: 22px;
  color: var(--gold);
  letter-spacing: .04em;
}
.rules-hero p { margin: 8px 0 0; color: #c7c7cc; font-size: 13px; }
.rules-list { padding: 0 16px 8px; display: flex; flex-direction: column; gap: 8px; }
.rules-item {
  display: flex; gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.rules-item .n {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(10,132,255,.15); color: #64d2ff;
  font-size: 12px; font-weight: 800;
}
.rules-item b { color: #fff; font-size: 13px; }
.rules-item p { margin: 4px 0 0; color: #9a9aa3; font-size: 12px; line-height: 1.55; }
.rules-item.highlight {
  border-color: rgba(232,200,114,.35);
  background: rgba(232,200,114,.06);
}
.rules-item.highlight .n { background: rgba(232,200,114,.18); color: var(--gold); }

/* 大厅品牌条 */
.lobby-brand-strip {
  margin: 8px 16px 4px;
  padding: 14px 16px;
  border-radius: 16px;
  display: flex; justify-content: space-between; align-items: center;
  background:
    radial-gradient(circle at 90% 20%, rgba(255,214,10,.2), transparent 40%),
    linear-gradient(135deg, #2d1b52, #121018);
  border: 1px solid rgba(191,90,242,.28);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.lbs-logo {
  font-size: 26px; font-weight: 900; color: var(--gold);
  letter-spacing: .02em;
}
.lbs-logo span { font-size: 16px; margin-left: 4px; color: #fff; font-weight: 700; }
.lbs-sub { font-size: 11px; color: #a78bfa; margin-top: 4px; }
.lbs-badge {
  font-size: 11px; font-weight: 800; color: #003d82;
  background: linear-gradient(135deg, #0066ff, #00c2ff);
  padding: 6px 10px; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,102,255,.35);
}

/* 钱包共享余额 */
.wallet-shared {
  margin: 0 16px 12px; padding: 14px 16px;
  border-radius: 14px;
  background: rgba(191,90,242,.1);
  border: 1px solid rgba(191,90,242,.25);
}
.wallet-shared.hidden { display: none !important; }
.ws-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.ws-amt { font-size: 22px; font-weight: 800; color: var(--gold); margin: 6px 0 2px; }
.ws-hint { margin: 0; font-size: 11px; }

/* 共享账号页 */
.shared-balances {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 0 16px 12px;
}
.sb-card {
  padding: 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.sb-card.partner {
  background: rgba(255,214,10,.06);
  border-color: rgba(255,214,10,.25);
}
.sb-card.partner.hidden { display: none; }
.sb-label { font-size: 11px; color: var(--muted); }
.sb-name { font-size: 13px; font-weight: 700; margin: 4px 0; }
.sb-amt { font-size: 20px; font-weight: 800; margin-top: 4px; }
.sb-amt.gold { color: var(--gold); }
.shared-bound-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.shared-bound-row:last-child { border-bottom: 0; }

/* 邀请/推广视觉 */
.promo-visual-head {
  margin: 12px 16px 8px; padding: 16px;
  border-radius: 16px; text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,214,10,.22), transparent 55%),
    linear-gradient(160deg, #3b1d6e, #121018);
  border: 1px solid rgba(232,200,114,.22);
}
.promo-visual-head.compact { padding: 12px 16px; }
.pvh-title {
  font-size: 24px; font-weight: 900;
  background: linear-gradient(90deg, #ffe9a8, #ffd60a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pvh-sub { font-size: 12px; color: #c4b5fd; margin-top: 6px; }
.invite-card-glow, .rate-card-glow {
  border-color: rgba(191,90,242,.22);
  box-shadow: 0 8px 28px rgba(88,40,160,.2);
}
.invite-page .invite-hero .av {
  background: linear-gradient(135deg, #ffd60a, #bf5af2);
  box-shadow: 0 8px 24px rgba(255,214,10,.25);
}

@media (min-width: 481px) {
  body { background: #050506; }
}
