/* ===========================================================
   10K TAVERN — visual identity
   Felt tabletop + brass ledger + bone dice.
   Two themes, swapped via [data-theme] on <html>:
     (default)         Felt Table  — daylight green felt, ivory cards
     [data-theme=casino] Casino Night — near-black felt, dark cards, neon gold/red
   =========================================================== */

/* Anything marked hidden stays hidden, even when a class below gives it
   display:grid or display:flex. Without this, the lobby and the game table
   showed underneath the join form before anyone had joined a room. */
[hidden]{ display:none !important; }

:root{
  --felt: #1E3D32;
  --felt-deep: #142822;
  --rail-top: #16281F;
  --felt-line: rgba(var(--fg-rgb), 0.06);
  --brass: #C9A227;
  --brass-rgb: 201,162,39;
  --brass-bright: #E4C34F;

  /* Text/icons sitting directly on the felt (rail, tray, buttons-on-felt) */
  --fg: #F4EFE4;
  --fg-rgb: 244,239,228;

  /* Card / dice surfaces, and the text that sits on them */
  --bone: #F4EFE4;
  --bone-light: #FBF7EE;
  --bone-dim: #E4DCC8;
  --bone-rgb: 244,239,228;
  --ink: #241F1A;
  --ink-rgb: 36,31,26;

  --clay: #A63D2F;
  --clay-bright: #C9503C;
  --pine: #3E6E57;
  --pine-rgb: 62,110,87;

  --display: 'Fraunces', Georgia, serif;
  --body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;

  --radius: 10px;
}

[data-theme="casino"]{
  --felt: #0A0A0C;
  --felt-deep: #050506;
  --rail-top: #131215;
  --brass: #E3B23C;
  --brass-rgb: 227,178,60;
  --brass-bright: #FFD966;

  --fg: #F2ECDD;
  --fg-rgb: 242,236,221;

  --bone: #18171B;
  --bone-light: #26242A;
  --bone-dim: #232127;
  --bone-rgb: 24,23,27;
  --ink: #F0E9DC;
  --ink-rgb: 240,233,220;

  --clay: #E63946;
  --clay-bright: #FF5A5F;
  --pine: #2FBF71;
  --pine-rgb: 47,191,113;
}

*{ box-sizing: border-box; }

html,body{
  margin:0; padding:0;
  background: var(--felt-deep);
  color: var(--fg);
  font-family: var(--body);
  min-height:100vh;
}

#app{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

button{ font-family: inherit; cursor:pointer; }
button:disabled{ cursor:not-allowed; opacity:0.45; }

/* -------------------- header rail -------------------- */
.rail{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 28px;
  background: linear-gradient(180deg, var(--rail-top), var(--felt-deep));
  border-bottom: 1px solid rgba(var(--brass-rgb),0.35);
}
.rail-brand{
  display:flex;
  align-items:baseline;
  gap:10px;
}
.rail-mark{
  color: var(--brass);
  font-size: 1.4rem;
  transform: translateY(1px);
}
.rail-brand h1{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  margin:0;
  color: var(--fg);
}
.rail-actions{ display:flex; gap:10px; }

.btn-plaque{
  background: transparent;
  border: 1px solid rgba(var(--brass-rgb),0.5);
  color: var(--brass-bright);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.15s ease;
}
.btn-plaque:hover{
  background: rgba(var(--brass-rgb),0.12);
  border-color: var(--brass-bright);
}

/* -------------------- felt table -------------------- */
.felt{
  flex:1;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(var(--pine-rgb),0.35), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 2px, transparent 2px, transparent 4px),
    var(--felt);
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 28px;
}

@media (max-width: 860px){
  .felt{ grid-template-columns: 1fr; }
}

