:root {
  --felt-1: #16283a;
  --felt-2: #0b141c;
  --gold: #8fa3b8;
  --gold-bright: #e8ecf1;
  --gold-dim: #2a3d52;
  --card-face: #faf5e9;
  --card-red: #c0332b;
  --card-black: #26211c;
  --card-w: 78px;
  --card-h: 112px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(ellipse at 50% 25%, var(--felt-1) 0%, var(--felt-2) 80%);
  background-attachment: fixed;
  color: var(--gold);
  overflow: hidden;
}

.hidden { display: none !important; }

.screen {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ============ LOBBY ============ */

#lobby { align-items: center; justify-content: center; }

.lobby-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 42px 56px;
  border: 3px double var(--gold);
  border-radius: 14px;
  background: rgba(30, 3, 6, 0.35);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 0, 0, 0.25);
  max-width: 92vw;
}

.title {
  font-size: 64px;
  letter-spacing: 10px;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 var(--gold-dim), 0 6px 18px rgba(0, 0, 0, 0.6);
  text-align: center;
  line-height: 1;
}

.title-sub {
  display: block;
  font-size: 17px;
  letter-spacing: 6px;
  margin-top: 10px;
  color: var(--gold);
  font-style: italic;
}

.suits-row {
  font-size: 26px;
  letter-spacing: 18px;
  color: var(--gold);
  margin-bottom: 8px;
  text-indent: 18px; /* balance letter-spacing */
}
.suits-row .rs { color: #f0847a; }

#name-input, #join-code {
  font-family: inherit;
  font-size: 18px;
  padding: 10px 14px;
  border: 2px solid var(--gold-dim);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--gold-bright);
  text-align: center;
  outline: none;
  width: 240px;
}
#name-input:focus, #join-code:focus { border-color: var(--gold-bright); }
#name-input::placeholder, #join-code::placeholder { color: rgba(143, 163, 184, 0.45); }

.gold-btn {
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 11px 22px;
  width: 240px;
  border: 2px solid var(--gold-dim);
  border-radius: 8px;
  background: linear-gradient(#37a56d, #2f8f5f 55%, #2a3d52);
  color: #1a1208;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  transition: filter .12s, transform .12s;
}
.gold-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.gold-btn:active { transform: translateY(1px); }
.gold-btn:disabled { filter: grayscale(.6) brightness(.8); cursor: default; transform: none; }
.gold-btn.secondary { background: none; color: var(--gold); }

.join-row { display: flex; gap: 10px; }
.join-row #join-code { width: 110px; text-transform: uppercase; letter-spacing: 4px; }
.join-row .gold-btn { width: 120px; }

#lobby-status { min-height: 26px; font-size: 17px; text-align: center; color: var(--gold-bright); }
#lobby-status b { letter-spacing: 5px; font-size: 22px; }

.lobby-note { font-size: 13px; font-style: italic; opacity: .65; text-align: center; max-width: 320px; }

/* ============ GAME LAYOUT ============ */

#game { padding: 12px 18px; gap: 6px; }

#opp-row, #my-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: calc(var(--card-h) * 0.75 + 16px);
}

#my-row { min-height: calc(var(--card-h) + 26px); }

#mid-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: calc(var(--card-h) + 60px);
}

.name-tag {
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 6px 14px;
  border: 2px solid var(--gold-dim);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--gold-bright);
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ CARDS ============ */

.card {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 8px;
  background: var(--card-face);
  border: 1px solid #9a8f7a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  color: var(--card-black);
  flex-shrink: 0;
  user-select: none;
}
.card.red-suit { color: var(--card-red); }

.card .corner {
  position: absolute;
  font-size: calc(var(--card-w) * 0.23);
  font-weight: bold;
  line-height: 1;
  text-align: center;
}
.card .corner span { display: block; font-size: calc(var(--card-w) * 0.21); }
.card .corner.tl { top: 6px; left: 6px; }
.card .corner.br { bottom: 6px; right: 6px; transform: rotate(180deg); }
.card .pip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--card-w) * 0.52);
}

.card.back {
  background:
    repeating-linear-gradient(45deg, rgba(143, 163, 184, 0.28) 0 5px, transparent 5px 11px),
    repeating-linear-gradient(-45deg, rgba(143, 163, 184, 0.18) 0 5px, transparent 5px 11px),
    linear-gradient(#7c1019, #55080f);
  border: 2px solid var(--gold-dim);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.25), 0 3px 8px rgba(0, 0, 0, 0.45);
}

.card.small {
  width: calc(var(--card-w) * 0.72);
  height: calc(var(--card-h) * 0.72);
}

/* Hands */
#opp-hand, #my-hand { display: flex; padding-left: 14px; }
#opp-hand .card:not(:first-child) { margin-left: calc(var(--card-w) * -0.45); }
#my-hand .card:not(:first-child) { margin-left: calc(var(--card-w) * -0.34); }

#my-hand { flex: 1; padding-top: 14px; }
#my-hand .card { transition: transform .12s, box-shadow .12s; touch-action: none; }
#my-hand .card.playable {
  cursor: grab;
  box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(0, 0, 0, 0.5);
}
#my-hand .card.playable:hover { transform: translateY(-12px); z-index: 5; }
#my-hand .card:not(.playable) { filter: brightness(.92); }
#my-hand .card.drag-source { opacity: 0.35; }

/* Dragged card following the pointer */
.card.ghost {
  position: fixed;
  z-index: 200;
  margin: 0;
  pointer-events: none;
  cursor: grabbing;
  transform: rotate(4deg) scale(1.06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
}

/* Cards flying off the table when a round resolves */
.card.fly {
  position: fixed;
  z-index: 60;
  margin: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.5, 0, 0.85, 0.6), opacity 0.6s ease-in;
}

/* Table */
#table {
  flex: 1;
  align-self: stretch; /* full-height drop zone even when empty */
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  align-content: center;
}

.pair {
  position: relative;
  width: calc(var(--card-w) + 26px);
  height: calc(var(--card-h) + 26px);
}
.pair .attack { position: absolute; top: 0; left: 0; }
.pair .defense {
  position: absolute;
  top: 22px;
  left: 22px;
  transform: rotate(9deg);
  box-shadow: -3px 4px 10px rgba(0, 0, 0, 0.55);
}
.pair .attack.target {
  box-shadow: 0 0 0 3px var(--gold-bright), 0 0 20px rgba(232, 236, 241, 0.75);
}
.pair .attack.drop-hover {
  box-shadow: 0 0 0 4px var(--gold-bright), 0 0 32px rgba(232, 236, 241, 0.95);
  transform: scale(1.06);
}

/* Attack drop zone while dragging */
#table.drop-ok {
  outline: 3px dashed rgba(143, 163, 184, 0.5);
  outline-offset: -8px;
  border-radius: 18px;
  background: rgba(143, 163, 184, 0.05);
}
#table.drop-ok.drop-hover {
  outline-color: var(--gold-bright);
  background: rgba(143, 163, 184, 0.12);
}

/* Stock (deck + trump) */
#stock { position: relative; width: calc(var(--card-w) + var(--card-h) * 0.85); flex-shrink: 0; }
#stock-cards { position: relative; height: calc(var(--card-h) + 10px); }
#trump-slot .card {
  position: absolute;
  top: calc((var(--card-h) - var(--card-w)) / 2);
  left: calc(var(--card-w) * 0.9);
  transform: rotate(90deg);
}
#deck-slot .card { position: absolute; top: 0; left: 0; }
#deck-slot .card:nth-child(2) { top: -3px; left: 3px; }
#deck-count {
  margin-top: 8px;
  text-align: center;
  font-size: 15px;
  color: var(--gold-bright);
}
.trump-badge {
  display: inline-block;
  font-size: 30px;
  padding: 6px 14px;
  border: 2px solid var(--gold-dim);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
}
.trump-badge.red-suit { color: #f0847a; }

#discard-info {
  width: 90px;
  flex-shrink: 0;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  opacity: .8;
}

/* Status + actions */
#status-bar {
  text-align: center;
  font-size: 19px;
  font-style: italic;
  color: var(--gold-bright);
  min-height: 28px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

#actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.gold-btn.action { width: 180px; font-size: 16px; padding: 10px 14px; }

/* ============ OVERLAY ============ */

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 26, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

#overlay-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 60px;
  border: 3px double var(--gold);
  border-radius: 14px;
  background: linear-gradient(rgba(22, 40, 58, 0.97), rgba(13, 24, 35, 0.97));
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.8);
}

#overlay-title {
  font-size: 42px;
  font-weight: bold;
  color: var(--gold-bright);
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.7);
  text-align: center;
}
#overlay-msg { font-size: 18px; font-style: italic; text-align: center; }

/* ============ MOBILE ============ */

