body.table-app {
  --felt: #174c3f;
  --felt-deep: #0f332c;
  --brass: #c08a3c;
  --paper: #f4efe4;
  --panel: rgba(255, 252, 244, 0.94);
  --panel-strong: #fffaf0;
  --ink: #1c2524;
  --muted: #66706d;
  --line: rgba(34, 48, 45, 0.18);
  --danger: #b54e45;
  --blue: #256f8a;
  --plum: #7a4f8f;
  background:
    radial-gradient(circle at 18% 10%, rgba(192, 138, 60, 0.22), transparent 28%),
    linear-gradient(135deg, #efe6d1 0%, #d8e0d7 44%, #d5dddf 100%);
  height: 100vh;
  overflow: hidden;
}

.table-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  overflow: clip;
}

.table-app.game-started .table-topbar {
  display: none;
}

.table-app.session-started .table-topbar {
  display: none;
}

.table-app.game-started .table-shell {
  height: 100dvh;
  grid-template-rows: minmax(0, 1fr);
}

.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  overflow: auto;
  padding: clamp(24px, 6vw, 72px);
  background:
    radial-gradient(circle at 15% 20%, rgba(192, 138, 60, 0.24), transparent 30%),
    linear-gradient(135deg, rgba(244, 239, 228, 0.96), rgba(213, 224, 215, 0.96));
}

.table-app.session-started .launch-screen {
  display: none;
}

.launch-copy {
  max-width: 640px;
}

.launch-kicker {
  margin: 0 0 12px;
  color: #8a5a16;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.launch-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(64px, 11vw, 128px);
  line-height: 0.9;
  letter-spacing: 0;
}

.launch-copy p {
  max-width: 460px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 24px);
}

.launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.launch-actions button {
  min-height: 46px;
  padding-inline: 18px;
  font-weight: 900;
}

.sell-sheet-preview {
  margin: 24px 0 0;
  max-width: min(100%, 540px);
}

.sell-sheet-preview a {
  display: block;
  border-radius: 8px;
  outline-offset: 4px;
}

.sell-sheet-preview img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(48vh, 560px);
  border-radius: 8px;
  object-fit: contain;
  object-position: top left;
  background: #062b28;
  box-shadow: 0 18px 46px rgba(28, 37, 36, 0.2);
}

.launch-screen > img {
  width: min(100%, 420px);
  justify-self: end;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(28, 37, 36, 0.24);
}

.table-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 150px;
  gap: 8px;
  align-items: center;
  padding: 7px clamp(10px, 1.4vw, 18px);
  background: rgba(255, 250, 240, 0.92);
  border-bottom: 1px solid rgba(43, 53, 50, 0.18);
  backdrop-filter: blur(16px);
}

.box-lockup {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  color: inherit;
  text-decoration: none;
  align-items: center;
  min-width: 0;
}

.box-lockup img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(22, 28, 26, 0.18);
}

.box-lockup h1 {
  font-size: 22px;
  line-height: 1;
}

.box-lockup p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-setup {
  display: grid;
  grid-template-columns: 42px 42px 66px minmax(118px, 1fr) minmax(118px, 1fr) 56px 58px 58px 52px;
  gap: 5px;
  align-items: end;
  min-width: 0;
}

.seat-setup[hidden] {
  display: none;
}

.seat-setup label {
  font-size: 10px;
  gap: 3px;
  min-width: 0;
}

.seat-setup input,
.seat-setup button,
.seat-setup .rules-link,
.seat-setup .setup-total,
.table-online button,
.table-online input {
  min-height: 30px;
  font-size: 12px;
  border-radius: 7px;
  padding-inline: 7px;
}

.seat-setup input[type="number"] {
  width: 100%;
  padding-inline: 4px;
}

.names-field input {
  width: 100%;
}

.setup-total {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.seat-setup button,
.seat-setup .rules-link,
.seat-setup .setup-total {
  justify-self: start;
  min-width: 0;
  width: 100%;
}

.setup-total.invalid {
  color: #8e2f28;
  border-color: rgba(181, 78, 69, 0.5);
  background: #fff1ed;
}

.table-online {
  justify-items: end;
  gap: 4px;
  min-width: 0;
}

.table-online .online-copy span {
  font-size: 10px;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-online .online-actions {
  gap: 6px;
}

.table-online .online-actions {
  justify-content: flex-end;
}

.table-online button {
  width: 100%;
  min-width: 0;
  padding-inline: 8px;
}

.table-main {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 188px;
  gap: 7px;
  padding: 7px clamp(10px, 1.4vw, 18px) 8px;
  overflow: visible;
}

.table-app.game-started .table-main {
  height: 100dvh;
  grid-template-rows: minmax(0, 1fr) 216px;
  padding-top: 8px;
  padding-bottom: 0;
  align-content: stretch;
}

.table-status {
  display: none;
  grid-template-columns: 150px minmax(500px, 1fr) minmax(260px, 0.8fr);
  gap: 7px;
  margin-bottom: 0;
  min-height: 0;
}

.table-status .status-tile {
  min-height: 48px;
  padding: 8px 10px;
}

.table-status .status-tile span {
  font-size: 10px;
}

.table-status .status-tile strong {
  font-size: 24px;
}

.table-status .score-readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 3px;
  font-size: 10px;
}

.table-status .round-tile strong {
  font-size: 20px;
  line-height: 1.05;
  white-space: normal;
}

.table-status .trend-tile strong {
  font-size: 13px;
  line-height: 1.2;
}

.felt-table {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: 18px;
  padding: 12px 18px 8px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.05), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px),
    var(--felt);
  box-shadow:
    inset 0 0 0 8px #6f4a25,
    inset 0 0 0 12px #a9753a,
    0 18px 44px rgba(22, 31, 28, 0.22);
  overflow: visible;
}

