/* Aurelian Casino - the house style: night violet, gold, Cinzel over Inter. */
:root {
  --night: #0b0716;
  --night-2: #120b24;
  --panel: #171030;
  --panel-2: #1f1640;
  --line: rgba(232, 193, 90, 0.18);
  --line-strong: rgba(232, 193, 90, 0.45);
  --gold: #e8c15a;
  --gold-hi: #fff1bf;
  --gold-lo: #b8862a;
  --violet: #7c3aed;
  --violet-hi: #a78bfa;
  --text: #f1edfa;
  --muted: #a99fc4;
  --win: #34d399;
  --loss: #f87171;
  --felt: #0d7148;
  --felt-hi: #1e9f6a;
  --radius: 16px;
  --display: 'Cinzel', Georgia, serif;
  --sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(124, 58, 237, 0.22), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(232, 193, 90, 0.08), transparent 60%),
    var(--night);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
input { font: inherit; color: inherit; }
a { color: var(--gold); text-decoration: none; }

/* ------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, rgba(23, 16, 48, 0.96), rgba(11, 7, 22, 0.96));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand img { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 22px rgba(232, 193, 90, 0.25); }
.brand b {
  font-family: var(--display); font-size: 21px; letter-spacing: 3px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-label { font-size: 11px; letter-spacing: 2px; color: var(--muted); margin: 14px 10px 6px; text-transform: uppercase; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--text); font-weight: 600; font-size: 15px; transition: background 0.15s, color 0.15s;
}
.nav a .ico { width: 26px; text-align: center; font-size: 18px; }
.nav a:hover { background: rgba(167, 139, 250, 0.08); }
.nav a.active { background: linear-gradient(90deg, rgba(124, 58, 237, 0.35), rgba(124, 58, 237, 0.05)); box-shadow: inset 3px 0 0 var(--gold); }
.sidebar .foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 10px; line-height: 1.5; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 14px 26px;
  background: rgba(11, 7, 22, 0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .title { font-family: var(--display); font-size: 18px; letter-spacing: 2px; color: var(--gold); }
.topbar .spacer { flex: 1; }
.balance {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line-strong); font-weight: 800; font-size: 17px;
  font-variant-numeric: tabular-nums; min-width: 150px;
}
.balance .coin { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 45%, var(--gold-lo)); box-shadow: 0 0 10px rgba(232, 193, 90, 0.5); flex: none; }
.balance.up { animation: pulse-win 0.7s; }
.balance.down { animation: pulse-loss 0.5s; }
@keyframes pulse-win { 30% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.35); border-color: var(--win); } }
@keyframes pulse-loss { 30% { box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.25); } }
.btn-daily {
  padding: 9px 16px; border-radius: 999px; font-weight: 800; font-size: 14px;
  background: linear-gradient(180deg, #fff1bf, var(--gold) 55%, var(--gold-lo)); color: #2a1a00;
  box-shadow: 0 6px 20px rgba(232, 193, 90, 0.25);
}
.btn-daily.cooldown { background: var(--panel-2); color: var(--muted); box-shadow: none; border: 1px solid var(--line); }
.user { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 999px; }
.user img, .user .initial { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.user .initial { display: grid; place-items: center; background: var(--violet); font-weight: 800; }
.user .who { line-height: 1.15; }
.user .who b { display: block; font-size: 14px; }
.user .who span { font-size: 12px; color: var(--gold); }
.user a.out { color: var(--muted); font-size: 12px; margin-left: 6px; }

.content { padding: 26px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ------------------------------------------------------------- lobby */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 42px 44px; margin-bottom: 26px;
  background: radial-gradient(600px 260px at 78% 50%, rgba(232, 193, 90, 0.18), transparent 70%),
    linear-gradient(120deg, #2a1260, #160a35 55%, #0e0820);
  border: 1px solid var(--line-strong);
}
.hero h1 { font-family: var(--display); font-size: 46px; margin: 0 0 8px; letter-spacing: 4px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #d9ccf5; font-size: 17px; margin: 0 0 22px; max-width: min(520px, calc(100% - 230px)); line-height: 1.5; }
.hero img { position: absolute; right: 48px; top: 50%; width: 190px; border-radius: 50%; transform: translateY(-50%); filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-56%) rotate(4deg); } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.tile {
  position: relative; border-radius: 18px; padding: 18px; min-height: 150px; overflow: hidden; text-align: left;
  border: 1px solid var(--line); background: var(--panel); transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.tile::before { content: ''; position: absolute; inset: 0; background: var(--tile-bg); opacity: 0.9; }
.tile > * { position: relative; }
.tile .big { position: absolute; top: 12px; right: 14px; font-size: 54px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); transition: transform 0.25s; }
.tile b { font-family: var(--display); font-size: 20px; letter-spacing: 1px; }
.tile span { color: #e2d8fb; font-size: 13px; }
.tile:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.tile:hover .big { transform: scale(1.1) rotate(-6deg); }
.row2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-top: 26px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h3 { margin: 0 0 12px; font-family: var(--display); letter-spacing: 1px; color: var(--gold); font-size: 17px; }
.feed { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.feed div { display: grid; grid-template-columns: 1fr 90px 80px; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); font-variant-numeric: tabular-nums; }
.feed .w { color: var(--win); font-weight: 700; text-align: right; }
.feed .l { color: var(--muted); text-align: right; }

/* ------------------------------------------------------------- game shell */
.game { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.game > * { min-width: 0; }
.controls { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.field label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.amount { display: flex; align-items: center; background: var(--night-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.amount input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: 0; padding: 12px 12px; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.amount button { padding: 0 12px; height: 46px; color: var(--muted); font-weight: 800; border-left: 1px solid var(--line); }
.amount button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.chips { display: flex; gap: 7px; margin-top: 8px; }
.chip {
  flex: 1; aspect-ratio: 1; max-width: 50px; border-radius: 50%; font-size: 12px; font-weight: 900; color: #fff;
  border: 3px dashed rgba(255, 255, 255, 0.6); box-shadow: inset 0 0 0 3px var(--c), 0 4px 10px rgba(0, 0, 0, 0.4);
  background: var(--c); transition: transform 0.12s;
}
.chip:hover { transform: translateY(-3px); }
.chip:active { transform: scale(0.94); }
.seg { display: flex; background: var(--night-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; padding: 10px; border-radius: 9px; font-weight: 800; color: var(--muted); transition: background 0.15s, color 0.15s; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.play {
  padding: 16px; border-radius: 14px; font-weight: 900; font-size: 17px; letter-spacing: 0.5px; color: #1c1200;
  background: linear-gradient(180deg, #fff1bf, var(--gold) 50%, var(--gold-lo));
  box-shadow: 0 10px 26px rgba(232, 193, 90, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.1s, filter 0.15s;
}
.play:hover { filter: brightness(1.06); }
.play:active { transform: translateY(1px) scale(0.99); }
.play.alt { background: linear-gradient(180deg, #34d399, #059669); color: #02180f; box-shadow: 0 10px 26px rgba(16, 185, 129, 0.28); }
.stat { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.stat b { color: var(--text); font-variant-numeric: tabular-nums; }

.stage {
  position: relative; min-height: 520px; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line); background: radial-gradient(700px 400px at 50% 40%, rgba(124, 58, 237, 0.25), transparent 70%), var(--night-2);
  display: grid; place-items: center;
}
.stage.felt { background: radial-gradient(ellipse at 50% 35%, var(--felt-hi), var(--felt) 55%, #063b25); }
.stage.felt::after { content: ''; position: absolute; inset: 10px; border-radius: 16px; border: 2px solid rgba(232, 193, 90, 0.5); pointer-events: none; }
.banner {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.6); opacity: 0; pointer-events: none; z-index: 10;
  padding: 18px 34px; border-radius: 18px; text-align: center; background: rgba(8, 5, 18, 0.9); border: 2px solid var(--gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); transition: transform 0.25s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.2s;
}
.banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.banner.low { top: 84%; }
.reel .strip.spinning { filter: blur(1.6px); }
.banner b { display: block; font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; }
.banner span { color: var(--muted); font-size: 14px; letter-spacing: 1px; }
.banner.win { border-color: var(--win); }
.banner.win b { color: var(--win); }
.banner.loss b { color: var(--loss); }
.recent { position: absolute; top: 16px; right: 16px; display: flex; gap: 6px; z-index: 5; }
.recent i { font-style: normal; font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 8px; background: rgba(0, 0, 0, 0.45); font-variant-numeric: tabular-nums; animation: pop 0.25s; }
.recent i.w { color: var(--win); }
.recent i.l { color: var(--loss); }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }

/* ------------------------------------------------------------- coinflip */
.coin-wrap { perspective: 1200px; }
.coin { width: 230px; height: 230px; position: relative; transform-style: preserve-3d; }
.coin .face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff6cf, #f1cf6b 35%, #c99630 70%, #8a5f14);
  box-shadow: inset 0 0 0 10px rgba(138, 95, 20, 0.6), inset 0 0 0 14px #f5d77f, 0 30px 60px rgba(0, 0, 0, 0.55); }
.coin .face span { margin-top: 34px; font-family: var(--display); font-size: 40px; font-weight: 700; color: #6b4708; letter-spacing: 2px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
.coin .face em { position: absolute; top: 30px; font-style: normal; font-size: 46px; }
.coin .tails { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #c4b5fd, #8b5cf6 40%, #4c1d95 80%); box-shadow: inset 0 0 0 10px rgba(46, 16, 101, 0.7), inset 0 0 0 14px var(--gold), 0 30px 60px rgba(0, 0, 0, 0.55); }
.coin .tails span { color: #fff1bf; text-shadow: none; }
.coin-shadow { width: 200px; height: 26px; margin: 30px auto 0; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, 0.55), transparent 70%); }

/* ------------------------------------------------------------- dice */
.dice-board { width: min(680px, 92%); }
.dice-roll { text-align: center; font-size: 84px; font-weight: 900; font-variant-numeric: tabular-nums; margin-bottom: 40px; transition: color 0.2s; }
.dice-roll.w { color: var(--win); text-shadow: 0 0 40px rgba(52, 211, 153, 0.4); }
.dice-roll.l { color: var(--loss); }
.track { position: relative; height: 18px; border-radius: 999px; background: var(--loss); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4); }
.track .zone { position: absolute; top: 0; bottom: 0; background: var(--win); border-radius: 999px; }
.track input[type='range'] { position: absolute; inset: -14px 0; width: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.track .handle { position: absolute; top: 50%; width: 34px; height: 34px; border-radius: 10px; transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #fff, #d9d4e8); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); pointer-events: none; }
.track .marker { position: absolute; top: -58px; transform: translateX(-50%); transition: left 0.5s cubic-bezier(0.2, 0.9, 0.2, 1); }
.track .marker b { display: block; padding: 6px 10px; border-radius: 10px; font-weight: 900; background: #fff; color: #111; font-variant-numeric: tabular-nums; }
.track .marker.w b { background: var(--win); color: #02180f; }
.track .marker.l b { background: var(--loss); color: #2a0606; }
.ticks { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 12px; font-variant-numeric: tabular-nums; }
.dice-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; }
.dice-info div { background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.dice-info span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.dice-info b { font-size: 20px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- slots */
.machine { width: min(560px, 94%); padding: 26px; border-radius: 28px; background: linear-gradient(180deg, #3b1a78, #1d0d40); border: 3px solid var(--gold); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(0, 0, 0, 0.5); }
.machine h2 { margin: 0 0 16px; text-align: center; font-family: var(--display); letter-spacing: 6px; color: var(--gold); font-size: 22px; }
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.reel { aspect-ratio: 7 / 9; overflow: hidden; border-radius: 16px; background: linear-gradient(180deg, #e9e3f7, #fff 30%, #fff 70%, #e9e3f7); box-shadow: inset 0 10px 18px rgba(0, 0, 0, 0.35), inset 0 -10px 18px rgba(0, 0, 0, 0.35); position: relative; }
.reel .strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.reel .sym { height: var(--sym-h, 180px); display: grid; place-items: center; font-size: calc(var(--sym-h, 180px) * 0.48); }
.payline { position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: rgba(232, 193, 90, 0.5); }
.paytable { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px 14px; margin-top: 18px; font-size: 14px; color: #d9ccf5; }
.paytable b { color: var(--gold); }

/* ------------------------------------------------------------- mines */
.grid { display: grid; grid-template-columns: repeat(5, 92px); gap: 12px; }
.cell {
  height: 92px; border-radius: 16px; background: linear-gradient(180deg, #2c2152, #1d1540); border: 1px solid rgba(167, 139, 250, 0.2);
  box-shadow: 0 6px 0 #0f0a24, 0 10px 20px rgba(0, 0, 0, 0.35); transition: transform 0.1s, background 0.2s; font-size: 44px; display: grid; place-items: center;
}
.cell:not(:disabled):hover { transform: translateY(-3px); background: linear-gradient(180deg, #3a2b6b, #241a50); }
.cell.gem { background: radial-gradient(circle, rgba(52, 211, 153, 0.25), #0f2a22); border-color: var(--win); animation: flip 0.35s; }
.cell.bomb { background: radial-gradient(circle, rgba(248, 113, 113, 0.35), #2a0e14); border-color: var(--loss); animation: flip 0.35s; }
.cell.ghost { opacity: 0.55; }
.cell:disabled { cursor: default; opacity: 1; }
@keyframes flip { from { transform: rotateY(90deg) scale(0.8); } }
.stage.shake { animation: shake 0.45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ------------------------------------------------------------- cards */
.table { width: 100%; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 26px; position: relative; z-index: 1; }
.hand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hand .label { font-size: 13px; letter-spacing: 3px; color: rgba(255, 255, 255, 0.75); font-weight: 700; text-transform: uppercase; display: flex; gap: 10px; align-items: center; }
.hand .total { min-width: 40px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); color: var(--gold-hi); font-weight: 900; letter-spacing: 0; }
.hand.active .cards { filter: drop-shadow(0 0 16px rgba(232, 193, 90, 0.55)); }
.hand.won .total { background: var(--win); color: #02180f; }
.hand.lost .total { background: var(--loss); color: #2a0606; }
.cards { display: flex; min-height: 150px; }
.pcard { width: 104px; height: 146px; margin-left: -18px; perspective: 800px; animation: deal 0.42s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.pcard:first-child { margin-left: 0; }
@keyframes deal { from { transform: translate(260px, -240px) rotate(-30deg); opacity: 0; } }
.pcard .inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.5s; }
.pcard.down .inner { transform: rotateY(180deg); }
.pcard .front, .pcard .back { position: absolute; inset: 0; border-radius: 11px; backface-visibility: hidden; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4); }
.pcard .front { background: #fdfaf0; border: 2px solid #d9b65a; color: #1d1530; }
.pcard .front .r { position: absolute; top: 7px; left: 10px; font-weight: 900; font-size: 24px; line-height: 1; }
.pcard .front .r2 { top: auto; left: auto; bottom: 7px; right: 10px; transform: rotate(180deg); }
.pcard .front .mid { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 46px; font-weight: 700; }
.pcard .front .mid em { position: absolute; top: 28px; font-style: normal; font-size: 22px; color: var(--gold-lo); }
.pcard .back { transform: rotateY(180deg); background: repeating-linear-gradient(45deg, rgba(232, 193, 90, 0.15) 0 2px, transparent 2px 12px), linear-gradient(135deg, #5b21b6, #2e1065); border: 3px solid var(--gold); }
.result-line { font-size: 20px; font-weight: 900; min-height: 28px; text-align: center; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.bj-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bj-actions button { padding: 13px; border-radius: 12px; font-weight: 900; background: var(--panel-2); border: 1px solid var(--line-strong); }
.bj-actions button:hover:not(:disabled) { background: #2b2058; }
.bacc-spots { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.bacc-spots button { padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--night-2); font-weight: 800; line-height: 1.2; }
.bacc-spots button span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.bacc-spots button.on { border-color: var(--gold); background: var(--panel-2); box-shadow: 0 0 0 1px var(--gold) inset; }
.bacc-hands { display: flex; gap: 60px; }

/* Rules printed on the felt, like a real table. */
.mid { position: relative; display: grid; place-items: center; width: 100%; min-height: 110px; }
.mid .result-line { position: absolute; z-index: 2; }
.felt-print { display: grid; place-items: center; pointer-events: none; width: 100%; }
.felt-print svg { width: min(420px, 80%); height: auto; overflow: visible; }
.felt-print text { font-family: var(--display); fill: rgba(255, 233, 168, 0.55); letter-spacing: 4px; }
.felt-print .small { fill: rgba(255, 255, 255, 0.35); font-family: var(--sans); font-weight: 700; letter-spacing: 3px; }
.felt-print img { position: absolute; width: 84px; opacity: 0.14; border-radius: 50%; }
.table.bj { min-height: 560px; justify-content: space-between; padding: 28px 20px; }
.table.bacc { min-height: 560px; justify-content: space-evenly; }
.table.bacc .pcard { width: 86px; height: 120px; margin-left: -12px; }
.table.bacc .pcard:first-child { margin-left: 0; }
.table.bacc .pcard .front .mid { font-size: 38px; }
.result-line:not(:empty) { padding: 6px 18px; border-radius: 999px; background: rgba(4, 14, 9, 0.7); }

/* ------------------------------------------------------------- misc */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 99;
  padding: 12px 20px; border-radius: 12px; background: #2a1020; border: 1px solid var(--loss); font-weight: 700; transition: all 0.25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.ok { background: #0d2a20; border-color: var(--win); }
.signin { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.signin .box { max-width: 460px; }
.signin img { width: 150px; border-radius: 50%; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6)); animation: float 5s ease-in-out infinite; }
.signin h1 { font-family: var(--display); font-size: 42px; letter-spacing: 5px; margin: 18px 0 8px; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.signin p { color: var(--muted); line-height: 1.6; }
.discord-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 26px; border-radius: 14px; background: #5865f2; color: #fff; font-weight: 800; font-size: 16px; }
.fair code { display: block; word-break: break-all; background: var(--night-2); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; margin: 6px 0 14px; }
.muted { color: var(--muted); }
.note { font-size: 12px; color: var(--muted); line-height: 1.5; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; top: auto; height: auto; width: 100%; z-index: 30; flex-direction: row; padding: 6px; overflow-x: auto; border-right: 0; border-top: 1px solid var(--line); }
  .sidebar .brand, .sidebar .nav-label, .sidebar .foot { display: none; }
  .nav { display: flex; gap: 2px; }
  .nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 10px; }
  .content { padding: 16px 16px 90px; }
  .topbar { padding: 10px 16px; }
  .topbar .title, .user .who { display: none; }
  .game { grid-template-columns: 1fr; }
  .stage { min-height: 400px; order: -1; }
  .hero { padding: 26px; }
  .hero h1 { font-size: 32px; }
  .hero p { max-width: none; }
  .btn-daily { padding: 9px 12px; white-space: nowrap; }
  .btn-daily .long { display: none; }
  .user a.out { display: none; }
  .balance { min-width: 0; }
  .hero img { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(5, 1fr); width: 100%; }
  .cell { height: auto; aspect-ratio: 1; font-size: 30px; }
  .pcard { width: 74px; height: 104px; margin-left: -24px; }
  .pcard .front .mid { font-size: 32px; }
  .bacc-hands { gap: 24px; }
  .coin { width: 170px; height: 170px; }
}

/* Your hand - or both hands after a split, side by side. */
.hands { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 960px) {
  /* The play button stays in reach above the bottom menu while you scroll the controls. */
  .controls > .play { position: sticky; bottom: 78px; z-index: 6; }
  .stage { min-height: 340px; }
}

/* ------------------------------------------------------------- cashier */
.cashier { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.cashier .card { display: flex; flex-direction: column; gap: 12px; }
.cashier .card h3 { margin: 0; }
.cashier .card p { margin: 0; line-height: 1.5; }
.balance { color: var(--text); }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.streak div { white-space: nowrap; text-align: center; padding: 10px 2px; border-radius: 10px; background: var(--night-2); border: 1px solid var(--line); font-size: 12px; }
.streak span { display: block; color: var(--muted); margin-bottom: 4px; font-size: 11px; }
.streak b { font-size: 14px; font-variant-numeric: tabular-nums; }
.streak .done { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.08); }
.streak .today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 18px rgba(232, 193, 90, 0.25); }
.levels { display: flex; flex-direction: column; gap: 8px; }
.lvl { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line); }
.lvl span { color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.lvl em { font-style: normal; color: var(--muted); font-size: 13px; }
.lvl .play { padding: 8px 16px; font-size: 14px; }
.lvl.ready { border-color: var(--win); }
.lvl.claimed { opacity: 0.6; }

@media (max-width: 960px) {
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { min-height: 118px; padding: 14px; }
  .tile .big { font-size: 38px; }
  .tile b { font-size: 16px; }
  .toast { bottom: 92px; max-width: 90%; text-align: center; }
}

/* ------------------------------------------------------ test-money wallet */
.cashier-tabs { max-width: 460px; margin: 0 0 18px; }
.cashier .wide { grid-column: 1 / -1; }
.testnet-badge {
  width: max-content; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: #fcd34d; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.4); padding: 4px 10px; border-radius: 999px;
}
.cashier .qr { width: 200px; height: 200px; align-self: center; border-radius: 14px; box-shadow: 0 0 0 1px var(--line-strong), 0 14px 34px rgba(0, 0, 0, 0.45); }
.addr { display: flex; gap: 8px; align-items: stretch; }
.addr code {
  flex: 1; min-width: 0; word-break: break-all; padding: 10px 12px; border-radius: 10px; background: var(--night-2); border: 1px solid var(--line);
  font: 13px/1.45 ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--gold-hi);
}
.play.mini { padding: 8px 16px; font-size: 14px; border-radius: 10px; }
.play.ghost { background: none; color: var(--muted); border: 1px solid var(--line-strong); box-shadow: none; width: max-content; }
.warn { padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.35); color: #fcd9a0; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }
.steps a, button.link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
button.link { padding: 0; font: inherit; font-weight: 700; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: auto; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--loss); }
.dot.on { background: var(--win); box-shadow: 0 0 8px var(--win); }
.txrows { display: flex; flex-direction: column; gap: 8px; }
.txrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line); font-size: 14px; }
.txrow > div { min-width: 0; }
.txrow small { color: var(--muted); font-size: 12px; }
.txrow small.why { display: block; margin-top: 2px; }
.txrow a { color: var(--muted); }
.pill { flex: none; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(169, 159, 196, 0.15); color: var(--muted); white-space: nowrap; }
.pill.ok { background: rgba(52, 211, 153, 0.14); color: var(--win); }
.pill.wait { background: rgba(232, 193, 90, 0.14); color: var(--gold); }
.pill.bad { background: rgba(248, 113, 113, 0.14); color: var(--loss); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { padding: 10px 6px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line); text-align: center; }
.stats span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 999px; background: var(--night-2); overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--gold)); }
.withdraw-form, .open-withdrawal { display: flex; flex-direction: column; gap: 12px; }
.amount input::placeholder { color: rgba(169, 159, 196, 0.55); font-weight: 600; }
.amount input.mono { font: 600 14px ui-monospace, 'Cascadia Code', Consolas, monospace; }
.cashier.wallet { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; }
@media (max-width: 860px) {
  .cashier.wallet { grid-template-columns: minmax(0, 1fr); }
  .stats b { font-size: 16px; }
}
.cashier-tabs button { white-space: nowrap; }
@media (max-width: 480px) { .cashier-tabs button { padding: 10px 6px; font-size: 14px; } }