/* -------------------- ledger (scoreboard) -------------------- */
.ledger{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.plaque{
  background: linear-gradient(180deg, var(--bone-light), var(--bone));
  color: var(--ink);
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid rgba(var(--ink-rgb),0.08);
  box-shadow: 0 3px 0 rgba(0,0,0,0.18), 0 8px 18px rgba(0,0,0,0.22);
  position: relative;
  transition: transform 0.15s ease;
}
.plaque.active{
  outline: 2px solid var(--brass-bright);
  outline-offset: 2px;
}
.plaque .p-name{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  display:flex;
  align-items:center;
  gap:8px;
}
.plaque .p-tag{
  font-size: 0.62rem;
  font-weight:700;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color: var(--pine);
  background: rgba(var(--pine-rgb),0.14);
  padding: 2px 6px;
  border-radius:4px;
}
.plaque .p-score{
  font-family: var(--mono);
  font-weight:700;
  font-size: 1.6rem;
  margin-top: 4px;
  letter-spacing: -0.01em;
}
.plaque .p-score .p-max{
  font-size: 0.85rem;
  color: rgba(var(--ink-rgb),0.4);
  font-weight:500;
}
.plaque .p-onboard{
  font-size: 0.7rem;
  color: rgba(var(--ink-rgb),0.5);
  margin-top:2px;
}

/* -------------------- turn banner -------------------- */
.tray-wrap{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.turn-banner{
  display:flex;
  align-items:baseline;
  gap:10px;
}
.turn-name{
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight:600;
  color: var(--brass-bright);
}
.turn-sub{
  font-size: 0.85rem;
  color: rgba(var(--fg-rgb),0.55);
}

/* -------------------- dice tray -------------------- */
.tray{
  background: var(--felt-deep);
  border: 1px solid rgba(var(--brass-rgb),0.28);
  border-radius: 16px;
  padding: 28px 24px 18px;
  min-height: 220px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap: 20px;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.35);
}

.risk-banner{
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--brass-bright);
  text-align:center;
  min-height: 1.1em;
}

.dice-row{
  display:flex;
  flex-wrap:wrap;
  gap: 16px;
  justify-content:center;
  align-items:center;
  min-height: 92px;
}

