:root {
  --felt: #0b3d2e;
  --felt-dark: #082a20;
  --felt-light: #12523e;
  --gold: #d4af37;
  --gold-soft: #e8cd6f;
  --cream: #f4ecd8;
  --ink: #1b1b1b;
  --card-bg: #f4ecd8;
  --card-border: #1c6b50;
  --card-back: #12523e;
  --danger: #c0392b;
  --success: #2f9e58;
  --radius: 10px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, var(--felt-light), var(--felt-dark));
  color: var(--cream);
  font-family: "Segoe UI", system-ui, sans-serif;
}

h1, h2 {
  color: var(--gold-soft);
}

button {
  font: inherit;
  background: var(--gold-soft);
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  min-height: 44px;
  cursor: pointer;
  margin: 0.2rem;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  filter: brightness(1.08);
}

input, select {
  font: inherit;
  padding: 0.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
}

/* ---- Setup view ---- */

#setup-view {
  max-width: 640px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--felt);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#setup-view label {
  display: block;
  margin: 0.75rem 0;
}

#setup-name {
  display: block;
  width: 100%;
  margin: 0.75rem 0;
  padding: 0.6rem;
}

#setup-settings-details {
  margin: 0.75rem 0;
}

#setup-settings-details summary {
  cursor: pointer;
  color: var(--gold-soft);
  font-weight: 600;
  padding: 0.3rem 0;
}

#setup-settings-details label {
  display: block;
  margin: 0.6rem 0 0.6rem 1rem;
}

#setup-seat-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.6rem;
  margin: 0.75rem 0;
}

.seat-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.3rem;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 90px;
}

.seat-box:hover {
  filter: brightness(1.15);
}

.seat-box-name {
  font-size: 0.72rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.seat-box-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  min-height: 0;
  width: 1.2rem;
  height: 1.2rem;
  line-height: 1;
  padding: 0;
  font-size: 0.85rem;
  border-radius: 999px;
  background: var(--danger);
  color: var(--cream);
}

.seat-box-add {
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--gold-soft);
  background: transparent;
  border-style: dashed;
}

.play-style-badge {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
}

.play-style-cautious {
  background: rgba(62, 110, 158, 0.25);
  color: #7fb3e0;
}

.play-style-balanced {
  background: rgba(155, 155, 155, 0.25);
  color: #c7c9cc;
}

.play-style-aggressive {
  background: rgba(192, 57, 43, 0.25);
  color: #e08a7d;
}

.pronoun-tag {
  font-size: 0.7rem;
  opacity: 0.7;
  font-weight: normal;
}

fieldset {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin: 1rem 0;
}

/* ---- Table view ---- */

#table-view {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

/* ---- Game bar (2026-08-29 redesign: icon/identity + pot-hero + "more" menu, replacing the old two-row banner/header stack) ---- */

#game-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--felt-light), var(--felt-dark));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#game-bar-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

#game-icon-display {
  flex: none;
  /* min- instead of fixed width/height: several games' icons are 2-3
     stacked emoji (e.g. 3-33's "AAA"), which overflowed a fixed-size
     circle and visually collided with the name text next to it -- letting
     the badge grow with its content (a pill, not always a perfect circle)
     fixes that instead of clipping or shrinking the icon. */
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
}

#game-name-block {
  min-width: 0;
}

#game-name-eyebrow {
  font-size: 0.68rem;
  color: var(--cream);
  opacity: 0.7;
}

#game-name-display {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#game-script-toggle-btn[hidden] {
  display: none;
}

#game-script-toggle-btn {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  min-height: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  cursor: pointer;
}

#game-script-toggle-btn:hover {
  background: rgba(212, 175, 55, 0.28);
  filter: none;
}

#game-script-toggle-btn[aria-expanded="true"] {
  background: var(--gold-soft);
  color: var(--ink);
}

#game-script-toggle-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

#rules-link[hidden] {
  display: none;
}

#rules-link {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--gold-soft);
  text-decoration: underline;
  font-size: 0.85rem;
  white-space: nowrap;
}

#resume-banner[hidden] {
  display: none;
}

#resume-banner {
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

