:root {
  --bg: #070708;
  --panel: #101014;
  --ink: #e6e2d6;
  --muted: #8a8678;
  --accent: #e8b84a;
  --phosphor: #f0c14a;
  --led-green: #3dffa0;
  --led-red: #ff5a5a;
  --board-black: #0a0a0c;
  --row-bg: #12141a;
  --row-alt: #0e1016;
  --hairline: #2a2e38;
  --suit-red: #ff4d4d;
  --suit-black: #121214;
}

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

body {
  font-family: "Barlow Condensed", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(ellipse at 50% 0%, #1a160c 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 3rem;
}

.site-header { margin-bottom: 1.5rem; }
.brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.logo {
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--phosphor);
  text-transform: uppercase;
}
.nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.nav a {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #a8a498;
  border: 1px solid #2a2a28;
  padding: 0.35rem 0.65rem;
  border-radius: 3px;
}
.nav a:hover, .nav a.active {
  color: var(--phosphor);
  border-color: #6a5420;
  background: #1a1808;
}
.tagline {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--muted);
  max-width: 62ch;
  font-size: 0.95rem;
}
.tagline strong { color: #e8e4d8; }

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.hand-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  max-height: 7.5rem;
  overflow-y: auto;
  padding: 0.15rem;
  width: 100%;
}

button, .hand-picker button {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid #3a3a30;
  background: #1c1c18;
  color: #e8e4d8;
  padding: 0.4rem 0.7rem;
  border-radius: 3px;
  cursor: pointer;
}
.hand-picker button { font-size: 0.78rem; letter-spacing: 0.04em; }
button:hover, .hand-picker button:hover { border-color: var(--phosphor); color: var(--phosphor); }
button.active, button.primary, .hand-picker button.active {
  background: #2a2410;
  border-color: #6a5420;
  color: var(--phosphor);
}
button:disabled { opacity: 0.35; cursor: not-allowed; }

.chassis {
  width: 100%;
  max-width: 860px;
  background: linear-gradient(180deg, #2a2a30 0%, #18181c 40%, #101014 100%);
  border-radius: 8px;
  padding: 12px 14px 14px;
  box-shadow:
    0 0 0 1px #3a3a42,
    0 20px 50px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.chassis-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  padding: 0 4px;
}
.chassis-top .brand {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5a5850;
}
.chassis-top .live {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--led-green);
}
.chassis-top .live::before {
  content: "● ";
  font-size: 0.55rem;
}

.board {
  background: var(--board-black);
  border: 1px solid #1a1a20;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}

.row-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.85rem;
  background: #0e1014;
  border-bottom: 1px solid #252830;
  min-height: 48px;
}
.event-name {
  font-weight: 800;
  font-size: clamp(1.1rem, 3.5vw, 1.55rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f6f2e8;
  line-height: 1.1;
}
.event-tag {
  font-family: "Share Tech Mono", "IBM Plex Mono", monospace;
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--phosphor);
  text-transform: uppercase;
  white-space: nowrap;
}