@media (max-width: 760px) {
  :root { --card-w: 56px; --card-h: 82px; }
  .title { font-size: 44px; letter-spacing: 6px; }
  .lobby-panel { padding: 28px 24px; }
  #game { padding: 8px; }
  #mid-row { gap: 10px; }
  #discard-info { display: none; }
  .name-tag { font-size: 14px; max-width: 120px; }
  #status-bar { font-size: 15px; }
  .gold-btn.action { width: 130px; font-size: 14px; }
  #overlay-box { padding: 28px 26px; }
  #overlay-title { font-size: 30px; }
}

/* ============================================================
   ONLINE HALL — additive styles; the game design above is untouched
   ============================================================ */

.gold-btn.mini { width: auto; font-size: 14px; padding: 7px 14px; }
.big-num { font-size: 34px; font-weight: bold; color: var(--gold-bright); }
.muted { opacity: .65; font-size: 14px; font-weight: normal; }
.row-2 { display: flex; gap: 10px; }
.dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #ff5b4d; margin-left: 4px; vertical-align: super;
}

#hall { padding: 18px; gap: 14px; overflow-y: auto; align-items: center; }
#hall-header {
  width: min(880px, 96vw);
  display: flex; align-items: center; gap: 12px;
}
.hall-title { font-size: 26px; letter-spacing: 4px; color: var(--gold-bright); font-weight: bold; }
.hall-title span { font-size: 14px; letter-spacing: 2px; font-style: italic; color: var(--gold); }
#hall-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
#btn-freeplay { margin-left: auto; }
#hall-user + #btn-freeplay, #hall-user:not(.hidden) ~ #btn-freeplay { margin-left: 0; }

.chip-badge {
  font-size: 16px; font-weight: bold; color: var(--gold-bright);
  border: 2px solid var(--gold-dim); border-radius: 18px; padding: 5px 12px;
  background: rgba(0, 0, 0, 0.35);
}

.hall-card {
  width: min(880px, 96vw);
  border: 2px solid var(--gold-dim); border-radius: 12px;
  background: rgba(10, 18, 26, 0.35);
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.hall-card h2, .hall-card h3 { color: var(--gold-bright); letter-spacing: 1px; }
.hall-card input, .hall-card select {
  font-family: inherit; font-size: 15px; padding: 8px 10px;
  border: 2px solid var(--gold-dim); border-radius: 7px;
  background: rgba(0, 0, 0, 0.3); color: var(--gold-bright); outline: none;
}
.hall-card input::placeholder { color: rgba(143, 163, 184, 0.4); }

#auth-panel { align-self: center; margin-top: 8vh; width: min(360px, 92vw); }
.pane-status { min-height: 20px; font-size: 14px; color: var(--gold-bright); font-style: italic; }

#hall-nav { width: min(880px, 96vw); display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btn {
  font-family: inherit; font-size: 15px; font-weight: bold; letter-spacing: 1px;
  padding: 8px 16px; cursor: pointer;
  border: 2px solid var(--gold-dim); border-radius: 20px;
  background: none; color: var(--gold);
}
.tab-btn.active { background: #1c3040; color: #e8ecf1; }
#hall-main { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.pane { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }

.form-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-row label { display: flex; gap: 6px; align-items: center; font-size: 15px; }
.form-row label.check { cursor: pointer; }
.seg { display: inline-flex; gap: 4px; }
.seg button {
  font-family: inherit; font-size: 14px; padding: 6px 10px; cursor: pointer;
  border: 2px solid var(--gold-dim); border-radius: 7px; background: none; color: var(--gold);
}
.seg button.active { background: var(--gold); color: #1a1208; font-weight: bold; }
.joiner { display: inline-flex; gap: 8px; margin-left: auto; }
#ht-code { width: 120px; text-transform: uppercase; letter-spacing: 3px; }

.list { display: flex; flex-direction: column; gap: 6px; }
.list-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border: 1px solid rgba(143, 163, 184, 0.25); border-radius: 8px;
  background: rgba(0, 0, 0, 0.22); font-size: 15px;
}
.list-row b { color: var(--gold-bright); }
.list-row .spacer { margin-left: auto; }
.online-dot { color: #37a56d; }
.offline-dot { color: rgba(255,255,255,.3); }

.code-badge {
  font-size: 30px; letter-spacing: 8px; font-weight: bold; color: var(--gold-bright);
  border: 2px dashed var(--gold-dim); border-radius: 10px; padding: 8px 18px;
}
.lobby-panel.wide { max-width: 560px; width: 92vw; }

#dm-layout { display: flex; gap: 14px; width: min(880px, 96vw); align-items: flex-start; }
#dm-threads { flex: 1; min-width: 220px; }
#dm-chat { flex: 2; }
#dm-messages {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 46vh; overflow-y: auto; padding: 6px 2px;
}
.dm-msg { max-width: 78%; padding: 7px 12px; border-radius: 12px; font-size: 15px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(143, 163, 184, 0.2); }
.dm-msg.mine { align-self: flex-end; background: rgba(143, 163, 184, 0.16); }
.dm-msg .when { display: block; font-size: 11px; opacity: .5; }
.dm-msg.invite { border-color: var(--gold-bright); }

/* in-game online extras */
#game-online-bar {
  position: fixed; top: 10px; right: 14px; z-index: 20;
  display: flex; gap: 10px; align-items: center;
}
.round-btn {
  position: fixed; right: 16px; bottom: calc(var(--card-h) + 60px); z-index: 21;
  width: 46px; height: 46px; border-radius: 50%; font-size: 20px; cursor: pointer;
  border: 2px solid var(--gold-dim); background: rgba(10, 18, 26, 0.8); color: var(--gold);
}
#chat-drawer {
  position: fixed; right: 14px; bottom: calc(var(--card-h) + 116px); z-index: 22;
  width: 290px; max-height: 46vh;
  display: flex; flex-direction: column; gap: 8px;
  border: 2px solid var(--gold-dim); border-radius: 12px;
  background: rgba(11, 20, 28, 0.95); padding: 12px;
}
#chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 14px; min-height: 60px; }
#chat-log .who { color: var(--gold-bright); font-weight: bold; }
#chat-drawer input { flex: 1; font-family: inherit; font-size: 14px; padding: 6px 8px;
  border: 2px solid var(--gold-dim); border-radius: 7px; background: rgba(0,0,0,.3); color: var(--gold-bright); outline: none; }
#emote-row { display: flex; gap: 6px; }
.emote { font-size: 18px; background: none; border: 1px solid var(--gold-dim); border-radius: 8px; cursor: pointer; padding: 4px 8px; }

/* multi-opponent row (online 2-4 players) */
.opp-block { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-right: 18px; }
.opp-block .opp-cards { display: flex; }
.opp-block .opp-cards .card:not(:first-child) { margin-left: calc(var(--card-w) * -0.52); }
.opp-block.active .name-tag { border-color: var(--gold-bright); box-shadow: 0 0 12px rgba(232, 236, 241, 0.5); }
.opp-block.out { opacity: .45; }

#overlay-list { display: flex; flex-direction: column; gap: 6px; min-width: 300px; }
#overlay-list .list-row { font-size: 16px; }

#toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 300;
  padding: 10px 22px; border-radius: 22px; font-size: 15px;
  border: 2px solid var(--gold-dim); background: rgba(11, 20, 28, 0.95); color: var(--gold-bright);
  box-shadow: 0 6px 22px rgba(0,0,0,.5);
}

@media (max-width: 760px) {
  #dm-layout { flex-direction: column; }
  .joiner { margin-left: 0; }
  #game-online-bar { top: auto; bottom: 8px; right: 8px; }
}

/* modal (profiles, game logs) */
#hall-modal {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(10, 18, 26, 0.75);
  display: flex; align-items: center; justify-content: center;
}
#hall-modal-box {
  position: relative;
  width: min(680px, 94vw); max-height: 84vh; overflow-y: auto;
  border: 3px double var(--gold); border-radius: 14px;
  background: linear-gradient(rgba(22, 40, 58, 0.98), rgba(13, 24, 35, 0.98));
  padding: 26px 30px; box-shadow: 0 0 80px rgba(0, 0, 0, 0.8);
}
#hall-modal-close { position: absolute; top: 12px; right: 12px; }
#hall-modal-body h2 { color: var(--gold-bright); margin-bottom: 10px; }

.tile-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.tile {
  flex: 1; min-width: 100px; text-align: center; padding: 10px;
  border: 1px solid rgba(143, 163, 184, 0.3); border-radius: 10px; background: rgba(0, 0, 0, 0.25);
}
.tile b { display: block; font-size: 24px; color: var(--gold-bright); }
.tile span { font-size: 11px; letter-spacing: 1px; opacity: .7; }