#resume-banner p {
  margin: 0 0 0.6rem;
}

#resume-night-btn {
  margin-right: 0.5rem;
}

#discard-saved-night-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--cream);
}

#setup-game-list-link {
  margin-top: 1rem;
}

#setup-game-list-link a {
  color: var(--gold-soft);
  text-decoration: underline;
  font-size: 0.9rem;
}

#game-bar-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: none;
}

#chips-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

#wallet-display {
  font-size: 0.82rem;
  opacity: 0.9;
  white-space: nowrap;
}

#rebuy-btn {
  min-height: 0;
  padding: 0.1rem 0.6rem;
  margin: 0;
  border-radius: 999px;
  background: rgba(192, 57, 43, 0.18);
  border: 1px solid var(--danger);
  color: #f2b8ae;
  font-size: 0.68rem;
  font-weight: 600;
}

#pot-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.3rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--gold);
  background: rgba(212, 175, 55, 0.14);
}

#pot-hero-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
  opacity: 0.85;
}

#pot-display {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold-soft);
  line-height: 1.15;
}

#more-menu-wrap {
  position: relative;
  flex: none;
}

#more-menu-btn {
  width: 2.5rem;
  height: 2.5rem;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

#more-menu-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

#more-menu[hidden] {
  display: none;
}

#more-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 190px;
  padding: 0.4rem;
  background: linear-gradient(135deg, var(--felt-light), var(--felt-dark));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#more-menu button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--cream);
  border-radius: 8px;
  margin: 0;
  padding: 0.55rem 0.6rem;
}

#more-menu button:hover:not(:disabled) {
  background: rgba(212, 175, 55, 0.14);
  filter: none;
}

#game-script-details {
  margin-bottom: 0.75rem;
  background: var(--felt);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

#game-script-body {
  color: var(--cream);
  line-height: 1.5;
  font-size: 0.92rem;
}

#game-script-body p {
  margin: 0 0 0.6rem;
}

#game-script-body p:last-child {
  margin-bottom: 0;
}

#game-script-body strong {
  color: var(--gold-soft);
}

#game-script-variants {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  font-size: 0.85rem;
  color: var(--cream);
  opacity: 0.9;
}

#game-script-variants:empty {
  display: none;
}

#game-script-variants div {
  margin: 0.15rem 0;
}

#game-script-variants strong {
  color: var(--gold-soft);
}


#debug-toggle-label {
  display: block;
  font-size: 0.85rem;
  color: var(--gold-soft);
  margin-bottom: 0.5rem;
  cursor: pointer;
}

#seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.seat {
  position: relative;
  background: var(--felt);
  border: 2px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.6rem;
  text-align: center;
}

.seat-quip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: max-content;
  max-width: 220px;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.3;
  box-shadow: var(--shadow);
  animation: quip-pop 0.25s ease-out;
}

.seat-quip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--gold);
}

.seat-quip::before {
  content: "";
  position: absolute;
  top: calc(100% - 1.5px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--cream);
  z-index: 1;
}

@keyframes quip-pop {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(6px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.seat-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-soft) inset;
}

.seat-folded {
  opacity: 0.45;
}

.seat-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.avatar-svg {
  border-radius: 50%;
  flex-shrink: 0;
}

.seat-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* The dealer marker -- a small "D" puck, the standard poker-room/online
   convention for whose turn it is to deal, rather than a die (which reads
   as "a random cut/decider" rather than "an ongoing, rotating role"). */
.dealer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.profile-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--felt-dark);
  color: var(--gold-soft);
  font-size: 0.7rem;
}

.seat-chips {
  color: var(--gold-soft);
  margin-bottom: 0.4rem;
}

.seat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
}

.seat-status {
  margin-top: 0.3rem;
  color: var(--danger);
  font-size: 0.8rem;
}

.seat-debug {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--gold-soft);
  font-style: italic;
}

.seat-debug-peek {
  color: var(--danger);
  opacity: 0.8;
}