.table-center {
  display: grid;
  grid-template-columns: 220px minmax(500px, 1fr) 270px;
  grid-template-rows: minmax(0, 1fr);
  gap: 6px;
  position: relative;
  z-index: 5;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.central-strip,
.tracker-row-layout,
.table-clients,
.table-market {
  background: rgba(14, 57, 47, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(7, 34, 28, 0.42);
  color: #fffaf0;
}

.central-strip {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  padding: 5px;
  min-height: 0;
  overflow: visible;
}

.table-piles {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(40px, 1fr);
  gap: 4px;
  min-height: 0;
}

.table-piles[hidden] {
  display: none;
}

.table-ledger {
  min-height: 0;
  padding: 5px;
  border-radius: 8px;
  background: rgba(11, 44, 37, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.table-ledger .zone-header {
  margin-bottom: 4px;
}

.ledger-roundline {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
  color: rgba(255, 250, 240, 0.72);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.table-ledger .zone-header h2 {
  color: #fffaf0;
}

.table-ledger .zone-header span {
  color: rgba(255, 250, 240, 0.72);
}

.table-ledger .ledger-roundline span {
  font-size: 12px;
  line-height: 1.1;
}

.table-ledger table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 3px;
  table-layout: fixed;
  color: #fffaf0;
}

.table-ledger th,
.table-ledger td {
  padding: 3px 4px;
  font-size: 9px;
  line-height: 1.1;
  text-align: right;
  background: rgba(255, 250, 240, 0.1);
}

.table-ledger thead th {
  color: rgba(255, 250, 240, 0.66);
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
  background: transparent;
}

.table-ledger th:first-child,
.table-ledger td:first-child,
.player-score-row th {
  text-align: left;
}

.player-score-row th {
  width: 46%;
  border-left: 4px solid var(--player-color);
  border-radius: 5px 0 0 5px;
  color: #fffaf0;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-score-row td {
  color: rgba(255, 250, 240, 0.88);
  font-weight: 900;
  white-space: nowrap;
}

.player-score-row.active th,
.player-score-row.active td {
  background: rgba(255, 250, 240, 0.18);
}

.player-score-row td:last-child {
  border-radius: 0 5px 5px 0;
}

.table-pile {
  min-width: 0;
  display: grid;
  gap: 3px;
  justify-items: center;
  align-content: start;
  padding: 3px;
  border-radius: 8px;
  background: rgba(11, 44, 37, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pile-card {
  width: 25px;
  aspect-ratio: 2.5 / 3.5;
  border-radius: 5px;
  background: #22302d;
  box-shadow: 0 5px 12px rgba(21, 27, 25, 0.22);
  overflow: hidden;
}

.pile-card img,
.trend-card img,
.round-tracker img,
.card-art,
.back-card-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pile-label {
  display: grid;
  gap: 1px;
  text-align: center;
  font-size: 7px;
  color: rgba(255, 250, 240, 0.72);
}

.pile-label strong {
  color: #fffaf0;
  font-size: 7px;
  line-height: 1.1;
}

.trend-card {
  display: grid;
  gap: 6px;
  padding: 5px;
  min-height: 0;
  overflow: visible;
  background: rgba(11, 44, 37, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.trend-card-shell {
  display: grid;
  gap: 3px;
  min-height: 0;
}

.rotated-card-frame,
.ceo-option.visual-founder .card-image-shell {
  position: relative;
  aspect-ratio: 1062 / 687;
  border-radius: 7px;
  background: #f2eadc;
  box-shadow: 0 7px 16px rgba(22, 30, 27, 0.2);
  overflow: hidden;
}

.rotated-card-frame .landscape-art,
.ceo-option.visual-founder .landscape-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trend-card-shell .rotated-card-frame {
  width: 100%;
  aspect-ratio: 1062 / 687;
}

.trend-caption {
  display: grid;
  gap: 2px;
  font-size: 9px;
  line-height: 1.15;
  color: #fffaf0;
}

.trend-caption span {
  color: rgba(255, 250, 240, 0.72);
}

.founder-trend-caption span:first-child {
  color: rgba(255, 250, 240, 0.6);
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.tracker-row-layout {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  padding: 5px;
  min-height: 0;
  overflow: visible;
}

.table-tracker {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 4px;
  min-height: 0;
  overflow: visible;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(11, 44, 37, 0.7);
}

.table-tracker .tracker-header {
  display: block;
  margin-bottom: 4px;
}

.table-tracker #hype-tracker {
  height: 100%;
  min-height: 0;
}

.hype-summary-table {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(8, 32, 27, 0.72);
}

.hype-summary-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 3px;
  table-layout: fixed;
  color: #fffaf0;
}

.hype-summary-table th,
.hype-summary-table td {
  padding: 4px 5px;
  font-size: 9px;
  line-height: 1.1;
  text-align: right;
  background: rgba(255, 250, 240, 0.1);
  white-space: nowrap;
}

.hype-summary-table thead th {
  color: rgba(255, 250, 240, 0.68);
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
  background: transparent;
}

.hype-summary-table th:first-child,
.hype-summary-table td:first-child,
.hype-summary-row th {
  text-align: left;
}

.hype-summary-row th {
  border-left: 4px solid var(--player-color);
  border-radius: 5px 0 0 5px;
  color: #fffaf0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hype-summary-row td {
  color: rgba(255, 250, 240, 0.9);
  font-weight: 900;
}

.hype-summary-row td:last-child {
  border-radius: 0 5px 5px 0;
}

.hype-summary-row.active th,
.hype-summary-row.active td {
  background: rgba(255, 250, 240, 0.18);
}

.hype-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.hype-chip b {
  width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: var(--player-color);
  color: white;
  font-size: 8px;
}

.hype-mat {
  position: relative;
  width: 100%;
  min-height: 110px;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 32, 27, 0.8);
}

.hype-mat > img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
  display: block;
}

.hype-tokens {
  position: absolute;
  inset: 0;
}

.hype-token-stack {
  position: absolute;
  min-width: 20px;
  min-height: 20px;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: flex-start;
  border-radius: 5px;
  padding: 2px;
  background: rgba(255, 250, 240, 0.9);
  color: var(--player-color);
  font-weight: 900;
  border: 1px solid var(--player-color);
  box-shadow: 0 4px 10px rgba(16, 22, 20, 0.2);
}

.hype-token-stack.active {
  outline: 2px solid var(--brass);
}

.round-tracker {
  display: none;
}

.round-marker {
  position: absolute;
  bottom: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  box-shadow: 0 0 0 3px white, 0 8px 16px rgba(0, 0, 0, 0.22);
}

.table-clients,
.table-market {
  padding: 6px;
  min-height: 0;
  overflow: visible;
}

.table-clients {
  grid-column: 3;
  grid-row: 1;
}

.table-market {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 4px;
}

.table-market .zone-header h2,
.table-clients .zone-header h2,
.market-subheader h2 {
  color: #fffaf0;
}

.table-market .zone-header span,
.table-clients .zone-header span,
.market-subheader span {
  color: rgba(255, 250, 240, 0.72);
}

.table-clients .client-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 4px;
  height: calc(100% - 38px);
}

.table-market .market-grid {
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  align-items: start;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 5px;
  min-height: 0;
  overflow: visible;
}

.table-market .empty-state {
  grid-column: 1 / -1;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: rgba(11, 44, 37, 0.72);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 250, 240, 0.82);
}

.table-market .visual-card {
  --card-hover-scale: 2.65;
  min-height: 0;
  height: auto;
  overflow: visible;
}

.employee-card.visual-card,
.employee-card.visual-card.c-suite-card {
  grid-template-rows: auto;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.table-market .visual-card .quick-card-info {
  display: none;
}

.table-market .visual-card .quick-card-info strong,
.table-market .visual-card .quick-card-info span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-market .c-suite-grid {
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  align-items: start;
  overflow: visible;
}

.table-market .c-suite-grid .visual-card {
  position: relative;
  width: auto;
  min-height: 0;
  height: auto;
  gap: 3px;
  align-self: start;
  overflow: visible;
}

.table-market .c-suite-grid .card-image-shell {
  width: auto;
  justify-self: stretch;
}

.table-market .c-suite-grid .quick-card-info {
  display: none;
  min-height: 20px;
}

.table-market .c-suite-grid .quick-card-info strong,
.table-market .c-suite-grid .quick-card-info span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-market .c-suite-grid .card-actions {
  position: relative;
  left: auto;
  top: auto;
  z-index: 80;
  width: auto;
  display: grid;
  align-content: start;
  transform: none;
}

.table-market .c-suite-grid .card-actions button {
  height: 66px;
  max-height: none;
  min-height: 66px;
  padding: 0 12px;
  font-size: 30px;
  line-height: 1;
  overflow: visible;
  white-space: nowrap;
}

.visual-card,
.visual-client,
.ceo-option.visual-founder {
  --card-hover-scale: 2.65;
  position: relative;
  display: grid;
  gap: 3px;
  align-content: start;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  transform-origin: center bottom;
}

.card-image-shell {
  position: relative;
  aspect-ratio: 2.5 / 3.5;
  border-radius: 7px;
  background: #f2eadc;
  box-shadow: 0 5px 12px rgba(15, 24, 21, 0.22);
  overflow: hidden;
}

.visual-card .card-image-shell,
.visual-client .card-image-shell {
  min-height: 0;
}

.visual-card .card-image-shell {
  aspect-ratio: 687 / 1062;
}

.visual-client .card-image-shell {
  aspect-ratio: 2.5 / 3.5;
}

.visual-card .card-art,
.visual-client .card-art {
  border-radius: 7px;
}

.visual-card:has(.card-image-shell:hover),
.visual-card:has(.card-image-shell:focus-visible),
.visual-client:has(.card-image-shell:hover),
.ceo-option.visual-founder:has(.card-image-shell:hover) {
  z-index: 1300;
}

.visual-card .card-image-shell:hover,
.visual-card .card-image-shell:focus-visible,
.visual-client .card-image-shell:hover,
.ceo-option.visual-founder .card-image-shell:hover,
.rotated-card-frame:hover {
  position: relative;
  z-index: 1300;
  transform: translate(var(--card-hover-shift-x, 0px), var(--card-hover-shift-y, 0px)) scale(var(--card-hover-effective-scale, var(--card-hover-scale, 2.65)));
  transform-origin: center center;
  box-shadow: 0 26px 70px rgba(7, 17, 14, 0.34);
}

.visual-card .card-image-shell,
.visual-client .card-image-shell,
.ceo-option.visual-founder .card-image-shell,
.rotated-card-frame {
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.hand-grid .visual-card .card-image-shell:hover,
.hand-grid .visual-card .card-image-shell:focus-visible {
  transform-origin: center center;
}

.market-grid .visual-card .card-image-shell:hover {
  transform-origin: center center;
}

.client-grid .visual-client .card-image-shell:hover,
.trend-card-shell .rotated-card-frame:hover {
  transform-origin: center center;
}

.visual-card.hover-expanded,
.visual-card:focus-within,
.visual-client.hover-expanded,
.visual-client:focus-within,
.ceo-option.visual-founder.hover-expanded,
.ceo-option.visual-founder:focus-within,
.trend-card-shell.hover-expanded {
  z-index: 1300;
}

.visual-card.hover-expanded .card-image-shell,
.visual-card:focus-within .card-image-shell,
.visual-client.hover-expanded .card-image-shell,
.visual-client:focus-within .card-image-shell,
.ceo-option.visual-founder.hover-expanded .card-image-shell,
.ceo-option.visual-founder:focus-within .card-image-shell,
.trend-card-shell.hover-expanded .rotated-card-frame {
  position: relative;
  z-index: 1300;
  transform: translate(var(--card-hover-shift-x, 0px), var(--card-hover-shift-y, 0px)) scale(var(--card-hover-effective-scale, var(--card-hover-scale, 2.65)));
  transform-origin: center center;
  box-shadow: 0 26px 70px rgba(7, 17, 14, 0.34);
}

.visual-client.hover-expanded .client-actions,
.visual-client:focus-within .client-actions,
.ceo-option.visual-founder.hover-expanded button,
.ceo-option.visual-founder:focus-within button {
  position: relative;
  z-index: 1350;
}

.card-token-board {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 28px;
  z-index: 3;
  display: grid;
  gap: 2px;
  padding: 4px;
  border-radius: 6px;
  background: rgba(255, 250, 240, 0.82);
  box-shadow: 0 5px 12px rgba(11, 18, 16, 0.18);
}

.player-token-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 3px;
  align-items: center;
  min-height: 8px;
}

.player-token-row b {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: var(--player-color);
  color: white;
  font-size: 8px;
  line-height: 1;
}

.token-square-group,
.token-square-line {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  min-width: 0;
}

.player-square {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 1px;
  background: var(--player-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.square-overflow {
  min-width: 14px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: var(--player-color);
  color: white;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.card-text-fallback {
  display: none;
  position: absolute;
  inset: 0;
  padding: 8px;
  background: linear-gradient(#fffaf0, #efe0bf);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.25;
}

.missing-art .card-text-fallback {
  display: grid;
  gap: 5px;
}

.quick-card-info {
  min-height: 20px;
  display: grid;
  gap: 1px;
  font-size: 9px;
  line-height: 1.2;
  color: var(--muted);
}

.table-hand .quick-card-info {
  min-height: 14px;
  font-size: 8px;
  line-height: 1.1;
}

.table-hand .quick-card-info strong {
  font-size: 8px;
}

.quick-card-info strong {
  color: var(--ink);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visual-card .card-actions {
  position: absolute;
  left: calc(50% + var(--card-hover-shift-x, 0px));
  top: var(--card-action-top, calc(100% + 4px));
  z-index: 1350;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: var(--card-action-width, 140%);
  min-width: 180px;
  max-width: 380px;
  padding: 8px;
  border-radius: 7px;
  background: rgba(255, 250, 240, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(8, 18, 16, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.visual-client .client-actions {
  position: absolute;
  left: calc(50% + var(--card-hover-shift-x, 0px));
  top: var(--card-action-top, calc(100% + 4px));
  z-index: 1350;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: var(--card-action-width, 140%);
  min-width: 180px;
  max-width: 380px;
  padding: 8px;
  border-radius: 7px;
  background: rgba(255, 250, 240, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(8, 18, 16, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.visual-card .card-actions button,
.visual-client .client-actions button {
  min-height: 66px;
  padding: 0 12px;
  font-size: 30px;
  line-height: 1;
  border-radius: 8px;
}

.visual-card.hover-expanded .card-actions,
.visual-card:focus-within .card-actions {
  position: absolute;
  left: calc(50% + var(--card-hover-shift-x, 0px));
  top: var(--card-action-top, calc(100% + 4px));
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.visual-client.hover-expanded .client-actions,
.visual-client:focus-within .client-actions {
  position: absolute;
  left: calc(50% + var(--card-hover-shift-x, 0px));
  top: var(--card-action-top, calc(100% + 4px));
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.visual-card.hover-expanded::before,
.visual-client.hover-expanded::before {
  content: "";
  position: absolute;
  left: calc(50% + var(--card-hover-shift-x, 0px));
  top: 0;
  z-index: 1340;
  width: var(--card-action-width, 150%);
  height: calc(var(--card-action-top, 100%) + 240px);
  transform: translateX(-50%);
  background: transparent;
  pointer-events: auto;
}

.visual-card.hover-expanded .card-image-shell,
.visual-client.hover-expanded .card-image-shell {
  pointer-events: none;
}

.table-market .c-suite-grid .card-actions {
  position: absolute;
  left: calc(50% + var(--card-hover-shift-x, 0px));
  top: var(--card-action-top, calc(100% + 4px));
  z-index: 1350;
  width: var(--card-action-width, 140%);
  transform: translate(-50%, -3px);
}

.table-market .c-suite-grid .visual-card.hover-expanded .card-actions,
.table-market .c-suite-grid .visual-card:focus-within .card-actions {
  transform: translate(-50%, 0);
}

.visual-card.played .card-image-shell {
  filter: saturate(0.7) brightness(0.82);
}

.visual-card.played::after {
  content: "Played";
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(22, 76, 63, 0.9);
  color: white;
  font-size: 10px;
  font-weight: 900;
  z-index: 2;
}

.visual-client {
  --card-hover-scale: 3;
  background: rgba(11, 44, 37, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 3px;
  min-height: 0;
  gap: 2px;
}

.table-clients .visual-client .card-image-shell {
  width: 108px;
  max-width: 100%;
  justify-self: center;
}

.table-clients .visual-client .card-image-shell:hover {
  transform: translate(var(--card-hover-shift-x, 0px), var(--card-hover-shift-y, 0px)) scale(var(--card-hover-scale, 3));
}

.visual-client.can-close .card-image-shell {
  box-shadow:
    0 0 0 2px rgba(245, 204, 80, 0.95),
    0 0 24px rgba(245, 204, 80, 0.72),
    0 5px 12px rgba(15, 24, 21, 0.22);
}

.visual-client.can-close.hover-expanded .card-image-shell,
.visual-client.can-close .card-image-shell:hover {
  box-shadow:
    0 0 0 3px rgba(255, 218, 92, 0.98),
    0 0 46px rgba(255, 218, 92, 0.82),
    0 26px 70px rgba(7, 17, 14, 0.34);
}

.table-clients .visual-client .card-token-board {
  left: 3px;
  right: 3px;
  bottom: 17px;
  gap: 1px;
  padding: 2px;
  border-radius: 4px;
}

.table-clients .visual-client .player-token-row {
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 2px;
}

.table-clients .visual-client .player-token-row b {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  font-size: 6px;
}

.table-clients .visual-client .player-square {
  width: 5px;
  height: 5px;
}

.client-overlay {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(255, 250, 240, 0.9);
  color: var(--ink);
  font-size: 9px;
  line-height: 1;
}

.table-clients .visual-client .client-overlay {
  left: 3px;
  right: 3px;
  bottom: 3px;
  padding: 2px 3px;
  font-size: 7px;
}

.client-requirements {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.table-clients .visual-client .client-requirements {
  position: relative;
  z-index: 80;
  justify-content: center;
  gap: 2px;
}

.client-interest-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 3px;
  font-size: 9px;
}

.client-interest-list span {
  display: flex;
  gap: 3px;
  align-items: center;
  border-left: 3px solid var(--player-color, var(--blue));
  padding-left: 3px;
  color: var(--muted);
}

.client-interest-list .active {
  color: var(--ink);
  font-weight: 800;
}

.client-interest-list em {
  margin-left: auto;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.client-special {
  font-size: 9px;
  line-height: 1.25;
  color: var(--muted);
}

.table-clients .visual-client .client-special,
.table-clients .visual-client .client-interest-list {
  display: none;
}

.client-interest-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 2px;
  table-layout: fixed;
}

.client-interest-table th,
.client-interest-table td {
  padding: 3px 4px;
  font-size: 9px;
  line-height: 1.1;
  background: rgba(255, 250, 240, 0.82);
  color: var(--ink);
}

.client-interest-table th {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  text-align: left;
  border-left: 3px solid var(--player-color);
  border-radius: 4px 0 0 4px;
}

.client-interest-table th b {
  width: 11px;
  height: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--player-color);
  color: #fff;
  font-size: 7px;
}

.client-interest-table th span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-interest-table td {
  width: 48px;
  text-align: right;
  font-weight: 900;
  font-size: 14px;
  border-radius: 0 4px 4px 0;
}

.client-interest-table .active th,
.client-interest-table .active td {
  background: rgba(255, 250, 240, 0.96);
}

.resource-chip {
  min-height: 16px;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 9px;
  cursor: help;
}

.table-clients .visual-client .resource-chip {
  min-height: 16px;
  padding: 1px 4px;
  font-size: 8px;
}

.table-clients .visual-client .client-actions {
  gap: 6px;
}

.table-clients .visual-client .client-actions button {
  min-height: 66px;
  padding: 0 12px;
  font-size: 30px;
  line-height: 1;
  border-radius: 8px;
  background: #d8d9d1;
  color: #5c635f;
  border-color: rgba(38, 48, 45, 0.16);
  opacity: 0.78;
}

.table-clients .visual-client .client-actions button.is-selectable {
  background: #f2d56a;
  color: #3f3510;
  border-color: rgba(156, 119, 22, 0.46);
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(255, 236, 135, 0.45);
}

.hype-token-stack > b {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: var(--player-color);
  color: white;
  font-size: 8px;
  line-height: 1;
}

.hype-token-stack .token-square-group {
  max-width: 58px;
}

.term,
[data-tooltip] {
  position: relative;
  cursor: help;
  text-decoration: underline dotted rgba(30, 48, 44, 0.45);
  text-underline-offset: 2px;
}

.term:hover::after,
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 200;
  width: min(260px, 72vw);
  padding: 8px 10px;
  border-radius: 7px;
  background: #17211f;
  color: #fffaf0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  text-align: left;
  box-shadow: 0 12px 30px rgba(12, 18, 16, 0.28);
  pointer-events: none;
}

.term:hover::before,
[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #17211f;
  z-index: 201;
}

.table-seats {
  position: absolute;
  inset: 10px 14px auto 14px;
  pointer-events: none;
  z-index: 18;
}

.player-seat {
  pointer-events: auto;
  position: absolute;
  width: min(430px, 48vw);
  min-width: 360px;
  display: grid;
  grid-template-columns: minmax(104px, 1fr) 64px 72px auto;
  gap: 5px;
  align-items: center;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  border: 2px solid var(--player-color);
  box-shadow: 0 14px 34px rgba(4, 20, 16, 0.22);
}

.seat-top {
  top: 0;
  left: 50%;
  height: 56px;
  transform: translateX(-50%);
}

.seat-left {
  top: 46%;
  left: 0;
  transform: translateY(-50%);
}

.seat-right {
  top: 46%;
  right: 0;
  transform: translateY(-50%);
}

.seat-bottom {
  display: none;
}

.table-app.game-started .seat-top {
  display: none;
}

.seat-header,
.seat-resources {
  display: grid;
  gap: 1px;
  align-items: center;
}

.seat-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.seat-header strong,
.seat-header em {
  grid-column: 1 / -1;
}

.seat-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-header span,
.seat-header em,
.seat-founder {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  font-style: normal;
}

.seat-hand {
  position: relative;
  min-height: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px;
  align-items: center;
  padding-left: 0;
}

.seat-count > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.seat-count > strong {
  color: var(--ink);
  font-size: 15px;
}

.seat-count > em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.back-card-mini {
  width: 18px;
  aspect-ratio: 2.5 / 3.5;
  margin-left: calc(var(--fan) * -11px);
  border-radius: 5px;
  box-shadow: 0 8px 16px rgba(11, 18, 16, 0.24);
  overflow: hidden;
}

.seat-active-note {
  color: var(--muted);
  font-weight: 900;
}

.seat-piles {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 3px;
}

.seat-piles .table-pile {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.seat-piles .pile-card {
  width: 18px;
}

.seat-piles .pile-label strong {
  display: none;
}

.seat-piles .pile-label {
  font-size: 8px;
  color: var(--muted);
}

.seat-resources span {
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.player-seat .seat-resources {
  grid-template-columns: repeat(3, auto);
  gap: 5px;
}

.seat-left,
.seat-right {
  width: 250px;
  min-width: 250px;
  grid-template-columns: 1fr;
}

.player-console {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 106px;
  gap: 7px;
  margin-top: 0;
  align-items: stretch;
  min-height: 0;
  overflow: visible;
}

.table-active {
  order: 1;
}

.table-actions {
  order: 3;
}

.table-hand {
  order: 2;
}

.table-active,
.table-hand,
.table-actions,
.table-log {
  background: var(--panel);
}

.table-active,
.table-hand {
  padding: 8px;
  min-height: 0;
  overflow: visible;
}

.table-active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
}

.table-active > span,
.zone-header span,
.market-subheader span {
  font-size: 9px;
}

.table-active > strong,
.zone-header h2,
.market-subheader h2 {
  font-size: 15px;
  line-height: 1.1;
}

.table-active p,
.zone-header p,
#manual-note {
  font-size: 10px;
  line-height: 1.25;
}

.table-active p {
  display: none;
}

.table-active .turn-counters {
  display: none;
  order: 5;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-top: 4px;
}

.table-active .turn-counter {
  --ability-color: #2f7d63;
  min-height: 29px;
  height: 29px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  align-items: center;
  padding: 4px 6px;
  border-left: 5px solid var(--ability-color);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
}

.table-active .turn-counter.plays { --ability-color: #2f7d63; }
.table-active .turn-counter.hires { --ability-color: #b86f12; }
.table-active .turn-counter.interest { --ability-color: #86510f; }
.table-active .turn-counter.sales { --ability-color: #7a3327; }
.table-active .turn-counter.quality { --ability-color: #235d69; }
.table-active .turn-counter.promote { --ability-color: #594789; }
.table-active .turn-counter.fire { --ability-color: #b84b3d; }

.table-active .turn-counters span {
  font-size: 8px;
  color: #495552;
}

.table-active .turn-counter strong {
  font-size: 16px;
  color: var(--ability-color);
}

.table-active .deck-grid {
  display: none;
}

.table-active .resource-grid {
  order: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(31px, 1fr);
  gap: 3px;
  margin-top: 7px;
  min-height: 0;
}

.table-active .resource-card.actions {
  border-left: 5px solid #2f7d63;
  background: #f4fff9;
}

.table-active .resource-card.hires {
  border-left: 5px solid #b86f12;
  background: #fff8ed;
}

.table-active .resource-card.money {
  min-height: 31px;
  height: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-left: 5px solid #1f7a55;
  background: #f5fff9;
}

.table-active .resource-card.widgets {
  border-left: 5px solid #2a7d87;
  background: #f3fcff;
}

.table-active .resource-card.promote {
  border-left: 5px solid #594789;
  background: #f8f4ff;
}

.table-active .resource-card.fire {
  border-left: 5px solid #b84b3d;
  background: #fff6f3;
}

.table-active .resource-card.interest {
  border-left: 5px solid #86510f;
  background: #fff8ed;
}

.table-active .resource-card.sales {
  border-left: 5px solid #7a3327;
  background: #fff5f2;
}

.table-active .resource-card.quality {
  border-left: 5px solid #235d69;
  background: #f3fcff;
}

.table-active .resource-card,
.table-active .deck-count {
  min-height: 31px;
  height: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 5px 7px;
}

.table-active .resource-card span,
.table-active .deck-count span {
  font-size: 8.5px;
}

.table-active .resource-card strong,
.table-active .deck-count strong {
  font-size: 17px;
}

.table-active .resource-card.money strong {
  font-size: 16px;
  color: #1f5e4a;
}

.table-active .resource-card.widgets strong {
  color: #235d69;
}

.table-active .resource-card.actions strong {
  color: #2f7d63;
}

.table-active .resource-card.hires strong {
  color: #b86f12;
}

.table-active .resource-card.promote strong {
  color: #594789;
}

.table-active .resource-card.fire strong {
  color: #b84b3d;
}

.table-active .resource-card.interest strong {
  color: #86510f;
}

.table-active .resource-card.sales strong {
  color: #7a3327;
}

.table-active .resource-card.quality strong {
  color: #235d69;
}

.table-active .resource-card[data-tooltip] {
  text-decoration: none;
}

.table-active .resource-card.money,
.table-active .resource-card.widgets {
  margin-top: 5px;
}

.table-hand .hand-grid {
  grid-template-columns: repeat(auto-fit, minmax(126px, 132px));
  justify-content: center;
  min-height: 0;
  max-height: 184px;
  overflow: visible;
  gap: 5px;
}

.table-hand .visual-card {
  --card-hover-scale: 2.65;
  gap: 3px;
  min-height: 0;
  height: auto;
  align-self: start;
}

.table-hand .visual-card .card-image-shell {
  width: auto;
  justify-self: stretch;
}

.table-hand .visual-card .card-actions button {
  height: 66px;
  max-height: none;
  min-height: 66px;
  font-size: 30px;
  padding: 0 12px;
  line-height: 1;
}

.table-hand .visual-card .card-actions {
  gap: 6px;
  justify-content: stretch;
  align-self: start;
  justify-self: stretch;
}

.table-hand .quick-card-info {
  display: none;
}

.table-hand .visual-card .card-actions button {
  width: auto;
  min-width: 0;
  font-size: 30px;
}

.table-actions {
  position: relative;
  z-index: 120;
  display: grid;
  gap: 5px;
  align-content: start;
  align-self: end;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.table-actions > button {
  min-height: 34px;
  padding-inline: 8px;
}

.table-actions #end-turn {
  order: 1;
}

.table-actions [data-open-rules] {
  order: 2;
}

.table-actions #toggle-manual {
  order: 3;
}

.table-actions #toggle-interface {
  order: 4;
}

.table-actions .manual-details {
  order: 5;
}

.table-actions #new-game {
  order: 6;
  margin-top: 2px;
}

.table-actions #toggle-interface[aria-pressed="true"] {
  background: #17211f;
  color: #fffaf0;
  border-color: rgba(255, 250, 240, 0.28);
}

.table-app.text-only .box-lockup {
  grid-template-columns: minmax(0, 1fr);
}

.table-app.text-only .box-lockup img,
.table-app.text-only .card-image-shell,
.table-app.text-only .rotated-card-frame,
.table-app.text-only .pile-card,
.table-app.text-only .back-card-mini,
.table-app.text-only .final-deck-art {
  display: none;
}

.table-app.text-only .felt-table {
  background: #f1efe6;
  border: 1px solid rgba(34, 48, 45, 0.18);
  box-shadow: 0 14px 34px rgba(22, 31, 28, 0.14);
  overflow: hidden;
}

.table-app.text-only .central-strip,
.table-app.text-only .table-clients,
.table-app.text-only .table-market,
.table-app.text-only .table-tracker {
  background: #fbfcf9;
  color: var(--ink);
  border-color: rgba(34, 48, 45, 0.18);
  box-shadow: none;
  overflow: hidden;
}

.table-app.text-only .table-market .zone-header h2,
.table-app.text-only .table-clients .zone-header h2,
.table-app.text-only .market-subheader h2,
.table-app.text-only .trend-caption,
.table-app.text-only .trend-caption strong {
  color: var(--ink);
}

.table-app.text-only .table-market .zone-header span,
.table-app.text-only .table-clients .zone-header span,
.table-app.text-only .market-subheader span,
.table-app.text-only .trend-caption span {
  color: var(--muted);
}

.table-app.text-only .table-market .market-grid,
.table-app.text-only .table-hand .hand-grid {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  justify-content: stretch;
  align-content: start;
  overflow: auto;
}

.table-app.text-only #hire-pool.market-grid,
.table-app.text-only #c-suite-pool.market-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  overflow: visible;
}

.table-app.text-only #hire-pool .employee-card,
.table-app.text-only #c-suite-pool .employee-card {
  min-width: 0;
}

.table-app.text-only #hire-pool .card-top,
.table-app.text-only #c-suite-pool .card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 6px 6px 4px;
}

.table-app.text-only #hire-pool .card-top h3,
.table-app.text-only #c-suite-pool .card-top h3 {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.table-app.text-only #hire-pool .cost-pill,
.table-app.text-only #c-suite-pool .cost-pill {
  min-width: 0;
  justify-self: start;
  padding: 3px 6px;
  font-size: 9px;
}

.table-app.text-only #hire-pool .card-stats,
.table-app.text-only #c-suite-pool .card-stats {
  padding: 5px 6px 0;
  gap: 3px;
}

.table-app.text-only #hire-pool .stat-chip,
.table-app.text-only #hire-pool .stock-pill,
.table-app.text-only #c-suite-pool .stat-chip,
.table-app.text-only #c-suite-pool .stock-pill {
  padding: 2px 5px;
  font-size: 8px;
}

.table-app.text-only #hire-pool .card-fill,
.table-app.text-only #hire-pool .department-line,
.table-app.text-only #hire-pool .trait-line,
.table-app.text-only #c-suite-pool .card-fill,
.table-app.text-only #c-suite-pool .department-line,
.table-app.text-only #c-suite-pool .trait-line {
  padding-left: 6px;
  padding-right: 6px;
}

.table-app.text-only #hire-pool .special-text,
.table-app.text-only #hire-pool .department,
.table-app.text-only #hire-pool .trait,
.table-app.text-only #c-suite-pool .special-text,
.table-app.text-only #c-suite-pool .department,
.table-app.text-only #c-suite-pool .trait {
  font-size: 9px;
  line-height: 1.18;
}

.table-app.text-only #hire-pool .card-actions,
.table-app.text-only #c-suite-pool .card-actions {
  padding: 5px 6px;
}

.table-app.text-only #hire-pool .card-actions button,
.table-app.text-only #c-suite-pool .card-actions button {
  min-height: 28px;
  padding: 0 5px;
  font-size: 10px;
}

.table-app.text-only .table-clients .client-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-auto-rows: auto;
  align-content: start;
  overflow: auto;
}

.table-app.text-only .employee-card,
.table-app.text-only .client-card,
.table-app.text-only .ceo-option {
  min-height: 0;
  background: #fffaf0;
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(18, 24, 22, 0.08);
}

.table-app.text-only .employee-card {
  grid-template-rows: auto auto auto auto auto auto;
}

.table-app.text-only .client-card {
  grid-template-columns: minmax(0, 1fr) minmax(82px, 0.72fr);
  grid-template-areas:
    "title interest"
    "requirements interest"
    "special interest"
    "actions actions";
  align-items: start;
  gap: 6px 8px;
  padding: 8px;
}

.table-app.text-only .client-card h3 {
  grid-area: title;
}

.table-app.text-only .client-requirements {
  grid-area: requirements;
}

.table-app.text-only .client-special {
  grid-area: special;
  margin: 0;
}

.table-app.text-only .client-interest-list {
  grid-area: interest;
  align-self: stretch;
  grid-template-columns: 1fr;
  gap: 4px;
}

.table-app.text-only .client-interest-list span {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 4px 5px;
  font-size: 10px;
}

.table-app.text-only .client-interest-list b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-app.text-only .client-actions {
  grid-area: actions;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-app.text-only .card-top {
  padding: 7px 8px 5px;
}

.table-app.text-only .card-top h3,
.table-app.text-only .client-card h3 {
  font-size: 13px;
}

.table-app.text-only .cost-pill,
.table-app.text-only .stat-chip,
.table-app.text-only .stock-pill,
.table-app.text-only .resource-chip {
  font-size: 10px;
}

.table-app.text-only .card-stats {
  min-height: 0;
  padding: 6px 8px 0;
  gap: 4px;
}

.table-app.text-only .card-fill {
  min-height: 0;
  padding: 0 8px;
}

.table-app.text-only .special-text,
.table-app.text-only .client-special {
  font-size: 11px;
  line-height: 1.25;
}

.table-app.text-only .department-line,
.table-app.text-only .trait-line {
  min-height: 0;
  padding: 0 8px 5px;
}

.table-app.text-only .card-actions,
.table-app.text-only .client-actions {
  position: static;
  left: auto;
  top: auto;
  width: auto;
  min-width: 0;
  max-width: none;
  display: grid;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  box-shadow: none;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.table-app.text-only .card-actions button,
.table-app.text-only .client-actions button,
.table-app.text-only .table-clients .visual-client .client-actions button,
.table-app.text-only .table-hand .visual-card .card-actions button,
.table-app.text-only .table-market .c-suite-grid .card-actions button {
  min-height: 30px;
  height: auto;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1.1;
}

.table-app.text-only .text-table-card {
  display: grid;
  gap: 5px;
  padding: 9px;
  border-radius: 8px;
  background: #fffaf0;
  border: 1px solid rgba(34, 48, 45, 0.18);
  color: var(--ink);
}

.table-app.text-only .text-table-card > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.table-app.text-only .text-table-card strong {
  font-size: 14px;
  line-height: 1.1;
}

.table-app.text-only .text-table-card p {
  margin: 0;
  color: #4c5955;
  font-size: 11px;
  line-height: 1.25;
}

.table-app.text-only .hype-summary-table {
  background: #fffaf0;
  border: 1px solid rgba(34, 48, 45, 0.14);
}

.table-app.text-only .hype-summary-table table {
  color: var(--ink);
}

.table-app.text-only .hype-summary-table th,
.table-app.text-only .hype-summary-table td {
  background: rgba(23, 76, 63, 0.06);
  color: var(--ink);
}

.table-app.text-only .hype-summary-table thead th {
  color: var(--muted);
  background: transparent;
}

.table-app.text-only .hype-summary-row th {
  color: var(--ink);
}

.table-app.text-only .player-seat {
  background: #fffaf0;
  box-shadow: 0 8px 18px rgba(4, 20, 16, 0.14);
}

.text-seat-pile {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 3px;
  border: 1px solid rgba(34, 48, 45, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
}

.text-seat-pile span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.choice-text-card-option {
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
}

.choice-text-card-option strong {
  font-size: 15px;
  line-height: 1.12;
}

.choice-text-card-option span,
.choice-text-card-option em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.choice-text-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.table-app.text-only .final-deck-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.table-app.text-only .final-deck-card p {
  margin: 0;
  color: #4c5955;
  font-size: 11px;
  line-height: 1.25;
}

.manual-command-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 6px;
}

.manual-command-grid button {
  min-height: 24px;
  padding: 0 6px;
  font-size: 11px;
}

.manual-details summary {
  min-height: 26px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.manual-details[hidden] {
  display: none;
}

.manual-details .adjust-grid {
  margin-top: 6px;
}

.manual-details[open] .adjust-grid {
  position: absolute;
  right: 0;
  bottom: 38px;
  z-index: 110;
  width: 214px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 18px 42px rgba(12, 21, 19, 0.2);
}

.manual-details[open] .adjust-row {
  grid-template-columns: minmax(70px, 1fr) 28px 28px;
  gap: 4px;
}

.manual-details[open] .adjust-row span {
  font-size: 10px;
}

.manual-details[open] .adjust-row button {
  min-height: 22px;
  font-size: 10px;
}

.table-log {
  position: fixed;
  right: 126px;
  bottom: 12px;
  z-index: 700;
  width: min(300px, 28vw);
  max-height: 138px;
  margin-top: 0;
  padding: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(6, 14, 12, 0.2);
}

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.log-header .utility-toggle {
  flex: 0 0 auto;
  margin-left: auto;
}

.utility-toggle {
  position: relative;
  z-index: 130;
  min-height: 24px;
  padding: 0 7px;
  font-size: 10px;
}

.table-log.collapsed {
  display: none;
}

.table-log h2 {
  font-size: 13px;
  margin-bottom: 4px;
}

.table-log #game-log {
  max-height: 96px;
  overflow: hidden;
}

.table-log .log-entry {
  padding: 3px 0;
  font-size: 10px;
  line-height: 1.25;
}

.table-draft {
  position: fixed;
  left: 50%;
  top: 26px;
  z-index: 720;
  width: min(1220px, calc(100vw - 32px));
  max-height: calc(100vh - 52px);
  margin-bottom: 0;
  transform: translateX(-50%);
  overflow: visible;
}

.table-draft .draft-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
  overflow: visible;
}

.ceo-option.visual-founder {
  --card-hover-scale: 1.8;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow: visible;
}

.ceo-option.visual-founder:has(.card-image-shell:hover) {
  z-index: 1300;
}

.ceo-option.visual-founder .card-image-shell {
  width: min(315px, 100%);
  justify-self: center;
}

.ceo-option.visual-founder .card-image-shell:hover {
  transform-origin: center center;
}

.ceo-option.visual-founder h3 {
  font-size: 22px;
}

.ceo-option.visual-founder p {
  font-size: 14px;
  line-height: 1.3;
}

.ceo-option.visual-founder button {
  min-height: 42px;
  font-size: 14px;
}

.flight-card {
  position: fixed;
  z-index: 500;
  pointer-events: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  transition: transform 620ms cubic-bezier(0.19, 1, 0.22, 1), opacity 620ms ease;
  will-change: transform, opacity;
}

.flight-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.toast-host {
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(560px, calc(100% - 40px));
  pointer-events: none;
}

.event-toast {
  justify-self: center;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(23, 33, 31, 0.92);
  color: #fffaf0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: 0 18px 36px rgba(5, 14, 12, 0.28);
}

.event-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.rules-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 18, 16, 0.58);
  backdrop-filter: blur(8px);
}

.rules-modal[hidden] {
  display: none;
}

.table-app .choice-modal {
  z-index: 2200;
  background: rgba(10, 18, 16, 0.58);
}

.table-app .choice-dialog {
  width: min(920px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 36px));
  background: #fffaf0;
}

.table-app .choice-dialog:has(.choice-card-option.hover-expanded),
.table-app .choice-dialog:has(.choice-card-thumb:hover) {
  overflow: visible;
}

.table-app .choice-options {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: stretch;
  overflow: visible;
}

.table-app .choice-options button {
  text-align: center;
}

.table-app .choice-card-option {
  --card-hover-scale: 2.65;
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, auto) auto;
  gap: 8px;
  align-content: start;
  justify-items: stretch;
  min-height: 0;
  padding: 8px;
  border-radius: 8px;
  overflow: visible;
  text-align: left;
}

.table-app .choice-card-option:has(.choice-card-thumb:hover) {
  z-index: 30;
}

.table-app .choice-card-option.hover-expanded {
  z-index: 40;
}

.table-app .choice-card-thumb {
  display: block;
  width: min(100%, 150px);
  justify-self: center;
  aspect-ratio: 687 / 1062;
  border-radius: 7px;
  overflow: hidden;
  background: #efe2c5;
  box-shadow: 0 10px 24px rgba(18, 24, 22, 0.18);
  cursor: zoom-in;
  transform-origin: center center;
  transition: transform 150ms ease, box-shadow 150ms ease;
  will-change: transform;
}

.table-app .choice-card-thumb:hover,
.table-app .choice-card-option.hover-expanded .choice-card-thumb {
  position: relative;
  z-index: 31;
  transform: translate(var(--card-hover-shift-x, 0px), var(--card-hover-shift-y, 0px)) scale(var(--card-hover-effective-scale, var(--card-hover-scale, 2.05)));
  box-shadow: 0 24px 64px rgba(8, 17, 14, 0.34);
}

.table-app .choice-card-thumb .card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.table-app .choice-card-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.table-app .choice-card-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.15;
}

.table-app .choice-card-copy span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}

.table-app .choice-dialog.final-score-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  background: #fffaf0;
}

.final-score-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.final-score-header h2 {
  margin-bottom: 4px;
}

.final-score-header p {
  margin: 0;
}

.final-new-game,
.final-view-deck,
.final-hide-deck {
  border: 1px solid rgba(35, 48, 45, 0.22);
  border-radius: 8px;
  background: #f8f0d8;
  color: var(--ink);
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(23, 32, 29, 0.12);
}

.final-new-game {
  min-width: 118px;
  min-height: 42px;
  background: var(--brass);
  color: #21170b;
}

.final-score-list {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.final-score-row {
  display: grid;
  grid-template-columns: 42px minmax(150px, 1fr) auto 120px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(34, 48, 45, 0.15);
  border-left: 6px solid var(--player-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.final-score-rank {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--player-color);
  color: #fffaf0;
  font-size: 18px;
  font-weight: 950;
}

.final-score-copy,
.final-score-breakdown {
  min-width: 0;
}

.final-score-copy {
  display: grid;
  gap: 2px;
}

.final-score-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-score-copy span,
.final-score-breakdown span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.final-score-breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
}

.final-score-breakdown span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.88);
  border: 1px solid rgba(34, 48, 45, 0.12);
}

.final-view-deck {
  min-height: 36px;
}

.final-view-deck.active {
  border-color: var(--player-color);
  background: #f3d680;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--player-color) 28%, transparent);
}

.final-deck-view {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(34, 48, 45, 0.16);
}

.final-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.final-deck-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.1;
}

