/* ── variables ──────────────────────────────────────────── */
:root {
  --bg:        #080706;
  --bg2:       #0d0b08;
  --panel:     #111009;
  --panel2:    #191610;
  --border:    #3d2a0c;
  --border-hi: #7a5218;
  --gold:      #d4a520;
  --gold-hi:   #f0c030;
  --gold-dim:  #6a4410;
  --text:      #e8d8a8;
  --muted:     #8a7040;
  --ok:        #3ae870;
  --danger:    #ff4040;
  --warn:      #ffaa20;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 8px 32px rgba(0,0,0,.65);
  --tr:        .18s ease;
}

/* ── reset ──────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 1400px 500px at 50% 0%,
      rgba(212,165,32,.10) 0%, transparent 60%),
    linear-gradient(180deg, #100e08 0%, var(--bg) 25%);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

h2 {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  margin-bottom: 14px;
}

p { line-height: 1.5; }

.muted-text { color: var(--muted); font-size: .88rem; }
.logo { font-weight: 800; font-size: 1.05rem; color: var(--gold); letter-spacing: .04em; }

/* ── panel ──────────────────────────────────────────────── */
.panel {
  background: linear-gradient(145deg, var(--panel2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* ── buttons ────────────────────────────────────────────── */
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--tr);
  white-space: nowrap;
}
button:disabled { opacity: .38; pointer-events: none; }
button:hover:not(:disabled) { transform: translateY(-2px); }
button:active:not(:disabled){ transform: translateY(0); }

.btn-primary {
  background: linear-gradient(150deg, var(--gold-hi), var(--gold));
  color: #1a1000;
  border-color: var(--gold);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(212,165,32,.4); }

.btn-danger {
  background: linear-gradient(150deg, #ff6060, #cc1c1c);
  color: #fff;
  border-color: #ff3030;
}
.btn-danger:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(255,48,48,.35); }

.btn-success {
  background: linear-gradient(150deg, #44ee88, #18a84e);
  color: #071a0f;
  border-color: #3ae870;
}
.btn-success:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(58,232,112,.3); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border-hi);
}
.btn-ghost:hover:not(:disabled) { color: var(--text); background: rgba(255,255,255,.05); }

.btn-icon {
  background: transparent; border: none;
  color: var(--muted); padding: 6px 8px; font-size: 1rem;
}
.btn-icon:hover { color: var(--text); }

.btn-sm { padding: 6px 10px; font-size: .78rem; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── inputs ─────────────────────────────────────────────── */
input, select, textarea {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: .92rem;
  width: 100%;
  transition: border-color var(--tr);
}
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,165,32,.18); }
input::placeholder { color: var(--muted); }

/* ── live pill & dot ────────────────────────────────────── */
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border-hi);
  font-size: .75rem; font-weight: 700; letter-spacing: .07em;
  background: rgba(0,0,0,.3);
  white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot.live    { background: #ff2222; animation: pulse 1.4s infinite; }
.dot.offline { background: #555; }

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0   rgba(255,34,34,.8); }
  60%      { box-shadow: 0 0 0 7px rgba(255,34,34,0);  }
}

/* ── status labels ──────────────────────────────────────── */
.status-label { font-size: .86rem; font-weight: 700; margin-top: 8px; }
.status-label.ok     { color: var(--ok); }
.status-label.warn   { color: var(--warn); }
.status-label.danger { color: var(--danger); }

.hint-text { color: var(--muted); font-size: .85rem; margin-bottom: 10px; line-height: 1.45; }
.hint-text.ok     { color: var(--ok); }
.hint-text.danger { color: var(--danger); }

/* ── status badge (open/closed) ─────────────────────────── */
.status-badge {
  padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em;
}
.status-badge.closed {
  background: rgba(255,64,64,.14); color: var(--danger); border: 1px solid rgba(255,64,64,.3);
}
.status-badge.open {
  background: rgba(58,232,112,.14); color: var(--ok); border: 1px solid rgba(58,232,112,.3);
}