.card {
  width: 34px;
  height: 46px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1.15rem;
  font-weight: 700;
  position: relative;
  background: var(--card-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
}

/* Rank stacked above suit symbol, each big enough to read at a glance --
   replaced a single inline "K♥"/"10♠" string that had to shrink to fit
   both characters on one line. Sized in em against .card's own font-size
   so every existing `.card { font-size: X }` override (the cut-for-deal
   fan/result cards) scales both spans together automatically, same as it
   scaled the old single string. The suit needs a much bigger em size than
   the rank -- Segoe UI's ♠♥♦♣ glyphs occupy only a small fraction of
   their own em box (lots of built-in whitespace), so a 1em suit reads as
   tiny and oddly padded next to a full-size rank letter; 1.7em is what it
   takes for the glyph's actual visible ink to match the rank's size. */
.card-rank {
  font-size: 0.85em;
  display: inline-block;
}

/* A 2-character rank ("10") is squeezed horizontally instead of shrunk,
   so every rank reads at the same height regardless of digit count. */
.card-rank-wide {
  transform: scaleX(0.78);
}

.card-suit {
  font-size: 1.7em;
  font-weight: 400;
  margin-top: -0.05em;
}

.card-back {
  background: repeating-linear-gradient(45deg, var(--card-back), var(--card-back) 4px, var(--felt-dark) 4px, var(--felt-dark) 8px);
  border: 1px solid var(--gold);
}

#cutfordeal-view,
#picker-view {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--felt);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

#picker-view {
  max-width: 960px;
}

.cutfordeal-tie-notice {
  color: var(--gold-soft);
  margin-bottom: 1rem;
  font-weight: 600;
}

.cutfordeal-fan {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 1.5rem auto;
  max-width: 680px;
}

/* The fan spreads the entire 52-card deck, not just one card per seat --
   sized smaller than a normal table card so all of them read as one spread
   pile rather than a full row of individually-important cards. */
.cutfordeal-fan .card {
  width: 38px;
  height: 54px;
  font-size: 0.7rem;
}

.cutfordeal-clickable {
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--gold-soft), var(--shadow);
  transition: transform 0.15s ease;
}

.cutfordeal-clickable:hover {
  transform: translateY(-4px) scale(1.04);
}

.cutfordeal-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 320px;
  margin: 0 auto;
}

.cutfordeal-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cutfordeal-seat-name {
  font-size: 0.85rem;
  color: var(--cream);
}

.cutfordeal-result-row .card {
  width: 40px;
  height: 56px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cutfordeal-waiting {
  width: 40px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  opacity: 0.5;
}

#cutfordeal-winner {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  min-height: 1.5em;
}

#picker-menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.picker-waiting {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--cream);
  opacity: 0.8;
  font-style: italic;
  padding: 1rem 0;
}


.game-pick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(160deg, var(--felt-light), var(--felt-dark));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem 0.6rem 0.8rem;
  min-height: 128px;
  color: var(--cream);
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.game-pick-card:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
  filter: none;
}

.game-pick-icon {
  font-size: 2rem;
  line-height: 1;
}

.game-pick-name {
  font-weight: 700;
  color: var(--gold-soft);
  font-size: 0.95rem;
  line-height: 1.25;
}

.game-pick-category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cream);
  opacity: 0.75;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.card-clickable {
  cursor: pointer;
  padding: 0;
  min-height: 46px;
}

.card-peek {
  opacity: 0.6;
  outline: 1px dashed var(--gold-soft);
  outline-offset: 1px;
}

.variant-form,
.confirm-screen {
  grid-column: 1 / -1;
  text-align: left;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.variant-form h3 {
  margin-top: 0;
  color: var(--gold-soft);
}

.variant-option-group {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.75rem 0;
  padding: 0.5rem 0 0;
}

.variant-option-group legend {
  color: var(--gold-soft);
  font-weight: 600;
  padding: 0 0 0.3rem;
}

.variant-choice-label {
  display: block;
  margin: 0.3rem 0;
  cursor: pointer;
}

.confirm-screen {
  text-align: center;
}

.confirm-variant-lines {
  text-align: left;
  display: inline-block;
  margin: 0.5rem 0;
}

.confirm-instructions {
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  color: var(--cream);
  line-height: 1.5;
}

.confirm-instructions p {
  margin: 0.4rem 0;
}

.confirm-instructions p:first-child {
  margin-top: 0;
}

.confirm-instructions p:last-child {
  margin-bottom: 0;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}

.card-beaten {
  opacity: 0.4;
  filter: grayscale(1);
}

.card-red {
  color: var(--danger);
}

.card-black {
  color: var(--ink);
}

.wild-tag {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.6rem;
  padding: 0 0.3rem;
}

/* Anaconda's "arrange your reveal order" step -- a small reveal-position
   badge, top-LEFT so it can coexist with a Joker's own top-right wild-tag
   without overlapping it. */
.order-tag {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--gold-soft);
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0 0.35rem;
}

