:root {
  --bg-top: #eee2c6;
  --bg-bottom: #cfb990;
  --ink: #18241f;
  --muted: #5c685d;
  --table-edge: #473625;
  --felt-deep: #173a35;
  --felt-mid: #235349;
  --felt-light: #3a7a71;
  --paper: #f7f0e0;
  --paper-deep: #e6d9bd;
  --line: rgba(24, 36, 31, 0.14);
  --gold: #c99544;
  --salmon: #be694a;
  --good: #2d6b49;
  --bad: #8b4538;
  --shadow: 0 28px 70px rgba(24, 22, 16, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Avenir Next Condensed", sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(27, 58, 53, 0.12), transparent 32%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

button {
  appearance: none;
  border: 1px solid rgba(25, 38, 31, 0.14);
  border-radius: 16px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fdf7ea, #eadcbf);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(24, 36, 31, 0.14);
}

button.primary {
  color: #fff9f0;
  border-color: rgba(89, 39, 28, 0.32);
  background: linear-gradient(180deg, #cb7957, #a34f37);
}

button.ghost {
  padding: 8px 12px;
}

.table-shell {
  width: min(1480px, calc(100vw - 24px));
  margin: 12px auto 24px;
  padding: 18px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(242, 228, 190, 0.56), rgba(214, 190, 144, 0.36)),
    linear-gradient(145deg, #362818, #5b4830);
  border: 2px solid rgba(84, 60, 34, 0.5);
  box-shadow: var(--shadow);
}

.table-header,
.player-rail,
.info-card,
.pond-stage {
  border-radius: 24px;
  border: 1px solid rgba(27, 32, 26, 0.18);
}

.table-header {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.85fr);
  gap: 18px;
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(248, 240, 222, 0.98), rgba(230, 214, 179, 0.94));
}

.brand-block h1,
.player-banner h2,
.pond-header h2,
.panel-head h3,
.lane-label h3,
.card-title,
.fish-name {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 700;
}

.brand-block h1 {
  font-size: clamp(2.9rem, 5vw, 4.9rem);
  line-height: 0.92;
}

.subtitle {
  max-width: 48rem;
  margin: 12px 0 0;
  line-height: 1.55;
  color: #34443b;
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.table-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.table-stat {
  min-height: 112px;
  padding: 18px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 251, 241, 0.98), rgba(233, 222, 200, 0.94));
  border: 1px solid rgba(25, 38, 31, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.table-stat.active {
  background:
    radial-gradient(circle at top, rgba(201, 149, 68, 0.22), transparent 56%),
    linear-gradient(180deg, rgba(255, 251, 241, 0.98), rgba(233, 222, 200, 0.94));
}

.table-stat span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
}

.table-stat strong {
  font-size: 2rem;
}

.table-layout {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.player-rail {
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, rgba(248, 240, 223, 0.98), rgba(229, 212, 177, 0.94));
}

.player-banner,
.panel-head,
.pond-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.player-meta,
.pond-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.player-pill,
.note-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(23, 60, 55, 0.08);
  border: 1px solid rgba(23, 60, 55, 0.14);
}

.hand-fan {
  margin-top: 16px;
  display: flex;
  align-items: flex-end;
  gap: 0;
  overflow-x: auto;
  padding: 14px 10px 8px;
}

.hand-group {
  display: grid;
  gap: 6px;
  min-width: max-content;
}

.hand-group + .hand-group {
  margin-left: 14px;
}

.hand-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px;
  color: rgba(24, 36, 31, 0.62);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hand-group-label strong {
  color: rgba(24, 36, 31, 0.82);
  font-size: 0.72rem;
}

.hand-group-cards {
  display: flex;
  align-items: flex-end;
  gap: 0;
}

.hand-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hand-fan .hand-card {
  width: 180px;
  min-width: 180px;
  margin-left: -24px;
}

.hand-fan .hand-card:first-child {
  margin-left: 0;
}

.opponent-hand {
  justify-content: center;
}

.opponent-hand .hand-card {
  transform-origin: center bottom;
  filter: saturate(0.9);
}

.opponent-hand .hand-card:nth-child(odd) {
  transform: translateY(2px) rotate(-3deg);
}

.opponent-hand .hand-card:nth-child(even) {
  transform: translateY(6px) rotate(2.5deg);
}

.local-hand {
  justify-content: center;
}

.local-hand .hand-card {
  transform-origin: center bottom;
}

.local-hand .hand-card:nth-child(odd) {
  transform: rotate(-3deg);
}

.local-hand .hand-card:nth-child(even) {
  transform: translateY(6px) rotate(2.5deg);
}

.board-stage {
  display: block;
}

.info-card {
  padding: 18px;
  background: linear-gradient(180deg, rgba(247, 239, 221, 0.98), rgba(229, 212, 177, 0.94));
  color: var(--ink);
}

.state-stack {
  display: grid;
  gap: 10px;
}

.state-cell {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 249, 237, 0.92);
  border: 1px solid rgba(24, 36, 31, 0.08);
}

.state-cell strong {
  display: block;
  margin-top: 5px;
  font-size: 1.15rem;
}

.log-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.log-entry {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 249, 237, 0.92);
  border: 1px solid rgba(24, 36, 31, 0.08);
  color: #33463d;
}

.pond-stage {
  position: relative;
  overflow: hidden;
  padding: 22px;
  color: #f4fffa;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(35, 83, 73, 0.98), rgba(20, 54, 48, 0.98));
}

.pond-stage::before,
.pond-stage::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.pond-stage::before {
  width: 280px;
  height: 280px;
  top: -90px;
  right: -50px;
}

.pond-stage::after {
  width: 220px;
  height: 220px;
  bottom: -90px;
  left: -60px;
}

.battle-ribbon {
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

.state-card {
  background: linear-gradient(180deg, rgba(249, 242, 227, 0.96), rgba(233, 219, 189, 0.92));
  box-shadow: 0 18px 32px rgba(14, 31, 28, 0.2);
}

.lane-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
}

.lane-card {
  padding: 14px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(244, 250, 247, 0.1), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, rgba(9, 38, 35, 0.12), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lane-card:hover {
  transform: translateY(-2px);
}

.lane-card.selected {
  border-color: rgba(201, 149, 68, 0.86);
  box-shadow: 0 0 0 3px rgba(201, 149, 68, 0.16), 0 18px 32px rgba(8, 27, 24, 0.18);
}

.lane-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 12px;
}

.lane-subtle {
  font-size: 0.8rem;
  color: rgba(244, 255, 250, 0.82);
}

.lane-board {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  gap: 10px;
  align-items: stretch;
}

.seat-stack {
  display: grid;
  gap: 8px;
}

.seat-label {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 255, 250, 0.74);
}

.mini-card,
.fish-focus,
.hand-card {
  border-radius: 18px;
  border: 1px solid rgba(24, 36, 31, 0.12);
}

