/* Crypto Arena — Mini App, стиль «Клуб» */

:root {
  --bg: #F4F5F9;
  --surface: #FFFFFF;
  --surface-2: #EEF0F5;
  --line: #E2E5EE;
  --line-strong: #D5D9E4;
  --text: #141622;
  --muted: #5E6478;
  --muted-2: #8A90A6;
  --accent: #11805A;
  --accent-ink: #FFFFFF;
  --accent-light: #3DDC97;
  --gold: #8A6414;
  --gold-bright: #C9A24A;
  --danger: #B8431F;
  --ink: #141622;        /* тёмные карточки баланса/итога */
  --ink-2: #262A3A;
  --ink-muted: #9AA0B8;
  --on-logo: #FFFFFF;
  --felt: #0F1F19;       /* стол */
  --felt-2: #16302A;
  --felt-line: #244A3E;
  --felt-muted: #9DB3A8;
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Тёмная тема Telegram: лобби и прочие экраны */
:root[data-theme="dark"] {
  --bg: #0A0B10;
  --surface: #13151E;
  --surface-2: #1B1E2B;
  --line: #262A3A;
  --line-strong: #3A3F52;
  --text: #F2F3F7;
  --muted: #A3A9BF;
  --muted-2: #7E849A;
  --accent: #3DDC97;
  --accent-ink: #0A0B10;
  --gold: #F2B13C;
  --ink: #1B1E2B;
  --ink-2: #262A3A;
  --on-logo: #0A0B10;
}
:root[data-theme="dark"] .logo { color: #F2F3F7; }
:root[data-theme="dark"] .card.face { background: #F5F3EA; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-weight: 600; font-size: 14px; line-height: 1.35;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
[hidden] { display: none !important; }
b, strong { font-weight: 800; }
.muted { color: var(--muted); font-weight: 700; }
.small { font-size: 11px; }
.accent { color: var(--accent); }
.rating { font-family: var(--font-display); font-weight: 700; color: var(--gold); }

/* ---------- Экраны ---------- */
.app { min-height: 100%; }
.screen { display: none; flex-direction: column; min-height: 100vh; padding: var(--safe-top) 20px calc(20px + var(--safe-bottom)); max-width: 480px; margin: 0 auto; }
.app[data-screen="welcome"] .screen[data-screen="welcome"],
.app[data-screen="deposit"] .screen[data-screen="deposit"],
.app[data-screen="lobby"] .screen[data-screen="lobby"],
.app[data-screen="waiting"] .screen[data-screen="waiting"],
.app[data-screen="match"] .screen[data-screen="match"],
.app[data-screen="result"] .screen[data-screen="result"],
.app[data-screen="profile"] .screen[data-screen="profile"],
.app[data-screen="leaderboard"] .screen[data-screen="leaderboard"] { display: flex; }
.screen-footer { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Шапка ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 8px 0 4px; }
.topbar-nav { margin: 0 -8px; }
.topbar-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-align: center; }
.topbar-center { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.topbar-center small { font-size: 11px; color: var(--muted); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .1em; }
.logo { width: 30px; height: 30px; color: var(--ink); }
.iconbtn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--muted); flex-shrink: 0; }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn-box { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 14px; }
.iconbtn-dark { width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: #fff; }
.iconbtn-dark svg { width: 16px; height: 16px; }
.textbtn { height: 44px; padding: 0 10px; display: flex; align-items: center; font-size: 12px; font-weight: 800; color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: 16px; font-weight: 800; font-size: 13px; width: 100%; transition: transform .08s; }
.btn:active { transform: scale(.985); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; }
.btn-accent { background: var(--accent); color: var(--accent-ink); height: 46px; border-radius: 14px; }
.btn-dark { background: var(--ink); color: #fff; height: 52px; }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); height: 48px; }
.btn-danger { color: var(--danger); }
.btn-outline-light { background: transparent; border: 1px solid #3A3F52; color: #fff; height: 46px; border-radius: 14px; }
.btn-gold { background: var(--gold-bright); color: #141622; font-family: var(--font-display); font-weight: 700; }
.btn-outline-felt { background: transparent; border: 1px solid #3A5E50; color: #DCE8E1; }
.btn-sm { height: 44px; padding: 0 16px; width: auto; border-radius: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Элементы ---------- */
.label { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.section-label { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 14px 0 10px; }
.chip { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 11px; font-weight: 800; }
.chip-dark { background: var(--ink-2); color: var(--accent-light); letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.live { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--accent); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.segment { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.seg-btn { flex: 1; height: 40px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--muted); }
.seg-btn.is-on { background: var(--ink); color: #fff; }
.segment-dark { background: var(--ink-2); border: 0; padding: 3px; }
.segment-dark .seg-btn { height: 36px; min-width: 56px; flex: 0 0 auto; padding: 0 14px; color: var(--ink-muted); }
.segment-dark .seg-btn.is-on { background: #fff; color: #141622; }

.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.section { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; justify-content: space-between; align-items: center; }
.section-head h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-body b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-body small { font-size: 11px; font-weight: 700; color: var(--muted); }
.row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.row-right b { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.row-right small { font-size: 11px; font-weight: 800; color: var(--muted-2); }
.row-stake { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.row-stake span { font-family: var(--font-body); font-size: 11px; color: var(--muted); }
.row-btn { height: 40px; padding: 0 14px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; }
.empty { padding: 22px 14px; text-align: center; font-size: 12px; color: var(--muted); }

.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 11px; width: 38px; height: 38px; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: 10px; background: var(--ink-2); }
.avatar-lg { width: 92px; height: 92px; font-size: 20px; box-shadow: 0 12px 24px rgba(20,22,34,.22); position: relative; }
.avatar-opp { width: 40px; height: 40px; background: var(--felt-2); border: 2px solid var(--accent-light); font-size: 12px; }
.avatar-me { width: 32px; height: 32px; background: var(--felt-2); border: 2px solid var(--gold-bright); font-size: 10px; }
.avatar-light { background: var(--surface-2); color: var(--text); }

.ring { position: relative; width: 58px; height: 58px; flex-shrink: 0; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 157; stroke-dashoffset: 157; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .6s ease; }
.ring .avatar { position: absolute; inset: 8px; width: auto; height: auto; font-size: 13px; }
.ring-lg { width: 66px; height: 66px; }
.ring-lg .avatar { font-size: 15px; }

.kv-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; margin-top: 26px; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { font-size: 13px; font-weight: 700; color: var(--muted); }
.kv b { font-size: 14px; }
.kv-flat { padding: 0; border: 0; }
.note-row, .status-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 12px; font-weight: 700; color: #3C4157; line-height: 1.4; }
.note-row { background: var(--surface-2); }
.note-row svg { width: 18px; height: 18px; flex-shrink: 0; color: #3C4157; }
:root[data-theme="dark"] .note-row, :root[data-theme="dark"] .status-row { color: var(--text); }
.status-row { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--muted); }
.status-row b { display: block; font-size: 13px; color: var(--text); }
.status-row small { font-size: 11px; }
.st-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.st-icon svg { width: 18px; height: 18px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; }
.bar i { height: 100%; background: var(--gold); display: block; transition: width .6s ease; }
.bar i:first-child { opacity: .45; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 4px; }
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); margin-top: 16px; padding-top: 0; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 14px; background: var(--bg); }
.stat b { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.stat small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 4px; }
.stat-card b { font-size: 16px; }
.tabs { display: flex; gap: 12px; }
.tab { height: 36px; font-size: 12px; font-weight: 800; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.is-on { color: var(--text); border-bottom-color: var(--text); }
.footer-bot { margin-top: auto; padding: 18px 0 2px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.fineprint { margin: 0; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted-2); }
.hint { margin: 0; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.4; }

/* ---------- Welcome ---------- */
.welcome-fan { position: relative; height: 210px; margin-top: 24px; }
.fan-card { position: absolute; bottom: 0; width: 104px; height: 146px; transform-origin: bottom center; }
.fan-card:nth-child(1) { left: calc(50% - 110px); transform: rotate(-16deg); }
.fan-card:nth-child(2) { left: calc(50% - 52px); bottom: 14px; }
.fan-card:nth-child(3) { left: calc(50% + 6px); transform: rotate(16deg); }
.fan-back svg { width: 104px; height: 146px; filter: drop-shadow(0 8px 14px rgba(20,22,34,.18)); }
.welcome-fan .card.face { box-shadow: 0 10px 18px rgba(20,22,34,.16); }
.welcome-fan .corner { font-size: 20px; top: 10px; left: 12px; }
.welcome-fan .pip { font-size: 56px; }
.welcome-title { margin: 32px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.welcome-title em { font-style: normal; color: var(--accent); }
.welcome-sub { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.welcome-points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.welcome-points li { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; }
.pt-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.pt-icon svg { width: 18px; height: 18px; }

/* ---------- Deposit ---------- */
.deposit-panel { align-items: center; margin-top: 14px; }
.deposit-net { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--muted); }
.qr { width: 168px; height: 168px; border-radius: 16px; background: #fff; border: 1px solid var(--line); padding: 14px; }
.qr svg { width: 100%; height: 100%; }
.addr-row { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.addr { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.amt { height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.amt.is-on { border: 2px solid var(--accent); color: var(--accent); }

/* ---------- Lobby ---------- */
.balance-card { position: relative; overflow: hidden; margin-top: 6px; padding: 20px; background: var(--ink); color: #fff; border-radius: 24px; display: flex; flex-direction: column; gap: 16px; }
.bc-mark { position: absolute; right: -40px; top: -30px; width: 160px; height: 160px; opacity: .12; color: #fff; }
.bc-mark-lg { left: -70px; right: auto; top: auto; bottom: -90px; width: 220px; height: 220px; opacity: .1; }
.bc-top { display: flex; justify-content: space-between; align-items: center; position: relative; }
.balance-card .label { color: var(--ink-muted); }
.bc-amount { display: flex; align-items: baseline; gap: 8px; position: relative; }
.bc-amount b { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: -.02em; }
.bc-amount span { font-size: 14px; font-weight: 800; color: var(--ink-muted); }
.bc-amount-sm b { font-size: 24px; }
.bc-pending { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--ink-2); font-size: 11px; font-weight: 700; color: #C9CFE2; position: relative; }
.bc-pending i { width: 7px; height: 7px; border-radius: 50%; background: #F2B13C; flex-shrink: 0; }
.bc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative; }
.player-card { margin-top: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; gap: 14px; }
.pc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pc-name { font-weight: 800; font-size: 16px; }
.pc-name-lg { font-family: var(--font-display); font-weight: 700; }
.pc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.pc-meta .rating { font-size: 13px; }
.pc-progress { font-size: 11px; }
.stake-pills { display: flex; gap: 6px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.pill { flex: 1; height: 44px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.pill.is-on { background: var(--ink); color: #fff; font-weight: 700; }
.soon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.soon { padding: 14px; border-radius: 18px; border: 1px dashed #C9CEDC; display: flex; align-items: center; justify-content: space-between; font-weight: 800; color: var(--muted); }
.soon small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }

/* ---------- Waiting ---------- */
.radar { position: relative; width: 240px; height: 240px; margin: 24px auto 0; display: flex; align-items: center; justify-content: center; }
.radar svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rr { fill: none; stroke: var(--line); stroke-width: 1.5; }
.rr-sweep { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 180 549; transform-origin: 50% 50%; animation: sweep 2.4s linear infinite; }
@keyframes sweep { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
.center-title { margin: 26px 0 0; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.center-sub { margin: 6px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }

/* ---------- Match (всегда тёмный) ---------- */
.screen-match { background: var(--felt); color: #F2F5F3; margin: 0 -20px; padding-left: 20px; padding-right: 20px; min-height: 100vh; }
.screen-match .iconbtn { color: var(--felt-muted); }
.screen-match .topbar-center small { color: var(--felt-muted); }
.timer { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--felt-2); border: 1px solid var(--felt-line); font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--gold-bright); }
.timer svg { width: 14px; height: 14px; }
.timer.is-low { color: #FF6B6B; }
.opp-row, .me-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.opp-row { margin-top: 6px; }
.me-row { margin-top: 10px; padding-bottom: 4px; }
.opp { display: flex; align-items: center; gap: 10px; min-width: 0; }
.opp b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opp small { font-size: 11px; font-weight: 700; color: var(--felt-muted); }
.me-row .opp b { font-size: 12px; display: inline; }
.me-row .opp small { font-size: 12px; }
.status-pill { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--felt-2); border: 1px solid var(--felt-line); font-size: 11px; font-weight: 800; color: var(--accent-light); white-space: nowrap; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-light); }
.status-pill.is-idle { color: var(--felt-muted); } .status-pill.is-idle::before { background: var(--felt-muted); }
.opp-hand { margin-top: 14px; display: flex; justify-content: center; min-height: 62px; }
.opp-hand .card-back { width: 44px; height: 62px; margin-right: -16px; filter: drop-shadow(-2px 0 4px rgba(0,0,0,.45)); }
.opp-hand .card-back:last-child { margin-right: 0; }
.felt { margin-top: 16px; flex: 1; border-radius: 28px; background: var(--felt-2); border: 1px solid var(--felt-line); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 48px 16px 18px; min-height: 290px; }
.felt-tag { position: absolute; top: 14px; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; background: var(--felt); border: 1px solid var(--felt-line); font-size: 11px; font-weight: 800; color: var(--felt-muted); text-transform: uppercase; letter-spacing: .08em; }
.felt-tag svg { width: 12px; height: 12px; }
.felt-trump { left: 14px; } .felt-trump b { font-size: 16px; color: #F2F5F3; text-transform: none; letter-spacing: 0; }
.felt-trump b.red { color: #FF6B6B; }
.felt-deck { right: 14px; text-transform: none; letter-spacing: 0; }
.pot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pot .label { color: var(--felt-muted); }
.pot div { display: flex; align-items: baseline; gap: 6px; }
.pot b { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--gold-bright); }
.pot span { font-size: 13px; font-weight: 800; color: var(--felt-muted); }
.table-pairs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; min-height: 92px; }
.pair { position: relative; width: 64px; height: 92px; }
.pair .card { position: absolute; left: 0; top: 0; box-shadow: 0 6px 14px rgba(0,0,0,.35); }
.pair .card.defend { left: 14px; top: 10px; transform: rotate(8deg); }
.felt-hint { margin: 0; font-size: 12px; font-weight: 700; color: var(--felt-muted); text-align: center; }

.card { width: 64px; height: 92px; border-radius: 9px; background: #fff; color: #141622; position: relative; user-select: none; }
.card.red { color: #D23A3A; }
.card .corner { position: absolute; top: 5px; left: 7px; font-weight: 800; font-size: 13px; line-height: 1; text-align: left; }
.card .corner i { display: block; font-style: normal; font-size: 12px; }
.card .pip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.card-back { width: 44px; height: 62px; }

.hand { margin-top: 14px; display: flex; justify-content: center; align-items: flex-end; height: 104px; }
.hand .card { width: 62px; height: 90px; margin-right: -18px; box-shadow: -2px 0 6px rgba(0,0,0,.35); transition: transform .12s; }
.hand .card:last-child { margin-right: 0; }
.hand .card.is-picked { transform: translateY(-14px); outline: 3px solid var(--gold-bright); z-index: 2; }
.hand .card.is-legal { box-shadow: -2px 0 6px rgba(0,0,0,.35), 0 0 0 1.5px var(--accent-light); }
.hand .card.is-dead { opacity: .5; }
.match-actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.textbtn-felt { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #3A5E50; color: var(--felt-muted); font-size: 11px; }

/* ---------- Result ---------- */
.result-card { position: relative; overflow: hidden; margin-top: 18px; padding: 26px 20px 22px; background: var(--ink); color: #fff; border-radius: 26px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.result-card > * { position: relative; }
.result-card .chip-dark svg { width: 12px; height: 12px; }
.r-amount { display: flex; align-items: baseline; gap: 8px; }
.r-amount b { font-family: var(--font-display); font-weight: 800; font-size: 52px; line-height: 1; letter-spacing: -.03em; color: var(--accent-light); }
.r-amount.is-loss b { color: #FF6B6B; }
.r-amount span { font-size: 16px; font-weight: 800; color: var(--ink-muted); }
.r-sub { margin: 0; font-size: 12px; color: var(--ink-muted); text-align: center; }
.r-score { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--ink-2); }
.r-score b { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink-muted); }
.who { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.who-opp { color: var(--ink-muted); }
.result + .card-panel, .screen[data-screen="result"] .card-panel { margin-top: 12px; }
.withdraw-card { margin-top: 16px; padding: 16px; background: var(--ink); color: #fff; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.withdraw-card .label { color: var(--ink-muted); }

/* ---------- Profile ---------- */
.profile-head { margin-top: 8px; display: flex; align-items: center; gap: 14px; }

/* ---------- Leaderboard ---------- */
.podium { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.pod.is-first { padding: 18px 8px 14px; border: 2px solid var(--accent); }
.pod .crown { width: 22px; height: 22px; color: var(--accent); }
.pod .avatar { width: 48px; height: 48px; font-size: 12px; background: var(--surface-2); color: var(--text); border: 2px solid #C9CDD9; }
.pod.is-first .avatar { width: 56px; height: 56px; font-size: 13px; border-color: var(--accent); }
.pod.is-third .avatar { border-color: #C98A5A; }
.pod b { font-size: 12px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .rating { font-size: 15px; } .pod.is-first .rating { font-size: 18px; }
.pod small { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.screen[data-screen="leaderboard"] .list { margin-top: 18px; background: transparent; border: 0; gap: 6px; overflow: visible; }
.screen[data-screen="leaderboard"] .row { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.pos { width: 24px; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 12px; color: var(--muted); }
.delta-up { color: var(--accent) !important; } .delta-down { color: var(--danger) !important; }
.my-row { margin-top: 10px; padding: 12px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--accent); display: flex; align-items: center; gap: 12px; }
.my-row .pos { color: var(--accent); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%); padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 10px 24px rgba(0,0,0,.25); z-index: 50; max-width: 90vw; }

@media (min-width: 480px) { .screen-match { margin: 0 auto; max-width: 480px; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { .rr-sweep { animation: none; } }

/* ---------- Drag & drop ---------- */
.hand .card { touch-action: none; cursor: grab; }
.hand .card.is-dragging { z-index: 20; transition: none; cursor: grabbing; box-shadow: 0 16px 28px rgba(0,0,0,.5); }
.felt.is-drop { border-color: var(--accent-light); box-shadow: inset 0 0 0 2px var(--accent-light); }
.felt { transition: border-color .15s, box-shadow .15s; }