/* ── top bar (player) ───────────────────────────────────── */
.top-bar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12,10,7,.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.top-bar-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 14px;
}
.wallet-wrap { display: flex; flex-direction: column; align-items: flex-end; }
.wallet-label  { font-size: .64rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.wallet-amount { font-size: 1.05rem; font-weight: 800; color: var(--gold-hi); }
.player-name-chip {
  font-size: .82rem; color: var(--muted); white-space: nowrap;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 999px;
}

/* ── page grid (player) ─────────────────────────────────── */
.page-grid {
  max-width: 1100px; margin: 16px auto; padding: 0 14px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
}
.stream-panel  { grid-column: 1; grid-row: 1; padding: 0; overflow: hidden; }
.bet-panel     { grid-column: 1; grid-row: 2; }
.history-panel { grid-column: 2; grid-row: 1 / 3; }

/* ── stream stage ───────────────────────────────────────── */
.stream-stage {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: var(--radius); overflow: hidden;
}
.stream-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.stream-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, #1c1910 0%, #060504 80%);
  display: flex; align-items: center; justify-content: center;
}
.offline-card {
  text-align: center; padding: 24px 28px;
  border: 1px solid rgba(212,165,32,.18); border-radius: var(--radius);
  background: rgba(0,0,0,.4); max-width: 280px;
}
.offline-icon  { font-size: 2.6rem; margin-bottom: 6px; }
.offline-title { font-size: 1rem; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.offline-sub   { color: var(--muted); font-size: .82rem; }

/* ── betting panel ──────────────────────────────────────── */
.bet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bet-head h2 { margin-bottom: 0; }

/* ── 12 symbol cards ────────────────────────────────────── */
.symbol-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}
.sym-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 8px 4px;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1.5px solid var(--border-hi);
  background: linear-gradient(145deg, var(--panel2), var(--panel));
  cursor: pointer; overflow: hidden;
  transition: all var(--tr);
}
.sym-card:hover:not(:disabled) {
  border-color: var(--gold-hi);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(212,165,32,.22);
}
.sym-card.selected {
  border-color: var(--gold-hi);
  background: linear-gradient(145deg, rgba(212,165,32,.22), rgba(212,165,32,.08));
  box-shadow: 0 0 0 2px rgba(212,165,32,.3), 0 8px 22px rgba(212,165,32,.25);
}
.sym-emoji { font-size: 1.65rem; line-height: 1; }
.sym-num   { font-size: .82rem; font-weight: 800; color: var(--muted); }
.sym-name  { font-size: .6rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; display: none; }
.sym-card.selected .sym-num  { color: var(--gold-hi); }
.sym-card.selected .sym-name { color: var(--gold); }

/* ── amount zone ────────────────────────────────────────── */
.quick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip-btn {
  padding: 7px 11px; font-size: .78rem;
  background: rgba(0,0,0,.28); color: var(--muted);
  border: 1px solid var(--border-hi); border-radius: var(--radius-sm);
}
.chip-btn:hover, .chip-btn.active {
  background: rgba(212,165,32,.14); color: var(--gold-hi); border-color: var(--gold);
}

.bet-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 6px; }
.bet-row input { margin: 0; }
.bet-submit { padding: 10px 18px; white-space: nowrap; }

.bet-msg { font-size: .86rem; color: var(--muted); min-height: 1.3em; }
.bet-msg.ok     { color: var(--ok); }
.bet-msg.warn   { color: var(--warn); }
.bet-msg.danger { color: var(--danger); }

/* ── history ────────────────────────────────────────────── */
.history-list {
  display: flex; flex-direction: column; gap: 5px;
  max-height: 480px; overflow-y: auto;
}
.history-item {
  display: grid; grid-template-columns: 2rem 1fr auto auto;
  align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0,0,0,.18);
}
.hi-emoji { font-size: 1.4rem; }
.hi-name  { font-size: .85rem; font-weight: 600; color: var(--text); }
.hi-num   { font-size: .85rem; font-weight: 800; color: var(--gold); }
.hi-round { font-size: .72rem; color: var(--muted); }