.mini-card {
  min-height: 112px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255, 249, 236, 0.97), rgba(233, 221, 195, 0.95));
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mini-card.empty {
  background: rgba(255, 255, 255, 0.08);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(244, 255, 250, 0.7);
}

.mini-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.mini-card-title {
  font-weight: 700;
  font-size: 0.84rem;
}

.mini-card-stat {
  font-size: 0.82rem;
  color: var(--muted);
}

.mini-card-text {
  margin-top: 8px;
  line-height: 1.35;
  font-size: 0.74rem;
}

.mini-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mini-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  background: rgba(23, 60, 55, 0.08);
  border: 1px solid rgba(23, 60, 55, 0.12);
}

.fish-focus {
  min-height: 246px;
  padding: 14px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(245, 252, 248, 0.96), rgba(219, 236, 231, 0.94));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 30px rgba(9, 30, 26, 0.15);
}

.fish-focus.empty {
  background: rgba(255, 255, 255, 0.08);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(244, 255, 250, 0.82);
}

.fish-points {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(201, 149, 68, 0.16);
  border: 1px solid rgba(201, 149, 68, 0.28);
  color: #704814;
  font-size: 0.8rem;
}

.fish-name {
  margin-top: 14px;
  font-size: 1.32rem;
}

.fish-rules {
  margin-top: 10px;
  color: #36514a;
  line-height: 1.45;
  font-size: 0.92rem;
}

.hook-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hook-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 249, 237, 0.96);
  border: 1px solid rgba(24, 36, 31, 0.12);
  color: #36514a;
}

.hook-preview.empty {
  opacity: 0.55;
  font-weight: 500;
}

.hook-preview.ready {
  background: rgba(118, 168, 110, 0.22);
  border-color: rgba(60, 110, 50, 0.45);
  color: #234c1d;
}

.hook-preview.weak {
  background: rgba(190, 105, 74, 0.18);
  border-color: rgba(190, 105, 74, 0.4);
  color: #6b2a18;
}

.hook-preview.opp {
  opacity: 0.85;
}

.bait-strip,
.lane-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ── Dock (per-player tackle + bait) ───────────────────────────── */
.dock-strip {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 249, 237, 0.7);
  border: 1px solid rgba(24, 36, 31, 0.12);
}

.dock-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.dock-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 56px;
}

.dock-bait {
  align-content: center;
}

.dock-slot.empty {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(24, 36, 31, 0.06);
  color: rgba(24, 36, 31, 0.55);
  font-size: 0.78rem;
  font-style: italic;
}

.dock-tackle-card {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 251, 240, 1), rgba(232, 218, 188, 0.95));
  border: 1px solid rgba(140, 100, 50, 0.32);
  box-shadow: 0 4px 10px rgba(40, 28, 12, 0.15);
}

.dock-tackle-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.dock-tackle-name {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.dock-tackle-stat {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6b3a14;
  background: rgba(180, 110, 60, 0.18);
  padding: 3px 9px;
  border-radius: 999px;
}

.dock-tackle-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.opponent-rail .dock-strip {
  opacity: 0.88;
}

/* The pond now contains only the contested fish + status. */
.fish-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
}

.lane-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.lane-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(246, 234, 210, 0.2);
  border-radius: 10px;
  background: rgba(6, 39, 41, 0.42);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.lane-card.selected {
  border-color: rgba(217, 183, 102, 0.86);
  box-shadow: 0 0 0 2px rgba(217, 183, 102, 0.2);
}

.lane-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
}

.lane-card-head span {
  font-weight: 800;
}

.lane-card-head strong {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: rgba(244, 255, 250, 0.72);
}

.bait-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
}

.bait-chip {
  background: rgba(255, 249, 237, 0.96);
  color: var(--ink);
  border: 1px solid rgba(24, 36, 31, 0.1);
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}

.status-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(244, 255, 250, 0.9);
}

.status-chip.warn {
  background: rgba(190, 105, 74, 0.15);
  border-color: rgba(190, 105, 74, 0.3);
}

.action-tray {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
  justify-content: center;
}

.log-card {
  margin-top: 18px;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(248, 241, 228, 0.94), rgba(228, 213, 181, 0.9));
  box-shadow: 0 18px 32px rgba(13, 29, 27, 0.2);
}

.hand-card {
  text-align: left;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 251, 243, 0.98), rgba(233, 222, 197, 0.95));
  box-shadow: 0 12px 28px rgba(22, 30, 24, 0.12);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, margin 140ms ease;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.hand-card:active {
  cursor: grabbing;
}

.hand-card:hover {
  transform: translateY(-8px) scale(1.02);
  z-index: 3;
}

.hand-card.selected {
  border-color: rgba(201, 149, 68, 0.92);
  box-shadow: 0 0 0 3px rgba(201, 149, 68, 0.16), 0 14px 28px rgba(22, 30, 24, 0.18);
}

.hand-card.unplayable {
  filter: saturate(0.72);
}