.die{
  width: 72px;
  height: 72px;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
.die:hover{ transform: translateY(-3px); }
.die.held{
  transform: translateY(-10px);
}
.die.locked{
  cursor: default;
  opacity: 0.55;
}
/* Decorative dice on the empty table — must not look clickable. */
.die.display{
  cursor: default;
  opacity: 0.75;
}
.die.display:hover{
  transform: none;
}
.die.rolling{
  animation: tumble 0.5s ease-out;
}
@keyframes tumble{
  0%{ transform: rotate(0deg) scale(1); }
  35%{ transform: rotate(190deg) scale(1.08); }
  70%{ transform: rotate(330deg) scale(0.98); }
  100%{ transform: rotate(360deg) scale(1); }
}

.die-face{ fill: var(--bone); stroke: rgba(var(--ink-rgb),0.15); stroke-width:2; }
.die.held .die-face{ fill: var(--brass-bright); stroke: var(--brass); }
.die-pip{ fill: var(--ink); }
.die.held .die-pip{ fill: var(--felt-deep); }

.tray-footline{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  border-top: 1px solid rgba(var(--brass-rgb),0.18);
  padding-top: 14px;
}
.turn-total{ display:flex; flex-direction:column; }
.tt-label{
  font-size: 0.68rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color: rgba(var(--fg-rgb),0.5);
}
.tt-value{
  font-family: var(--mono);
  font-size: 2.1rem;
  font-weight:700;
  color: var(--brass-bright);
  line-height:1.1;
}
.banked-hint{
  font-size: 0.82rem;
  color: rgba(var(--fg-rgb),0.6);
  text-align:right;
  max-width: 260px;
}
.banked-hint.warn{ color: var(--clay-bright); font-weight:600; }
.banked-hint.good{ color: var(--pine); }

/* -------------------- controls -------------------- */
.controls{
  display:flex;
  gap:12px;
}
.btn-primary, .btn-secondary{
  padding: 13px 26px;
  border-radius: 999px;
  font-weight:700;
  font-size: 0.95rem;
  border: none;
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
}
.btn-primary{
  background: var(--brass);
  color: var(--felt-deep);
}
.btn-primary:hover:not(:disabled){ background: var(--brass-bright); transform: translateY(-1px); }
.btn-secondary{
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(var(--fg-rgb),0.3);
}
.btn-secondary:hover:not(:disabled){ border-color: var(--fg); background: rgba(var(--fg-rgb),0.06); }

.btn-link{
  background:none; border:none; color: var(--brass-bright);
  font-size: 0.85rem; font-weight:600; text-decoration: underline; padding: 4px 0;
}

/* -------------------- log -------------------- */
.log{
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(var(--fg-rgb),0.45);
  max-height: 96px;
  overflow-y:auto;
  line-height:1.7;
  padding-right: 6px;
}
.log div:first-child{ color: rgba(var(--fg-rgb),0.75); }

/* -------------------- footer -------------------- */
.floor-note{
  text-align:center;
  font-size: 0.72rem;
  color: rgba(var(--fg-rgb),0.35);
  padding: 10px;
}

/* -------------------- modals -------------------- */
.modal-veil{
  position:fixed; inset:0;
  background: rgba(10,16,13,0.7);
  backdrop-filter: blur(3px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 50;
  padding: 20px;
}
.modal-veil[hidden]{
  display:none;
}
.modal-card{
  background: var(--bone);
  color: var(--ink);
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y:auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
}
.modal-close-btn{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(var(--ink-rgb),0.45);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.modal-close-btn:hover{
  background: rgba(var(--ink-rgb),0.08);
  color: var(--ink);
}
.modal-wide{ max-width: 620px; }
.modal-card h2{
  font-family: var(--display);
  margin: 0 0 6px;
  font-size: 1.4rem;
}
.modal-note{ font-size:0.85rem; color: rgba(var(--ink-rgb),0.55); margin-top:0; }

.field-group{ margin: 18px 0; }
.field-group > label{
  display:block;
  font-size: 0.72rem;
  font-weight:700;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color: rgba(var(--ink-rgb),0.55);
  margin-bottom: 8px;
}

.player-name-list, .ai-list{ display:flex; flex-direction:column; gap:8px; }
.name-row{ display:flex; gap:8px; align-items:center; }
.name-row input[type="text"]{
  flex:1;
  padding: 9px 12px;
  border-radius:8px;
  border: 1px solid rgba(var(--ink-rgb),0.18);
  font-family: var(--body);
  font-size: 0.9rem;
}
.name-row select{
  padding: 9px 10px;
  border-radius:8px;
  border: 1px solid rgba(var(--ink-rgb),0.18);
  font-family: var(--body);
  font-size: 0.85rem;
}
.name-row .remove-btn{
  background:none; border:none; color: var(--clay); font-size:1.1rem; padding: 4px 8px;
}

.modal-actions{
  display:flex; justify-content:flex-end; gap:10px; margin-top: 22px;
}
.modal-actions .btn-primary, .modal-actions .btn-secondary{
  padding: 10px 20px; font-size: 0.88rem;
}
.modal-card .btn-secondary{ border-color: rgba(var(--ink-rgb),0.2); color: var(--ink); }
.modal-card .btn-secondary:hover{ background: rgba(var(--ink-rgb),0.05); }

/* -------------------- rules grid -------------------- */
.rules-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 560px){ .rules-grid{ grid-template-columns: 1fr; } }

.rule-item{
  border: 1px solid rgba(var(--ink-rgb),0.12);
  border-radius: 10px;
  padding: 12px 14px;
}
.rule-item .r-label{ font-weight:600; font-size:0.88rem; display:block; }
.rule-item .r-desc{ font-size: 0.75rem; color: rgba(var(--ink-rgb),0.55); margin: 3px 0 8px; }
.rule-item select, .rule-item input[type="number"]{
  width:100%;
  padding: 7px 9px;
  border-radius:7px;
  border: 1px solid rgba(var(--ink-rgb),0.18);
  font-family: var(--mono);
  font-size: 0.85rem;
}
.rule-item.toggle{ display:flex; align-items:center; justify-content:space-between; }
.rule-item.toggle .r-desc{ margin:2px 0 0; }
.switch{
  position:relative; width:42px; height:24px; flex-shrink:0;
}
.switch input{ opacity:0; width:0; height:0; }
.switch .slider{
  position:absolute; inset:0; background: rgba(var(--ink-rgb),0.2); border-radius:999px; transition:0.15s;
}
.switch .slider::before{
  content:''; position:absolute; width:18px; height:18px; left:3px; top:3px;
  background:#fff; border-radius:50%; transition:0.15s;
}
.switch input:checked + .slider{ background: var(--pine); }
.switch input:checked + .slider::before{ transform: translateX(18px); }

/* -------------------- gameover -------------------- */
#gameover-body{ font-size:0.95rem; line-height:1.6; }
#gameover-body .go-winner{ font-family: var(--display); font-size:1.2rem; color: var(--pine); font-weight:600; }
#gameover-body table{ width:100%; border-collapse:collapse; margin-top:12px; font-family: var(--mono); font-size:0.85rem; }
#gameover-body td, #gameover-body th{ padding:6px 4px; border-bottom:1px solid rgba(var(--ink-rgb),0.1); text-align:left; }

/* -------------------- odds table -------------------- */
.odds-table{
  width:100%;
  border-collapse:collapse;
  margin-top: 16px;
}
.odds-table thead th{
  text-align:left;
  font-size: 0.68rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color: rgba(var(--ink-rgb),0.5);
  padding: 0 8px 8px;
  border-bottom: 1px solid rgba(var(--ink-rgb),0.15);
}
.odds-table tbody td{
  padding: 12px 8px;
  border-bottom: 1px solid rgba(var(--ink-rgb),0.08);
  vertical-align: middle;
}
.odds-table tbody tr:last-child td{ border-bottom: none; }
.odds-combo{ display:flex; flex-direction:column; }
.odds-label{ font-weight:600; font-size:0.92rem; }
.odds-example{ font-family: var(--mono); font-size:0.75rem; color: rgba(var(--ink-rgb),0.5); margin-top:2px; }
.odds-pct{ font-family: var(--mono); font-weight:700; font-size:1rem; color: var(--pine); white-space:nowrap; }
.odds-in{ font-family: var(--mono); font-size:0.85rem; color: rgba(var(--ink-rgb),0.6); white-space:nowrap; text-align:right; }

/* ===========================================================
   MULTIPLAYER LOBBY
   Reuses the felt/brass/bone vocabulary from the table itself:
   seats are rendered as the same brass plaques used on the
   scoreboard, so joining a game and playing it feel continuous.
   =========================================================== */

.felt-single{ grid-template-columns: 1fr; }

/* -------------------- connection chip -------------------- */
.conn-chip{
  display:inline-flex; align-items:center; gap:7px;
  font-size:0.72rem; letter-spacing:0.04em;
  color: rgba(var(--fg-rgb),0.6);
  padding: 6px 12px;
  border-radius:999px;
  border:1px solid rgba(var(--fg-rgb),0.12);
}
.conn-dot{
  width:7px; height:7px; border-radius:50%;
  background: var(--pine);
  box-shadow: 0 0 0 3px rgba(var(--pine-rgb),0.18);
}
.conn-chip.is-down .conn-dot{
  background: var(--clay);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.18);
}

/* -------------------- entry -------------------- */
.entry{
  max-width: 860px;
  margin: 0 auto;
  padding: 8px 0 32px;
}
.entry-head{ text-align:center; margin-bottom: 30px; }
.entry-head h2{
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight:600;
  margin:0 0 8px;
  color: var(--fg);
  letter-spacing:-0.01em;
}
.entry-head p{
  margin:0;
  color: rgba(var(--fg-rgb),0.55);
  font-size: 0.98rem;
}

.entry-name{
  max-width: 420px;
  margin: 0 auto 28px;
  text-align:center;
}
.entry-name label{
  display:block;
  font-size:0.72rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color: rgba(var(--fg-rgb),0.5);
  margin-bottom:8px;
}
.entry-name input{
  width:100%;
  padding: 12px 16px;
  border-radius:10px;
  border:1px solid rgba(var(--brass-rgb),0.4);
  background: rgba(0,0,0,0.18);
  color: var(--fg);
  font-family: var(--body);
  font-size:1rem;
  text-align:center;
}
.entry-name input:focus,
.code-entry input:focus{
  outline:none;
  border-color: var(--brass-bright);
  box-shadow: 0 0 0 3px rgba(var(--brass-rgb),0.16);
}

.entry-paths{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:18px;
}
@media (max-width: 680px){ .entry-paths{ grid-template-columns:1fr; } }
.entry-error{
  max-width: 560px;
  margin: 22px auto 0;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  color: #F3C9BE;
  background: rgba(176, 58, 46, 0.22);
  border: 1px solid rgba(214, 92, 72, 0.55);
}

.entry-card{
  background: var(--felt-deep);
  border:1px solid rgba(var(--brass-rgb),0.28);
  border-radius:16px;
  padding: 24px 22px;
  display:flex;
  flex-direction:column;
  gap:10px;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.3);
}
.entry-eyebrow{
  font-size:0.66rem;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color: var(--brass-bright);
}
.entry-card h3{
  font-family: var(--display);
  font-size:1.25rem;
  font-weight:600;
  margin:0;
  color: var(--fg);
}
.entry-card p{
  margin:0 0 6px;
  font-size:0.88rem;
  line-height:1.55;
  color: rgba(var(--fg-rgb),0.55);
  flex:1;
}
.entry-card .btn-primary,
.entry-card .btn-secondary{ align-self:flex-start; }