/* ── result overlay ─────────────────────────────────────── */
.result-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.84); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.result-overlay[hidden] { display: none; }
.result-card {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--border-hi);
  border-radius: 20px; padding: 38px 32px;
  text-align: center; max-width: 380px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
  animation: popIn .32s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
  from { transform: scale(.75); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.r-symbol { font-size: 5.5rem; line-height: 1; margin-bottom: 6px; animation: flip .4s ease; }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.r-number  { font-size: .95rem; color: var(--muted); margin-bottom: 14px; }
.r-verdict { font-size: 1.9rem; font-weight: 900; margin-bottom: 8px; }
.r-verdict.win  { color: var(--ok); text-shadow: 0 0 30px rgba(58,232,112,.5); }
.r-verdict.lose { color: var(--muted); }
.r-payout  { font-size: 1.5rem; font-weight: 800; color: var(--ok); margin-bottom: 22px; min-height: 1.8rem; }
.r-close   { width: 100%; padding: 14px; font-size: .95rem; }

/* ── chat fab ───────────────────────────────────────────── */
.chat-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 200;
  width: 54px; height: 54px; border-radius: 50%; padding: 0;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold));
  border: none; color: #1a1000; font-size: 1.35rem;
  box-shadow: 0 6px 24px rgba(212,165,32,.5);
}
.chat-unread {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff;
  font-size: .62rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.chat-unread[hidden] { display: none; }

/* ── chat window ────────────────────────────────────────── */
.chat-window {
  position: fixed; right: 16px; bottom: 82px; z-index: 200;
  width: min(360px, calc(100vw - 32px)); height: 400px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--border-hi); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.65);
  display: flex; flex-direction: column; overflow: hidden;
  animation: slideUp .2s ease;
}
.chat-window[hidden] { display: none; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-title { font-weight: 700; color: var(--gold); font-size: .92rem; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.chat-msg { display: flex; flex-direction: column; max-width: 90%; }
.chat-msg.me   { align-self: flex-end; align-items: flex-end; }
.chat-msg.them { align-self: flex-start; }
.cm-author { font-size: .68rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.cm-text {
  padding: 8px 11px; border-radius: 12px;
  font-size: .85rem; line-height: 1.4; word-break: break-word;
}
.chat-msg.me   .cm-text { background: rgba(212,165,32,.16); border: 1px solid rgba(212,165,32,.28); }
.chat-msg.them .cm-text { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); }
.cm-time { font-size: .65rem; color: var(--muted); margin-top: 2px; }

.chat-compose {
  display: grid; grid-template-columns: 1fr auto; gap: 6px;
  padding: 8px; border-top: 1px solid var(--border); flex-shrink: 0;
}
.chat-compose input { margin: 0; }

/* ── auth / login page ──────────────────────────────────── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-wrap  { width: 100%; max-width: 420px; }
.auth-card  {
  background: linear-gradient(145deg, var(--panel2), var(--panel));
  border: 1px solid var(--border-hi); border-radius: 20px;
  padding: 40px 32px; box-shadow: 0 20px 60px rgba(0,0,0,.7);
  text-align: center;
}
.auth-logo  { font-size: 4rem; margin-bottom: 8px; }
.auth-title { font-size: 1.7rem; color: var(--gold); margin-bottom: 4px; }
.auth-sub   { color: var(--muted); font-size: .88rem; margin-bottom: 28px; }
.auth-form  { text-align: left; }
.field-label {
  display: block; font-size: .76rem; font-weight: 700; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 5px;
}
.field-input { margin-bottom: 14px; }
.login-btn  { width: 100%; padding: 13px; font-size: .95rem; margin-top: 4px; }
.auth-msg   { font-size: .86rem; margin-top: 12px; min-height: 1.2em; }
.auth-msg.ok     { color: var(--ok); }
.auth-msg.danger { color: var(--danger); }
.auth-footer-links { margin-top: 20px; }
.auth-footer { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.auth-link   { color: var(--gold); font-weight: 600; }

/* ── admin gate ─────────────────────────────────────────── */
.gate-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gate-card {
  width: 100%; max-width: 380px;
  background: linear-gradient(145deg, var(--panel2), var(--panel));
  border: 1px solid var(--border-hi); border-radius: 20px;
  padding: 40px 30px; text-align: center; box-shadow: var(--shadow);
}
.gate-pwd { text-align: center; font-size: 1.1rem; letter-spacing: .12em; margin-bottom: 10px; }
.gate-err { color: var(--danger); font-size: .85rem; margin-bottom: 8px; }
.gate-btn { width: 100%; padding: 13px; font-size: .95rem; }

/* ── admin topbar ───────────────────────────────────────── */
.admin-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px; height: 52px;
  background: rgba(12,10,7,.93); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.admin-meta { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); margin-left: auto; }
.admin-meta strong { color: var(--gold); }

/* ── admin layout ───────────────────────────────────────── */
.admin-layout {
  max-width: 1240px; margin: 16px auto; padding: 0 14px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start;
}
.admin-left  { display: flex; flex-direction: column; gap: 14px; }
.admin-right { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 60px; }

.admin-stream { max-height: 260px; margin-bottom: 0; }

/* ── admin result grid ──────────────────────────────────── */
.admin-result-grid .sym-card:hover {
  border-color: var(--danger);
  background: rgba(255,64,64,.08);
  box-shadow: 0 4px 16px rgba(255,64,64,.2);
}
.admin-result-grid .sym-name { display: block; }
.result-sym-card { aspect-ratio: auto; height: 68px; }

/* ── bet summary rows ───────────────────────────────────── */
.bsr-grid { display: flex; flex-direction: column; gap: 4px; }
.bsr-row {
  display: grid; grid-template-columns: 1.6rem 1.8rem 1fr 5rem;
  align-items: center; gap: 7px;
  padding: 5px 9px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0,0,0,.18);
}
.bsr-row.leader { border-color: var(--gold); background: rgba(212,165,32,.07); }
.bsr-sym  { font-size: 1rem; }
.bsr-n    { font-size: .8rem; font-weight: 800; color: var(--gold); }
.bsr-bar-wrap { height: 5px; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.bsr-bar  { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); border-radius: 999px; transition: width .4s ease; min-width: 0; }
.bsr-amt  { font-size: .76rem; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.bsr-row.leader .bsr-amt { color: var(--gold-hi); font-weight: 700; }

/* ── user list ──────────────────────────────────────────── */
.users-section { max-height: 520px; display: flex; flex-direction: column; overflow: hidden; }
.users-section h2 { flex-shrink: 0; }
.user-list {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
  padding-right: 2px;
}
.user-item {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0,0,0,.18);
}
.ui-info  { display: flex; flex-direction: column; }
.ui-name  { font-weight: 700; font-size: .88rem; }
.ui-phone { font-size: .72rem; color: var(--muted); }
.ui-bal   { font-weight: 800; color: var(--gold); font-size: .88rem; white-space: nowrap; }
.ui-actions { display: flex; gap: 4px; }

/* ── chat log (admin) ───────────────────────────────────── */
.chat-log-section { max-height: 320px; display: flex; flex-direction: column; overflow: hidden; }
.chat-log-section h2 { flex-shrink: 0; }
.admin-chat-log {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
}
.acl-msg {
  padding: 7px 9px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0,0,0,.18);
}
.acl-name { font-weight: 700; color: var(--gold); font-size: .82rem; }
.acl-time { font-size: .68rem; color: var(--muted); margin-left: 6px; }
.acl-text { font-size: .82rem; color: var(--muted); margin-top: 3px; }

