:root {
  --bg-1: #0b1410;
  --bg-2: #11261a;
  --panel: rgba(10, 18, 12, 0.92);
  --panel-2: rgba(16, 28, 20, 0.95);
  --border: #2a4b35;
  --accent: #f6c744;
  --accent-2: #f25f5c;
  --accent-3: #49dcb1;
  --turn: #4cff6a;
  --text: #f7f3dc;
  --muted: #a7b7a8;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "VT323", monospace;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(72, 151, 104, 0.25), transparent 55%),
    repeating-linear-gradient(90deg, rgba(17, 28, 20, 0.8) 0, rgba(17, 28, 20, 0.8) 14px, rgba(12, 20, 14, 0.8) 14px, rgba(12, 20, 14, 0.8) 28px),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  opacity: 0.35;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: rgba(7, 12, 9, 0.95);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 8px 20px var(--shadow);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--accent);
  background: rgba(246, 199, 68, 0.15);
  font-family: "Press Start 2P", cursive;
  font-size: 14px;
  color: var(--accent);
}

.brand-title {
  font-family: "Press Start 2P", cursive;
  font-size: 14px;
}

.brand-sub {
  color: var(--muted);
  font-size: 16px;
}

.site-nav {
  display: flex;
  gap: 18px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  font-size: 18px;
  position: relative;
  padding-bottom: 4px;
}

.nav-link.active,
.nav-link:hover {
  color: var(--accent);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.wallet-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-status {
  color: var(--muted);
  font-size: 16px;
}

.btn {
  border: 2px solid var(--border);
  background: rgba(16, 28, 20, 0.9);
  color: var(--text);
  padding: 10px 16px;
  font-family: "Press Start 2P", cursive;
  font-size: 11px;
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 14px var(--shadow);
}

.btn.primary {
  background: var(--accent);
  color: #1a1201;
  border-color: var(--accent);
}

.main {
  padding: 32px 28px 64px;
  position: relative;
  z-index: 2;
}

.view {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  max-width: 960px;
  margin: 0 auto 24px;
}

.section-header h2 {
  font-family: "Press Start 2P", cursive;
  font-size: 20px;
  margin: 0 0 12px;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.hero {
  max-width: 1100px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.hero h1 {
  font-family: "Press Start 2P", cursive;
  font-size: 26px;
  margin-bottom: 18px;
}

.lead {
  font-size: 22px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin: 22px 0;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-number {
  font-family: "Press Start 2P", cursive;
  color: var(--accent);
  font-size: 16px;
}

.stat-label {
  color: var(--muted);
  font-size: 16px;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.retro-screen {
  width: 100%;
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 22px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.retro-screen ul {
  padding-left: 16px;
  margin: 14px 0 18px;
  color: var(--muted);
}

.screen-title {
  font-family: "Press Start 2P", cursive;
  font-size: 14px;
}

.screen-foot {
  color: var(--accent-3);
  font-size: 16px;
}

.mint-grid {
  max-width: 1100px;
  margin: 70px auto 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.mint-preview {
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 20px;
  box-shadow: 0 12px 24px var(--shadow);
}

.preview-frame {
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--border);
  padding: 14px;
  display: grid;
  place-items: center;
}

#punk-canvas {
  width: 100%;
  max-width: 260px;
  image-rendering: pixelated;
  background: transparent;
}

.preview-meta {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-box {
  background: var(--panel-2);
  border: 2px solid var(--border);
  padding: 12px;
}

.price-label {
  color: var(--muted);
  font-size: 16px;
}

.price-value {
  font-family: "Press Start 2P", cursive;
  color: var(--accent);
  font-size: 16px;
  margin-top: 8px;
}

.price-detail {
  color: var(--muted);
  font-size: 16px;
  margin-top: 6px;
}

.mint-powers {
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--border);
  padding: 12px;
}

.mint-powers-title {
  font-size: 16px;
  color: var(--accent-3);
  margin-bottom: 8px;
}

.mint-powers-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 16px;
  display: grid;
  gap: 6px;
}

.preview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mint-controls {
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 20px;
}

.traits-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.trait-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trait-row label {
  font-size: 18px;
  color: var(--accent-3);
}

.trait-row select {
  background: rgba(8, 14, 10, 0.9);
  border: 2px solid var(--border);
  color: var(--text);
  padding: 8px;
  font-family: "VT323", monospace;
  font-size: 18px;
}

.play-grid {
  max-width: 1100px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 18px;
  box-shadow: 0 12px 24px var(--shadow);
}

.card h3 {
  font-family: "Press Start 2P", cursive;
  font-size: 14px;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-3);
  font-size: 18px;
}

select {
  width: 100%;
  background: rgba(8, 14, 10, 0.9);
  border: 2px solid var(--border);
  color: var(--text);
  padding: 8px;
  font-family: "VT323", monospace;
  font-size: 18px;
  margin-bottom: 12px;
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.table-area {
  max-width: 1240px;
  margin: 0 auto;
  background: rgba(6, 10, 8, 0.92);
  border: 2px solid var(--border);
  padding: 18px;
  overflow: visible;
}

.table-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.table-header h3 {
  margin: 0;
  justify-self: start;
}

.table-header::after {
  content: "";
  justify-self: end;
}

.table-meta {
  color: var(--muted);
  font-size: 18px;
  text-align: center;
  justify-self: center;
}

.table-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  justify-items: center;
}

.table-stage {
  position: relative;
  width: 100%;
  min-height: clamp(520px, 64vh, 660px);
  display: grid;
  place-items: center;
  padding: 40px 60px 64px;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.88) 68%);
  border-radius: 18px;
}

.table-hud {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 5;
  pointer-events: auto;
}

.table-hud-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.table-hud-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(6, 10, 8, 0.92);
  border: 2px solid rgba(73, 220, 177, 0.28);
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.55);
  min-width: 140px;
}