.code-entry{ display:flex; gap:10px; }
.code-entry input{
  flex:1;
  min-width:0;
  padding: 12px 14px;
  border-radius:10px;
  border:1px solid rgba(var(--brass-rgb),0.4);
  background: rgba(0,0,0,0.18);
  color: var(--brass-bright);
  font-family: var(--mono);
  font-size:1.15rem;
  font-weight:700;
  letter-spacing:0.3em;
  text-transform:uppercase;
}
.code-entry input::placeholder{ color: rgba(var(--fg-rgb),0.25); letter-spacing:0.3em; }

/* -------------------- lobby -------------------- */
.lobby{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items:start;
  max-width: 980px;
  margin:0 auto;
}
@media (max-width: 780px){ .lobby{ grid-template-columns:1fr; } }

/* The room code is the thing people read aloud across a table,
   so it gets the weight of a brass plaque rather than a form field. */
.code-panel{
  background: linear-gradient(180deg, var(--bone-light), var(--bone));
  border-radius:16px;
  padding: 22px 20px;
  text-align:center;
  box-shadow: 0 3px 0 rgba(0,0,0,0.18), 0 10px 24px rgba(0,0,0,0.24);
}
.code-label{
  display:block;
  font-size:0.66rem;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color: rgba(var(--ink-rgb),0.45);
  margin-bottom:10px;
}
.code-plaque{
  font-family: var(--mono);
  font-size: clamp(2.4rem, 8vw, 3.1rem);
  font-weight:700;
  letter-spacing: 0.18em;
  text-indent: 0.18em; /* keeps the tracking from pushing it off-centre */
  color: var(--ink);
  line-height:1.1;
}
.btn-copy{
  margin-top:14px;
  width:100%;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(var(--ink-rgb),0.2);
  background:transparent;
  color: var(--ink);
  font-size:0.82rem;
  font-weight:600;
  transition: all 0.15s ease;
}
.btn-copy:hover{ background: rgba(var(--ink-rgb),0.06); }
.btn-copy.copied{ border-color: var(--pine); color: var(--pine); }
.code-hint{
  margin:14px 0 0;
  font-size:0.75rem;
  line-height:1.5;
  color: rgba(var(--ink-rgb),0.5);
}