/* ── scrollbars ─────────────────────────────────────────── */
::-webkit-scrollbar        { width: 4px; height: 4px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--border-hi); border-radius: 999px; }

/* ── shared utilities ───────────────────────────────────── */
.panel-title {
  font-size: .82rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--gold);
  border-left: 3px solid var(--gold); padding-left: 9px;
  margin-bottom: 12px;
}
.muted-sm { color: var(--muted); font-size: .82rem; }

/* ── extra button variants ──────────────────────────────── */
.btn-gold {
  background: linear-gradient(150deg, var(--gold-hi), var(--gold));
  color: #1a1000; border-color: var(--gold);
}
.btn-gold:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(212,165,32,.4); }

.btn-outline {
  background: transparent; color: var(--gold);
  border: 1px solid var(--gold-dim);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--gold); background: rgba(212,165,32,.08);
}

/* ── deposit button (header glow) ───────────────────────── */
.btn-deposit {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; border: 1px solid #22c55e;
  font-weight: 800; letter-spacing: .04em;
  box-shadow: 0 0 0 0 rgba(34,197,94,.6);
  animation: dep-pulse 2.2s infinite;
}
.btn-deposit:hover { box-shadow: 0 4px 20px rgba(34,197,94,.55); animation: none; }
@keyframes dep-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  60%      { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
}

/* ── deposit modal ──────────────────────────────────────── */
.deposit-modal { max-width: 420px; width: 100%; }
.deposit-body  { padding: 18px 22px 22px; flex: 1; overflow-y: auto; }
.dep-subtitle  { font-size: .82rem; color: var(--muted); margin-bottom: 16px; }

/* ── deposit info bar ───────────────────────────────────── */
.dep-info-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: rgba(212,165,32,.07); border: 1px solid rgba(212,165,32,.22);
  border-radius: 8px; padding: 7px 12px; margin-bottom: 12px;
  font-size: .72rem; font-weight: 700; color: var(--gold);
}
.dep-info-rate { color: var(--muted); font-weight: 400; }