.table-hud-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.table-hud-value {
  font-family: "Press Start 2P", cursive;
  font-size: 12px;
  color: var(--accent);
  margin-top: 6px;
  text-align: right;
}

.stack-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.stack-toggle-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.switch {
  position: relative;
  width: 44px;
  height: 22px;
  display: inline-block;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-ui {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.switch-ui::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe3a1 0%, #f6c744 55%, #b67e0a 100%);
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.switch input:checked + .switch-ui {
  background: rgba(73, 220, 177, 0.22);
  border-color: rgba(73, 220, 177, 0.35);
}

.switch input:checked + .switch-ui::before {
  transform: translateX(22px);
}

.table-hud-power {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(12, 12, 12, 0.88);
  border: 2px solid rgba(246, 199, 68, 0.42);
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  max-width: min(420px, 46vw);
  text-align: right;
}

.table-felt-wrap {
  position: relative;
  width: min(100%, 860px);
  height: clamp(300px, 34vw, 360px);
  display: grid;
  place-items: center;
  overflow: visible;
}

.chip-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: visible;
}

.chip.fx-chip {
  will-change: transform, opacity;
}

.hand-result {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 96%);
  background: rgba(6, 10, 8, 0.92);
  border: 2px solid rgba(73, 220, 177, 0.45);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  z-index: 7;
}

.hand-result-title {
  font-family: "Press Start 2P", cursive;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
}

.hand-result-winner {
  font-family: "Press Start 2P", cursive;
  font-size: 11px;
  color: var(--turn);
  margin-bottom: 8px;
}

.hand-result-players {
  display: grid;
  gap: 6px;
  font-size: 18px;
  color: var(--text);
}

.hand-result-player {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}

.hand-result-player.winner {
  border-color: rgba(76, 255, 106, 0.55);
  background: rgba(76, 255, 106, 0.08);
}

.hand-result-player.winner .reason {
  color: var(--turn);
}

.hand-result-player .reason {
  color: var(--muted);
}

.seat-info-slot.winner-seat .ps-seat-avatar {
  border-color: var(--turn);
  box-shadow:
    0 0 0 3px rgba(76, 255, 106, 0.18),
    0 0 26px rgba(76, 255, 106, 0.5);
}

.table-felt {
  position: relative;
  background: linear-gradient(180deg, rgba(64, 64, 64, 0.92), rgba(12, 12, 12, 0.95));
  width: 100%;
  height: 100%;
  border-radius: 240px;
  padding: 26px;
  margin: 0;
  overflow: hidden;
  z-index: 0;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.65);
}