#board-hand {
  background: var(--felt-dark);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.community-row {
  display: flex;
  gap: 0.4rem;
}

/* ---- 3-33 board (horizontal, columned -- was a wide wrapping flex row) ---- */

.board-333 {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.board-333-top {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.board-333-community-label {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 0.25rem;
}

.board-333-community-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.6rem;
  align-items: center;
  min-height: 60px;
}

.card-stack {
  position: relative;
  display: flex;
  flex: none;
}

.card-stack-item {
  margin-left: calc(var(--stack-i, 0) * -28px);
}

.card-stack-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0 0.35rem;
  line-height: 1.3;
}

.board-333-outright {
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
}

.board-333-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.result-col {
  background: var(--felt);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  text-align: center;
}

.result-col-target {
  font-size: 0.78rem;
  opacity: 0.75;
}

.result-col-amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-soft);
}

.result-col-names {
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

@media (max-width: 560px) {
  .board-333-results {
    grid-template-columns: 1fr;
  }
}

.community-cross {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.cross-row {
  display: flex;
  gap: 0.4rem;
}

.pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.pyramid-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pyramid-row-label {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-right: 0.15rem;
}

#human-hand {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
  min-height: 46px;
}

#action-panel {
  background: var(--felt);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  margin-bottom: 1rem;
}

#log-feed {
  max-height: 160px;
  overflow-y: auto;
  background: var(--felt-dark);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

.log-line {
  padding: 0.15rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- History view ---- */

#history-view {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1rem;
}

#history-view table {
  width: 100%;
  border-collapse: collapse;
  background: var(--felt);
  border-radius: var(--radius);
  overflow: hidden;
}

#history-view th, #history-view td {
  padding: 0.5rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid var(--card-border);
}

#history-view th:first-child, #history-view td:first-child {
  text-align: left;
}

.net-positive {
  color: var(--success);
}

.net-negative {
  color: var(--danger);
}

/* ---- Roster picker modal ---- */

#roster-modal[hidden] {
  display: none;
}

#roster-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10;
}

#roster-modal-content {
  background: var(--felt);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

#roster-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#roster-modal-header h2 {
  margin: 0;
}

#roster-close-btn {
  background: transparent;
  color: var(--cream);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.2rem 0.6rem;
}

.roster-hint {
  font-size: 0.75rem;
  opacity: 0.75;
  margin-top: 0.4rem;
}

#roster-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

#roster-count {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

#roster-search {
  flex: 1;
  min-width: 160px;
}

#roster-grid {
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: min-content;
  gap: 0.6rem;
  min-height: 0;
}

.roster-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: start;
  gap: 0.3rem;
  background: var(--felt-dark);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.6rem;
  text-align: center;
  cursor: pointer;
  color: var(--cream);
  min-height: 0;
  height: auto;
  min-width: 0;
  margin: 0;
}

.roster-card:hover:not(:disabled) {
  border-color: var(--gold);
}

.roster-card:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.roster-card-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.roster-card-archetype {
  font-size: 0.75rem;
  color: var(--gold-soft);
}

.roster-card-oneliner {
  font-size: 0.72rem;
  opacity: 0.85;
}

.roster-card-taken {
  font-size: 0.7rem;
  color: var(--gold-soft);
  opacity: 0.7;
}


@media (max-width: 520px) {
  #seats {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  .seat-quip {
    max-width: 160px;
    font-size: 0.75rem;
  }
}