.hand-card.response-armed {
  border-color: rgba(45, 107, 73, 0.34);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.card-title {
  font-size: 1rem;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  background: rgba(23, 60, 55, 0.08);
  color: var(--muted);
}

.badge-fish {
  background: rgba(58, 122, 113, 0.12);
  color: #1d5d55;
}

.badge-bait {
  background: rgba(201, 149, 68, 0.12);
  color: #7c5418;
}

.badge-tackle {
  background: rgba(190, 105, 74, 0.12);
  color: #864331;
}

.badge-trick,
.badge-condition {
  background: rgba(92, 104, 93, 0.14);
  color: #4b564c;
}

.badge-biome {
  background: rgba(78, 126, 156, 0.14);
  color: #25516b;
}

.card-body {
  margin-top: 12px;
  color: #3f4d43;
  line-height: 1.48;
  font-size: 0.92rem;
}

.card-footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.card-index {
  color: var(--muted);
  font-size: 0.74rem;
}

.response-ready {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(45, 107, 73, 0.12);
  color: var(--good);
  font-size: 0.74rem;
}

.spot-ready {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(58, 122, 113, 0.14);
  color: #1d5d55;
  font-size: 0.74rem;
}

@media (max-width: 1180px) {
  .table-header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .table-shell {
    width: min(100vw - 12px, 100%);
    margin: 6px auto 16px;
    padding: 10px;
    border-radius: 22px;
  }

  .table-stats,
  .lane-grid {
    grid-template-columns: 1fr;
  }

  .hand-fan {
    justify-content: flex-start;
    padding-left: 4px;
  }

  .hand-fan .hand-card {
    min-width: 160px;
    width: 160px;
    margin-left: -34px;
  }

  .lane-board {
    grid-template-columns: 1fr;
  }

  .seat-label {
    text-align: left;
  }
}

/* =============================================================
   MODERN CARD GAME CLIENT REWRITE
   Final screen model: header, opponent zone, battlefield, player hand.
   ============================================================= */

:root {
  --client-bg: #07100e;
  --client-panel: rgba(10, 18, 16, 0.88);
  --client-panel-2: rgba(15, 28, 25, 0.92);
  --client-line: rgba(239, 211, 151, 0.16);
  --client-gold: #e7bd6f;
  --client-gold-soft: rgba(231, 189, 111, 0.16);
  --client-teal: #1e7c77;
  --client-red: #b95f4a;
  --client-text: #f4ead6;
  --client-muted: rgba(244, 234, 214, 0.62);
  --game-card-w: 168px;
  --game-card-h: 235px;
  --hand-card-w: 156px;
  --hand-card-h: 218px;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  color: var(--client-text);
  background:
    linear-gradient(180deg, rgba(4, 9, 8, 0.82), rgba(4, 9, 8, 0.94)),
    radial-gradient(ellipse at 50% 30%, rgba(26, 104, 97, 0.28), transparent 52%),
    linear-gradient(135deg, #2a1b12 0%, #07100e 36%, #0d201e 100%);
}

button {
  border-radius: 8px;
  border: 1px solid var(--client-line);
  background: linear-gradient(180deg, rgba(42, 52, 45, 0.96), rgba(16, 24, 21, 0.98));
  color: var(--client-text);
}

button.primary {
  border-color: rgba(231, 189, 111, 0.58);
  background: linear-gradient(180deg, #d99b56, #a14d3e);
}

.scene-game,
.scene-game.active {
  display: block;
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.scene-game .table-shell {
  width: 100%;
  max-width: 1680px;
  min-height: 100vh;
  height: auto;
  margin: 0 auto;
  padding: 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(106, 64, 35, 0.55), rgba(22, 16, 12, 0.72), rgba(106, 64, 35, 0.55));
}

.scene-game .table-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  min-height: 54px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--client-line);
  background: rgba(4, 8, 7, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

.header-brand {
  min-width: 0;
}

.header-title {
  color: var(--client-gold);
  font-size: 1rem;
}

.header-sub,
.header-dot {
  color: var(--client-muted);
}

.scene-game .table-stats {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.scene-game .table-stat {
  min-height: 0;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--client-line);
  background: rgba(18, 29, 25, 0.88);
}

.scene-game .table-stat strong {
  color: #fff4d7;
  font-size: 0.95rem;
}

.scene-game .table-stat.active {
  border-color: rgba(231, 189, 111, 0.38);
  background: linear-gradient(180deg, rgba(78, 89, 57, 0.94), rgba(26, 41, 31, 0.96));
}

.header-controls {
  justify-content: flex-end;
}

.table-body,
.game-column {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: visible;
}

.table-body {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 10px;
}

.game-column {
  grid-template-rows: auto auto auto;
}

.scene-game .player-rail,
.scene-game .pond-stage,
.log-sidebar {
  overflow: visible;
  border-radius: 10px;
  border: 1px solid var(--client-line);
  background: linear-gradient(180deg, var(--client-panel), rgba(4, 10, 9, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 32px rgba(0, 0, 0, 0.26);
}

.scene-game .player-rail {
  padding: 10px 14px;
}

.scene-game .opponent-rail {
  opacity: 1;
}

.scene-game .local-rail {
  border-color: rgba(231, 189, 111, 0.36);
  box-shadow: 0 0 0 1px rgba(231, 189, 111, 0.1), 0 18px 38px rgba(0, 0, 0, 0.32);
}

.scene-game .player-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scene-game .player-banner h2 {
  font-size: 1rem;
  color: #fff0d0;
}

.kicker {
  margin-bottom: 4px;
  color: var(--client-muted);
  letter-spacing: 0.12em;
}

.scene-game .player-pill,
.note-pill,
.state-pill,
.progress-score {
  border: 1px solid var(--client-line);
  background: rgba(5, 12, 11, 0.64);
  color: var(--client-text);
}

.dock-strip {
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(239, 211, 151, 0.1);
  background: rgba(255, 244, 210, 0.045);
}

.dock-row {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.9fr);
}

.dock-section {
  min-height: 38px;
}

.dock-tackle-card {
  padding: 8px 10px;
  border-radius: 7px;
  border-color: rgba(231, 189, 111, 0.28);
  background: linear-gradient(180deg, rgba(70, 52, 32, 0.95), rgba(22, 28, 24, 0.96));
}

.dock-tackle-name {
  color: #ffe6ae;
}

.bait-chip,
.mini-chip,
.dock-slot.empty {
  border-radius: 6px;
  border: 1px solid rgba(239, 211, 151, 0.12);
  background: rgba(239, 211, 151, 0.08);
  color: rgba(244, 234, 214, 0.86);
}

.scene-game .pond-stage {
  min-height: 0;
  padding: 12px;
  color: var(--client-text);
  background:
    linear-gradient(180deg, rgba(17, 86, 78, 0.92), rgba(5, 31, 32, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 22px);
}

.scene-game .board-stage,
.scene-game .pond-stage,
.scene-game .lane-area,
.scene-game .lane-area-inner,
.scene-game .fish-stage {
  flex: none;
  height: auto;
  max-height: none;
  overflow: visible;
}

.scene-game .board-stage,
.scene-game .pond-stage {
  display: block;
}

.pond-header {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(220px, 1fr) minmax(280px, auto);
  align-items: center;
  gap: 10px;
}

.pond-title-row,
.match-progress,
.state-pills {
  margin: 0;
}

.pond-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.state-pills {
  justify-content: flex-end;
}

.state-pill {
  padding: 5px 9px;
  font-size: 0.72rem;
  border-radius: 8px;
}

.scene-game .lane-area {
  margin-top: 10px;
  min-height: 0;
}

.scene-game .lane-area-inner {
  display: grid;
  grid-template-rows: auto auto minmax(290px, auto) auto;
  gap: 10px;
  min-height: 0;
  height: auto;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 211, 151, 0.12);
  background: rgba(2, 18, 20, 0.5);
}

.turn-coach {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(3, 12, 13, 0.72);
}

.turn-coach strong {
  color: #ffdd91;
}

.decision-help {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 0;
}

.decision-help-item {
  min-height: 48px;
  border-radius: 8px;
  border-color: rgba(231, 189, 111, 0.18);
  background: rgba(94, 64, 19, 0.72);
  box-shadow: none;
}

.decision-help-item strong {
  color: #f5c673;
}

.decision-help-item span {
  color: rgba(255, 242, 210, 0.82);
}

.scene-game .fish-stage {
  display: block;
  margin: 0;
}

.scene-game .lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 12px;
  width: 100%;
}

.scene-game .lane-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 10px;
  min-height: 318px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 211, 151, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.08)),
    rgba(4, 25, 27, 0.7);
  color: var(--client-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.scene-game .lane-card:hover {
  transform: translateY(-2px);
}

.scene-game .lane-card.selected {
  border-color: rgba(231, 189, 111, 0.82);
  box-shadow: 0 0 0 2px rgba(231, 189, 111, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lane-card-head {
  width: 100%;
  min-height: 22px;
}

.lane-card-head span {
  color: #b9fff3;
}

.scene-game .fish-focus {
  width: var(--game-card-w);
  min-width: var(--game-card-w);
  height: var(--game-card-h);
  min-height: var(--game-card-h);
  max-height: var(--game-card-h);
  align-self: center;
  justify-self: center;
  border-radius: 11px;
}

.fish-focus:not(.empty) {
  color: #18221d;
  background: linear-gradient(180deg, #eee2bd, #b6c0a0);
}

.fish-focus.empty {
  color: rgba(244, 234, 214, 0.72);
  background:
    radial-gradient(ellipse at center, rgba(79, 168, 158, 0.14), transparent 54%),
    rgba(3, 20, 22, 0.84);
}

.fish-focus:not(.empty) .fish-name {
  color: #1d2a22;
}

.fish-focus:not(.empty) .fish-rules {
  color: #344339;
}

.lane-status {
  width: 100%;
  min-height: 30px;
  justify-content: center;
  margin: 0;
}

.status-chip {
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.07);
}

.status-chip.trap-chip {
  border-color: rgba(231, 189, 111, 0.32);
  background: var(--client-gold-soft);
}

.action-tray {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px;
  border-radius: 10px;
  background: rgba(3, 10, 10, 0.78);
}

.action-tray button {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.76rem;
  font-weight: 800;
}

.hand-fan {
  margin-top: 8px;
  padding: 4px 4px 8px;
  overflow-x: auto;
  overflow-y: visible;
}

.hand-group {
  gap: 5px;
}

.hand-group + .hand-group {
  margin-left: 10px;
}

.hand-group-cards {
  align-items: flex-end;
}

.scene-game .hand-card,
.scene-game .hand-fan .hand-card {
  width: var(--hand-card-w);
  min-width: var(--hand-card-w);
  height: var(--hand-card-h);
  min-height: var(--hand-card-h);
  max-height: var(--hand-card-h);
  margin-left: -28px;
  padding: 10px;
  border-radius: 11px;
}

.scene-game .hand-fan .hand-card:first-child,
.scene-game .hand-group-cards .hand-card:first-child {
  margin-left: 0;
}

.scene-game .opponent-hand {
  justify-content: center;
  padding-bottom: 4px;
}

.scene-game .opponent-rail .hand-card.face-down,
.scene-game .opponent-hand .hand-card {
  width: 118px;
  min-width: 118px;
  height: 66px;
  min-height: 66px;
  max-height: 66px;
  margin-left: -18px;
  border-radius: 9px;
}

.scene-game .opponent-hand .hand-card:first-child {
  margin-left: 0;
}

.hand-card:hover,
.local-hand .hand-card:nth-child(even):hover,
.local-hand .hand-card:nth-child(odd):hover {
  transform: translateY(-12px) scale(1.025);
}

.local-hand .hand-card:nth-child(even),
.local-hand .hand-card:nth-child(odd),
.opponent-hand .hand-card:nth-child(even),
.opponent-hand .hand-card:nth-child(odd) {
  transform: none;
}

.card-title {
  font-size: 0.92rem;
}

.card-art {
  height: 48px;
}

.card-body {
  font-size: 0.78rem;
  line-height: 1.32;
  -webkit-line-clamp: 3;
}

.card-footer {
  margin-top: 8px;
}

.response-ready,
.spot-ready {
  font-size: 0.66rem;
}

.log-sidebar.open {
  width: 300px;
}

.sidebar-inner {
  width: 300px;
}

@media (max-width: 1120px) {
  :root {
    --game-card-w: 150px;
    --game-card-h: 210px;
    --hand-card-w: 142px;
    --hand-card-h: 200px;
  }

  .pond-header {
    grid-template-columns: 1fr;
  }

  .state-pills {
    justify-content: flex-start;
  }

  .scene-game .lane-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 820px) {
  .scene-game .table-header {
    position: static;
    grid-template-columns: 1fr;
  }

  .header-controls,
  .scene-game .table-stats {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .table-body {
    grid-template-columns: 1fr;
  }

  .scene-game .lane-grid {
    grid-template-columns: 1fr;
  }

  .scene-game .lane-card {
    min-height: 286px;
  }

  .action-tray {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-help {
    grid-template-columns: 1fr;
  }

  .log-sidebar,
  .log-sidebar.open,
  .sidebar-inner {
    width: 100%;
  }
}

/* =============================================================
   SCENES
   ============================================================= */

.scene {
  display: none;
}

.scene.active {
  display: block;
}

.scene-full {
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top, rgba(58, 122, 113, 0.22), transparent 52%),
    radial-gradient(ellipse at bottom right, rgba(201, 149, 68, 0.1), transparent 44%),
    linear-gradient(180deg, #0e2822 0%, #162d28 60%, #091d19 100%);
  color: var(--paper);
}

.scene-full.active {
  display: flex;
}

.scene-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  padding: 40px 24px;
  max-width: 540px;
}

.scene-kicker {
  color: rgba(247, 240, 224, 0.58);
  margin-bottom: 12px;
}

.title-wordmark {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(4rem, 13vw, 8rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--paper);
}

.scene-tagline {
  margin: 28px 0 40px;
  color: rgba(247, 240, 224, 0.72);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 380px;
}

.scene-heading {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--paper);
}

.scene-cta {
  font-size: 1.05rem;
  padding: 16px 44px;
  border-radius: 20px;
  min-width: 200px;
}

.menu-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

.menu-hint {
  margin: 10px 0 24px;
  color: rgba(247, 240, 224, 0.58);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 280px;
}

.menu-back {
  margin-top: 32px;
  color: rgba(247, 240, 224, 0.62);
  border-color: rgba(247, 240, 224, 0.18);
}

.menu-back:hover {
  color: var(--paper);
}

button:disabled {
  opacity: 0.44;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

:focus-visible {
  outline: 2px solid rgba(203, 121, 87, 0.85);
  outline-offset: 2px;
  border-radius: 6px;
}

button:focus-visible,
.hand-card:focus-visible {
  outline: 2px solid rgba(203, 121, 87, 0.9);
  outline-offset: 3px;
}

.coming-soon {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.14);
  vertical-align: middle;
  margin-left: 6px;
}

/* =============================================================
   SINGLE-LANE AREA
   ============================================================= */

.lane-area {
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.lane-area-inner {
  height: 100%;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(244, 250, 247, 0.1), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, rgba(9, 38, 35, 0.12), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lane-area .lane-board {
  grid-template-columns: 200px minmax(0, 1fr) 200px;
}

/* =============================================================
   FACE-DOWN CARDS (opponent hand in hot-seat mode)
   ============================================================= */

.hand-card.face-down {
  min-height: 162px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.04) 0px,
      rgba(255, 255, 255, 0.04) 2px,
      transparent 2px,
      transparent 10px
    ),
    linear-gradient(180deg, #1a4039, #11302b);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 20px rgba(8, 24, 22, 0.22);
  cursor: default;
  pointer-events: none;
}

/* =============================================================
   OVERLAYS (handoff + winner)
   ============================================================= */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 24, 21, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.overlay[hidden] {
  display: none;
}

.overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 52px 48px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top, rgba(58, 122, 113, 0.18), transparent 50%),
    linear-gradient(180deg, rgba(247, 239, 221, 0.98), rgba(224, 208, 172, 0.96));
  border: 1px solid rgba(25, 38, 31, 0.16);
  box-shadow: 0 40px 80px rgba(8, 20, 18, 0.5);
  max-width: 420px;
  width: calc(100vw - 48px);
}

.overlay-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.overlay-heading {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.1;
}

.overlay-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.handoff-continue {
  margin-top: 22px;
  min-width: 160px;
}

/* Winner overlay variant */

.overlay-winner .overlay-content {
  background:
    radial-gradient(circle at top, rgba(201, 149, 68, 0.22), transparent 48%),
    linear-gradient(180deg, rgba(255, 249, 234, 0.99), rgba(232, 214, 173, 0.97));
}

.overlay-response .overlay-content {
  max-width: 720px;
  text-align: left;
  align-items: stretch;
}

.overlay-rules .overlay-content {
  max-width: 760px;
  text-align: left;
  align-items: stretch;
}

.rules-content .scene-cta {
  align-self: center;
  margin-top: 20px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.rules-grid div {
  min-height: 104px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 249, 237, 0.9);
  border: 1px solid rgba(24, 36, 31, 0.1);
}

.rules-grid strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.04rem;
}

.rules-grid span {
  display: block;
  color: #3e5047;
  line-height: 1.45;
  font-size: 0.9rem;
}

.decision-help {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(720px, 100%);
  margin: 8px auto 4px;
}

.decision-help[hidden] {
  display: none;
}

.decision-help-item {
  min-height: 54px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 249, 237, 0.9);
  border: 1px solid rgba(24, 36, 31, 0.12);
  box-shadow: 0 8px 18px rgba(19, 34, 28, 0.08);
}

.decision-help-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7b4834;
}