.table-felt::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 220px;
  background:
    radial-gradient(circle at 50% 45%, #2f8f4b 0%, #1f6d3a 42%, #153f25 78%, #0e2b1b 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 0 60px rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.table-felt::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 208px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.table-center {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  z-index: 2;
}

.table-center .pot-label,
.table-center .board-stage,
.table-center .pot-stack {
  display: none;
}

.pot-label {
  font-family: "Press Start 2P", cursive;
  font-size: 12px;
  color: var(--accent);
}

.pot-value {
  font-size: 22px;
  color: var(--text);
}

.pot-stack {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid #1f3a29;
  background: rgba(8, 16, 12, 0.7);
}

.pot-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.chip-stack {
  position: relative;
  width: 32px;
  height: 24px;
}

.chip {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #0b0b0b;
  background: radial-gradient(circle at 30% 30%, #ffd56a 0%, #f6c744 40%, #c79010 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.chip.small {
  position: static;
  width: 14px;
  height: 14px;
  border-width: 1px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.chip-stack .chip:nth-child(1) { top: 6px; left: 0; }
.chip-stack .chip:nth-child(2) { top: 2px; left: 6px; }
.chip-stack .chip:nth-child(3) { top: -2px; left: 12px; }

.seat-bet {
  position: absolute;
  left: 50%;
  top: 100%;
  bottom: auto;
  transform: translate(-50%, 6px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #223626;
  background: rgba(8, 16, 12, 0.75);
  font-size: 12px;
  color: var(--accent);
  z-index: 3;
}

.seat-cards-slot[data-seat="2"] .seat-bet {
  bottom: 100%;
  top: auto;
  transform: translate(-50%, -6px);
}

.seat-cards-slot[data-seat="1"] .seat-bet {
  right: 100%;
  left: auto;
  top: 50%;
  transform: translate(-6px, -50%);
}

.seat-cards-slot[data-seat="3"] .seat-bet {
  left: 100%;
  top: 50%;
  transform: translate(6px, -50%);
}

.seat-bet .chip {
  position: static;
  width: 16px;
  height: 16px;
  border-width: 1px;
}

.seat-info-slot {
  position: absolute;
  width: clamp(160px, 20vw, 190px);
  height: auto;
  background: transparent;
  border: none;
  padding: 0;
  text-align: center;
  display: grid;
  place-items: center;
  z-index: 3;
  pointer-events: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.ps-seat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ps-seat-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.55);
  position: relative;
}

.ps-seat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  image-rendering: pixelated;
  filter: saturate(1.05) contrast(1.05);
}

.ps-seat-pos {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0.4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

.ps-seat-panel {
  margin-top: 0;
  min-width: 140px;
  padding: 8px 10px 7px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(46, 46, 46, 0.7), rgba(8, 8, 8, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.ps-seat-cards {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  justify-content: center;
  --card-w: 38px;
  --card-h: 54px;
}

.ps-seat-cards .card-face,
.ps-seat-cards .card-back {
  font-size: calc(var(--card-h, 80px) * 0.2);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.45);
}

.ps-seat-name {
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.05;
}

.ps-seat-action {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
  min-height: 24px;
}

.ps-seat-action.action-check,
.ps-seat-action.action-call {
  color: #f6c744;
}

.ps-seat-action.action-raise {
  color: #33b7ff;
}

.ps-seat-action.action-fold {
  color: #f25f5c;
}

.ps-seat-action.action-all-in {
  color: #ffb14a;
}

.ps-seat-action.action-turn {
  color: rgba(255, 255, 255, 0.9);
}

.ps-seat-action.action-out,
.ps-seat-action.action-neutral {
  color: rgba(255, 255, 255, 0.55);
}

.ps-seat-badge {
  position: absolute;
  left: -18px;
  top: 34px;
  min-width: 24px;
  height: 18px;
  padding: 0 5px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(180deg, rgba(142, 28, 28, 0.95), rgba(56, 10, 10, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.ps-seat-dealer {
  position: absolute;
  left: -18px;
  top: 52px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  color: #2a1c00;
  background: radial-gradient(circle at 30% 30%, #ffe3a1 0%, #f6c744 55%, #b67e0a 100%);
  border: 1px solid rgba(0, 0, 0, 0.65);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.seat-avatar-wrap {
  width: clamp(76px, 8.5vw, 96px);
  height: clamp(76px, 8.5vw, 96px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #1f2a1f;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.seat-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  image-rendering: pixelated;
  transform: scale(1.05);
}

.seat-info {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(6, 6, 6, 0.85);
  border: 2px solid #090909;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45);
  z-index: 4;
}

.seat-label {
  padding: 6px 10px;
  border-radius: 999px;
  border: 2px solid #1c2a1f;
  background: rgba(6, 10, 8, 0.85);
  min-width: 120px;
}

.seat-name {
  font-size: 14px;
  color: var(--text);
}

.seat-stack {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  color: var(--accent-3);
}

.seat-info-slot.active-seat .ps-seat-avatar {
  border-color: var(--turn);
  box-shadow:
    0 0 0 3px rgba(76, 255, 106, 0.18),
    0 0 24px rgba(76, 255, 106, 0.42);
}

.seat-info-slot.active-seat .ps-seat-panel {
  border-color: rgba(76, 255, 106, 0.35);
}

.seat-info-slot.active-seat .ps-seat {
  animation: turnPulse 1.2s ease-in-out infinite;
}

.seat-info-slot.folded {
  opacity: 0.6;
}

.seat-cards-slot {
  position: absolute;
  width: clamp(118px, 16vw, 140px);
  height: clamp(78px, 11vw, 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.seat-cards-slot.folded {
  opacity: 0.6;
}

.seat-cards-slot.active-seat {
  filter: drop-shadow(0 0 10px rgba(76, 255, 106, 0.25));
}

@keyframes turnPulse {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

.seat-cards {
  display: flex;
  justify-content: center;
  gap: 3px;
  --card-w: clamp(32px, 3.6vw, 38px);
  --card-h: clamp(46px, 5vw, 54px);
  position: static;
}

.card-face,
.card-back {
  width: var(--card-w, 56px);
  height: var(--card-h, 80px);
  border-radius: 6px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.35);
}

.card-face {
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f4 100%);
  color: #141414;
  border: 1px solid rgba(0, 0, 0, 0.18);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: calc(var(--card-h, 80px) * 0.24);
  font-weight: 700;
  position: relative;
  padding: 6px;
}

.card-face.red {
  color: #c93a35;
}

.card-face.black {
  color: #1a1a1a;
}

.card-corner {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: calc(var(--card-h, 80px) * 0.22);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 0.92;
}

.card-corner .corner-suit {
  font-size: 0.92em;
  margin-top: -2px;
}

.card-corner.bottom {
  display: none;
}

.card-suit {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  font-size: calc(var(--card-h, 80px) * 0.44);
  line-height: 1;
}

.card-back {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 6px 10px rgba(0, 0, 0, 0.35);
}

.community-cards {
  display: flex;
  gap: 14px;
  margin: 0;
  --card-w: clamp(54px, 5.8vw, 68px);
  --card-h: clamp(78px, 7.2vw, 96px);
}

.board-stage {
  font-family: "Press Start 2P", cursive;
  font-size: 10px;
  color: var(--accent-3);
  margin-bottom: 4px;
}

.seat-info-slot[data-seat="0"] { top: -58px; left: 50%; transform: translateX(-50%); }
.seat-info-slot[data-seat="1"] { right: -34px; top: 50%; transform: translateY(-50%); }
.seat-info-slot[data-seat="3"] { left: -34px; top: 50%; transform: translateY(-50%); }
.seat-info-slot[data-seat="2"] { bottom: -86px; left: 50%; transform: translateX(-50%); }

.table-felt .seat-cards-slot {
  display: none;
}

.table-controls {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px) auto auto auto;
  grid-template-areas: "actions raise lifeline sound timer";
  gap: 12px;
  align-items: center;
}

.table-controls.no-lifeline {
  grid-template-columns: 1fr minmax(220px, 320px) auto auto;
  grid-template-areas: "actions raise sound timer";
}

.action-buttons { grid-area: actions; }
.raise-control { grid-area: raise; }
#lifeline-button { grid-area: lifeline; }
#sound-toggle { grid-area: sound; }
#decision-timer { grid-area: timer; }

.raise-control {
  display: grid;
  gap: 4px;
  min-width: 200px;
  padding: 8px 10px;
  border: 2px solid var(--border);
  background: rgba(6, 12, 9, 0.8);
}

.raise-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

#raise-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(246, 199, 68, 0.8), rgba(73, 220, 177, 0.8));
  border: 1px solid #223626;
}

#raise-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f6c744;
  border: 2px solid #1f2a1f;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

#raise-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f6c744;
  border: 2px solid #1f2a1f;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.raise-value {
  font-family: "Press Start 2P", cursive;
  font-size: 11px;
  color: var(--accent);
}

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-hand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  margin: -6px auto 0;
}

.hero-label {
  display: none;
}

.hero-cards {
  display: flex;
  gap: 4px;
  --card-w: 46px;
  --card-h: 66px;
}

.hero-cards .card-face,
.hero-cards .card-back {
  font-size: calc(var(--card-h, 108px) * 0.2);
}

.timer {
  font-family: "Press Start 2P", cursive;
  font-size: 12px;
  color: var(--accent);
}

#decision-timer {
  min-width: 84px;
  text-align: center;
  padding: 10px 12px;
  border: 2px solid var(--border);
  background: rgba(6, 12, 9, 0.8);
}

#decision-timer.urgent {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

#sound-toggle[aria-pressed="true"] {
  border-color: rgba(73, 220, 177, 0.8);
}

#sound-toggle[aria-pressed="false"] {
  opacity: 0.65;
}

.table-log {
  margin-top: 16px;
  max-height: 220px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--border);
  padding: 10px;
  font-size: 16px;
}

.profile-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.punks-grid {
  display: grid;
  gap: 12px;
}

.punk-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px;
  border: 2px solid var(--border);
  background: rgba(10, 16, 12, 0.85);
}

.punk-card img {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
  border: 2px solid var(--border);
}

.match-list {
  display: grid;
  gap: 10px;
}

.match-item {
  padding: 10px;
  border: 2px solid var(--border);
  background: rgba(10, 16, 12, 0.85);
}

.status {
  font-size: 16px;
  color: var(--muted);
  margin-top: 10px;
}

.status.error {
  color: var(--accent-2);
}

.hidden {
  display: none;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(12, 18, 14, 0.95);
  border: 2px solid var(--accent);
  padding: 12px 16px;
  font-family: "Press Start 2P", cursive;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .site-header {
    flex-direction: column;
    gap: 16px;
  }
  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .wallet-box {
    flex-direction: column;
  }
  .table-felt-wrap {
    width: min(100%, 760px);
    height: clamp(280px, 42vw, 340px);
  }
  .table-felt {
    padding: 22px;
  }
  .table-stage {
    min-height: 520px;
    padding: 34px 36px 56px;
  }
  .seat-info-slot {
    width: 160px;
  }
  .seat-avatar-wrap {
    width: 86px;
    height: 86px;
  }

  .table-controls {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "actions actions"
      "raise raise"
      "lifeline sound"
      "timer timer";
    justify-items: stretch;
  }

  .action-buttons {
    justify-content: center;
  }

  #decision-timer {
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 24px 16px 40px;
  }
  .hero h1 {
    font-size: 20px;
  }
  .brand-title {
    font-size: 12px;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
  }
  .table-stage {
    padding: 20px;
    min-height: auto;
  }
  .seat-info-slot {
    width: 150px;
  }
  .table-felt-wrap {
    width: 100%;
    height: 280px;
    margin: 0 auto 24px;
  }
  .table-felt {
    padding: 18px;
  }
  .seat-info-slot[data-seat="0"] { top: -46px; left: 50%; transform: translateX(-50%); }
  .seat-info-slot[data-seat="1"] { right: -22px; top: 50%; transform: translateY(-50%); }
  .seat-info-slot[data-seat="3"] { left: -22px; top: 50%; transform: translateY(-50%); }
  .seat-info-slot[data-seat="2"] { bottom: -78px; }

  .table-controls {
    grid-template-columns: 1fr;
    grid-template-areas:
      "actions"
      "raise"
      "lifeline"
      "sound"
      "timer";
  }

  #lifeline-button,
  #sound-toggle,
  #decision-timer {
    width: 100%;
    justify-self: stretch;
  }
}