.row-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background: #101218;
  border-bottom: 1px solid #252830;
  min-height: 44px;
}
.street {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0ebe0;
  padding: 0.15rem 0.55rem;
  background: #1a2030;
  border: 1px solid #3a4a60;
  line-height: 1.1;
}
.street.flop, .street.turn { border-color: #2a5040; background: #0e2018; color: #7dffb0; }
.street.river { border-color: #6a4020; background: #201408; color: #ffb060; }
.street.show { border-color: #6a5420; background: #201808; color: var(--phosphor); }

.meta-mid {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #5a6050;
  text-transform: uppercase;
  text-align: center;
}

.pot {
  font-family: "Share Tech Mono", "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--phosphor);
  text-align: right;
  line-height: 1;
}
.pot small {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: #8a7850;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.row-board {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0.85rem;
  background: linear-gradient(180deg, #0c1810 0%, #0a120e 100%);
  border-bottom: 1px solid #1a3024;
  min-height: 100px;
}

.pcard {
  --w: 48px;
  --h: 68px;
  width: var(--w);
  height: var(--h);
  border-radius: 4px;
  position: relative;
  background: linear-gradient(165deg, #fffef9, #ebe6da);
  box-shadow: 0 2px 0 #b8b0a0, 0 4px 12px rgba(0,0,0,0.5);
  padding: 4px 5px;
  font-family: "Barlow Condensed", Georgia, sans-serif;
  color: var(--suit-black);
  flex-shrink: 0;
}
.pcard.red { color: var(--suit-red); }
.pcard .rank {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.pcard .suit-sm { font-size: 0.85rem; line-height: 1; font-family: Georgia, serif; }
.pcard .suit-lg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-family: Georgia, serif;
  pointer-events: none;
}
.pcard.hole { --w: 38px; --h: 54px; }
.pcard.hole .rank { font-size: 1rem; }
.pcard.hole .suit-lg { font-size: 1.1rem; }
.pcard.empty {
  background: transparent;
  box-shadow: none;
  border: 1px dashed #2a4034;
  opacity: 0.5;
}
.pcard.empty * { display: none; }
.pcard.deal-in { animation: dealIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1); }

@keyframes dealIn {
  from { transform: translateY(-12px) scale(0.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.col-hdr {
  display: grid;
  grid-template-columns: 10px 7.5rem 2.6rem auto 1fr;
  gap: 0.65rem;
  padding: 0.3rem 0.85rem;
  background: #181a20;
  border-bottom: 1px solid #2a2e38;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6a7080;
}
.col-hdr span:last-child { text-align: right; }

.row-player {
  display: grid;
  grid-template-columns: 10px 7.5rem 2.6rem auto 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0.85rem;
  min-height: 60px;
  border-bottom: 1px solid #151820;
  background: var(--row-bg);
}
.row-player.alt { background: var(--row-alt); }
.row-player.focus {
  background: linear-gradient(90deg, #1a1808 0%, #12141a 55%);
  box-shadow: inset 3px 0 0 var(--phosphor);
}
.row-player.winner-row {
  background: linear-gradient(90deg, #1e1608 0%, #12141a 60%);
  box-shadow: inset 3px 0 0 #e09030;
}
.row-player.fold-row { opacity: 0.45; }
.row-player.fold-row .name { text-decoration: line-through; color: #706860; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.live   { background: var(--led-green); }
.status-dot.act    { background: var(--phosphor); box-shadow: 0 0 8px var(--phosphor); }
.status-dot.allin  { background: #c070ff; box-shadow: 0 0 8px #c070ff; }
.status-dot.fold   { background: #a04040; }
.status-dot.winner { background: #e09030; box-shadow: 0 0 10px #e09030; }

.name {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f6f2e8;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos {
  font-family: "Share Tech Mono", "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #9098a8;
  text-transform: uppercase;
}
.holes { display: flex; gap: 4px; }
.stack {
  font-family: "Share Tech Mono", "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: #b8e0c0;
  text-align: right;
  justify-self: end;
  line-height: 1;
}
.stack.win { color: var(--phosphor); }
.stack.danger { color: #ffb060; }

.row-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.85rem;
  min-height: 48px;
  background: #080a0c;
  border-top: 1px solid #1e2430;
}
.action-main {
  font-weight: 800;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f6f2e8;
  line-height: 1.15;
  text-align: center;
}
.action-main.punch {
  color: var(--phosphor);
  text-shadow: 0 0 20px rgba(240, 193, 74, 0.25);
}

.row-ticker {
  overflow: hidden;
  background: #060806;
  border-top: 1px solid #1a2418;
  padding: 0.35rem 0;
}
.row-ticker .track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  font-family: "Share Tech Mono", "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--led-green);
  animation: tick 22s linear infinite;
  width: max-content;
  padding-left: 100%;
}
.row-ticker .dim { color: #4a6050; }
.row-ticker .hi { color: #e8f0e8; }

@keyframes tick {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.caption {
  text-align: center;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 58ch;
  min-height: 2.5em;
}

.about { margin-bottom: 2rem; }
.about h2 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin-bottom: 0.85rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: 1fr; }
  .row-player, .col-hdr {
    grid-template-columns: 10px 1fr 2.4rem auto auto;
  }
  .name { font-size: 1.1rem; }
}
.card {
  background: var(--panel);
  border: 1px solid #242428;
  border-radius: 6px;
  padding: 0.9rem 1rem;
}
.card h3 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: #f0ebe0;
}
.card p {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.88rem;
  color: #b8b4a8;
}

footer {
  border-top: 1px solid #2a2a28;
  padding-top: 1rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
footer a { color: #c8c0a0; }
footer .muted { opacity: 0.85; }
footer code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  background: #1a1a18;
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

@media (max-width: 520px) {
  .pcard { --w: 40px; --h: 56px; }
  .pcard .rank { font-size: 1rem; }
  .pcard.hole { --w: 32px; --h: 46px; }
}