.decision-help-item span {
  display: block;
  color: #30493f;
  font-size: 0.78rem;
  line-height: 1.3;
}

.response-content {
  gap: 14px;
}

.response-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  width: 100%;
  margin-top: 8px;
}

.response-choice {
  min-height: 180px;
  text-align: left;
  padding: 16px;
  cursor: pointer;
  touch-action: auto;
  user-select: auto;
}

.response-choice .card-footer {
  margin-top: 18px;
}

.response-pass {
  align-self: flex-end;
  min-width: 160px;
}

.winner-scores {
  width: 100%;
  margin: 22px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.winner-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 249, 237, 0.9);
  border: 1px solid rgba(24, 36, 31, 0.08);
  font-size: 1rem;
}

.winner-score-row strong {
  font-size: 1.2rem;
  color: var(--ink);
}

/* =============================================================
   DRAG AND DROP
   ============================================================= */

/* Ghost card that follows the pointer */
.drag-ghost {
  pointer-events: none;
  z-index: 9999;
  cursor: grabbing !important;
  box-shadow:
    0 28px 56px rgba(8, 20, 18, 0.38),
    0 8px 16px rgba(8, 20, 18, 0.22);
  will-change: transform, opacity;
  /* Suppress the fan overlap margin set by .hand-fan */
  margin-left: 0 !important;
}