.final-deck-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.final-hide-deck {
  min-height: 34px;
  padding-inline: 12px;
}

.final-deck-grid {
  min-height: 0;
  max-height: min(390px, 42vh);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  overflow: auto;
  padding: 2px 2px 10px;
}

.final-deck-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(34, 48, 45, 0.15);
  border-top: 4px solid var(--player-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 16px rgba(18, 24, 22, 0.1);
}

.final-deck-art {
  display: block;
  aspect-ratio: 687 / 1062;
  overflow: hidden;
  border-radius: 6px;
  background: #efe2c5;
}

.final-deck-art .card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.final-deck-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-deck-card > span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .final-score-header,
  .final-deck-header {
    align-items: stretch;
    flex-direction: column;
  }

  .final-score-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .final-score-breakdown,
  .final-view-deck {
    grid-column: 2;
    justify-content: start;
  }
}

.rules-dialog {
  width: min(980px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(6, 14, 12, 0.36);
}

.rules-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.rules-dialog h2 {
  font-size: 18px;
}

.rules-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

@media (max-width: 1100px) {
  body.table-app {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .table-shell,
  .table-main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

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

  .seat-setup {
    grid-template-columns: repeat(3, minmax(68px, 80px)) repeat(2, minmax(180px, 1fr));
  }

  .felt-table {
    min-height: 720px;
    padding: 170px 118px 16px;
  }

  .player-seat {
    width: 190px;
  }
}

@media (max-width: 940px) {
  .table-status,
  .player-console,
  .central-strip,
  .tracker-row-layout {
    grid-template-columns: 1fr;
  }

  .table-center {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .central-strip,
  .table-market,
  .table-clients {
    grid-column: 1;
    grid-row: auto;
  }

  .central-strip {
    grid-template-rows: auto auto;
  }

  .seat-setup {
    grid-template-columns: repeat(3, 1fr);
  }

  .names-field {
    grid-column: span 3;
  }

  .setup-total {
    grid-column: span 3;
  }

  .felt-table {
    min-height: auto;
    padding: 12px;
    border-radius: 18px;
  }

  .table-seats {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }

  .player-seat,
  .seat-top,
  .seat-left,
  .seat-right {
    position: static;
    width: 100%;
    min-width: 0;
    transform: none;
  }

  .seat-bottom {
    display: none;
  }

  .table-piles {
    grid-template-columns: repeat(3, 1fr);
  }

  .table-hand .hand-grid,
  .table-market .market-grid,
  .table-clients .client-grid {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  }

  .visual-card .card-image-shell:hover,
  .visual-card .card-image-shell:focus-visible,
  .visual-card.hover-expanded .card-image-shell,
  .visual-card:focus-within .card-image-shell,
  .visual-client .card-image-shell:hover,
  .visual-client.hover-expanded .card-image-shell,
  .ceo-option.visual-founder .card-image-shell:hover,
  .ceo-option.visual-founder.hover-expanded .card-image-shell,
  .rotated-card-frame:hover {
    transform: scale(1.28);
  }
}

@media (max-width: 600px) {
  .launch-screen {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .launch-screen > img {
    width: min(72vw, 300px);
    justify-self: start;
  }

  .launch-actions,
  .launch-actions button {
    width: 100%;
  }

  .table-main,
  .table-topbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .box-lockup {
    grid-template-columns: 48px 1fr;
  }

  .box-lockup img {
    width: 48px;
    height: 48px;
  }

  .seat-setup {
    grid-template-columns: 1fr 1fr;
  }

  .names-field,
  .setup-total {
    grid-column: span 2;
  }

  .table-piles {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-status {
    gap: 8px;
  }
}
