/* Fuego Poker — dark room, fire accents */
:root {
  --bg: #0d0f14;
  --bg2: #131722;
  --panel: #1a1f2e;
  --panel2: #222839;
  --line: #2c3347;
  --text: #e8ebf2;
  --muted: #8b93a7;
  --fire: #ff6a2b;
  --fire2: #ffb02b;
  --green: #3ddc84;
  --red: #ff4d5e;
  --blue: #4da3ff;
  --felt1: #1d3a34;
  --felt2: #142a26;
  --rail: #241a14;
  --usdc: #2775ca;
  --fuego: #ff6a2b;
  --card-w: 52px;
  --card-h: 74px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 700px at 50% -200px, #1a2030, var(--bg));
  color: var(--text);
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ===== Top bar ===== */
#topbar {
  display: flex; align-items: center; gap: 22px;
  height: 54px; padding: 0 18px;
  background: rgba(13,15,20,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand { font-weight: 900; font-size: 18px; letter-spacing: 2px; display: flex; align-items: center; gap: 6px; }
.brand .flame { filter: drop-shadow(0 0 6px rgba(255,106,43,.8)); }
.brand-sub { color: var(--fire); }
#nav { display: flex; gap: 4px; flex: 1; }
#nav a { padding: 7px 13px; border-radius: 8px; color: var(--muted); font-weight: 600; }
#nav a:hover { color: var(--text); background: var(--panel); }
#nav a.active { color: var(--fire2); background: rgba(255,106,43,.1); }
.top-right { display: flex; align-items: center; gap: 8px; }
.balances { display: flex; gap: 8px; align-items: center; }
.bal-chip {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 13px;
}
.bal-chip:hover { border-color: var(--fire); }
.tok { font-size: 10px; font-weight: 800; padding: 2px 5px; border-radius: 4px; vertical-align: 1px; }
.tok.usdc { background: var(--usdc); color: #fff; }
.tok.fuego { background: linear-gradient(135deg, var(--fire), var(--fire2)); color: #1a0d05; }

.btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 8px; padding: 8px 14px; font-weight: 700; font-size: 13px;
  transition: all .15s;
}
.btn:hover { border-color: var(--fire); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-fire {
  background: linear-gradient(135deg, var(--fire), #ff8f2b);
  border: none; color: #1a0d05;
}
.btn-fire:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; }
.btn-green { background: var(--green); border: none; color: #06281a; }
.btn-red { background: var(--red); border: none; color: #fff; }
.btn-big { padding: 12px 22px; font-size: 15px; border-radius: 10px; }

#view { min-height: calc(100vh - 54px); }

/* ===== Lobby ===== */
.lobby { max-width: 1180px; margin: 0 auto; padding: 26px 20px 60px; }
.lobby-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  background: linear-gradient(120deg, rgba(255,106,43,.14), rgba(39,117,202,.10)),
              var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 26px 30px; margin-bottom: 22px;
}
.lobby-hero h1 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.lobby-hero p { color: var(--muted); max-width: 560px; line-height: 1.5; }
.lobby-hero .hl { color: var(--fire2); font-weight: 700; }
.quick-seat {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; min-width: 270px;
}
.quick-seat h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 12px; }
.qs-row { display: flex; gap: 8px; margin-bottom: 10px; }
.qs-row select {
  flex: 1; background: var(--bg2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 10px; font-weight: 600; font-size: 13px;
}
.quick-seat .btn { width: 100%; }

.lobby-tabs { display: flex; gap: 6px; margin-bottom: 14px; align-items: center; }
.lobby-tab {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 14px;
}
.lobby-tab.active { background: var(--panel); color: var(--fire2); border-color: var(--line); }
.lobby-filters { margin-left: auto; display: flex; gap: 8px; }
.lobby-filters select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 9px; font-size: 12.5px; font-weight: 600;
}

table.tbl { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 12px; overflow: hidden; }
.tbl-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.tbl th {
  text-align: left; padding: 11px 14px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted); background: var(--panel2);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.tbl th:hover { color: var(--text); }
.tbl td { padding: 11px 14px; border-top: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
.tbl tr.row:hover { background: rgba(255,106,43,.06); cursor: pointer; }
.stakes { font-weight: 800; }
.seats-cell { color: var(--muted); }
.seats-cell b { color: var(--text); }
.full-tag { color: var(--muted); font-size: 11px; }
.feature-tag {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 7px; border-radius: 5px; margin-left: 7px;
}
.feature-tag.deep { background: rgba(77,163,255,.18); color: var(--blue); }
.feature-tag.new { background: rgba(61,220,132,.16); color: var(--green); }

.sng-status { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 5px; }
.sng-status.reg { background: rgba(61,220,132,.16); color: var(--green); }
.sng-status.run { background: rgba(255,176,43,.16); color: var(--fire2); }

/* ===== Table page ===== */
.table-page { display: flex; flex-direction: column; height: calc(100vh - 54px); }
.table-head {
  display: flex; align-items: center; gap: 14px; padding: 8px 18px;
  border-bottom: 1px solid var(--line); background: var(--bg2);
}
.table-head .tname { font-weight: 800; font-size: 14px; }
.table-head .tmeta { color: var(--muted); font-size: 12.5px; }
.table-head .spacer { flex: 1; }
.table-main { flex: 1; display: flex; min-height: 0; }
.felt-area { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 12px; min-width: 0; }

.table-oval {
  position: relative; width: min(96%, 1050px); aspect-ratio: 1.9;
  max-height: 100%;
}
.felt {
  position: absolute; inset: 6.5% 5.5%;
  background: radial-gradient(ellipse at 50% 38%, var(--felt1), var(--felt2) 78%);
  border-radius: 50% / 50%;
  border: 12px solid var(--rail);
  box-shadow: inset 0 0 60px rgba(0,0,0,.55), 0 18px 44px rgba(0,0,0,.5),
              inset 0 0 0 2px rgba(255,176,43,.14);
}
.felt-logo {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%,-50%);
  font-size: 30px; font-weight: 900; letter-spacing: 5px; color: rgba(255,255,255,.05);
  user-select: none; pointer-events: none;
}
.table-msg {
  position: absolute; left: 50%; top: 71%; transform: translateX(-50%);
  color: rgba(255,255,255,.55); font-size: 13px; font-weight: 600; white-space: nowrap;
}

/* board + pot */
.board {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%);
  display: flex; gap: 7px; min-height: var(--card-h);
}
.pot-line {
  position: absolute; left: 50%; top: 62%; transform: translateX(-50%);
  display: flex; gap: 10px; align-items: center;
}
.pot-pill {
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,176,43,.3);
  color: var(--fire2); border-radius: 20px; padding: 4px 13px;
  font-weight: 800; font-size: 13px; white-space: nowrap;
}
.pot-pill.side { color: var(--text); border-color: var(--line); font-size: 12px; }

/* cards */
.pcard {
  width: var(--card-w); height: var(--card-h);
  border-radius: 6px; background: #f9f8f4;
  font-weight: 900; position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.08);
  animation: dealIn .18s ease-out;
}
@keyframes dealIn { from { transform: translateY(-14px) scale(.85); opacity: 0; } }
/* corner index: rank over suit, top-left, like a real card */
.pcard .corner {
  position: absolute; top: 4px; left: 5px;
  display: flex; flex-direction: column; align-items: center; line-height: .95;
}
.pcard .corner .crk { font-size: calc(var(--card-w) * .40); }
.pcard .corner .cst { font-size: calc(var(--card-w) * .30); }
.pcard .corner.r10 .crk { font-size: calc(var(--card-w) * .33); letter-spacing: -1px; }
/* big center suit pip */
.pcard .pip {
  position: absolute; right: 6%; bottom: 2%;
  font-size: calc(var(--card-w) * .62); line-height: 1;
}
.pcard.s-s { color: #16181d; } .pcard.s-h { color: #d8232a; }
.pcard.s-d { color: #d8232a; } .pcard.s-c { color: #16181d; }
.fourcolor .pcard.s-d { color: #1f6fd0; } .fourcolor .pcard.s-c { color: #1d8a3e; }
.pcard.back {
  background: linear-gradient(135deg, #7c2410, #a13312 45%, #7c2410);
  border: 2px solid #f0e8d8;
  display: flex; align-items: center; justify-content: center;
}
.pcard.back::after { content: '🔥'; font-size: 15px; opacity: .8; }
/* inline colored cards in the dealer log */
.cs { font-weight: 800; white-space: nowrap; }
.cs.s-s { color: #dfe4ee; } .cs.s-h { color: #ff6b71; }
.cs.s-d { color: #ff6b71; } .cs.s-c { color: #dfe4ee; }
.fourcolor .cs.s-d { color: #5fa8ff; } .fourcolor .cs.s-c { color: #4fce7e; }
/* pot flying to the winner */
.pot-fly {
  position: absolute; transform: translate(-50%,-50%); z-index: 8;
  background: rgba(0,0,0,.72); border: 1px solid var(--fire2); color: var(--fire2);
  border-radius: 20px; padding: 4px 13px; font-weight: 800; font-size: 13px;
  white-space: nowrap; transition: left .6s ease, top .6s ease, opacity .25s;
}
/* hero made-hand indicator */
.made-hand {
  color: var(--fire2); font-weight: 800; font-size: 12.5px;
}
.pcard.dim { filter: brightness(.45); }
.pcard.win-hi { box-shadow: 0 0 0 2.5px var(--fire2), 0 0 16px rgba(255,176,43,.7); }
.pcard.sm { --card-w: 40px; --card-h: 57px; width: 40px; height: 57px; border-radius: 5px; }

/* seats */
.seat { position: absolute; transform: translate(-50%,-50%); width: 148px; z-index: 5; }
.seat-open {
  width: 104px; height: 40px; margin: 0 auto;
  border: 2px dashed rgba(255,255,255,.22); border-radius: 22px;
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.55); font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.seat-open:hover { border-color: var(--fire); color: var(--fire2); background: rgba(255,106,43,.12); }
.seat-cards { display: flex; justify-content: center; gap: 3px; height: 46px; margin-bottom: -12px; position: relative; z-index: 1; }
.seat-cards .pcard { width: 32px; height: 46px; border-radius: 4px; }
/* small villain cards: centered rank over suit, no separate pip */
.seat-cards .pcard .corner {
  position: static; width: 100%; height: 100%;
  justify-content: center; line-height: 1;
}
.seat-cards .pcard .corner .crk { font-size: 15px; }
.seat-cards .pcard .corner .cst { font-size: 13px; }
.seat-cards .pcard .corner.r10 .crk { font-size: 12.5px; letter-spacing: -.5px; }
.seat-cards .pcard .pip { display: none; }
.seat-cards .pcard.back::after { font-size: 10px; }
.seat-cards.hero-cards { height: 64px; margin-bottom: -14px; }
.seat-cards.hero-cards .pcard { width: 46px; height: 64px; }
.seat-cards.hero-cards .pcard .corner { position: absolute; top: 3px; left: 4px; width: auto; height: auto; }
.seat-cards.hero-cards .pcard .corner .crk { font-size: 18px; }
.seat-cards.hero-cards .pcard .corner .cst { font-size: 13px; }
.seat-cards.hero-cards .pcard .corner.r10 .crk { font-size: 14px; letter-spacing: -1px; }
.seat-cards.hero-cards .pcard .pip { display: block; font-size: 26px; right: 5%; bottom: 3%; }

.plate {
  position: relative; background: rgba(10,12,18,.92);
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 6px 10px 7px 44px; min-height: 44px; z-index: 2;
  transition: border-color .15s, box-shadow .15s, opacity .3s;
}
.plate .avatar {
  position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--panel2); border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.plate .pname { font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate .pstack { font-weight: 800; font-size: 12.5px; color: var(--fire2); }
.plate .pstack.usdc-c { color: #7db9ff; }
.seat.folded .plate, .seat.folded .seat-cards { opacity: .42; }
.seat.acting .plate {
  border-color: var(--fire2);
  box-shadow: 0 0 0 1.5px var(--fire2), 0 0 18px rgba(255,176,43,.45);
}
.seat.winner .plate {
  border-color: var(--green);
  box-shadow: 0 0 0 1.5px var(--green), 0 0 20px rgba(61,220,132,.5);
}
.plate .status-tag {
  position: absolute; top: -9px; right: 8px; font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px; padding: 2px 6px; border-radius: 4px;
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
}
.plate .status-tag.allin { background: var(--red); border-color: var(--red); color: #fff; }
.plate .status-tag.blind-tag { background: var(--panel2); }
.timer-track { position: absolute; left: 4px; right: 4px; bottom: 2px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: var(--green); border-radius: 2px; }
.timer-fill.warn { background: var(--fire2); } .timer-fill.crit { background: var(--red); }
.timer-fill.bank { background: var(--blue); }

.act-bubble {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--line); border-radius: 6px;
  font-size: 10.5px; font-weight: 800; padding: 2px 8px; white-space: nowrap; z-index: 3;
  text-transform: uppercase; letter-spacing: .4px;
  animation: popIn .15s ease-out;
}
@keyframes popIn { from { transform: translateX(-50%) scale(.7); opacity: 0; } }
.act-bubble.a-fold { color: var(--muted); }
.act-bubble.a-check { color: var(--green); }
.act-bubble.a-call { color: var(--blue); }
.act-bubble.a-bet, .act-bubble.a-raise { color: var(--fire2); }
.hand-name-tag {
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 800; color: var(--green); white-space: nowrap;
}

/* bet zones + button */
.bet-zone { position: absolute; transform: translate(-50%,-50%); z-index: 4; display: flex; align-items: center; gap: 5px; transition: all .35s ease; }
.chipstack { display: flex; flex-direction: column-reverse; align-items: center; }
.chip {
  width: 17px; height: 17px; border-radius: 50%; margin-top: -12px;
  border: 2.5px dashed rgba(255,255,255,.75); box-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.chip:first-child { margin-top: 0; }
.bet-amt {
  background: rgba(0,0,0,.55); border-radius: 10px; padding: 2px 8px;
  font-size: 11.5px; font-weight: 800; color: #ffe9b0; white-space: nowrap;
}
.dealer-btn {
  position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: #f5f2e8; color: #222; font-weight: 900; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transform: translate(-50%,-50%); transition: all .3s ease; z-index: 6;
  box-shadow: 0 2px 5px rgba(0,0,0,.5);
}

/* ===== action bar ===== */
.action-dock {
  border-top: 1px solid var(--line); background: var(--bg2);
  padding: 10px 18px; min-height: 118px; display: flex; flex-direction: column; gap: 8px;
}
.presets-row { display: flex; gap: 6px; align-items: center; }
.preset-btn {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 7px; padding: 5px 11px; font-weight: 700; font-size: 12px;
}
.preset-btn:hover { color: var(--fire2); border-color: var(--fire); }
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--fire); height: 4px; }
.bet-input {
  width: 110px; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-weight: 800; font-size: 14px; text-align: right;
}
.actions-row { display: flex; gap: 10px; }
.act-btn {
  flex: 1; max-width: 220px; padding: 13px 10px; border-radius: 10px;
  font-size: 15px; font-weight: 800; border: none; letter-spacing: .3px;
  transition: filter .1s;
}
.act-btn:hover { filter: brightness(1.15); }
.act-btn.fold { background: #3a2028; color: #ff8f9b; border: 1px solid #5c2733; }
.act-btn.check, .act-btn.call { background: #15382a; color: #52e6a0; border: 1px solid #1f5c40; }
.act-btn.raise { background: linear-gradient(135deg, var(--fire), #ff9d2b); color: #1a0d05; }
.act-btn.allin-btn { background: linear-gradient(135deg, #d81b3f, #ff5252); color: #fff; }
.prechecks { display: flex; gap: 18px; align-items: center; padding: 8px 2px; color: var(--muted); font-weight: 600; font-size: 13px; }
.prechecks label { display: flex; gap: 7px; align-items: center; cursor: pointer; }
.prechecks input { accent-color: var(--fire); width: 15px; height: 15px; }
.dock-note { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 14px; }
.hero-timer-row { display: flex; align-items: center; gap: 10px; }
.hero-timer-track { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.hero-timer-label { font-size: 11px; color: var(--muted); font-weight: 700; min-width: 78px; text-align: right; }

/* ===== side panel (log/chat) ===== */
.side-panel {
  width: 300px; border-left: 1px solid var(--line); background: var(--bg2);
  display: flex; flex-direction: column; min-height: 0;
}
.side-tabs { display: flex; border-bottom: 1px solid var(--line); }
.side-tab { flex: 1; background: none; border: none; color: var(--muted); padding: 10px; font-weight: 700; font-size: 12.5px; }
.side-tab.active { color: var(--fire2); box-shadow: inset 0 -2px 0 var(--fire); }
.log-scroll { flex: 1; overflow-y: auto; padding: 10px 12px; font-size: 12px; line-height: 1.55; }
.log-line { color: var(--muted); margin-bottom: 3px; }
.log-line b { color: var(--text); }
.log-line.log-hl { color: var(--fire2); }
.log-line.log-win { color: var(--green); }
.chat-line { margin-bottom: 4px; }
.chat-line .who { font-weight: 800; color: var(--blue); }
.chat-input-row { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-input-row input {
  flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-size: 13px;
}

/* ===== modals ===== */
.modal-back {
  position: fixed; inset: 0; background: rgba(5,7,10,.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  animation: fadeIn .15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  width: min(480px, 94vw); max-height: 88vh; overflow-y: auto;
  animation: slideUp .18s ease-out;
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } }
.modal.wide { width: min(560px, 94vw); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; font-weight: 800; }
.modal-x { background: none; border: none; color: var(--muted); font-size: 20px; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 20px; }
.modal-body p.sub { color: var(--muted); line-height: 1.5; margin-bottom: 14px; }

.wallet-opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; color: var(--text); font-weight: 700; font-size: 15px;
}
.wallet-opt:hover { border-color: var(--fire); background: rgba(255,106,43,.07); }
.wallet-opt .wicon { font-size: 24px; width: 32px; text-align: center; }
.wallet-opt .wsub { margin-left: auto; color: var(--muted); font-size: 11.5px; font-weight: 600; }

.cashier-tabs { display: flex; border-bottom: 1px solid var(--line); }
.cashier-tab { flex: 1; padding: 12px; background: none; border: none; color: var(--muted); font-weight: 800; font-size: 13.5px; }
.cashier-tab.active { color: var(--fire2); box-shadow: inset 0 -2px 0 var(--fire); }
.cur-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.cur-card {
  border: 1.5px solid var(--line); background: var(--panel2); border-radius: 12px;
  padding: 14px; text-align: left; color: var(--text);
}
.cur-card.sel { border-color: var(--fire); background: rgba(255,106,43,.08); }
.cur-card .cname { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.cur-card .csub { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.net-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.net-pill {
  border: 1.5px solid var(--line); background: var(--panel2); color: var(--text);
  border-radius: 20px; padding: 7px 14px; font-weight: 700; font-size: 12.5px;
}
.net-pill.sel { border-color: var(--fire); color: var(--fire2); }
.net-pill .nfee { color: var(--muted); font-weight: 600; font-size: 11px; }
.warn-box {
  background: rgba(255,176,43,.1); border: 1px solid rgba(255,176,43,.35);
  border-radius: 10px; padding: 10px 13px; font-size: 12.5px; color: #ffd98a;
  line-height: 1.45; margin-bottom: 14px;
}
.addr-box {
  display: flex; gap: 14px; align-items: center; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px;
}
.qr { width: 92px; height: 92px; background: #fff; border-radius: 8px; padding: 6px; flex-shrink: 0; }
.qr canvas, .qr svg { width: 100%; height: 100%; }
.addr-text { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; line-height: 1.5; }
.copy-btn { margin-top: 8px; }
.dep-status { display: flex; flex-direction: column; gap: 8px; }
.dep-step { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 13px; }
.dep-step.done { color: var(--green); }
.dep-step.active { color: var(--fire2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.dep-step.done .dot { background: var(--green); }
.dep-step.active .dot { background: var(--fire2); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.field input[type=text], .field input[type=number] {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 11px 12px; font-size: 14px; font-weight: 700;
}
.field input:focus { outline: none; border-color: var(--fire); }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.inline-max { position: relative; }
.inline-max .maxb { position: absolute; right: 8px; top: 7px; padding: 4px 9px; font-size: 11px; }

.hist-row { border-bottom: 1px solid var(--line); padding: 10px 14px; }
.hist-row .hr-top { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.hist-row .hr-title { font-weight: 700; font-size: 13px; }
.hist-row .hr-sub { color: var(--muted); font-size: 11.5px; }
.hist-amt { font-weight: 800; }
.hist-amt.pos { color: var(--green); } .hist-amt.neg { color: var(--red); }
.hist-detail { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.6; font-family: ui-monospace, monospace; white-space: pre-wrap; display: none; }
.hist-row.open .hist-detail { display: block; }

/* buy-in modal */
.buyin-table-info { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 16px; font-weight: 600; }
.buyin-amount { text-align: center; font-size: 30px; font-weight: 900; color: var(--fire2); margin-bottom: 4px; }
.buyin-bb { text-align: center; color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 5px; font-weight: 600; }
.checkbox-row { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; margin: 14px 0; cursor: pointer; }
.checkbox-row input { accent-color: var(--fire); width: 15px; height: 15px; }
.bal-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; }

/* ===== history page / fair page ===== */
.page { max-width: 880px; margin: 0 auto; padding: 30px 20px 60px; }
.page h1 { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.page .lead { color: var(--muted); margin-bottom: 22px; line-height: 1.55; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.panel-body { padding: 16px 18px; line-height: 1.6; color: #c9cfdd; }
.panel-body code { background: var(--bg2); padding: 2px 6px; border-radius: 5px; font-size: 12px; color: var(--fire2); }
.stat-row { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-tile { flex: 1; min-width: 150px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat-tile .sv { font-size: 22px; font-weight: 900; }
.stat-tile .sl { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; margin-top: 3px; }
.verify-ok { color: var(--green); font-weight: 800; }
.verify-hash { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); word-break: break-all; }
.empty-note { color: var(--muted); text-align: center; padding: 40px 20px; }

/* toasts */
#toast-root { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--fire);
  border-radius: 10px; padding: 11px 15px; min-width: 260px; max-width: 360px;
  font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.45);
  animation: slideUp .2s ease-out; line-height: 1.45;
}
.toast.t-green { border-left-color: var(--green); }
.toast.t-blue { border-left-color: var(--blue); }
.toast .t-sub { color: var(--muted); font-size: 11.5px; font-weight: 600; margin-top: 3px; font-family: ui-monospace, monospace; }

/* footer (hidden on the table — the table owns the full viewport) */
#footer { border-top: 1px solid var(--line); background: var(--bg2); margin-top: 40px; }
body.on-table #footer { display: none; }
.foot-inner {
  max-width: 1180px; margin: 0 auto; padding: 26px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.foot-brand { font-weight: 900; letter-spacing: 2px; }
.foot-sub { color: var(--muted); font-size: 12px; margin-top: 4px; max-width: 380px; line-height: 1.5; }
.foot-links { display: flex; gap: 16px; }
.foot-links a { color: var(--muted); font-weight: 600; font-size: 13px; }
.foot-links a:hover { color: var(--fire2); }

@media (max-width: 1000px) {
  .side-panel { display: none; }
  .lobby-hero { flex-direction: column; align-items: stretch; }
}