/* ── currency picker ────────────────────────────────────── */
.dep-curr-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dep-curr-btn {
  padding: 5px 11px; font-size: .72rem; font-weight: 700;
  background: #0d0b08; border: 1px solid #3d2a0c; color: var(--muted);
  border-radius: 20px; cursor: pointer; white-space: nowrap;
  transition: all var(--tr);
}
.dep-curr-btn:hover { border-color: #7a5218; color: var(--gold); }
.dep-curr-btn.active {
  background: rgba(212,165,32,.15); border-color: var(--gold);
  color: var(--gold-hi); box-shadow: 0 0 0 1.5px rgba(212,165,32,.2);
}

/* ── live conversion preview ────────────────────────────── */
.dep-conv-box {
  background: rgba(212,165,32,.06); border: 1px solid rgba(212,165,32,.22);
  border-radius: 10px; padding: 10px 14px; margin-top: 10px;
}
.dep-conv-coins { font-size: 1.05rem; font-weight: 900; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.dep-conv-rate  { font-size: .68rem; color: var(--muted); margin-top: 4px; }

.dep-quick { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.dep-q {
  padding: 6px 12px; font-size: .8rem; font-weight: 700;
  background: rgba(212,165,32,.08); color: var(--gold);
  border: 1px solid var(--gold-dim); border-radius: 20px; cursor: pointer;
  transition: all var(--tr);
}
.dep-q:hover, .dep-q.active {
  background: rgba(212,165,32,.2); border-color: var(--gold-hi); color: var(--gold-hi);
}

.dep-methods { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dep-method {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--bg2);
  cursor: pointer; transition: all var(--tr);
}
.dep-method.selected {
  border-color: var(--ok);
  background: rgba(58,232,112,.07);
  box-shadow: 0 0 0 2px rgba(58,232,112,.18);
}
.dep-method-soon { opacity: .5; cursor: default; pointer-events: none; }
.dep-method-icon { font-size: 1.3rem; flex-shrink: 0; }
.dep-method-info { display: flex; flex-direction: column; flex: 1; }
.dep-method-name { font-size: .88rem; font-weight: 700; color: var(--text); }
.dep-method-desc { font-size: .72rem; color: var(--muted); margin-top: 1px; }
.dep-method-check {
  font-size: .9rem; color: var(--ok); font-weight: 900;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(58,232,112,.15); display: flex; align-items: center; justify-content: center;
}
.dep-soon-badge {
  font-size: .65rem; font-weight: 800; padding: 2px 7px;
  background: rgba(255,170,32,.15); color: var(--warn);
  border-radius: 20px; border: 1px solid rgba(255,170,32,.3);
}

.btn-deposit-proceed {
  display: block; width: 100%; margin-top: 16px;
  padding: 14px; font-size: 1rem; font-weight: 800; letter-spacing: .04em;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; border: none; border-radius: 12px; cursor: pointer;
  transition: all var(--tr);
}
.btn-deposit-proceed:hover:not(:disabled) { box-shadow: 0 6px 22px rgba(34,197,94,.45); transform: translateY(-2px); }
.btn-deposit-proceed:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── dep crypto icon ────────────────────────────────────── */
#dpmCrypto .dep-method-icon {
  font-size: 1.2rem; font-weight: 900; color: #f7931a;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(247,147,26,.12); display: flex; align-items: center; justify-content: center;
}
#dpmCrypto.selected { border-color: #f7931a; background: rgba(247,147,26,.07); box-shadow: 0 0 0 2px rgba(247,147,26,.2); }
#dpmCrypto.selected .dep-method-check { background: rgba(247,147,26,.15); color: #f7931a; }

/* ── dep coin picker ────────────────────────────────────── */
.dep-coin-picker { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }

/* ── coin selector (shared: deposit + withdrawal) ───────── */
.coin-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.coin-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px; border-radius: 14px; border: 1.5px solid var(--border);
  background: var(--bg2); cursor: pointer; transition: all var(--tr);
}
.coin-btn:hover { border-color: var(--border-hi); }
.coin-btn.active { box-shadow: 0 0 0 2px rgba(247,147,26,.25); }
.coin-btn[data-coin="USDT"].active { border-color: #26a17b; background: rgba(38,161,123,.08); box-shadow: 0 0 0 2px rgba(38,161,123,.2); }
.coin-btn[data-coin="BTC"].active  { border-color: #f7931a; background: rgba(247,147,26,.08); box-shadow: 0 0 0 2px rgba(247,147,26,.2); }
.coin-icon { font-size: 1.5rem; font-weight: 900; line-height: 1; }
.usdt-icon { color: #26a17b; }
.btc-icon  { color: #f7931a; }
.coin-name { font-size: .9rem; font-weight: 800; color: var(--text); }
.coin-sub  { font-size: .62rem; color: var(--muted); text-align: center; }

/* ── withdrawal modal ───────────────────────────────────── */
.wd-modal { max-width: 440px; width: 100%; }
.wd-body  { padding: 18px 22px 22px; }

.wd-tabs {
  display: flex; gap: 0; margin-bottom: 18px;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
}
.wd-tab {
  flex: 1; padding: 11px 8px; font-size: .84rem; font-weight: 700;
  background: var(--bg2); color: var(--muted); border: none; cursor: pointer;
  transition: all var(--tr); letter-spacing: .02em;
}
.wd-tab + .wd-tab { border-left: 1px solid var(--border); }
.wd-tab:hover { color: var(--text); background: rgba(255,255,255,.03); }
.wd-tab.active { background: rgba(212,165,32,.12); color: var(--gold-hi); }

.wd-pane { display: none; }
.wd-pane.active { display: block; animation: fadeIn .2s ease; }

.wallet-input {
  font-family: "Courier New", monospace; font-size: .82rem; letter-spacing: .03em;
  word-break: break-all;
}
.wd-crypto-note {
  font-size: .72rem; color: var(--warn); margin-top: 10px;
  padding: 9px 12px; border-radius: 9px;
  background: rgba(255,170,32,.07); border-left: 3px solid var(--warn);
  line-height: 1.5;
}
.wd-submit-btn { width: 100%; padding: 13px; margin-top: 14px; font-size: .95rem; font-weight: 800; }

@media (max-width: 480px) {
  .deposit-modal, .wd-modal { border-radius: 18px 18px 0 0; margin-top: auto; }
  .deposit-body, .wd-body   { padding: 14px 16px 20px; }
  .dep-methods { gap: 6px; }
  .dep-method  { padding: 10px 12px; }
  .coin-selector { gap: 8px; }
  .coin-btn { padding: 12px 6px; }
  .dep-quick { gap: 5px; }
  .dep-q { padding: 5px 9px; font-size: .75rem; }
  .wd-tabs .wd-tab { font-size: .78rem; padding: 10px 4px; }
}

.btn-bet {
  background: linear-gradient(150deg, var(--gold-hi), var(--gold));
  color: #1a1000; border-color: var(--gold);
  padding: 11px 22px; font-size: .95rem; white-space: nowrap;
}
.btn-bet:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(212,165,32,.4); }
.btn-bet:disabled { opacity: .35; pointer-events: none; }

/* ── top bar (player) ───────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 14px;
  background: rgba(8,7,6,.95); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.tb-logo { font-size: 1rem; font-weight: 800; color: var(--gold); letter-spacing: .04em; white-space: nowrap; }
.tb-wallet { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; }
.tb-wallet-label { font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.tb-wallet-amt { font-size: 1rem; font-weight: 800; color: var(--gold-hi); }
.tb-name { font-size: .8rem; color: var(--muted); white-space: nowrap; background: rgba(255,255,255,.04); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; }
.tb-uid { font-size: .7rem; font-family: monospace; font-weight: 700; color: var(--gold); white-space: nowrap; background: rgba(212,165,32,.12); border: 1px solid rgba(212,165,32,.3); padding: 3px 8px; border-radius: 999px; letter-spacing: .04em; }

.tb-actions { display: flex; gap: 6px; align-items: center; }

/* ── main layout (player) ───────────────────────────────── */
.main-wrap {
  max-width: 1100px; margin: 14px auto; padding: 0 14px;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px;
}
.left-col  { display: flex; flex-direction: column; gap: 14px; }
.right-col { display: flex; flex-direction: column; gap: 14px; }

/* ── unmute overlay ─────────────────────────────────────── */
.unmute-overlay {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,5,4,.6); backdrop-filter: blur(3px);
}
.unmute-overlay[hidden] { display: none; }
.unmute-btn {
  padding: 14px 32px; font-size: 1rem; font-weight: 800; letter-spacing: .05em;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; border: none; border-radius: 30px; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(34,197,94,.5), 0 8px 28px rgba(34,197,94,.3);
  animation: unmute-pulse 1.8s infinite;
}
.unmute-btn:hover { transform: scale(1.05); animation: none; box-shadow: 0 8px 30px rgba(34,197,94,.5); }
@keyframes unmute-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.55), 0 8px 28px rgba(34,197,94,.25); }
  55%      { box-shadow: 0 0 0 18px rgba(34,197,94,0),  0 8px 28px rgba(34,197,94,.25); }
}