/* Lane glows when a card is dragged over it */
#laneArea.drop-active .lane-area-inner {
  border-color: rgba(201, 149, 68, 0.72);
  box-shadow:
    0 0 0 3px rgba(201, 149, 68, 0.22),
    0 0 48px rgba(201, 149, 68, 0.1);
  transition: border-color 0.1s, box-shadow 0.1s;
}

/* =============================================================
   FULL-SCREEN GAME LAYOUT
   All rules here override the scrolling prototype defaults.
   ============================================================= */

/* Game scene fills the full viewport with no overflow */
.scene-game {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scene-game .table-shell {
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  padding: 10px;
  border-radius: 0;
  border: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Compact header bar ──────────────────────────────────────── */

.scene-game .table-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-radius: 16px;
  flex-shrink: 0;
  /* grid override */
  grid-template-columns: unset;
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-shrink: 0;
}

.header-title {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 700;
  font-size: 1.15rem;
}

.header-dot {
  color: var(--muted);
  font-size: 0.9rem;
}

.header-sub {
  color: var(--muted);
  font-size: 0.88rem;
}

.scene-game .table-stats {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.scene-game .table-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  min-height: unset;
  border-radius: 12px;
  flex-direction: row;
}

.scene-game .table-stat span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.scene-game .table-stat strong {
  font-size: 1rem;
}

.header-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.compact-btn {
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* ── Body: game column + sidebar ─────────────────────────────── */

.table-body {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 10px;
  margin-top: 8px;
  overflow: hidden;
}

.game-column {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

/* ── Player rails ─────────────────────────────────────────────── */

.scene-game .player-rail {
  flex-shrink: 0;
  padding: 10px 14px 12px;
  border-radius: 18px;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

/* Local rail is always the active player's rail; give it a warm accent. */
.scene-game .local-rail {
  border-color: rgba(203, 121, 87, 0.55);
  box-shadow: 0 12px 28px rgba(163, 79, 55, 0.2);
}

.scene-game .opponent-rail {
  opacity: 0.86;
}

.scene-game .player-banner {
  gap: 10px;
}

.scene-game .player-banner h2 {
  font-size: 1.05rem;
  margin: 0;
}

.scene-game .player-pill {
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* Opponent face-down cards: shorter since no content */
.scene-game .opponent-rail .hand-fan {
  margin-top: 8px;
  padding: 6px 10px 4px;
}

.scene-game .hand-card.face-down {
  min-height: 62px;
}

/* Local hand: cards tighter together */
.scene-game .local-hand {
  margin-top: 8px;
}

/* ── Board stage fills remaining space ───────────────────────── */

.scene-game .board-stage {
  flex: 1 1 320px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.scene-game .pond-stage {
  flex: 1;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border-radius: 18px;
  overflow: visible;
}

/* ── Compact pond header with inline state pills ─────────────── */

.pond-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.pond-title-row .kicker {
  margin: 0;
}

.state-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.match-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
}

.caught-pile {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.caught-p2 {
  text-align: right;
}

.caught-label {
  color: rgba(244, 255, 250, 0.72);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.caught-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.caught-p2 .caught-list {
  justify-content: flex-end;
}

.caught-chip,
.caught-empty {
  display: inline-flex;
  align-items: center;
  max-width: 116px;
  padding: 4px 8px;
  border-radius: 999px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
}

.caught-chip {
  background: rgba(255, 249, 237, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
}

.caught-empty {
  color: rgba(244, 255, 250, 0.58);
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.progress-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(9, 38, 35, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff9ef;
  font-weight: 700;
}

.progress-score span {
  color: rgba(244, 255, 250, 0.64);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 249, 237, 0.88);
  border: 1px solid rgba(24, 36, 31, 0.08);
  font-size: 0.74rem;
  color: var(--ink);
}

.state-pill .pill-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.64rem;
}

/* Lane area fills available board space */
.scene-game .lane-area {
  flex: 1;
  min-height: 220px;
  margin-top: 0;
  overflow: visible;
}

.scene-game .lane-area-inner {
  min-height: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.turn-coach {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(9, 38, 35, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(244, 255, 250, 0.84);
  font-size: 0.84rem;
}

.turn-coach strong {
  color: #fff9ef;
  font-size: 0.96rem;
}

.scene-game .lane-board {
  flex: 1;
  min-height: 0;
}

.scene-game .fish-focus {
  width: 180px;
  min-width: 180px;
  min-height: 202px;
  aspect-ratio: 5 / 7;
  flex: 0 0 auto;
  align-self: center;
  padding: 14px;
}

.scene-game .fish-name {
  font-size: 1.1rem;
}

.scene-game .fish-rules {
  font-size: 0.82rem;
  margin-top: 6px;
}

/* Action tray: flush to bottom of pond */
.scene-game .action-tray {
  margin-top: 10px;
  flex-shrink: 0;
}

/* ── Collapsible log sidebar ─────────────────────────────────── */

.log-sidebar {
  width: 0;
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.24s ease;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 240, 223, 0.98), rgba(229, 212, 177, 0.94));
  border: 1px solid rgba(27, 32, 26, 0.18);
}

.log-sidebar.open {
  width: 264px;
}

.sidebar-inner {
  width: 264px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px;
  overflow: hidden;
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.sidebar-head .kicker {
  margin: 0;
}

.scene-game .log-list {
  flex: 1;
  overflow-y: auto;
  max-height: unset;
  gap: 7px;
}

.scene-game .log-entry {
  padding: 8px 10px;
  font-size: 0.8rem;
  border-radius: 12px;
}

/* =============================================================
   PREMIUM CARD CLIENT SKIN
   Last-mile overrides for the playable match surface.
   ============================================================= */

body {
  background:
    linear-gradient(115deg, rgba(6, 12, 10, 0.96), rgba(21, 32, 25, 0.94)),
    repeating-linear-gradient(
      35deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 9px
    );
  color: #f6ead2;
  overflow: hidden;
}

button {
  border-radius: 10px;
  border-color: rgba(229, 194, 128, 0.26);
  background:
    linear-gradient(180deg, rgba(50, 61, 49, 0.95), rgba(26, 35, 29, 0.95));
  color: #f6ead2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 26px rgba(0, 0, 0, 0.2);
}

button.primary {
  border-color: rgba(252, 187, 95, 0.55);
  background:
    linear-gradient(180deg, #e0a45f, #b85f42 62%, #833d33);
  color: #fff6e8;
  text-shadow: 0 1px 0 rgba(65, 30, 20, 0.36);
}

button.ghost {
  color: rgba(246, 234, 210, 0.82);
  background: rgba(15, 22, 19, 0.62);
}

.scene-game .table-shell {
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(15, 17, 15, 0.12), rgba(0, 0, 0, 0.22)),
    linear-gradient(135deg, #5a321f, #2d2017 48%, #6b4428);
}

.scene-game .table-header {
  border-radius: 12px;
  border-color: rgba(246, 234, 210, 0.12);
  background: rgba(7, 12, 11, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-title {
  color: #f7d68d;
  letter-spacing: 0.02em;
}

.header-sub,
.header-dot,
.scene-game .table-stat span {
  color: rgba(246, 234, 210, 0.56);
}

.scene-game .table-stat {
  border: 1px solid rgba(229, 194, 128, 0.16);
  background: rgba(24, 34, 29, 0.78);
  color: #f6ead2;
}

.scene-game .table-stat.active {
  background:
    linear-gradient(180deg, rgba(93, 110, 75, 0.84), rgba(38, 52, 40, 0.84));
  border-color: rgba(247, 214, 141, 0.36);
}

.scene-game .table-stat strong {
  color: #fff3d6;
}

.table-body {
  gap: 12px;
}

.scene-game .player-rail,
.scene-game .pond-stage,
.log-sidebar {
  border-color: rgba(246, 234, 210, 0.1);
  background:
    linear-gradient(180deg, rgba(16, 24, 21, 0.88), rgba(7, 13, 12, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 40px rgba(0, 0, 0, 0.22);
}

.scene-game .local-rail {
  border-color: rgba(224, 164, 95, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(224, 164, 95, 0.16),
    0 18px 46px rgba(0, 0, 0, 0.34);
}

.scene-game .opponent-rail {
  opacity: 0.94;
}

.kicker,
.scene-game .player-pill,
.note-pill,
.caught-label,
.state-pill .pill-label,
.hand-group-label {
  letter-spacing: 0.12em;
}

.scene-game .player-banner h2,
.fish-name,
.card-title {
  color: #fff0d0;
}

.scene-game .player-pill,
.note-pill {
  border-color: rgba(246, 234, 210, 0.12);
  background: rgba(255, 248, 226, 0.08);
  color: rgba(246, 234, 210, 0.82);
}

.dock-strip {
  border-color: rgba(246, 234, 210, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 248, 226, 0.075), rgba(0, 0, 0, 0.1));
}

.dock-tackle-card {
  border-color: rgba(222, 177, 100, 0.32);
  background:
    linear-gradient(145deg, rgba(69, 53, 34, 0.96), rgba(28, 34, 29, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dock-tackle-name,
.dock-tackle-stat,
.mini-chip,
.dock-slot.empty {
  color: rgba(255, 241, 210, 0.9);
}

.dock-tackle-stat,
.mini-chip,
.dock-slot.empty {
  background: rgba(255, 248, 226, 0.08);
  border-color: rgba(246, 234, 210, 0.1);
}

.scene-game .pond-stage {
  background:
    linear-gradient(180deg, rgba(19, 74, 65, 0.94), rgba(9, 34, 34, 0.96)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 18px
    );
}

.pond-stage::before,
.pond-stage::after {
  display: none;
}

.match-progress,
.state-pills,
.turn-coach {
  position: relative;
  z-index: 1;
}

.turn-coach {
  border-color: rgba(246, 234, 210, 0.13);
  background: rgba(4, 13, 13, 0.52);
  color: rgba(246, 234, 210, 0.78);
}

.turn-coach strong {
  color: #ffe2a0;
}

.state-pill,
.caught-chip,
.progress-score {
  border-color: rgba(246, 234, 210, 0.12);
  background: rgba(6, 20, 20, 0.46);
  color: #f6ead2;
}

.caught-empty {
  color: rgba(246, 234, 210, 0.48);
  border-color: rgba(246, 234, 210, 0.12);
}

.scene-game .lane-area-inner {
  border: 1px solid rgba(246, 234, 210, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.1)),
    rgba(5, 28, 29, 0.42);
}

.fish-focus {
  border: 1px solid rgba(246, 234, 210, 0.18);
  border-radius: 14px;
  color: #f6ead2;
  background:
    linear-gradient(145deg, rgba(252, 241, 209, 0.95), rgba(174, 200, 184, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 18px 38px rgba(0, 0, 0, 0.28);
}

.fish-focus.empty {
  border-style: solid;
  background:
    linear-gradient(145deg, rgba(13, 55, 55, 0.72), rgba(5, 28, 30, 0.78));
  color: rgba(246, 234, 210, 0.82);
}

.fish-focus:not(.empty) .fish-name {
  color: #19231f;
}

.fish-focus:not(.empty) .fish-rules {
  color: #31423a;
}

.fish-points {
  border-color: rgba(99, 63, 23, 0.2);
  background: rgba(142, 91, 34, 0.14);
  color: #684016;
}

.hook-preview {
  border-radius: 8px;
}

.action-tray {
  padding: 10px;
  border-radius: 14px;
  background: rgba(6, 13, 12, 0.58);
  border: 1px solid rgba(246, 234, 210, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.action-tray button {
  min-width: 132px;
  min-height: 44px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hand-fan {
  scrollbar-color: rgba(246, 234, 210, 0.22) transparent;
}

.hand-group-label {
  color: rgba(246, 234, 210, 0.56);
}

.hand-group-label strong {
  color: #f7d68d;
}

.hand-card {
  min-height: 202px;
  border: 1px solid rgba(22, 24, 20, 0.28);
  border-radius: 13px;
  color: #19231f;
  background:
    linear-gradient(180deg, rgba(255, 252, 241, 0.99), rgba(226, 216, 191, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 16px 32px rgba(0, 0, 0, 0.26);
}

.hand-card::before {
  content: "";
  display: block;
  height: 5px;
  margin: -7px -7px 9px;
  border-radius: 8px 8px 3px 3px;
  background: #3a7a71;
}

.hand-card.selected {
  border-color: rgba(247, 214, 141, 0.9);
  box-shadow:
    0 0 0 2px rgba(247, 214, 141, 0.32),
    0 24px 44px rgba(0, 0, 0, 0.34);
}

.hand-card:hover {
  transform: translateY(-10px) scale(1.025);
}

.hand-group-plays .hand-card::before {
  background: linear-gradient(90deg, #2f8e8b, #d9b766);
}

.hand-group-bait .hand-card::before {
  background: linear-gradient(90deg, #d6a342, #7ca856);
}

.hand-group-tackle .hand-card::before {
  background: linear-gradient(90deg, #a65b42, #d7b476);
}

.card-badge,
.response-ready,
.spot-ready {
  border-radius: 6px;
  letter-spacing: 0.06em;
}

.card-body,
.card-index {
  color: #46554c;
}

.scene-game .hand-card.face-down {
  min-height: 72px;
  border-color: rgba(247, 214, 141, 0.22);
  background:
    linear-gradient(135deg, rgba(213, 166, 82, 0.22), transparent 35%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 2px,
      transparent 2px,
      transparent 8px
    ),
    linear-gradient(180deg, #21443e, #102722);
}

.log-sidebar {
  background: rgba(9, 13, 12, 0.74);
}

.scene-game .log-entry {
  border-color: rgba(246, 234, 210, 0.1);
  background: rgba(255, 248, 226, 0.07);
  color: rgba(246, 234, 210, 0.78);
}

@media (max-width: 860px) {
  .scene-game .table-header {
    gap: 8px;
    flex-wrap: wrap;
  }

  .match-progress {
    grid-template-columns: 1fr;
  }

  .progress-score {
    justify-content: center;
  }

  .caught-p2,
  .caught-p2 .caught-list {
    text-align: left;
    justify-content: flex-start;
  }

  .action-tray button {
    flex: 1 1 130px;
  }
}

/* =============================================================
   CARD CLIENT PASS
   Dense game-client affordances layered over the DOM renderer.
   ============================================================= */

:root {
  --client-card-w: 180px;
  --client-card-h: 252px;
}

.scene-game .table-shell {
  padding: 10px;
}

.scene-game .table-header,
.scene-game .player-rail,
.scene-game .pond-stage,
.log-sidebar {
  border-radius: 10px;
}

.scene-game .pond-stage {
  padding: 12px;
}

.scene-game .lane-area-inner {
  min-height: 100%;
  padding: 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.14)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 16px
    ),
    rgba(5, 28, 29, 0.5);
}

.scene-game .fish-stage {
  flex: 1;
  justify-content: center;
  margin: 8px 0 10px;
}

.scene-game .fish-focus {
  position: relative;
  width: var(--client-card-w);
  min-width: var(--client-card-w);
  height: var(--client-card-h);
  min-height: var(--client-card-h);
  max-height: var(--client-card-h);
  gap: 8px;
  overflow: hidden;
  border-radius: 13px;
}

.fish-focus::before,
.hand-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -18px 34px rgba(36, 28, 18, 0.08);
}

.fish-focus:not(.empty)::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #2f8e8b, #d9b766);
}

.fish-focus.empty {
  justify-content: center;
}

.fish-points {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 5px 8px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fish-art,
.card-art {
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(28, 38, 31, 0.12);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -16px 26px rgba(16, 23, 20, 0.1);
}

.fish-art {
  height: 58px;
  margin-top: 17px;
  background:
    radial-gradient(circle at 28% 48%, rgba(255, 244, 185, 0.86) 0 9px, transparent 10px),
    radial-gradient(ellipse at 62% 47%, rgba(47, 142, 139, 0.92) 0 28px, transparent 29px),
    linear-gradient(160deg, rgba(43, 112, 112, 0.95), rgba(13, 58, 62, 0.96));
}

.fish-art-empty {
  margin-top: 0;
  background:
    radial-gradient(ellipse at center, rgba(246, 234, 210, 0.14), transparent 52%),
    repeating-linear-gradient(
      135deg,
      rgba(246, 234, 210, 0.05) 0,
      rgba(246, 234, 210, 0.05) 1px,
      transparent 1px,
      transparent 8px
    ),
    rgba(5, 28, 30, 0.64);
}

.fish-focus .fish-name {
  margin-top: 0;
  line-height: 1.08;
}

.fish-focus .fish-rules {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hook-preview-row {
  margin-top: auto;
  gap: 5px;
}

.hook-preview {
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 0.66rem;
  line-height: 1.1;
}

.hand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hand-card::before {
  position: relative;
  z-index: 1;
}

.card-topline,
.card-art,
.card-body,
.card-footer {
  position: relative;
  z-index: 1;
}

.card-topline > div {
  min-width: 0;
}

.card-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-art {
  height: 54px;
  margin-top: 10px;
  background:
    radial-gradient(circle at 24% 36%, rgba(255, 255, 255, 0.42), transparent 18%),
    linear-gradient(135deg, rgba(58, 122, 113, 0.88), rgba(24, 48, 43, 0.94));
}

.card-art-fish {
  background:
    radial-gradient(circle at 24% 46%, rgba(248, 221, 126, 0.88) 0 8px, transparent 9px),
    radial-gradient(ellipse at 61% 50%, rgba(43, 126, 122, 0.94) 0 26px, transparent 27px),
    linear-gradient(145deg, #1e6e70, #12363a);
}

.card-art-bait {
  background:
    radial-gradient(circle at 38% 50%, rgba(247, 214, 141, 0.92) 0 16px, transparent 17px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 8px),
    linear-gradient(145deg, #9f7629, #315f38);
}

.card-art-tackle {
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(242, 211, 154, 0.88) 43% 47%, transparent 48%),
    radial-gradient(circle at 72% 58%, transparent 0 10px, rgba(242, 211, 154, 0.86) 11px 13px, transparent 14px),
    linear-gradient(145deg, #8a4534, #2f3532);
}

.card-art-trick,
.card-art-condition {
  background:
    radial-gradient(circle at 30% 42%, rgba(240, 214, 166, 0.52), transparent 18%),
    radial-gradient(circle at 68% 58%, rgba(181, 111, 87, 0.62), transparent 24%),
    linear-gradient(145deg, #46585a, #202a2b);
}

.card-art-biome {
  background:
    radial-gradient(ellipse at 35% 64%, rgba(247, 214, 141, 0.58), transparent 24%),
    radial-gradient(ellipse at 70% 42%, rgba(80, 155, 172, 0.62), transparent 28%),
    linear-gradient(145deg, #1e5361, #203d34);
}

.card-body {
  display: -webkit-box;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-footer {
  min-height: 28px;
  margin-top: 10px;
}

.response-ready,
.spot-ready {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hand-card.unplayable {
  opacity: 0.72;
}

.hand-card.response-armed {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 0 0 1px rgba(45, 107, 73, 0.28),
    0 16px 32px rgba(0, 0, 0, 0.24);
}

.action-tray {
  width: min(100%, 720px);
  align-self: center;
}

.action-tray button {
  flex: 1 1 132px;
  border-radius: 8px;
}

@media (max-width: 860px) {
  :root {
    --client-card-w: 160px;
    --client-card-h: 224px;
  }

  .lane-grid {
    grid-template-columns: 1fr;
  }

  .scene-game .fish-focus {
    width: var(--client-card-w);
    min-width: var(--client-card-w);
    height: var(--client-card-h);
    min-height: var(--client-card-h);
    max-height: var(--client-card-h);
  }
}

@media (max-height: 940px), (max-width: 860px) {
  body {
    overflow: auto;
  }

  .scene-game {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .scene-game .table-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .table-body,
  .game-column {
    overflow: visible;
  }

  .scene-game .board-stage,
  .scene-game .pond-stage,
  .scene-game .lane-area {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
  }

  .scene-game .fish-stage {
    flex: 0 0 auto;
  }

  .scene-game .lane-area-inner {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  .scene-game .table-shell {
    padding: 10px;
  }

  .table-body {
    display: block;
    margin-top: 10px;
  }

  .game-column {
    gap: 10px;
  }

  .scene-game .player-rail,
  .scene-game .pond-stage {
    margin-bottom: 10px;
  }

  .scene-game .table-stats {
    order: 3;
    flex-basis: 100%;
    justify-content: stretch;
  }

  .scene-game .table-stat {
    justify-content: center;
  }

  .pond-header,
  .match-progress {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pond-title-row {
    align-items: flex-start;
  }

  .state-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .state-pill {
    justify-content: space-between;
    min-width: 0;
  }

  .state-pill strong,
  .state-pill span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .caught-p2,
  .caught-p2 .caught-list {
    text-align: left;
    justify-content: flex-start;
  }

  .scene-game .fish-stage {
    min-height: 260px;
  }

  .log-sidebar,
  .log-sidebar.open {
    width: 100%;
    margin-top: 10px;
  }

  .sidebar-inner {
    width: 100%;
    max-height: 280px;
  }
}

/* Final cascade lock for the match screen. Keep this at EOF. */
.scene-game .game-column {
  display: grid;
  grid-template-rows: auto auto auto;
  align-items: start;
}

.scene-game .board-stage,
.scene-game .pond-stage,
.scene-game .lane-area,
.scene-game .fish-stage {
  display: block;
  flex: none;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.scene-game .lane-area-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  flex: none;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.scene-game .fish-stage {
  width: 100%;
  justify-self: stretch;
}

.scene-game .local-rail {
  position: relative;
  z-index: 2;
}

.scene-game .lane-grid {
  width: 100%;
  justify-self: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scene-game .lane-card {
  min-width: 0;
}

/* Hover zoom for hand readability. The hand rail reserves vertical room so
   enlarged cards are readable without covering the battlefield. */
.scene-game .local-rail {
  overflow: visible;
}

.scene-game .local-hand {
  overflow-x: auto;
  overflow-y: visible;
  padding-top: 118px;
  margin-top: -90px;
  padding-bottom: 24px;
}

.scene-game .local-hand .hand-card:hover,
.scene-game .local-hand .hand-card:focus-visible {
  width: 228px;
  min-width: 228px;
  height: 320px;
  min-height: 320px;
  max-height: 320px;
  z-index: 80;
  transform: translateY(-82px);
  transform-origin: center bottom;
  border-color: rgba(255, 226, 151, 0.96);
  box-shadow:
    0 0 0 2px rgba(255, 226, 151, 0.34),
    0 34px 74px rgba(0, 0, 0, 0.54);
}

.scene-game .local-hand .hand-card:hover .card-title,
.scene-game .local-hand .hand-card:focus-visible .card-title {
  white-space: normal;
  line-height: 1.06;
}

.scene-game .local-hand .hand-card:hover .card-art,
.scene-game .local-hand .hand-card:focus-visible .card-art {
  height: 64px;
}

.scene-game .local-hand .hand-card:hover .card-body,
.scene-game .local-hand .hand-card:focus-visible .card-body {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  font-size: 0.84rem;
  line-height: 1.34;
}

.scene-game .local-hand .hand-card.selected {
  z-index: 60;
  transform: translateY(-16px);
  border-color: rgba(255, 226, 151, 1);
  box-shadow:
    0 0 0 3px rgba(255, 226, 151, 0.34),
    0 22px 48px rgba(0, 0, 0, 0.42);
}

.scene-game .local-hand .hand-card.selected::after {
  box-shadow:
    inset 0 0 0 2px rgba(255, 226, 151, 0.45),
    inset 0 -18px 34px rgba(36, 28, 18, 0.08);
}