.lobby-main{
  background: var(--felt-deep);
  border:1px solid rgba(var(--brass-rgb),0.28);
  border-radius:16px;
  padding: 22px;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.3);
}
.lobby-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom:14px;
}
.lobby-head h2{
  font-family: var(--display);
  font-size:1.3rem;
  font-weight:600;
  margin:0;
  color: var(--fg);
}
.seat-count{
  font-family: var(--mono);
  font-size:0.78rem;
  color: rgba(var(--fg-rgb),0.5);
}

.seat-list{ display:flex; flex-direction:column; gap:9px; }

.seat{
  display:flex;
  align-items:center;
  gap:10px;
  background: linear-gradient(180deg, var(--bone-light), var(--bone));
  color: var(--ink);
  border-radius:10px;
  padding: 11px 14px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.16);
}
.seat-name{
  flex:1;
  font-family: var(--display);
  font-weight:600;
  font-size:0.98rem;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.seat-you{
  font-family: var(--body);
  font-weight:500;
  font-size:0.78rem;
  color: rgba(var(--ink-rgb),0.45);
}
.seat-badge{
  font-size:0.6rem;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  padding:2px 7px;
  border-radius:4px;
  background: rgba(var(--pine-rgb),0.16);
  color: var(--pine);
}
.seat-badge.is-away{
  background: rgba(0,0,0,0.07);
  color: var(--clay);
}
.seat-remove{
  background:none;
  border:none;
  color: var(--clay);
  font-size:0.8rem;
  font-weight:600;
  padding:4px 6px;
  border-radius:6px;
}
.seat-remove:hover{ background: rgba(0,0,0,0.06); }

.seat-empty{
  border:1px dashed rgba(var(--fg-rgb),0.16);
  border-radius:10px;
  padding: 11px 14px;
  font-size:0.85rem;
  color: rgba(var(--fg-rgb),0.35);
}

.lobby-rules{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(var(--brass-rgb),0.18);
}
.lobby-rules-label{
  display:block;
  font-size:0.66rem;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color: rgba(var(--fg-rgb),0.45);
  margin-bottom:5px;
}
.lobby-rules-summary{
  font-family: var(--mono);
  font-size:0.76rem;
  line-height:1.6;
  color: rgba(var(--fg-rgb),0.65);
}

.lobby-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}
.waiting-note{
  font-size:0.85rem;
  color: rgba(var(--fg-rgb),0.5);
  flex:1;
}

/* -------------------- game screen wrapper -------------------- */
.game-wrap{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:24px;
  align-items:start;
}
@media (max-width: 860px){ .game-wrap{ grid-template-columns:1fr; } }

/* -------------------- mode picker (single-player home) -------------------- */
.modes{
  max-width: 900px;
  margin: 0 auto;
  padding: 46px 28px 40px;
}
.mode-paths{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
  margin-top: 28px;
}
@media (max-width: 760px){ .mode-paths{ grid-template-columns:1fr; } }

.mode-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  text-align:left;
  text-decoration:none;
  background: var(--felt-deep);
  border:1px solid rgba(var(--brass-rgb),0.28);
  border-radius:16px;
  padding: 22px 20px;
  cursor:pointer;
  font-family: var(--body);
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.3);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.mode-card:hover{
  border-color: var(--brass-bright);
  transform: translateY(-2px);
}
.mode-card:focus-visible{
  outline:2px solid var(--brass-bright);
  outline-offset:3px;
}
.mode-title{
  font-family: var(--display);
  font-size:1.15rem;
  font-weight:600;
  color: var(--fg);
}
.mode-desc{
  font-size:0.86rem;
  line-height:1.55;
  color: rgba(var(--fg-rgb),0.55);
}