/* ── stream offline state ───────────────────────────────── */
.stream-offline {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, #1c1910 0%, #060504 80%);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 8px; text-align: center; padding: 20px;
}
.stream-offline[hidden] { display: none; }
.s-off-icon  { font-size: 2.6rem; }
.s-off-title { font-size: 1rem; font-weight: 700; color: var(--gold); }
.s-off-sub   { color: var(--muted); font-size: .82rem; }

/* ── betting status banner ──────────────────────────────── */
.bet-banner {
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0,0,0,.28);
  font-size: .88rem; font-weight: 700; color: var(--muted);
  text-align: center;
}
.bet-banner.open {
  border-color: rgba(58,232,112,.4); background: rgba(58,232,112,.08); color: var(--ok);
}

/* ── symbol panel & grid ────────────────────────────────── */
.symbol-panel {}
.sp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sp-title  { font-size: .82rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gold); border-left: 3px solid var(--gold); padding-left: 9px; }
.sp-round  { font-size: .75rem; color: var(--muted); background: rgba(0,0,0,.3); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; }

.sym-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px;
  margin-bottom: 4px;
}
.sym-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px 4px; aspect-ratio: 1; border-radius: 12px;
  border: 1.5px solid var(--border-hi);
  background: linear-gradient(145deg, var(--panel2), var(--panel));
  cursor: pointer; overflow: hidden; transition: all var(--tr);
}
.sym-card:hover:not(:disabled) {
  border-color: var(--gold-hi); transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(212,165,32,.22);
}
.sym-card.selected {
  border-color: var(--gold-hi);
  background: linear-gradient(145deg, rgba(212,165,32,.22), rgba(212,165,32,.08));
  box-shadow: 0 0 0 2px rgba(212,165,32,.3), 0 8px 22px rgba(212,165,32,.25);
}
.sc-circle {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px var(--glow, rgba(0,0,0,.4));
  transition: box-shadow var(--tr);
}
.sym-card.selected .sc-circle { box-shadow: 0 4px 18px var(--glow, rgba(212,165,32,.4)); }
.sc-emoji { font-size: 1.4rem; line-height: 1; }
.sc-label { font-size: .6rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.sc-total { font-size: .65rem; color: var(--gold-dim); font-weight: 700; }
.sc-mybet { font-size: .58rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.sym-card.selected .sc-label { color: var(--gold); }
.sym-card.selected .sc-total { color: var(--gold); }
.sym-card.bet-placed {
  border-color: var(--ok);
  box-shadow: 0 0 0 2px rgba(58,232,112,.25);
}
.sym-card.bet-placed .sc-label { color: var(--ok); }
.sym-card.bet-placed .sc-mybet { color: var(--ok); font-weight: 700; }

/* ── bet controls ───────────────────────────────────────── */
.bet-controls-panel {}
.bc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.bc-row:last-child { margin-bottom: 0; }
.bc-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  padding: 7px 11px; font-size: .78rem; font-weight: 700;
  background: rgba(0,0,0,.28); color: var(--muted);
  border: 1px solid var(--border-hi); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--tr);
}
.chip:hover { background: rgba(212,165,32,.1); color: var(--gold-hi); border-color: var(--gold-dim); }
.chip.active { background: rgba(212,165,32,.18); color: var(--gold-hi); border-color: var(--gold); }

.bet-input { flex: 1; min-width: 160px; }
.bet-hint  { font-size: .8rem; color: var(--muted); margin: 0; }