.hist-box {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 13px; font-family: ui-monospace, Menlo, monospace;
  max-height: 50vh; overflow-y: auto; padding: 8px;
  background: rgba(0, 0, 0, 0.3); border-radius: 8px;
}
.hist-line.err { color: #ff8a7a; }
.hist-line.auto { opacity: .65; }
.hist-t { color: var(--gold-dim); margin-right: 8px; }

.name-link { cursor: pointer; text-decoration: underline dotted rgba(143,163,184,.5); }
.name-link:hover { color: var(--gold-bright); }
.list-row.me-row { border-color: var(--gold-bright); }

/* ============================================================
   CASINO RESKIN — oval table, dark top bar, ornate backs
   ============================================================ */

body {
  background:
    radial-gradient(1100px 520px at 50% -8%, #16283a 0%, transparent 62%),
    radial-gradient(900px 500px at 50% 108%, #10202e 0%, transparent 60%),
    #0b141c;
  background-attachment: fixed;
}

/* --- top bar (game + hall) --- */
.site-bar {
  position: relative;
  z-index: 25;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  background: linear-gradient(#16222e, #0e1822);
  border-bottom: 2px solid #23364a;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}
.bar-side.left { justify-self: start; display: flex; gap: 10px; }
.bar-side.right { justify-self: end; display: flex; gap: 10px; align-items: center; }
.bar-logo, .hall-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(#f4f7fa, #cfd8e2 55%, #8fa3b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8));
  white-space: nowrap;
}
.bar-btn {
  font-family: inherit; font-size: 14px; font-weight: bold; letter-spacing: 1px;
  padding: 7px 14px; cursor: pointer; border-radius: 7px;
  background: linear-gradient(#1c3040, #152534);
  border: 1px solid #2a3d52; color: #e8ecf1;
}
.bar-btn:hover { filter: brightness(1.2); }

#hall-header {
  width: 100vw;
  margin: -18px -18px 0;
  padding: 8px 18px;
  background: linear-gradient(#16222e, #0e1822);
  border-bottom: 2px solid #23364a;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  flex-wrap: wrap;
}
.hall-title span { -webkit-text-fill-color: var(--gold); font-size: 13px; filter: none; }
#hall-me-ava { cursor: pointer; display: inline-flex; }
#hall-me-ava:hover { filter: brightness(1.2); }

/* --- oval table --- */
#felt {
  position: absolute;
  top: 66px; left: 2.5vw; right: 2.5vw; bottom: 92px;
  border-radius: 50%;
  background: linear-gradient(160deg, #e8ecf1 0%, #2a3d52 30%, #3d5670 60%, #c98a3a 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 0;
}
#felt-inner {
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #142838 0%, #122232 55%, #0e1b28 100%);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.65), inset 0 0 8px rgba(0, 0, 0, 0.8);
}
#felt-inner::after {              /* inner pin-line like the mockup */
  content: '';
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  border: 1.5px solid rgba(143, 163, 184, 0.35);
}

#game { padding: 0 18px 10px; }
#opp-row, #mid-row, #status-bar, #my-row { position: relative; z-index: 2; }

#opp-row { justify-content: center; gap: 7vw; margin-top: 22px; min-height: 108px; }
#mid-row { gap: 12px; }
#stock { margin-left: 7vw; }
#discard-info { display: none; }

/* deck + opponent count badges */
.count-badge {
  position: absolute;
  right: -8px; bottom: 6px;
  z-index: 3;
  min-width: 27px; height: 27px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 6px;
  border-radius: 50%;
  background: #132030;
  border: 1.5px solid var(--gold-dim);
  color: var(--gold-bright);
  font-size: 14px; font-weight: bold;
}
.opp-block .opp-cards { position: relative; }
#opp-hand { position: relative; }
#opp-hand > .count-badge { position: static; margin-left: 10px; align-self: center; }
#deck-count {
  position: absolute;
  left: -10px; top: -10px;
  z-index: 3;
  min-width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #132030;
  border: 1.5px solid var(--gold-dim);
  color: var(--gold-bright);
  font-size: 14px; font-weight: bold;
  margin: 0; text-align: center;
}
#deck-count:empty { display: none; }
#stock-cards { overflow: visible; }

.opp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; justify-content: center; }
.opp-block .opp-cards .card { transform: rotate(calc(var(--k, 0) * 1deg)); }

/* ornate card backs (generated art with gradient fallback) */
.card.back {
  border: 3px solid #efe3cb;
  background:
    url('assets/card-back.png') center / cover no-repeat,
    repeating-linear-gradient(45deg, rgba(143, 163, 184, 0.28) 0 5px, transparent 5px 11px),
    repeating-linear-gradient(-45deg, rgba(143, 163, 184, 0.18) 0 5px, transparent 5px 11px),
    linear-gradient(#7c1019, #55080f);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
}

/* gold-trimmed faces */
.card { border: 1px solid #cbaa58; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55); }

/* fanned player hand */
#my-row { justify-content: center; margin-top: -30px; }
#my-hand {
  flex: 0 1 auto;
  padding: 14px 10px 0;
  justify-content: center;
}
#my-hand .card {
  transform: rotate(calc(var(--i, 0) * 3.5deg)) translateY(calc(var(--i, 0) * var(--i, 0) * 1.7px));
  transform-origin: 50% 135%;
}
#my-hand .card.playable:hover {
  transform: rotate(calc(var(--i, 0) * 3.5deg)) translateY(calc(var(--i, 0) * var(--i, 0) * 1.7px - 16px));
  z-index: 5;
}

/* action buttons + side column */
#actions { position: absolute; right: 200px; bottom: 26px; z-index: 6; }
#game-side {
  position: fixed;
  right: 18px; top: 78px;
  display: flex; flex-direction: column; gap: 12px;
  z-index: 30;
}
.table-btn {
  font-family: inherit; font-size: 16px; font-weight: bold; letter-spacing: 0.5px;
  width: 168px; padding: 12px 16px; cursor: pointer;
  background: linear-gradient(#1c3040, #152534);
  border: 1px solid #2a3d52; border-radius: 8px;
  color: #e8ecf1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.table-btn:hover { filter: brightness(1.2); }

/* chips-stack balance */
#game-money {
  position: fixed;
  right: 34px; bottom: 215px;
  z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.chip-stack { position: relative; width: 52px; height: 46px; }
.chip-stack i {
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 5px dashed rgba(255, 255, 255, 0.85);
  background-clip: padding-box;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}
.chip-stack .c1 { background: #2f8f5f; left: 0; top: 6px; }
.chip-stack .c2 { background: #b32b24; left: 12px; top: 0; }
.chip-stack .c3 { background: #7a7f8a; left: 6px; top: 10px; }
#game-money-label { font-size: 19px; font-weight: bold; color: var(--gold-bright); text-shadow: 0 2px 5px rgba(0,0,0,.7); }

/* trump + status above felt */
#status-bar { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85); }

/* --- avatars --- */
.ava { display: inline-flex; flex-shrink: 0; }
.ava-svg { display: block; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }

#ava-editor { display: flex; gap: 28px; flex-wrap: wrap; }
#ava-preview { flex-shrink: 0; }
#ava-controls { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 12px; }
.ava-group h4 { color: var(--gold-bright); margin-bottom: 6px; letter-spacing: 1px; }
.ava-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.ava-opt {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 2px solid transparent; border-radius: 10px;
  padding: 5px 7px; cursor: pointer;
  color: var(--gold); font-family: inherit; font-size: 11px;
}
.ava-opt:hover { border-color: var(--gold-dim); }
.ava-opt.active { border-color: var(--gold-bright); background: rgba(143, 163, 184, 0.1); }

.rules-text p { margin-bottom: 10px; font-size: 15px; line-height: 1.45; }
.rules-text b { color: var(--gold-bright); }

@media (max-width: 760px) {
  #felt { top: 58px; left: 6px; right: 6px; bottom: 84px; }
  .bar-logo, .hall-title { font-size: 21px; letter-spacing: 2px; }
  #game-side { top: 66px; right: 8px; }
  .table-btn { width: 116px; font-size: 13px; padding: 9px 10px; }
  #game-money { right: 12px; bottom: 190px; }
  #actions { right: 130px; bottom: 16px; }
  #stock { margin-left: 2vw; }
}

/* ============================================================
   HOMEPAGE — game mode cards, tiles, portrait avatars
   ============================================================ */

.ava-img { display: block; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-dim); background: #152534; }
.ava-opt.portrait { padding: 8px 10px; font-size: 13px; }
.ava-opt.portrait .ava-img { border-width: 3px; }
#ava-preview .ava-img { border: 4px solid var(--gold); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); }

#home-menu {
  width: min(1140px, 97vw);
  display: grid;
  grid-template-columns: repeat(4, 1fr) 150px;
  gap: 14px;
  align-items: stretch;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 12px 14px;
  border: 2px solid #2a3d52;
  border-radius: 12px;
  background: linear-gradient(#152534, #0f1a24 70%, #12202e);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.mode-card.legend { border-color: #5b2a86; background: linear-gradient(#331048, #1c0729 70%, #24093a); }
.mode-card.private-card { border-color: #1f6b45; background: linear-gradient(#0e3d26, #071f13 70%, #0a2818); }

.ribbon {
  margin-top: 12px;
  padding: 7px 22px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #1a1208;
  background: linear-gradient(#d99a4a, #c98a3a 60%, #9c6a26);
  clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.mode-art {
  width: 100%;
  height: 128px;
  border-radius: 8px;
  background-position: center 30%;
  background-size: cover;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.art-champion { background-image: url('assets/home-champion.png'); }
.art-legend { background-image: url('assets/home-legend.png'); }
.art-joker { background-image: url('assets/home-joker.png'); }
.art-private { background-image: url('assets/home-joker.png'); filter: hue-rotate(105deg) saturate(0.8); }
.art-private .lock { font-size: 44px; filter: hue-rotate(-105deg) drop-shadow(0 4px 10px rgba(0,0,0,.8)); }

.mode-bet { font-size: 26px; font-weight: 800; color: var(--gold-bright); }
.mode-bet span { font-size: 12px; letter-spacing: 2px; color: var(--gold); font-weight: normal; }

.mode-opts { display: flex; gap: 10px; }
.mode-opts span {
  width: 62px; height: 62px;
  border: 1.5px solid var(--gold-dim);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 9px; letter-spacing: 0.5px; color: var(--gold);
  text-align: center; line-height: 1.2;
}
.mode-opts span b { font-size: 17px; color: var(--gold-bright); }

.play-now {
  margin-top: auto;
  width: 100%;
  padding: 12px 0;
  font-family: inherit; font-size: 17px; font-weight: 800; letter-spacing: 1.5px;
  color: #eafbe7;
  background: linear-gradient(#37a56d, #2f8f5f 55%, #26744c);
  border: 1px solid #26744c; border-radius: 8px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.play-now:hover { filter: brightness(1.15); }
.play-now.private { background: linear-gradient(#c98a3a, #9c6a26 55%, #7d5420); border-color: #9c6a26; color: #1a1208; }

#home-tiles { display: flex; flex-direction: column; gap: 12px; }
.tile {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 12px; font-weight: 800; letter-spacing: 1.5px;
  color: #fff; cursor: pointer;
  border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.tile i { font-style: normal; font-size: 30px; }
.tile:hover { filter: brightness(1.15); }
.t-rank { background: linear-gradient(#8d3f9e, #5c2368); }
.t-wallet { background: linear-gradient(#c98a3a, #8a5c22); }
.t-ava { background: linear-gradient(#2b7da0, #14506b); }
.t-free { background: linear-gradient(#37a56d, #2f8f5f); }

@media (max-width: 1000px) {
  #home-menu { grid-template-columns: repeat(2, 1fr); }
  #home-tiles { flex-direction: row; grid-column: 1 / -1; }
  .tile { padding: 14px 0; }
}
@media (max-width: 560px) {
  #home-menu { grid-template-columns: 1fr; }
  #home-tiles { flex-wrap: wrap; }
  .tile { min-width: 42%; }
}

/* ============================================================
   GRAND VAULT THEME — Lovable design system port
   (palette, typography, components; overrides earlier sections)
   ============================================================ */

:root {
  --felt-1: #152534;
  --felt-2: #0b141c;
  --gold: #8fa3b8;
  --gold-bright: #e8ecf1;
  --gold-dim: #2a3d52;
  --wine: #152534;
  --wine-deep: #0f1a24;
  --wine-ink: #0b141c;
  --lacquer: #0f1a24;
  --obsidian: #0a1118;
  --cream: #f5f0e6;
  --crimson: #7a1620;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--cream);
  background: radial-gradient(ellipse at center, #152534 0%, #0f1a24 55%, #0b141c 100%);
  background-attachment: fixed;
  overflow: auto;
}
.font-display, .title, .bar-logo, h1, h2, h3, h4 { font-family: 'Manrope', 'Inter', sans-serif; letter-spacing: -0.01em; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--lacquer); }
::-webkit-scrollbar-thumb { background: #2a3d52; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #3d5670; }

/* ---- shared utility components ---- */
.frame-gold {
  position: relative;
  border-radius: 14px;
  background: linear-gradient(180deg, #182838 0%, #132030 100%);
  box-shadow: 0 0 0 1px #2a3d52,
    0 8px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.03);
}
.frame-gold-thin {
  border: 1px solid #2a3d52;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.25);
}
.text-gold-sweep {
  background: linear-gradient(90deg, #2a3d52, #e8ecf1, #e8ecf1, #e8ecf1, #2a3d52);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: goldSweep 6s linear infinite;
}
@keyframes goldSweep { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes shimmerSweep { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(120%); } }
@keyframes floatThumb { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulseLive { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(201,75,75,0.7); } 50% { opacity: .7; box-shadow: 0 0 0 7px rgba(201,75,75,0); } }

.btn-gold, .gold-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600; letter-spacing: 0.02em; font-size: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #37a56d 0%, #2f8f5f 100%);
  border: 1px solid #26744c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer; overflow: hidden;
  transition: transform .1s, filter .15s;
  width: auto;
}
.btn-gold:hover, .gold-btn:hover { filter: brightness(1.06); }
.btn-gold:active, .gold-btn:active { transform: translateY(1px); }
.btn-gold:disabled, .gold-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.4); }
.btn-gold.shimmer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shimmerSweep 3.2s ease-in-out infinite;
  pointer-events: none;
}
.btn-gold.mini { padding: 8px 16px; font-size: 11px; }
.gold-btn.secondary, .btn-ghost-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-weight: 500; letter-spacing: .01em;
  font-size: 13px;
  color: #cfd8e2; background: transparent;
  border: 1px solid #2a3d52;
  cursor: pointer; transition: all .15s; width: auto; box-shadow: none;
}
.gold-btn.secondary:hover, .btn-ghost-gold:hover { border-color: #3d5670; color: #ffffff; background: #182838; transform: none; }
.btn-ghost-gold.big { font-size: 13px; padding: 11px 22px; }
.btn-crimson {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: .02em; font-size: 13px;
  color: #1a1208;
  background: linear-gradient(180deg, #d99a4a 0%, #c98a3a 100%);
  border: 1px solid #9c6a26;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer; transition: transform .1s, filter .15s;
}
.btn-crimson:hover { filter: brightness(1.06); }
.btn-crimson:active { transform: translateY(1px); }
.btn-crimson.mini { padding: 7px 14px; font-size: 10.5px; }
.gold-btn.mini { width: auto; font-size: 11px; padding: 8px 14px; }

/* ---- persistent top bar ---- */
#site-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 12px; padding: 8px 20px;
  background: rgba(15,26,36,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #2a3d52;
}
.tb-side { display: flex; align-items: center; gap: 4px; }
.tb-side.left { justify-self: start; }
.tb-side.right { justify-self: end; }
.icon-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 11px; border-radius: 8px;
  background: none; border: none; cursor: pointer;
  color: #8fa3b8; font-family: 'Inter', sans-serif;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  transition: all .2s;
}
.icon-link:hover { color: #e8ecf1; background: rgba(94,125,154,0.1); }
.icon-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-link.exit { color: #d18b8b; }
.icon-link.exit:hover { color: #f5c0c0; background: rgba(201,75,75,0.2); }
.icon-link .badge, .badge {
  position: absolute; top: -1px; right: -1px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: #c94b4b; border: 1px solid #0f1a24;
  color: #ffffff; font-size: 9px; font-weight: 700;
  display: grid; place-items: center;
}
.tb-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo-d {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; grid-template-columns: repeat(2, 12px); place-content: center; gap: 1px;
  background: #152534;
  border: 1px solid #2a3d52;
}
.logo-d i { font-style: normal; font-size: 10px; line-height: 1; color: #e8ecf1; text-align: center; }
.logo-d i.r { color: #c94b4b; }
.logo-word {
  display: inline-flex; flex-direction: column; line-height: 1.15;
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  color: #e8ecf1;
}
.logo-word i { font-style: normal; font-size: 9px; letter-spacing: .35em; color: #8fa3b8; font-weight: 600; }
.balance-chip {
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(94,125,154,0.55); background: rgba(12,22,32,0.6);
  color: #e8ecf1; font-weight: 700; font-size: 14px;
  cursor: pointer; white-space: nowrap;
}
.me-link #hall-me-ava .ava-img { width: 28px; height: 28px; }
.me-link { max-width: 190px; overflow: hidden; }
#hall-username { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: none; background: none; padding: 0; font-size: 12px; max-width: 110px; }

/* ---- hall shell + pages ---- */
#hall { padding: 76px 0 60px; align-items: center; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; height: auto; min-height: 100vh; }
#hall-main { width: min(1240px, 96vw); max-width: 96vw; display: flex; flex-direction: column; gap: 16px; }
.page { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 100%; min-width: 0; overflow-x: clip; }
.page > section, .vsec > .hall-card, .hall-card, .hero-band, .promo-row { max-width: 100%; min-width: 0; }
#auth-panel { margin-top: 10vh; width: min(380px, 92vw); align-self: center; }

#variant-nav { display: flex; justify-content: center; gap: 8px; }
.vtab {
  padding: 8px 16px; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  letter-spacing: .01em;
  color: #8fa3b8; background: transparent;
  border: 1px solid transparent; cursor: pointer;
  transition: all .15s;
}
.vtab:hover { color: #e8ecf1; background: #152534; }
.vtab.active {
  color: #e8ecf1;
  background: #1c3040;
  border-color: #2a3d52; font-weight: 600;
}

.hall-card {
  width: 100%;
  border: 1px solid #2a3d52; border-radius: 12px;
  background: rgba(15,26,36,0.72);
  box-shadow: 0 0 0 1px rgba(232,236,241,0.12) inset, 0 0 20px rgba(94,125,154,0.06);
  padding: 18px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.hall-card h2, .hall-card h3 { color: #e8ecf1; }
.hall-card input, .hall-card select, .drawer input, .drawer select {
  font-family: 'Inter', sans-serif; font-size: 14px; padding: 9px 12px;
  border: 1px solid rgba(94,125,154,0.4); border-radius: 8px;
  background: #0a141d; color: var(--cream); outline: none;
}
.hall-card input:focus, .drawer input:focus { border-color: #e8ecf1; }

/* ---- hero band (Grand Hall) ---- */
.hero-band { overflow: hidden; min-height: 320px; position: relative; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .7; }
.hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #0f1a24 0%, rgba(15,26,36,0.5) 55%, transparent),
              linear-gradient(0deg, #0f1a24, transparent 45%);
}
.hero-content {
  position: relative; z-index: 2;
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px; align-items: center;
  padding: 44px 48px; min-height: 320px;
}
.hero-title { font-size: clamp(40px, 6vw, 68px); line-height: .95; margin: 14px 0 0; }
.hero-sub { margin-top: 14px; max-width: 460px; color: #8fa3b8; font-size: 15px; line-height: 1.5; }
.hero-sub.center { margin: 12px auto 0; text-align: center; }
.hero-ctas { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hero-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-self: center; }
.hero-thumbs .thumb { width: 100%; aspect-ratio: 3/4; background-size: cover; background-position: center; overflow: hidden; }
.thumb.float { animation: floatThumb 4s ease-in-out infinite; }
.thumb.d1 { animation-delay: .4s; } .thumb.d2 { animation-delay: .8s; }

/* ---- promos ---- */
.promo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.promo {
  background: rgba(15,26,36,0.7);
  padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: transform .25s, box-shadow .25s;
}
.promo:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #3d5670, 0 14px 32px rgba(0,0,0,0.45); }
.promo-title { color: #e8ecf1; font-size: 17px; }
.promo-body { font-size: 12px; color: #8fa3b8; margin-top: 3px; }

/* ---- results strips ---- */
.results-strip, .rush-strip { background: rgba(11,20,28,0.85); overflow: hidden; }
.strip-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-bottom: 1px solid rgba(138,109,46,0.35);
}
.strip-title { font-size: 11px; letter-spacing: .2em; color: #e8ecf1; font-weight: 700; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #c94b4b; animation: pulseLive 1.6s infinite; }
.strip-track { display: flex; gap: 12px; padding: 12px 16px; overflow-x: auto; }
.result-card {
  min-width: 250px;
  border: 1px solid #2a3d52; border-radius: 10px;
  background: linear-gradient(135deg, #0f1a24, #0f1a24);
  padding: 11px 14px; display: flex; flex-direction: column; gap: 5px;
}
.result-card .rc-top { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .14em; color: #2a3d52; }
.result-card .rc-players { font-size: 13px; color: var(--cream); font-weight: 600; }
.result-card .rc-bottom { display: flex; justify-content: space-between; align-items: center; }
.result-card .rc-mode { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: #8fa3b8; }
.result-card .rc-pot { color: #e8ecf1; font-weight: 700; font-size: 14px; }

/* ---- vault layout ---- */
#vault-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 16px; align-items: start; }
#vault-rail { display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; background: rgba(11,20,28,0.8); position: sticky; top: 76px; }
.rail-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 9px;
  background: none; border: none; cursor: pointer; text-align: left;
  color: #8fa3b8; font-family: 'Inter', sans-serif; font-size: 12px;
  font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  transition: all .2s;
}
.rail-btn:hover { color: #e8ecf1; background: rgba(94,125,154,0.08); }
.rail-btn.active { color: #e8ecf1; background: #1c3040; font-weight: 700; }
#vault-content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vsec { display: flex; flex-direction: column; gap: 14px; }
.vault-search { padding: 4px; background: rgba(10,20,29,0.85); }
.vault-search input { width: 100%; border: none; background: none; padding: 9px 14px; color: var(--cream); font-size: 14px; outline: none; }

/* ---- queue tiles ---- */
.tile-row-lg { display: flex; gap: 14px; flex-wrap: wrap; }
.tile-row-lg.center { justify-content: center; }
.qtile {
  min-width: 200px; flex: 1; max-width: 280px;
  border: 1px solid #2a3d52; border-radius: 12px;
  background: linear-gradient(160deg, rgba(21,37,52,0.85), rgba(15,26,36,0.95));
  padding: 18px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  transition: transform .25s, box-shadow .25s;
}
.qtile:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #3d5670, 0 14px 32px rgba(0,0,0,0.45); }
.qtile .qt-name { font-family: 'Manrope', sans-serif; color: #e8ecf1; font-size: 17px; }
.qtile .qt-stake { font-size: 24px; font-weight: 800; color: var(--cream); }
.qtile .qt-meta { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #8fa3b8; }

/* ---- VIP ---- */
.vip-me { display: flex; gap: 14px; flex-wrap: wrap; }
.vip-tile {
  flex: 1; min-width: 130px; text-align: center; padding: 14px;
  border: 1px solid rgba(94,125,154,0.35); border-radius: 10px; background: rgba(10,20,29,0.5);
}
.vip-tile b { display: block; font-size: 26px; color: #e8ecf1; }
.vip-tile span { font-size: 10px; letter-spacing: .16em; color: #2a3d52; text-transform: uppercase; }

/* ---- store ---- */
.skin-card {
  width: 180px;
  border: 1px solid #2a3d52; border-radius: 12px;
  background: rgba(15,26,36,0.75); padding: 14px;
  display: flex; flex-direction: column; gap: 9px; align-items: center;
  transition: transform .2s, box-shadow .2s;
}
.skin-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #3d5670, 0 14px 28px rgba(0,0,0,0.4); }
.skin-card.equipped { box-shadow: 0 0 0 2px #37a56d, 0 0 20px rgba(55,165,109,0.25); }
.skin-preview { width: 74px; height: 106px; border-radius: 8px; }
.skin-name { font-family: 'Manrope', sans-serif; color: #e8ecf1; font-size: 14px; text-align: center; }
.skin-price { font-size: 13px; font-weight: 700; color: var(--cream); }

/* card-back skins: unified var-driven deck art (see DECK SKINS section) */

/* ---- rewards ---- */
.reward-line { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.reward-line b { color: #e8ecf1; font-size: 22px; }
.jp-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* ---- rush page ---- */
#page-rush { position: relative; }
.rush-hero {
  position: relative; text-align: center; padding: 46px 20px 30px;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(rgba(15,26,36,0.55), rgba(15,26,36,0.85)), url('assets/hero-hall.jpg') center/cover;
  box-shadow: 0 0 0 1px #2a3d52, 0 0 0 3px #0f1a24, 0 12px 30px rgba(0,0,0,0.55);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.rush-strip { position: sticky; bottom: 8px; }

/* ---- payments ---- */
.payments-card { gap: 16px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 620px; }
.pay-method {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px; cursor: pointer;
  background: rgba(10,20,29,0.6);
  color: var(--cream); font-family: 'Inter', sans-serif;
  transition: all .2s;
}
.pay-method:hover { border-color: #e8ecf1; }
.pay-method.active { box-shadow: 0 0 0 2px #37a56d, 0 0 20px rgba(55,165,109,0.25); }
.pay-icon { width: 46px; height: 46px; }
.pay-name { font-weight: 800; font-size: 16px; letter-spacing: .06em; }
.deposit-row { align-items: center; }
#deposit-amount { width: 170px; font-size: 18px; font-weight: 700; text-align: center; }

/* ---- drawers ---- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 120;
  width: min(400px, 94vw);
  background: linear-gradient(180deg, #0e1822, #0a141d);
  border-left: 1px solid #2a3d52;
  box-shadow: -20px 0 60px rgba(0,0,0,0.6);
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { color: #e8ecf1; font-size: 20px; }
.drawer-sub { color: #2a3d52; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-top: 6px; }
.drawer-close { font-size: 16px; }
#dm-messages { max-height: 44vh; }

/* ---- list rows restyle ---- */
.list-row {
  border: 1px solid rgba(94,125,154,0.25); border-radius: 9px;
  background: rgba(10,20,29,0.45); font-size: 13.5px;
  font-family: 'Inter', sans-serif;
}
.list-row b { color: #e8ecf1; }
.seg button { border-radius: 999px; font-family: 'Inter', sans-serif; font-size: 12px; padding: 7px 14px; border-color: rgba(94,125,154,0.45); }
.seg button.active { background: #2f8f5f; color: #ffffff; border-color: #26744c; font-weight: 700; }

.big-num { color: #e8ecf1; }
.code-badge { color: #e8ecf1; border-color: rgba(94,125,154,0.5); }
.pane-status { color: #e8ecf1; }
.muted { color: #8fa3b8; opacity: 1; }
.lobby-note { color: #8fa3b8; opacity: .8; }

/* free-play lobby + game palette alignment */
.lobby-panel { background: rgba(15,26,36,0.6); border-color: var(--gold); }
#game .site-bar { background: linear-gradient(180deg, #0e1822, #0a141d); border-bottom-color: rgba(94,125,154,0.35); }
#felt { background: linear-gradient(160deg, #3d5670 0%, #23364a 35%, #16283a 65%, #2a3d52 100%); }
#felt-inner { background: radial-gradient(closest-side, #152534 0%, #132433 55%, #0e1c29 100%); }
.table-btn { background: linear-gradient(180deg, #37a56d 0%, #2f8f5f 100%); border-color: #26744c; color: #ffffff; border-radius: 10px; font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 10px rgba(0,0,0,0.3); }
.gold-btn.action { border-radius: 999px; }
#hall-modal-box, #overlay-box { background: linear-gradient(160deg, rgba(21,37,52,0.97), rgba(15,26,36,0.98)); border: none; }
#overlay-title { color: #e8ecf1; }
#toast { background: rgba(10,20,29,0.95); border-color: #2a3d52; color: #e8ecf1; font-family: 'Inter', sans-serif; }

/* responsive */
@media (max-width: 980px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-thumbs { display: none; }
  .promo-row { grid-template-columns: 1fr; }
  #vault-layout { grid-template-columns: 1fr; }
  #vault-rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .pay-methods { grid-template-columns: 1fr; }
  .icon-link span { display: none; }
  #hall-username { display: none; }
}

/* ============================================================
   POLISH: no layout shift, drag glide, defense veils
   ============================================================ */

/* the "golden line" was the styled scrollbar appearing/disappearing */
html { scrollbar-gutter: stable; }
body:has(#game:not(.hidden)) { overflow: hidden; }
body:has(#lobby:not(.hidden)) { overflow: hidden; }

/* dragged ghost: transform-driven, no snap */
.card.ghost {
  transition: none;
  will-change: transform;
  left: 0; top: 0;
}
.card.ghost.ghost-fly {
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.25s ease-out;
}
.card.ghost.ghost-fade { transition: opacity 0.25s ease-out; opacity: 0; }

/* defense veils while dragging: droppable = gold field, unbeatable = dark field */
.pair .attack { transition: box-shadow 0.15s; }
.pair .attack.target::after {
  content: '⤓';
  position: absolute; inset: 0;
  border-radius: 8px;
  background: rgba(232, 236, 241, 0.28);
  border: 2px dashed rgba(232, 236, 241, 0.9);
  display: grid; place-items: center;
  font-size: 30px; color: rgba(15, 26, 36, 0.75);
  pointer-events: none;
}
.pair .attack.drop-hover::after { background: rgba(232, 236, 241, 0.45); }
.pair .attack.undef-no::after {
  content: '✕';
  position: absolute; inset: 0;
  border-radius: 8px;
  background: rgba(8, 16, 24, 0.55);
  display: grid; place-items: center;
  font-size: 22px; color: rgba(232, 236, 241, 0.5);
  pointer-events: none;
}

/* ============================================================
   CASINO — roulette, blackjack, chips, badges, waiting seats
   ============================================================ */

#casino-tabs { display: flex; gap: 8px; justify-content: center; }
.cas-sec { display: flex; flex-direction: column; gap: 14px; }
.cas-card { gap: 14px; }
.cas-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cas-layout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.cas-controls { display: flex; flex-direction: column; gap: 10px; }
.cas-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* chip tray */
.chip-tray { display: flex; gap: 8px; flex-wrap: wrap; }
.cas-chip {
  --chip-c: #8a8f98;
  width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--chip-c), color-mix(in srgb, var(--chip-c) 65%, #000));
  border: 4px dashed rgba(255, 255, 255, 0.85);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 0 0 3px rgba(0, 0, 0, 0.25);
  color: #fff; font-weight: 800; font-size: 12px; font-family: 'Inter', sans-serif;
  cursor: pointer; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  transition: transform 0.12s;
}
.cas-chip:hover { transform: translateY(-3px); }
.cas-chip.sel { outline: 3px solid #37a56d; outline-offset: 2px; transform: translateY(-3px); }

/* roulette board — big printed-felt casino layout */
#r-board {
  display: flex; flex-direction: column; gap: 0;
  flex: 1; min-width: 0;
}
.r-main { display: flex; }
.r-zerocol { display: flex; flex-direction: column; width: 62px; }
.r-zerocol .r-cell { flex: 1; border-radius: 26px 0 0 26px; font-size: 22px; }
.r-grid { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr) 66px; }
.r-under { display: flex; flex-direction: column; margin-left: 62px; margin-right: 66px; }
.r-dozens { display: grid; grid-template-columns: repeat(3, 1fr); }
.r-evens { display: grid; grid-template-columns: repeat(6, 1fr); }
.r-cell {
  position: relative;
  min-height: 52px;
  border-radius: 0;
  font-family: 'Manrope', 'Inter', sans-serif; font-weight: 700; font-size: 21px;
  color: var(--cream); cursor: pointer;
  border: 1.5px solid #c98a3a;
  margin: -0.75px;
  background: transparent;
  transition: filter 0.12s;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.r-cell:hover { filter: brightness(1.45); z-index: 2; box-shadow: inset 0 0 18px rgba(232, 236, 241, 0.35); }
.r-cell.red { background: radial-gradient(ellipse at 50% 35%, #b32433, #7a1620 85%); }
.r-cell.black { background: radial-gradient(ellipse at 50% 35%, #262630, #0e0e12 85%); }
.r-cell.green { background: radial-gradient(ellipse at 50% 35%, #23945d, #135031 85%); }
.r-cell.outside { background: rgba(15, 26, 36, 0.35); color: #e8ecf1; font-size: 15px; letter-spacing: 0.08em; }
.r-cell.colbet { font-size: 13px; }
.r-cell.doz { min-height: 52px; }
.r-cell.red-d { color: #e04a3e; font-size: 26px; text-shadow: 0 0 1px #c98a3a, 0 1px 3px rgba(0,0,0,.8); }
.r-cell.black-d { color: #17171d; font-size: 26px; text-shadow: 0 0 2px #c98a3a; }
.r-stack {
  position: absolute; top: -8px; right: -6px; z-index: 3;
  min-width: 30px; height: 30px; padding: 0 3px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--chip-c, #c98a3a), color-mix(in srgb, var(--chip-c, #c98a3a) 60%, #000));
  border: 3px dashed rgba(255, 255, 255, 0.85);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.6);
}
#r-wheel { width: 260px; flex-shrink: 0; }
#r-wheel svg { width: 100%; height: auto; filter: drop-shadow(0 8px 20px rgba(0,0,0,.6)); }
.r-timer { display: flex; align-items: center; gap: 10px; }
.r-timer-track { width: 160px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.5); overflow: hidden; border: 1px solid rgba(94, 125, 154, 0.4); }
#r-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #c98a3a, #37a56d); transition: width 0.1s linear; }
#r-timer-txt { color: #e8ecf1; font-weight: 800; font-family: 'Inter', sans-serif; }
.r-result { min-height: 26px; font-size: 17px; color: var(--cream); }
.r-result b { font-size: 22px; padding: 2px 12px; border-radius: 6px; margin-right: 6px; }
.r-result b.red { background: #c94b4b; } .r-result b.black { background: #1c1c22; } .r-result b.green { background: #2f8f5f; }

/* blackjack */
.bj-table { display: flex; flex-direction: column; gap: 14px; min-height: 220px; }
.bj-row { display: flex; align-items: center; gap: 14px; }
.bj-label { width: 110px; color: #e8ecf1; font-family: 'Manrope', sans-serif; font-size: 15px; }
.bj-cards { display: flex; }
.bj-cards .card { width: 58px; height: 84px; }
.bj-cards .card:not(:first-child) { margin-left: -22px; }
.bj-card .corner { font-size: 14px; } .bj-card .pip { font-size: 26px; }
#bj-hands { display: flex; flex-direction: column; gap: 10px; }
.bj-hand { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 10px; }
.bj-hand.active { background: rgba(232, 236, 241, 0.08); box-shadow: 0 0 0 1px rgba(232, 236, 241, 0.5); }
.bj-hand-info { font-size: 14px; color: var(--cream); }
.bj-res { margin-left: 8px; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.bj-res.win, .bj-res.blackjack { background: #2f8f5f; color: #eafbe7; }
.bj-res.lose { background: #7a1620; color: #ffd9d4; }
.bj-res.push { background: #3f4a5a; color: #e8eef7; }

/* username badges */
.ubadge-e { font-style: normal; margin-left: 4px; font-size: 1em; filter: drop-shadow(0 0 6px rgba(232, 236, 241, 0.6)); }
.badge-card .badge-big { font-size: 46px; line-height: 1.2; filter: drop-shadow(0 0 10px rgba(232, 236, 241, 0.5)); }
#tb-my-badge .ubadge-e { font-size: 15px; }

/* waiting seats */
.seat-waiting { border-style: dashed; opacity: 0.85; }
.seat-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(94, 125, 154, 0.25); border-top-color: #e8ecf1;
  animation: seatSpin 1s linear infinite;
}
@keyframes seatSpin { to { transform: rotate(360deg); } }
.wait-dots i { font-style: normal; color: #e8ecf1; font-size: 20px; animation: waitDot 1.2s infinite; }
.wait-dots i:nth-child(2) { animation-delay: 0.2s; }
.wait-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes waitDot { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

@media (max-width: 1020px) {
  #roul-table { border-radius: 130px 130px 22px 22px; padding: 18px; }
  #roul-table::before { border-radius: 120px 120px 16px 16px; }
  .rt-felt { flex-direction: column; border-radius: 116px 116px 12px 12px; padding: 20px 14px; gap: 16px; }
  .rt-wheelwell { width: min(320px, 80vw); }
  .r-cell { min-height: 36px; font-size: 13px; }
  .r-cell.outside { font-size: 11px; }
  .r-zerocol { width: 44px; }
  .r-zerocol .r-cell { font-size: 16px; }
  .r-grid { grid-template-columns: repeat(12, 1fr) 44px; }
  .r-under { margin-left: 44px; margin-right: 44px; }
}

/* ============================================================
   CASINO ROOMS — dedicated tables, physical wheel, art chips
   ============================================================ */

.cas-lobby { grid-template-columns: 1fr 1fr; }
.cas-lobby-card { overflow: hidden; display: flex; flex-direction: column; }
.cas-lobby-art { height: 210px; background-size: cover; background-position: center; }
.roul-art { background-image: url('assets/roulette-table.jpg'); }
.bj-art { background-image: url('assets/blackjack-table.jpg'); }
.cas-lobby-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.cas-lobby-body h2 { color: #e8ecf1; }

#roul-screen, #bj-screen { padding: 72px 22px 20px; gap: 14px; overflow-y: auto; position: relative; }
.cas-screen-bg {
  position: fixed; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
}
.cas-screen-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(15,26,36,0.45), rgba(11,20,28,0.88) 85%);
}
.cas-topline { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cas-title { color: #e8ecf1; font-size: 26px; text-shadow: 0 2px 8px rgba(0,0,0,.8); }

/* ---- the physical roulette table ---- */
#roul-table {
  margin: 6px auto 0;
  width: min(1240px, 98vw);
  border-radius: 230px 26px 26px 230px;
  padding: 26px;
  background:
    radial-gradient(120% 160% at 8% 50%, #7a5a30 0%, #5a3c1a 30%, #3a250e 68%, #241608 100%);
  box-shadow:
    inset 0 2px 0 rgba(232, 236, 241, 0.35),
    inset 0 -14px 26px rgba(0, 0, 0, 0.55),
    0 30px 70px rgba(0, 0, 0, 0.8),
    0 6px 18px rgba(0, 0, 0, 0.6);
  position: relative;
}
#roul-table::before {                 /* gold beading on the rail */
  content: '';
  position: absolute; inset: 10px;
  border-radius: 220px 18px 18px 220px;
  border: 2px solid rgba(94, 125, 154, 0.55);
  pointer-events: none;
}
.rt-felt {
  border-radius: 205px 14px 14px 205px;
  padding: 26px 26px 26px 20px;
  background:
    radial-gradient(90% 130% at 20% 50%, #1a3049 0%, #16283c 45%, #112031 80%, #0d1a28 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.55), inset 0 0 6px rgba(0, 0, 0, 0.8);
  display: flex; align-items: center; gap: 26px;
}
.rt-wheelwell {
  flex-shrink: 0;
  width: min(380px, 34vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #0d1824 55%, #12202e 78%, rgba(0,0,0,0) 79%);
  box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.85), inset 0 0 0 5px rgba(94, 125, 154, 0.35);
  display: grid; place-items: center;
  padding: 12px;
}
#r-wheel {
  width: 100%;
  aspect-ratio: 1;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.65));
}
#r-wheel svg { position: relative; display: block; }
.rt-layout { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rt-rack {
  margin: 14px auto 0;
  width: min(1100px, 96vw);
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(#2c1a0a, #1c1006);
  box-shadow: inset 0 1px 0 rgba(232,236,241,.25), 0 10px 26px rgba(0,0,0,.6);
}

/* generated chip art, recolored per denomination */
.cas-chip {
  background: url('assets/chip.png') center / cover no-repeat;
  border: none;
  border-radius: 50%;
  overflow: hidden;
  filter: var(--chip-f, none) drop-shadow(0 3px 6px rgba(0,0,0,.6));
  box-shadow: none;
  width: 56px; height: 56px;
}
.cas-chip span {
  display: grid; place-items: center;
  width: 30px; height: 30px; margin: 0 auto;
  border-radius: 50%;
  background: rgba(8, 16, 24, 0.72);
  filter: none;
  font-size: 11px;
}
.cas-chip.sel { outline: 3px solid #37a56d; outline-offset: 2px; border-radius: 50%; transform: translateY(-3px); }
.r-stack {
  background: url('assets/chip.png') center / cover no-repeat;
  border: none;
  border-radius: 50%;
  overflow: hidden;
  filter: var(--chip-f, none);
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
}
.r-stack::after { content: ''; }

/* blackjack room */
.bj-area {
  max-width: 860px; margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(12, 22, 32, 0.35);
  box-shadow: inset 0 0 60px rgba(0,0,0,.35);
}
.bj-dealer-row { justify-content: center; }
#bj-hands { align-items: center; }
.pane-status.center, .cas-btns.center { justify-content: center; text-align: center; }
.bj-bottom {
  max-width: 860px; margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}

@media (max-width: 900px) {
  .cas-lobby { grid-template-columns: 1fr; }
  #r-wheel { position: static; margin: 0 auto; }
}

/* ============================================================
   LAYOUT V2 — inline nav, profile dropdown, menu tiles,
   avatar rings, premium deck previews  (Lovable newest layout)
   ============================================================ */

#site-topbar {
  display: flex; align-items: center; gap: 18px;
  grid-template-columns: none;
  height: 56px; padding: 0 20px;
}
#main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.tb-side.right { margin-left: auto; }

/* profile chip + dropdown */
#me-menu-wrap { position: relative; }
.me-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 5px; border-radius: 999px;
  background: #132030; border: 1px solid #2a3d52;
  color: #e8ecf1; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; position: relative;
  transition: border-color .15s;
}
.me-chip:hover { border-color: #3d5670; }
.me-chip .me-caret { color: #8fa3b8; font-size: 10px; }
.me-chip #hall-username { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chip .badge { position: absolute; top: -4px; right: -4px; }

.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
  min-width: 230px;
  background: linear-gradient(180deg, #182838 0%, #132030 100%);
  border: 1px solid #2a3d52; border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  padding: 6px;
  display: flex; flex-direction: column;
}
.dd-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  background: none; border: none; cursor: pointer; text-align: left;
  color: #cfd8e2; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
}
.dd-item:hover { background: #1c3040; color: #ffffff; }
.dd-item.exit { color: #d18b8b; }
.dd-item.exit:hover { background: rgba(201,75,75,0.15); color: #f5c0c0; }
.dd-item .badge { position: static; margin-left: auto; }
.dd-item .dd-note { margin-left: auto; font-style: normal; font-size: 11px; color: #8fa3b8; }
.dd-sep { height: 1px; background: #2a3d52; margin: 6px 8px; }

/* menu homepage */
.menu-head { text-align: center; padding-top: 6px; }
.menu-head h1 { font-size: clamp(28px, 4vw, 40px); color: #e8ecf1; }
.menu-head p { margin-top: 6px; }
.game-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.game-tile { overflow: hidden; display: flex; flex-direction: column; padding: 0; transition: transform .15s, box-shadow .15s; }
.game-tile:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #3d5670, 0 14px 32px rgba(0,0,0,0.45); }
.gt-art { width: 100%; aspect-ratio: 16/10; background-size: cover; background-position: center; }
.gt-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.gt-name { font-size: 19px; font-weight: 700; color: #e8ecf1; }
.gt-meta { font-size: 12px; color: #8fa3b8; flex: 1; }
.gt-body .btn-gold, .gt-body .btn-crimson { width: 100%; }

/* avatar rings */
.ava-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.ava-wrap .ava-img { width: 100%; height: 100%; }
.ava-ring {
  position: absolute; inset: -14%;
  width: 128%; height: 128%;
  pointer-events: none; user-select: none;
}
.ring-preview { display: grid; place-items: center; width: 90px; height: 90px; }

/* ============================================================
   DECK SKINS — one source of truth. --deck-art/--deck-filter is
   what every card back on the platform renders with; equipping a
   skin flips the variables, so the game deck, opponents' hands,
   table previews AND the store all follow the equipped design.
   The free basic deck is Vault Classic (assets/backs/back-classic).
   ============================================================ */

body { --deck-art: url('assets/backs/back-classic.png'); --deck-filter: none; }
body.skin-classic-scarlet { --deck-art: url('assets/backs/back-classic-scarlet.png'); }
body.skin-classic-forest  { --deck-art: url('assets/backs/back-classic-forest.png'); }
body.skin-classic-ruby    { --deck-art: url('assets/backs/back-classic-ruby.png'); }
body.skin-crimson      { --deck-art: url('assets/card-back.png'); }
body.skin-emerald      { --deck-art: url('assets/card-back.png'); --deck-filter: hue-rotate(115deg) saturate(0.85) brightness(0.95); }
body.skin-sapphire     { --deck-art: url('assets/card-back.png'); --deck-filter: hue-rotate(215deg) saturate(0.8) brightness(0.95); }
body.skin-onyx         { --deck-art: url('assets/card-back.png'); --deck-filter: grayscale(0.85) brightness(0.75) contrast(1.1); }
body.skin-royal-navy   { --deck-art: url('assets/backs/back-royal-navy.png'); }
body.skin-emerald-deco { --deck-art: url('assets/backs/back-emerald-deco.png'); }
body.skin-bordeaux     { --deck-art: url('assets/backs/back-bordeaux.png'); }
body.skin-onyx-line    { --deck-art: url('assets/backs/back-onyx-line.png'); }
body.skin-sunburst     { --deck-art: url('assets/backs/back-sunburst.png'); }

.card.back {
  background: var(--deck-art) center / cover no-repeat, linear-gradient(#132030, #0e1c29);
  filter: var(--deck-filter);
}
.tp-cards i { background: var(--deck-art) center / cover no-repeat; filter: var(--deck-filter); }

/* store catalog tiles still show their own design while the basic deck is on… */
.skin-preview.card.back.back-classic      { background: url('assets/backs/back-classic.png') center / cover no-repeat; filter: none; }
.skin-preview.card.back.back-classic-scarlet { background: url('assets/backs/back-classic-scarlet.png') center / cover no-repeat; filter: none; }
.skin-preview.card.back.back-classic-forest  { background: url('assets/backs/back-classic-forest.png') center / cover no-repeat; filter: none; }
.skin-preview.card.back.back-classic-ruby    { background: url('assets/backs/back-classic-ruby.png') center / cover no-repeat; filter: none; }
.skin-preview.card.back.back-crimson      { background: url('assets/card-back.png') center / cover no-repeat; filter: none; }
.skin-preview.card.back.back-emerald      { background: url('assets/card-back.png') center / cover no-repeat; filter: hue-rotate(115deg) saturate(0.85) brightness(0.95); }
.skin-preview.card.back.back-sapphire     { background: url('assets/card-back.png') center / cover no-repeat; filter: hue-rotate(215deg) saturate(0.8) brightness(0.95); }
.skin-preview.card.back.back-onyx         { background: url('assets/card-back.png') center / cover no-repeat; filter: grayscale(0.85) brightness(0.75) contrast(1.1); }
.skin-preview.card.back.back-royal-navy   { background: url('assets/backs/back-royal-navy.png') center / cover no-repeat; filter: none; }
.skin-preview.card.back.back-emerald-deco { background: url('assets/backs/back-emerald-deco.png') center / cover no-repeat; filter: none; }
.skin-preview.card.back.back-bordeaux     { background: url('assets/backs/back-bordeaux.png') center / cover no-repeat; filter: none; }
.skin-preview.card.back.back-onyx-line    { background: url('assets/backs/back-onyx-line.png') center / cover no-repeat; filter: none; }
.skin-preview.card.back.back-sunburst     { background: url('assets/backs/back-sunburst.png') center / cover no-repeat; filter: none; }

/* …but the moment a premium deck is equipped, the whole shop wears it too */
body[class*="skin-"] .skin-preview.card.back {
  background: var(--deck-art) center / cover no-repeat;
  filter: var(--deck-filter);
}

/* high stakes hero reuses .rush-hero with inline art */
#page-high .rush-hero { background-size: cover; background-position: center 30%; }

@media (max-width: 900px) {
  #site-topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  #main-nav { order: 3; width: 100%; overflow-x: auto; }
  .me-chip #hall-username { display: none; }
  #hall { padding-top: 128px; }
}

/* ============================================================
   QUICK GAME + TABLE PREVIEW — 3-tile menu, option segments,
   interactive oval durak table with seats & chosen options
   ============================================================ */

.game-grid.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.grid-3 .gt-art { aspect-ratio: 16/10; }
.grid-3 .gt-name { font-size: 24px; }
.grid-3 .gt-meta { font-size: 13px; }

.quick-layout {
  display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 26px; align-items: start;
}
.qk-label { color: #8fa3b8; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin: 6px 0 2px; }
.quick-opts { display: flex; flex-direction: column; gap: 8px; }
.quick-opts .seg { flex-wrap: wrap; }
.big-play { margin-top: 14px; padding: 14px 22px; font-size: 16px; font-weight: 700; }

/* the interactive table preview */
.table-preview { position: relative; width: 100%; aspect-ratio: 16/10; min-height: 220px; }
.tp-felt { position: absolute; inset: 0; }
.tp-oval {
  position: absolute; inset: 8% 6%;
  border-radius: 50%;
  background: linear-gradient(160deg, #3d5670 0%, #23364a 35%, #16283a 65%, #2a3d52 100%);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}
.tp-oval::after {
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  background: radial-gradient(closest-side, #152534 0%, #132433 55%, #0e1c29 100%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}
.tp-pinline { position: absolute; inset: 14%; border-radius: 50%; border: 1.5px solid rgba(143, 163, 184, 0.3); z-index: 1; }
.tp-center {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 2;
  text-align: center;
}
.tp-cards { display: flex; gap: 3px; margin-bottom: 4px; }
.tp-cards i {
  width: 20px; height: 29px; border-radius: 3px;
  background: url('assets/card-back.png') center / cover no-repeat;
  border: 1px solid #efe3cb;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.tp-cards i:nth-child(2) { transform: rotate(7deg) translateY(-2px); }
.tp-cards i:nth-child(3) { transform: rotate(14deg); }
.tp-stake { font-weight: 800; font-size: 18px; color: #e8ecf1; text-shadow: 0 2px 6px rgba(0,0,0,.7); }
.tp-mode { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: #c98a3a; font-weight: 700; }
.tp-codeline { font-size: 11px; letter-spacing: .12em; color: #8fa3b8; }
.tp-seat {
  position: absolute; transform: translate(-50%, -50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 86px; text-align: center;
}
.tp-seat .ava-img, .tp-seat .ava-svg { border-width: 2px; }
.tp-empty {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px dashed #3d5670; color: #3d5670;
  font-size: 20px; font-weight: 700;
  background: rgba(11, 20, 28, 0.5);
}
.tp-name {
  max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 600; color: #cfd8e2;
  background: rgba(11, 20, 28, 0.75);
  border: 1px solid #23364a; border-radius: 999px; padding: 2px 8px;
}

/* table lobby preview sizing */
#tl-preview { max-width: 460px; margin: 0 auto; }
.tbl-mode { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #c98a3a; font-weight: 700; }
.tbl-stake { font-weight: 700; }

@media (max-width: 760px) {
  .quick-layout { grid-template-columns: 1fr; }
}

/* "Return to table" pulses light/dark while the game waits on you */
@keyframes turnFlash {
  from { filter: brightness(0.72); box-shadow: none; }
  to   { filter: brightness(1.35); box-shadow: 0 0 16px rgba(217, 154, 74, 0.65); }
}
#btn-return.turn-flash { animation: turnFlash 0.7s ease-in-out infinite alternate; }

/* ---- live support drawer ---- */
.sup-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.drawer textarea {
  font-family: 'Inter', sans-serif; font-size: 14px; padding: 9px 12px;
  border: 1px solid rgba(94,125,154,0.4); border-radius: 8px;
  background: #0a141d; color: #e8ecf1; outline: none; resize: vertical;
}
.drawer textarea:focus { border-color: #e8ecf1; }
#sup-list .sup-row { cursor: pointer; }
#sup-list .sup-row:hover { border-color: #3d5670; }
.sup-badge { position: static; margin-left: 6px; }
.sup-chat-title { margin: 10px 0 6px; font-size: 15px; }
#sup-messages {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 52vh; overflow-y: auto; padding: 6px 2px; margin-bottom: 8px;
}
#sup-messages .dm-msg { align-self: flex-start; }
#sup-messages .dm-msg.mine { align-self: flex-end; }
.sup-who { color: #c98a3a; }