/* ── live bets per symbol ───────────────────────────────── */
.bet-totals-grid { display: flex; flex-direction: column; gap: 4px; }
.bt-row {
  display: grid; grid-template-columns: 1.6rem 5.5rem 1fr 5rem;
  align-items: center; gap: 7px;
  padding: 5px 9px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0,0,0,.18);
}
.bt-emoji { font-size: 1rem; }
.bt-name  { font-size: .78rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.bt-bar-wrap { height: 5px; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.bt-bar   { height: 100%; border-radius: 999px; transition: width .4s ease; min-width: 0; }
.bt-amt   { font-size: .75rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ── round history ──────────────────────────────────────── */
.result-history { display: flex; flex-direction: column; gap: 5px; max-height: 320px; overflow-y: auto; }
.history-row {
  display: grid; grid-template-columns: 1.8rem 1fr auto;
  align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0,0,0,.18);
}
.hr-emoji { font-size: 1.3rem; }
.hr-name  { font-size: .85rem; font-weight: 600; color: var(--text); }
.hr-round { font-size: .72rem; color: var(--muted); white-space: nowrap; }

/* ── overlay (modal backdrop) ───────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.84); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.overlay[hidden] { display: none; }

/* ── result card elements ───────────────────────────────── */
.result-card {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--border-hi); border-radius: 20px;
  padding: 38px 32px; text-align: center;
  max-width: 380px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
  animation: popIn .32s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
  from { transform: scale(.75); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.rc-sym     { font-size: 5.5rem; line-height: 1; margin-bottom: 8px; animation: rcFlip .4s ease; }
@keyframes rcFlip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.rc-name    { font-size: .92rem; color: var(--muted); margin-bottom: 14px; }
.rc-verdict { font-size: 1.9rem; font-weight: 900; margin-bottom: 8px; }
.rc-verdict.win  { color: var(--ok);    text-shadow: 0 0 30px rgba(58,232,112,.5); }
.rc-verdict.lose { color: var(--muted); }
.rc-payout  { font-size: 1.5rem; font-weight: 800; color: var(--ok); margin-bottom: 22px; min-height: 1.8rem; }
.rc-close   { width: 100%; padding: 14px; font-size: .95rem; }

/* ── modal card (history, withdrawal) ───────────────────── */
.modal-card {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--border-hi); border-radius: var(--radius);
  width: 100%; max-width: 540px; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
  animation: popIn .28s cubic-bezier(.34,1.56,.64,1);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: .9rem; font-weight: 700; color: var(--gold); flex-shrink: 0;
}

/* ── wallet history ─────────────────────────────────────── */
.wallet-history { flex: 1; overflow-y: auto; padding: 12px; }
.wh-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.wh-table th { padding: 7px 10px; text-align: left; color: var(--gold); font-weight: 700; border-bottom: 1px solid var(--border); }
.wh-table td { padding: 7px 10px; border-bottom: 1px solid rgba(60,42,12,.4); }
.wh-table tr:hover td { background: rgba(255,255,255,.02); }
.pos { color: var(--ok); font-weight: 700; }
.neg { color: var(--danger); font-weight: 700; }

/* ── withdrawal form ────────────────────────────────────── */
.withdraw-form { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.f-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 8px; }
.f-input { margin: 0; }

/* ── chat window (player) ───────────────────────────────── */
.chat-badge {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff;
  font-size: .6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.chat-badge[hidden] { display: none; }
.chat-fab { position: relative; }

.chat-win {
  position: fixed; right: 16px; bottom: 82px; z-index: 200;
  width: min(360px, calc(100vw - 32px)); height: 420px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--border-hi); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.65);
  display: flex; flex-direction: column; overflow: hidden;
  animation: slideUp .2s ease;
}
.chat-win[hidden] { display: none; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-tabs { display: flex; gap: 2px; }
.ctab {
  flex: 1; padding: 9px 8px; font-size: .78rem; font-weight: 700;
  background: transparent; color: var(--muted); border: none;
  border-bottom: 2px solid transparent; letter-spacing: .04em;
  transition: all var(--tr); cursor: pointer;
}
.ctab:hover { color: var(--text); }
.ctab.active { color: var(--gold); border-bottom-color: var(--gold); }

.chat-body {
  flex: 1; overflow-y: auto; padding: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.chat-body[hidden] { display: none; }

.chat-send {
  padding: 9px 14px; font-size: .9rem;
  background: linear-gradient(150deg, var(--gold-hi), var(--gold));
  color: #1a1000; border: none; border-radius: var(--radius-sm);
  font-weight: 800; cursor: pointer;
}
.chat-send:hover { box-shadow: 0 4px 14px rgba(212,165,32,.35); }

.admin-msg .cm-text {
  background: rgba(58,232,112,.1); border-color: rgba(58,232,112,.25);
}

/* ── responsive – desktop collapse ──────────────────────── */
@media (max-width: 780px) {
  .page-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .stream-panel  { grid-column: 1; grid-row: 1; }
  .bet-panel     { grid-column: 1; grid-row: 2; }
  .history-panel { grid-column: 1; grid-row: 3; }
  .history-list  { max-height: 260px; }
  .admin-layout  { grid-template-columns: 1fr; }
  .admin-right   { position: static; }
  .top-bar-inner { gap: 8px; }
  .player-name-chip { display: none; }
  .main-wrap   { grid-template-columns: 1fr; }
  .sym-grid    { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .sc-circle   { width: 38px; height: 38px; }
  .sc-emoji    { font-size: 1.2rem; }
  .symbol-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .sym-emoji   { font-size: 1.4rem; }
}

/* ════════════════════════════════════════════════════════
   MOBILE APP LAYOUT  — premium redesign (≤ 680px)
   ════════════════════════════════════════════════════════ */
@media (max-width: 680px) {

  /* ── Top bar: 2-row compact design ─────────────────── */
  .topbar {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 14px 0;
    gap: 6px;
  }
  .tb-logo { font-size: .88rem; }
  .live-pill { font-size: .68rem; padding: 3px 8px; }
  .tb-wallet { margin-left: auto; }         /* stays pinned right on row 1 */
  .tb-wallet-label { font-size: .56rem; }
  .tb-wallet-amt   { font-size: .92rem; }
  .tb-name { display: none; }               /* save space — hidden on mobile */
  .tb-uid { font-size: .65rem; padding: 2px 7px; }

  /* Action buttons fill the full second row */
  .tb-actions {
    width: 100%;
    gap: 6px;
    padding: 8px 0 6px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
  }
  .tb-actions button {
    flex: 1;
    min-width: 0;
    padding: 10px 4px;
    font-size: .7rem;
    border-radius: 10px;
  }

  /* ── Page layout: single column ─────────────────────── */
  .main-wrap {
    grid-template-columns: 1fr;
    margin: 8px auto;
    padding: 0 10px;
    gap: 10px;
  }

  /* ── Panels: tighter radius + padding ───────────────── */
  .panel {
    padding: 14px 12px;
    border-radius: 12px;
  }

  /* ── Stream ─────────────────────────────────────────── */
  .stream-panel { padding: 0; border-radius: 12px; }
  .stream-stage { border-radius: 12px; }

  /* ── Betting status banner ───────────────────────────── */
  .bet-banner { font-size: .82rem; padding: 10px 14px; border-radius: 10px; }

  /* ── Symbol panel header ─────────────────────────────── */
  .sp-title { font-size: .76rem; }

  /* ── Symbol grid — 3-per-row, large tap targets ─────── */
  .sym-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 0;
  }
  .sym-card {
    padding: 14px 6px 12px;
    border-radius: 14px;
    gap: 6px;
    aspect-ratio: unset;          /* let height be content-driven */
    min-height: 88px;
  }
  .sc-circle { width: 52px; height: 52px; }
  .sc-emoji  { font-size: 1.85rem; }
  .sc-label  { font-size: .63rem; display: block; }   /* show name on mobile */
  .sc-total  { font-size: .6rem; }
  .sc-mybet  { font-size: .58rem; }

  /* ── Bet controls ────────────────────────────────────── */
  .bet-controls-panel { padding: 14px 12px; }
  .bc-row { gap: 8px; margin-bottom: 10px; }

  /* Chips row: all 6 chips spread evenly in one row */
  .bc-chips { gap: 8px; width: 100%; }
  .chip {
    flex: 1;
    min-width: 0;
    padding: 11px 4px;
    font-size: .78rem;
    min-height: 44px;             /* Apple/Material minimum tap target */
    border-radius: 10px;
    text-align: center;
  }

  /* Amount input + Place Bet — stacked vertically */
  .bc-amount-row {
    flex-direction: column;
    gap: 10px;
  }
  .bet-input {
    width: 100%;
    min-width: 0;
    font-size: 1.05rem;
    padding: 14px 16px;
    min-height: 52px;
    text-align: center;
    letter-spacing: .02em;
  }
  .btn-bet {
    width: 100%;
    padding: 15px;
    font-size: 1.02rem;
    letter-spacing: .06em;
    min-height: 52px;
    border-radius: 12px;
  }
  .bet-hint { font-size: .78rem; }

  /* ── Right column (live bets + history) ─────────────── */
  .right-col { gap: 10px; }
  .result-history { max-height: 220px; }
  .bt-name { font-size: .72rem; }
  .bt-amt  { font-size: .68rem; }

  /* ── Chat FAB ────────────────────────────────────────── */
  .chat-fab { right: 12px; bottom: 18px; }
  .chat-win { right: 12px; bottom: 88px; width: calc(100vw - 24px); }

  /* ── Auth / gate cards ───────────────────────────────── */
  .auth-card, .gate-card { padding: 30px 20px; }
  .result-card { padding: 28px 20px; }
  .rc-sym { font-size: 4rem; }
}

/* ── Very small phones (≤ 380px) ────────────────────────── */
@media (max-width: 380px) {
  .tb-logo { font-size: .82rem; letter-spacing: .01em; }
  .tb-wallet-amt { font-size: .86rem; }
  .tb-actions button { font-size: .64rem; padding: 9px 3px; }

  .sym-grid { gap: 8px; }
  .sym-card { min-height: 78px; padding: 12px 4px 10px; }
  .sc-circle { width: 44px; height: 44px; }
  .sc-emoji  { font-size: 1.6rem; }

  .chip { font-size: .72rem; padding: 10px 3px; min-height: 42px; }
  .btn-bet { font-size: .95rem; padding: 14px; }
  .bet-input { font-size: .95rem; padding: 13px 12px; }
}
