.play-shell {
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.play-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  padding: 26px 0 30px;
}

.play-hero h1 {
  max-width: 860px;
  font-size: 54px;
  line-height: 1;
}

.play-hero p:not(.eyebrow) {
  max-width: 820px;
  color: #42423b;
  font-size: 19px;
  line-height: 1.38;
}

.connection-panel,
.play-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fffaf0;
}

.connection-panel {
  display: grid;
  gap: 12px;
  box-shadow: 0 16px 34px rgba(78, 58, 28, .1);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-transform: none;
}

input[readonly] {
  background: #f8f1df;
}

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

.status-line {
  margin-bottom: 18px;
  border-left: 6px solid var(--capability);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff7e6;
  font-weight: 700;
}

.play-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.play-grid > .play-panel:first-child {
  position: sticky;
  top: 88px;
}

.board-head,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.board-head {
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.board-head h2,
.section-heading h2 {
  margin-bottom: 0;
}

.table-section {
  margin-top: 24px;
}

.table-status {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0 10px;
}

.status-card {
  min-width: 0;
  border: 1px solid #e1d3b5;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.status-card strong {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-card span {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.status-card.primary {
  border-color: rgba(178, 58, 50, .42);
  background: #fff3ef;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.action-row .mini {
  flex-basis: 100%;
  margin-bottom: 0;
}

.action-bar {
  position: sticky;
  top: 72px;
  z-index: 4;
  border: 1px solid rgba(126, 92, 46, .24);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 250, 240, .94);
  backdrop-filter: blur(8px);
}

.report-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 14px;
}

.report-tools .mini {
  margin: 0;
}

.choice-wait {
  flex-basis: 100%;
  border-left: 5px solid var(--influence);
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8f1df;
}

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

.match-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.match-row.invited {
  border-left: 5px solid var(--capability);
  padding-left: 10px;
  background: #fff7e6;
}

.match-row div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.match-title strong {
  overflow-wrap: anywhere;
}

.match-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.seat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seat.filled {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #f1ead8;
  color: var(--muted);
  font-weight: 800;
}

.session-card {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.session-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.session-facts div {
  border: 1px solid #e2d6bb;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

.session-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.session-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.compact-actions {
  margin-bottom: 0;
}

.mandate-choice-panel {
  flex-basis: 100%;
  display: grid;
  gap: 10px;
  width: 100%;
  border: 1px solid #d8c8a8;
  border-left: 6px solid var(--influence);
  border-radius: 8px;
  padding: 14px;
  background: #fff7e6;
}

.mandate-choice-panel h3 {
  margin: 0;
  font-size: 22px;
}

.mandate-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.mandate-option {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--influence);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.mandate-option h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.mandate-option p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mandate-option footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.player-panel {
  display: grid;
  gap: 12px;
  border-top: 6px solid #d8c8a8;
  background: #fff;
}

.player-panel.active {
  border-color: var(--capability);
  border-top-color: var(--capability);
  box-shadow: inset 0 0 0 2px rgba(178, 58, 50, 0.18);
}

.player-panel.self {
  background: #fffdf7;
}

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

.player-heading h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.seat-badge,
.active-badge,
.self-badge,
.stage-badge {
  border: 1px solid #d8c8a8;
  border-radius: 999px;
  padding: 4px 7px;
  background: #f8f1df;
  color: #332c22;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.active-badge {
  border-color: rgba(178, 58, 50, .42);
  background: #ffe8e2;
  color: var(--capability);
}

.self-badge {
  border-color: rgba(25, 115, 95, .36);
  background: #e5f5ef;
  color: var(--safety);
}

.stage-badge {
  justify-self: start;
  background: #fff7e6;
}

.digital-lab-mat {
  display: grid;
  gap: 10px;
}

.mat-resource-bank {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mat-resource-vault {
  min-height: 68px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 2px dashed rgba(90, 76, 53, .55);
  border-radius: 8px;
  padding: 8px 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.24)),
    #fff8e8;
  color: #4d4336;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.mat-resource-vault strong {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 24px;
  line-height: 1;
}

.mat-model-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #cbd5d8;
  border-radius: 8px;
  padding: 8px;
  background:
    linear-gradient(90deg, rgba(178, 58, 50, .1), rgba(25, 115, 95, .1)),
    #f5fbfb;
}

.mat-stage-track,
.revenue-slider,
.funding-path-mini,
.government-stake-box,
.deployment-map {
  border: 1px solid #e2d6bb;
  border-radius: 7px;
  padding: 8px;
  background: #fffaf0;
}

.mat-stage-track {
  display: grid;
  gap: 6px;
}

.mat-stage-track.capability {
  border-left: 5px solid var(--capability);
}

.mat-stage-track.safety {
  border-left: 5px solid var(--safety);
}

.mat-stage-track .label,
.revenue-slider .label,
.funding-path-mini .label,
.government-stake-box .label,
.deployment-map .label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.mat-stage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.mat-stage-segment {
  min-height: 62px;
  display: grid;
  align-content: space-between;
  gap: 5px;
  border: 1px solid rgba(42, 48, 58, .16);
  border-radius: 6px;
  padding: 5px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.24)),
    #f9f4e8;
}

.mat-stage-track.capability .mat-stage-segment {
  background:
    linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,.2)),
    #fff0ed;
}

.mat-stage-track.safety .mat-stage-segment {
  background:
    linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,255,255,.24)),
    #eaf8f1;
}

.mat-stage-segment strong {
  min-height: 20px;
  color: #4f5f72;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.mat-stage-nodes,
.deployment-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  align-items: center;
}

.mat-stage-nodes::before,
.deployment-route::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  border-top: 1px solid rgba(42, 48, 58, .28);
}

.mat-stage-nodes b,
.deployment-route b {
  position: relative;
  z-index: 1;
  min-width: 18px;
  min-height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(42, 48, 58, .25);
  border-radius: 999px;
  background: #fffdf8;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.mat-stage-segment:last-child .mat-stage-nodes {
  grid-template-columns: 1fr;
}

.mat-stage-nodes b.filled,
.deployment-route b.filled,
.funding-path-mini b.current {
  border-color: rgba(178, 58, 50, .52);
  background: #ffe8e2;
  color: var(--capability);
}

.mat-stage-track.safety .mat-stage-nodes b.filled,
.deployment-route b.filled {
  border-color: rgba(25, 115, 95, .46);
  background: #e3f5ee;
  color: var(--safety);
}

.mat-stage-nodes b.current {
  box-shadow: 0 0 0 3px rgba(178, 58, 50, .14);
}

.mat-finance-row {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr .8fr;
  gap: 8px;
}

.revenue-slider {
  border-left: 5px solid var(--gold);
}

.revenue-slider strong,
.government-stake-box strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-title);
  font-size: 20px;
  line-height: 1;
}

.funding-path-mini {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.funding-path-mini .label {
  grid-column: 1 / -1;
}

.funding-path-mini b {
  min-height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(77, 84, 152, .24);
  border-radius: 999px;
  background: #eef0ff;
  font-family: var(--font-mono);
  font-size: 10px;
}

.government-stake-box {
  border-left: 5px solid var(--enterprise);
  text-align: center;
}

.government-stake-box.taken {
  background: #eaf2ff;
}

.deployment-map {
  display: grid;
  gap: 7px;
  background:
    radial-gradient(ellipse at 18% 42%, rgba(25, 115, 95, .14) 0 16%, transparent 17%),
    radial-gradient(ellipse at 45% 35%, rgba(77, 84, 152, .13) 0 14%, transparent 15%),
    radial-gradient(ellipse at 72% 52%, rgba(25, 115, 95, .12) 0 18%, transparent 19%),
    linear-gradient(90deg, transparent 0 24%, rgba(42, 48, 58, .08) 24% 25%, transparent 25% 49%, rgba(42, 48, 58, .08) 49% 50%, transparent 50% 74%, rgba(42, 48, 58, .08) 74% 75%, transparent 75%),
    #f9fbf5;
}

.deployment-lane {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.deployment-route {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 26px;
  padding: 0 2px;
}

.deployment-route::before {
  border-top-style: dashed;
  border-color: rgba(36, 96, 132, .42);
}

.mat-zones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mat-zones span {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px dashed #8e8068;
  border-radius: 7px;
  background: #fffdf8;
  color: #5b5142;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.track-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.track-strip span {
  border: 1px solid #e2d6bb;
  border-radius: 8px;
  padding: 9px;
  background: #fffaf0;
}

.track-strip strong {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.track-strip b {
  display: block;
  margin-top: 3px;
  font-family: var(--font-title);
  font-size: 26px;
  line-height: 1;
}

.track-capability b {
  color: var(--capability);
}

.track-safety b {
  color: var(--safety);
}

.track-gap.warning b {
  color: var(--capability);
}

.mini {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.stat-grid span {
  display: grid;
  gap: 2px;
  border: 1px solid #e2d6bb;
  border-radius: 6px;
  padding: 7px;
  background: #fffaf0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.stat-grid strong {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.project-tile {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  gap: 8px;
  min-height: 420px;
  border: 1px solid var(--line);
  border-top: 7px solid var(--capability);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  overflow: hidden;
}

.project-tile.is-playable {
  box-shadow: 0 12px 26px rgba(78, 58, 28, .13);
}

.project-tile.is-locked {
  opacity: .78;
}

.project-tile.type-safety {
  border-top-color: var(--safety);
}

.project-tile.type-infrastructure,
.project-tile.type-breakthrough {
  border-top-color: #8d6b28;
}

.project-tile.type-consumer {
  border-top-color: #b85b2d;
}

.project-tile.type-enterprise {
  border-top-color: #315f73;
}

.project-tile.type-governance {
  border-top-color: var(--influence);
}

.project-tile.type-financing {
  border-top-color: var(--gold);
}

.project-art {
  position: relative;
  min-height: 108px;
  border: 1px solid #d8c8a8;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 250, 239, .1), rgba(255, 250, 239, .18)),
    var(--project-art, none),
    #f1ead8;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.project-art span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  width: fit-content;
  max-width: calc(100% - 16px);
  border: 1px solid rgba(53, 42, 29, .28);
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(255, 250, 239, .9);
  color: #332c22;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}

.project-tile h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.tile-type {
  margin: -2px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.tile-rails {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  border: 1px solid #e5d9bf;
  border-radius: 8px;
  padding: 8px;
  background: #fbf4e7;
}

.project-tile p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.32;
}

.project-tile footer,
.tile-top {
  display: grid;
  gap: 8px;
}

.project-tile footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  border-top: 1px solid #e1d4bd;
  padding-top: 8px;
}

.play-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.req-chips {
  opacity: .9;
}

.output-chips {
  align-content: end;
}

.play-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  border: 1px solid #d7c9b0;
  border-radius: 999px;
  padding: 4px 6px;
  background: #fffaf0;
  color: #2b2822;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  max-width: 100%;
  min-width: 0;
}

.play-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.play-chip img {
  width: 13px;
  height: 13px;
  object-fit: contain;
  flex: 0 0 auto;
}

.muted-chip {
  color: var(--muted);
}

.play-reason {
  min-height: 28px;
  border-left: 4px solid #d8c8a8;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fbf4e7;
}

.project-tile.is-playable .play-reason {
  border-left-color: var(--safety);
  background: #eef8f2;
  color: #24594c;
}

.log-panel {
  display: grid;
  gap: 12px;
}

.log-panel pre {
  overflow: auto;
  max-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #171512;
  color: #fff8e8;
}

.log-panel ol {
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 12px 12px 34px;
  background: #fff;
}

.event-callout {
  border: 1px solid #d8c8a8;
  border-left: 6px solid var(--compute);
  border-radius: 8px;
  padding: 12px;
  background: #f4f7f7;
}

.tabletop-stage {
  display: grid;
  gap: 12px;
}

.table-opponents {
  grid-area: opponents;
}

.self-tableau {
  grid-area: self;
  min-width: 0;
}

.decision-surface {
  grid-area: decisions;
  min-width: 0;
}

.table-market {
  grid-area: market;
}

.table-hand {
  grid-area: hand;
}

.self-lab-mat,
.opponent-seat {
  border: 1px solid rgba(232, 222, 198, .78);
  border-radius: 8px;
  background: rgba(255, 253, 248, .96);
}

.self-lab-mat {
  display: grid;
  gap: 10px;
  height: 100%;
  padding: 12px;
}

.self-lab-mat.active,
.opponent-seat.active {
  animation: activePulse 1800ms ease-in-out infinite;
}

.opponent-seat {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.opponent-seat.empty-seat {
  border-style: dashed;
  background: rgba(247, 250, 245, .92);
}

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

.opponent-stats span {
  min-width: 0;
  border: 1px solid rgba(220, 206, 176, .9);
  border-radius: 6px;
  padding: 5px 6px;
  background: #fffaf0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
}

.opponent-stats span.warn {
  border-color: rgba(178, 58, 50, .4);
  background: #ffe8e2;
  color: var(--capability);
}

.opponent-stats strong {
  display: block;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.opponent-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.opponent-footer span {
  border: 1px solid rgba(70, 102, 120, .24);
  border-radius: 999px;
  padding: 4px 7px;
  background: #eef5f5;
  color: #244653;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.card-stock {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
}

.card-stock .section-heading {
  align-items: center;
}

.card-stock .section-heading h2 {
  font-size: 20px;
}

.log-drawer {
  margin-top: 12px;
  border: 1px solid #d8c8a8;
  border-radius: 8px;
  background: #fffaf0;
}

.log-drawer summary {
  cursor: pointer;
  padding: 11px 13px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.log-drawer[open] {
  padding-bottom: 12px;
}

.log-drawer[open] .log-panel {
  padding: 0 12px;
}

.endgame-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 21, 18, .58);
}

.endgame-overlay[hidden] {
  display: none;
}

.endgame-dialog {
  width: min(560px, 100%);
  border: 1px solid rgba(232, 222, 198, .9);
  border-top: 7px solid var(--capability);
  border-radius: 8px;
  padding: 20px;
  background: #fffdf8;
  box-shadow: 0 26px 70px rgba(19, 24, 25, .34);
}

.endgame-dialog h2 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1;
}

.endgame-dialog p:not(.eyebrow) {
  margin: 0 0 12px;
  color: #42423b;
  font-weight: 800;
  line-height: 1.34;
}

.endgame-winner {
  border-left: 5px solid var(--safety);
  border-radius: 6px;
  padding: 10px 12px;
  background: #eef8f2;
  color: #24594c !important;
}

.endgame-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.endgame-actions button {
  min-height: 40px;
}

.mandate-choice-panel {
  animation: decisionPop 220ms ease-out;
}

.mandate-option {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.mandate-option::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 42px;
  z-index: -1;
  background: linear-gradient(90deg, rgba(77, 84, 152, .2), rgba(25, 115, 95, .18), rgba(178, 58, 50, .16));
}

body.view-table .play-shell,
body.view-results .play-shell {
  width: min(1680px, calc(100% - 18px));
  padding: 12px 0 18px;
}

body.view-table .play-hero,
body.view-results .play-hero {
  display: none;
}

body.view-table .status-line,
body.view-results .status-line {
  margin-bottom: 10px;
  padding: 10px 12px;
}

body.view-table .top-nav,
body.view-results .top-nav {
  display: none;
}

body.view-table .play-grid,
body.view-results .play-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.view-table .play-grid > .play-panel:first-child,
body.view-results .play-grid > .play-panel:first-child {
  display: none;
}

body.view-table [data-board],
body.view-results [data-board] {
  border: 0;
  padding: 0;
  background: transparent;
}

body.view-table .board-head,
body.view-results .board-head {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

body.view-table .board-head h2,
body.view-results .board-head h2 {
  font-size: 28px;
}

body.view-table .table-status,
body.view-results .table-status {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 8px 0;
}

body.view-table .status-card,
body.view-results .status-card {
  padding: 8px;
}

body.view-table .status-card span,
body.view-results .status-card span {
  font-size: 16px;
}

body.view-table .tabletop-stage,
body.view-results .tabletop-stage {
  min-height: calc(100vh - 218px);
  max-height: calc(100vh - 176px);
  grid-template:
    "opponents opponents" auto
    "self decisions" minmax(260px, 1fr)
    "market hand" minmax(214px, 30vh)
    / minmax(0, 1.12fr) minmax(360px, .88fr);
  gap: 10px;
  border: 1px solid rgba(47, 82, 78, .42);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(90deg, rgba(48, 84, 77, .88), rgba(55, 89, 102, .84)),
    #31534d;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08);
  overflow: hidden;
}

body.view-table .players-grid,
body.view-results .players-grid {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 8px;
  margin: 0;
}

body.view-table .player-heading h3,
body.view-results .player-heading h3 {
  font-size: 17px;
}

body.view-table .self-tableau,
body.view-results .self-tableau,
body.view-table .decision-surface,
body.view-results .decision-surface {
  min-height: 0;
}

body.view-table .self-lab-mat,
body.view-results .self-lab-mat {
  overflow: auto;
}

body.view-table .digital-lab-mat,
body.view-results .digital-lab-mat {
  gap: 8px;
}

body.view-table .mat-resource-bank,
body.view-results .mat-resource-bank {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

body.view-table .mat-resource-vault,
body.view-results .mat-resource-vault {
  min-height: 58px;
}

body.view-table .mat-resource-vault strong,
body.view-results .mat-resource-vault strong {
  font-size: 22px;
}

body.view-table .mat-stage-grid,
body.view-results .mat-stage-grid {
  grid-template-columns: repeat(5, minmax(72px, 1fr));
}

body.view-table .mat-stage-segment,
body.view-results .mat-stage-segment {
  min-height: 56px;
}

body.view-table .decision-surface .action-bar,
body.view-results .decision-surface .action-bar {
  position: static;
  align-content: start;
  height: 100%;
  margin: 0;
  overflow: auto;
  border-color: rgba(255, 255, 255, .44);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .98), rgba(242, 247, 245, .96));
  box-shadow: 0 16px 28px rgba(19, 42, 43, .18);
  animation: decisionPop 180ms ease-out;
}

body.view-table .action-bar button,
body.view-results .action-bar button {
  min-height: 36px;
}

body.view-table .card-stock,
body.view-results .card-stock {
  border: 1px solid rgba(232, 222, 198, .78);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 253, 248, .96);
}

body.view-table .market-grid,
body.view-results .market-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(216px, 236px);
  grid-template-columns: none;
  gap: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding-bottom: 5px;
}

body.view-table .project-tile,
body.view-results .project-tile {
  width: 100%;
  min-height: 0;
  max-height: 100%;
  grid-template-rows: auto 76px auto auto auto auto;
  gap: 6px;
  padding: 8px;
  animation: cardDeal 240ms ease-out both;
}

body.view-table .project-art,
body.view-results .project-art {
  min-height: 74px;
}

body.view-table .project-tile h3,
body.view-results .project-tile h3 {
  font-size: 16px;
}

body.view-table .project-tile p,
body.view-results .project-tile p {
  font-size: 12px;
  line-height: 1.24;
}

body.view-table .project-tile > p:not(.tile-type):not(.play-reason),
body.view-results .project-tile > p:not(.tile-type):not(.play-reason) {
  max-height: 46px;
  overflow: auto;
}

body.view-table .project-tile footer,
body.view-results .project-tile footer {
  grid-template-columns: 1fr;
  gap: 5px;
}

body.view-table .project-tile footer button,
body.view-results .project-tile footer button {
  min-height: 32px;
  padding: 7px 9px;
}

body.view-table .play-reason,
body.view-results .play-reason {
  min-height: 0;
  padding: 5px 7px;
}

body.view-table .log-drawer,
body.view-results .log-drawer {
  margin-top: 8px;
}

@keyframes cardDeal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes activePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 213, 97, .16), inset 0 0 0 2px rgba(255, 213, 97, .24);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(255, 213, 97, .2), inset 0 0 0 2px rgba(255, 213, 97, .44);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-tile,
  .mandate-choice-panel,
  .self-lab-mat.active,
  .opponent-seat.active,
  body.view-table .decision-surface .action-bar,
  body.view-results .decision-surface .action-bar {
    animation: none;
  }
}

@media (max-width: 960px) {
  .play-hero,
  .play-grid {
    grid-template-columns: 1fr;
  }

  .play-grid > .play-panel:first-child,
  .action-bar {
    position: static;
  }

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

  body.view-table .tabletop-stage,
  body.view-results .tabletop-stage {
    max-height: none;
    min-height: auto;
    grid-template:
      "opponents" auto
      "self" auto
      "decisions" auto
      "market" minmax(230px, auto)
      "hand" minmax(230px, auto)
      / minmax(0, 1fr);
    overflow: visible;
  }

  body.view-table .self-lab-mat,
  body.view-results .self-lab-mat,
  body.view-table .decision-surface .action-bar,
  body.view-results .decision-surface .action-bar {
    height: auto;
    overflow: visible;
  }

  body.view-table .mat-resource-bank,
  body.view-results .mat-resource-bank {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .play-shell {
    width: min(100% - 18px, 1440px);
  }

  .play-hero h1 {
    font-size: 38px;
  }

  .endgame-dialog h2 {
    font-size: 28px;
  }

  .endgame-actions {
    display: grid;
  }

  .mandate-options {
    grid-template-columns: 1fr;
  }

  .mandate-option {
    min-height: auto;
  }

  .board-head,
  .section-heading {
    display: grid;
  }

  .table-status,
  .track-strip,
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  body.view-table .table-status,
  body.view-results .table-status,
  body.view-table .mat-resource-bank,
  body.view-results .mat-resource-bank,
  body.view-table .mat-finance-row,
  body.view-results .mat-finance-row,
  body.view-table .mat-zones,
  body.view-results .mat-zones {
    grid-template-columns: 1fr 1fr;
  }

  body.view-table .mat-stage-grid,
  body.view-results .mat-stage-grid {
    grid-template-columns: 1fr;
  }

  body.view-table .market-grid,
  body.view-results .market-grid {
    grid-auto-columns: minmax(208px, 84vw);
  }
}

/* React multiplayer board surface */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #f7bd3b;
  outline-offset: 2px;
}

body.view-table .status-line,
body.view-results .status-line {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.view-table .play-shell,
body.view-results .play-shell {
  width: min(2040px, calc(100% - 18px));
  padding: 10px 0 14px;
}

body.view-table .play-grid,
body.view-results .play-grid {
  display: block;
}

body.view-table [data-board],
body.view-results [data-board] {
  border: 0;
  padding: 0;
  background: transparent;
}

.react-board {
  height: auto;
  min-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto minmax(74px, auto) minmax(330px, 1fr) auto minmax(124px, auto);
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(218, 171, 85, .34);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(0deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 36px 36px,
    radial-gradient(ellipse at 50% 18%, rgba(39, 89, 73, .38), transparent 52%),
    #10201c;
  box-shadow: inset 0 0 0 2px rgba(255, 247, 214, .06), 0 22px 60px rgba(18, 14, 9, .28);
  color: #f8efd9;
  overflow: visible;
}

.react-board.empty {
  min-height: 320px;
  place-content: center;
  text-align: center;
}

.scoreboard-row {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(var(--seat-count, 4), minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
}

.player-scoreboard {
  container-name: player-card;
  container-type: inline-size;
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid rgba(219, 197, 150, .28);
  border-radius: 8px;
  padding: 9px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.065), rgba(255,255,255,.012) 54%),
    #151918;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 218, .04);
  overflow: visible;
}

.player-scoreboard.active {
  border-color: #f0ad2e;
  box-shadow: 0 0 0 1px rgba(240, 173, 46, .5), 0 0 22px rgba(240, 173, 46, .18), inset 0 0 0 1px rgba(240, 173, 46, .2);
}

.player-scoreboard:not(.full) {
  display: flex;
  flex-direction: column;
}

.player-scoreboard header,
.project-market-panel header,
.action-rail header,
.your-lab-mat > header,
.hand-dock header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.player-title h3,
.action-rail h2,
.your-lab-mat h2,
.hand-dock h2,
.project-market-panel h2 {
  margin: 0;
  color: inherit;
  font-size: 18px;
  line-height: 1;
}

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

.player-token {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: #df6a57;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.player-2 { color: #f0ad2e; }
.player-3 { color: #a979cf; }
.player-4 { color: #2eb67d; }
.player-5 { color: #46a6d9; }

.scoreboard-grid {
  min-width: 0;
  display: none;
  grid-template-columns: .9fr 1.25fr;
  grid-template-areas:
    "bank meters"
    "lower meters"
    "footer footer";
  gap: 8px 10px;
}

.player-scoreboard.full .scoreboard-grid,
.player-scoreboard-popover .scoreboard-grid {
  display: grid;
}

.scoreboard-bank {
  grid-area: bank;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.scoreboard-bank.lower {
  grid-area: lower;
}

.scoreboard-meters {
  grid-area: meters;
  display: grid;
  gap: 5px;
}

.player-scoreboard footer {
  grid-area: footer;
  display: grid;
  grid-template-columns: .55fr 1fr .65fr .7fr;
  gap: 6px;
  border-top: 1px solid rgba(219, 197, 150, .22);
  padding-top: 7px;
  color: #ded4bd;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.player-scoreboard footer span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scoreboard-footer-lp b {
  color: #f0ad2e;
}

.player-scoreboard-summary,
.scoreboard-inspect-button {
  display: grid;
}

.player-scoreboard-summary {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px;
  color: #d9cfb9;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.player-scoreboard.full .player-scoreboard-summary,
.player-scoreboard.full .player-compact-metrics,
.player-scoreboard.full .scoreboard-inspect-button {
  display: none;
}

.player-compact-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
  color: #d9cfb9;
}

.player-compact-metrics > span:last-child {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(219, 197, 150, .16);
  padding-top: 5px;
  color: #ded4bd;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.player-compact-metrics .ui-icon-value {
  justify-content: center;
  border: 1px solid rgba(219, 197, 150, .16);
  border-radius: 5px;
  padding: 4px;
  background: rgba(255,255,255,.045);
  font-size: 12px;
}

.player-compact-metrics .ui-icon-value img {
  width: 16px;
  height: 16px;
}

.scoreboard-legacy-pill {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  border: 1px solid rgba(240, 173, 46, .38);
  border-radius: 5px;
  padding: 4px 5px;
  background: rgba(240, 173, 46, .12);
  color: #f8efd9;
}

.scoreboard-legacy-pill b {
  color: #f0ad2e;
  font-size: 14px;
}

.scoreboard-inspect-button {
  width: 100%;
  min-height: 24px;
  max-height: 30px;
  margin-top: auto;
  border-color: rgba(219, 197, 150, .28);
  padding: 4px 6px;
  background: rgba(255,255,255,.08);
  color: #f8efd9;
  font-size: 10px;
}

.player-scoreboard-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(360px, 86vw);
  border: 1px solid rgba(240, 173, 46, .54);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)),
    #121615;
  box-shadow: 0 18px 42px rgba(0,0,0,.42), 0 0 0 1px rgba(240, 173, 46, .14);
}

.scoreboard-row .player-scoreboard:nth-last-child(-n + 2) .player-scoreboard-popover {
  right: 0;
  left: auto;
}

.popover-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #f8efd9;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.popover-title-row button {
  min-height: 26px;
  border-color: rgba(219, 197, 150, .3);
  padding: 4px 7px;
  background: #252824;
  color: #f8efd9;
  font-size: 10px;
}

@container player-card (max-width: 295px) {
  .player-scoreboard.full .scoreboard-grid,
  .player-scoreboard-popover .scoreboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "bank"
      "meters"
      "lower"
      "footer";
  }

  .player-scoreboard.full footer,
  .player-scoreboard-popover footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  header {
    align-items: start;
  }

  .player-title {
    gap: 6px;
  }

  .player-title h3 {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.05;
  }

  .player-token {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }

  .active-badge,
  .self-badge {
    padding: 3px 5px;
    font-size: 8px;
  }
}

.ui-icon-value {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f8efd9;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 900;
}

.ui-icon-value img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  object-fit: contain;
}

.has-tooltip {
  position: relative;
}

.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 90;
  width: max-content;
  max-width: 220px;
  border: 1px solid rgba(219, 197, 150, .34);
  border-radius: 6px;
  padding: 6px 8px;
  background: #101514;
  color: #fff8e8;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  opacity: 0;
  pointer-events: none;
  text-transform: none;
  transform: translate(-50%, 4px);
  transition: opacity .14s ease, transform .14s ease;
  white-space: normal;
}

.has-tooltip:hover::after,
.has-tooltip:focus::after,
.has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.ui-meter-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 38px;
  gap: 7px;
  align-items: center;
  color: #e7ddc9;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ui-meter {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  min-width: 0;
}

.ui-meter i,
.agi-meter i {
  min-height: 9px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.12);
}

.ui-meter-row.capability .ui-meter i.filled,
.agi-meter i.filled {
  background: #b84638;
  border-color: #df7666;
}

.ui-meter-row.safety .ui-meter i.filled {
  background: #2c8f69;
  border-color: #62b993;
}

.ui-meter-row.revenue .ui-meter i.filled {
  background: #c7942f;
  border-color: #e6bd66;
}

.gap-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #d9eedf;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.gap-row.warning {
  color: #f47d68;
}

.global-status-strip {
  display: grid;
  grid-template-columns: 96px minmax(150px, 1fr) minmax(330px, 1.9fr) minmax(170px, 1.1fr) minmax(130px, .9fr);
  gap: 8px;
  border: 1px solid rgba(219, 197, 150, .28);
  border-radius: 8px;
  padding: 9px 12px;
  background:
    linear-gradient(90deg, rgba(240, 173, 46, .08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.012)),
    #151a1a;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 218, .035);
}

.status-block {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  border-right: 1px solid rgba(219, 197, 150, .18);
  padding-right: 10px;
}

.status-block:last-child {
  border-right: 0;
  padding-right: 0;
}

.status-block span {
  color: #c7baa2;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-block strong {
  color: #f8efd9;
  font-family: var(--font-title);
  font-size: 20px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.status-block.round strong {
  color: #f0ad2e;
}

.status-block.risk-level.elevated strong,
.status-block.risk-level.critical strong {
  color: #ff765f;
}

.status-block.risk-level.contained strong {
  color: #62b993;
}

.turn-step-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.turn-step-rail li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #9c917e;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.turn-step-rail li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 11px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  border-top: 1px solid rgba(255,255,255,.18);
}

.turn-step-rail li span {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 999px;
}

.turn-step-rail li.current {
  color: #f0ad2e;
}

.turn-step-rail li.current span {
  border-color: #f0ad2e;
  background: rgba(240, 173, 46, .12);
  box-shadow: 0 0 0 4px rgba(240, 173, 46, .08);
}

.agi-meter {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2px;
}

.board-main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 8px;
}

.market-and-alerts {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 8px;
}

.project-market-panel,
.your-lab-mat,
.hand-dock {
  min-width: 0;
  border: 1px solid rgba(60, 42, 20, .28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,.08)), #eadfc7;
  color: #181613;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.38);
}

.project-market-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  overflow: hidden;
}

.project-market-panel header p,
.action-rail header p,
.your-lab-mat > header p {
  margin: 0;
  color: #6d604a;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-market-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--market-count, 8), minmax(0, 1fr));
  gap: 10px;
  overflow: hidden;
}

.compact-project-card {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  border: 1px solid #a89778;
  border-bottom: 5px solid var(--capability);
  border-radius: 7px;
  padding: 7px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.18)),
    #fff4dc;
  box-shadow: 0 8px 18px rgba(28, 20, 10, .16);
  overflow: hidden;
}

.compact-project-card.type-safety { border-bottom-color: var(--safety); }
.compact-project-card.type-infrastructure,
.compact-project-card.type-breakthrough { border-bottom-color: var(--compute); }
.compact-project-card.type-consumer { border-bottom-color: #b85b2d; }
.compact-project-card.type-enterprise { border-bottom-color: #315f73; }
.compact-project-card.type-governance { border-bottom-color: var(--influence); }
.compact-project-card.type-financing { border-bottom-color: var(--gold); }
.compact-project-card.locked { opacity: .82; }

.card-cost-column {
  display: grid;
  align-content: start;
  gap: 5px;
}

.card-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 23px;
  border: 1px solid #d3c2a2;
  border-radius: 4px;
  padding: 2px 3px;
  background: #fffdf7;
  color: #1d1a15;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
}

.card-chip img {
  width: 14px;
  height: 14px;
}

.card-main {
  min-width: 0;
  display: grid;
  grid-template-rows: 44px auto minmax(34px, 1fr) auto;
  gap: 5px;
}

.card-art-strip {
  position: relative;
  border: 1px solid #d1bd97;
  border-radius: 5px;
  background: #dfd0af center / cover;
  overflow: hidden;
}

.card-art-strip span {
  position: absolute;
  left: 5px;
  bottom: 5px;
  max-width: calc(100% - 10px);
  border-radius: 999px;
  padding: 3px 5px;
  background: rgba(255, 248, 232, .88);
  color: #2d271c;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.compact-project-card h3 {
  margin: 0;
  color: #16130e;
  font-size: 14px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.compact-project-card p {
  display: -webkit-box;
  margin: 0;
  color: #312b22;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.22;
  max-height: none;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.compact-project-card footer {
  display: grid;
  gap: 3px;
}

.card-output-row,
.hand-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.compact-project-card button {
  min-height: 24px;
  width: 100%;
  padding: 4px 8px;
  font-size: 12px;
}

.project-market-stack {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(220px, .74fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  border: 1px dashed rgba(91, 79, 59, .48);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.16)),
    #f3e8d0;
  color: #181613;
  text-align: left;
  overflow: hidden;
}

.stacked-card-preview {
  position: relative;
  min-height: 230px;
}

.stacked-card {
  position: absolute;
  inset: 14px auto auto calc(var(--stack-index) * 18px);
  width: 168px;
  height: 218px;
  display: grid;
  align-content: end;
  gap: 5px;
  border: 1px solid #9c8763;
  border-bottom: 6px solid var(--capability);
  border-radius: 7px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,.06)),
    #fff4dc;
  box-shadow: 0 12px 26px rgba(28, 20, 10, .18);
  transform: translateY(calc(var(--stack-index) * 3px)) rotate(var(--stack-rotate));
}

.stacked-card.type-safety { border-bottom-color: var(--safety); }
.stacked-card.type-infrastructure,
.stacked-card.type-breakthrough { border-bottom-color: var(--compute); }
.stacked-card.type-consumer { border-bottom-color: #b85b2d; }
.stacked-card.type-enterprise { border-bottom-color: #315f73; }
.stacked-card.type-governance { border-bottom-color: var(--influence); }
.stacked-card.type-financing { border-bottom-color: var(--gold); }

.stacked-card b,
.stacked-card small {
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stacked-card b {
  color: #171512;
  font-size: 15px;
  line-height: 1.05;
}

.stacked-card small {
  color: #6d604a;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.stacked-card-copy {
  display: grid;
  gap: 8px;
}

.stacked-card-copy span {
  color: #6d604a;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stacked-card-copy strong {
  color: #171512;
  font-family: var(--font-title);
  font-size: 30px;
  line-height: 1;
}

.stacked-card-copy p {
  max-width: 34ch;
  margin: 0;
  color: #4b4335;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.market-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 15, 13, .72);
}

.market-overlay-panel {
  width: min(1500px, 100%);
  max-height: min(86vh, 860px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  border: 1px solid rgba(219, 197, 150, .42);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
    #10201c;
  box-shadow: 0 28px 90px rgba(0,0,0,.46);
}

.market-overlay-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #f8efd9;
}

.market-overlay-panel header span {
  color: #d7c39f;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-overlay-panel header h2 {
  margin: 2px 0 0;
  color: #fff8e8;
  font-size: 28px;
}

.market-overlay-panel header button {
  border-color: rgba(219, 197, 150, .38);
  background: #252824;
  color: #f8efd9;
}

.market-overlay-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  overflow: auto;
  padding: 2px 2px 8px;
}

.market-overlay-grid .compact-project-card {
  min-height: 300px;
}

.event-incident-stack {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(190px, 1fr) minmax(110px, .42fr);
  gap: 8px;
}

.table-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid rgba(219, 197, 150, .3);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.015) 58%),
    #1a1b19;
  color: #f8efd9;
  overflow: hidden;
}

.public-event-card {
  border-left: 5px solid #f0ad2e;
}

.event-card-face {
  grid-template-rows: minmax(88px, .82fr) auto;
  gap: 0;
  padding: 0;
}

.event-card-art {
  position: relative;
  min-height: 110px;
  border-bottom: 1px solid rgba(219, 197, 150, .26);
  background:
    linear-gradient(180deg, rgba(7, 12, 11, .05), rgba(7, 12, 11, .62)),
    #2b2f2a center / cover;
  overflow: hidden;
}

.event-card-art span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 248, 232, .9);
  color: #2b2418;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.event-card-copy {
  display: grid;
  gap: 8px;
  padding: 13px 14px 15px;
}

.incident-summary-card {
  border-left: 5px solid #d85b48;
}

.deck-summary-card {
  border-left: 5px solid #315f73;
}

.table-card-label {
  color: #d7c39f;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.table-card h3 {
  margin: 0;
  color: #fff8e8;
  font-size: 19px;
  line-height: 1.04;
}

.table-card p {
  margin: 0;
  color: #dacdb4;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.severity-token {
  width: 62px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid #d85b48;
  border-radius: 8px;
  background: #7e2d25;
  color: #fff8e8;
  font-family: var(--font-title);
  font-size: 28px;
}

.action-rail {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(76px, auto) minmax(0, 1fr);
  gap: 9px;
  border: 1px solid rgba(219, 197, 150, .3);
  border-radius: 8px;
  padding: 11px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    #141817;
  overflow: hidden;
}

.action-rail h2 {
  white-space: nowrap;
}

.action-rail header p {
  display: none;
}

.action-command-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.action-command {
  width: 100%;
  min-height: 48px;
  display: grid;
  justify-items: start;
  gap: 4px;
  border-color: rgba(219, 197, 150, .24);
  border-radius: 7px;
  padding: 8px;
  background: #262824;
  color: #f8efd9;
  text-align: left;
}

.action-command.primary {
  border-color: #f0ad2e;
  background: #6d4610;
}

.action-command.danger {
  border-color: #d85b48;
  background: #4a211d;
}

.action-command small {
  color: #d7c39f;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
}

.rail-waiting-card,
.rail-log,
.rail-choice-panel {
  border: 1px solid rgba(219, 197, 150, .22);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0,0,0,.22);
}

.rail-waiting-card {
  display: grid;
  align-content: center;
}

.rail-waiting-card span,
.rail-log h3,
.rail-choice-panel h3 {
  color: #d7c39f;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.rail-waiting-card strong {
  display: block;
  margin: 4px 0;
  color: #f0ad2e;
  font-family: var(--font-title);
  font-size: 16px;
}

.rail-waiting-card p,
.rail-choice-panel p {
  margin: 0;
  color: #e7ddc9;
  font-size: 12px;
  line-height: 1.3;
}

.rail-log {
  min-height: 0;
  display: grid;
  gap: 8px;
  overflow: hidden;
}

.rail-log header {
  display: block;
}

.rail-log ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: #e7ddc9;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
}

.rail-log button {
  min-height: 34px;
  font-size: 12px;
}

.your-lab-mat {
  min-height: 250px;
  overflow: visible;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-areas:
    "head head"
    "bank core";
  gap: 10px 12px;
  padding: 10px 12px;
}

.your-lab-mat > header {
  grid-area: head;
}

.lab-resource-bank {
  grid-area: bank;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-content: start;
}

.lab-icon-stat {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
}

.lab-resource-bank > .lab-icon-stat {
  min-height: 88px;
  display: grid;
  border: 1px solid #d0bd96;
  border-radius: 8px;
  background: #f7edda;
}

.lab-icon-stat > span {
  color: #5b4f3b;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.your-lab-mat .ui-icon-value {
  color: #181613;
  font-size: 24px;
}

.your-lab-mat .ui-icon-value img {
  width: 27px;
  height: 27px;
}

.lab-core-grid {
  grid-area: core;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(330px, .95fr) 108px minmax(380px, 1.05fr) minmax(330px, .9fr);
  grid-template-rows: auto auto;
  gap: 8px;
}

.lab-tracks,
.gap-panel,
.funding-panel,
.deployment-panel,
.lab-records article {
  border: 1px solid #d0bd96;
  border-radius: 8px;
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.48), rgba(255,255,255,.08)),
    #f3e6cf;
}

.lab-tracks {
  display: grid;
  gap: 7px;
  align-content: start;
}

.your-lab-mat .ui-meter-row {
  grid-template-columns: 84px minmax(0, 1fr) 42px;
  color: #2d271c;
}

.your-lab-mat .ui-meter i {
  background: #dfd1b4;
  border-color: #c9b48c;
}

.lab-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-top: 4px;
}

.lab-trio .lab-icon-stat {
  min-height: 46px;
  border: 1px solid #d8c8a6;
  border-radius: 6px;
  background: rgba(255, 250, 240, .48);
}

.lab-trio .ui-icon-value {
  font-size: 18px;
}

.lab-trio .ui-icon-value img {
  width: 22px;
  height: 22px;
}

.gap-panel {
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.gap-panel span,
.funding-panel > span,
.deployment-panel > span,
.lab-records span {
  color: #6d604a;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.gap-panel strong {
  color: #287a61;
  font-family: var(--font-title);
  font-size: 30px;
  line-height: 1;
}

.gap-panel.warning strong {
  color: #b84638;
}

.gap-panel p {
  margin: 0;
  color: #5b4f3b;
  font-weight: 900;
}

.funding-panel,
.deployment-panel {
  display: grid;
  gap: 8px;
  align-content: start;
}

.ui-stage-track {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 4px;
}

.ui-stage-track span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #bca57d;
  border-radius: 5px;
  background: #e5d4b3;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
}

.ui-stage-track span.current {
  border-color: #c88b18;
  background: #e5a92e;
  color: #1b160d;
}

.deployment-lanes {
  display: grid;
  gap: 7px;
}

.deployment-lanes > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.deployment-lanes b {
  font-size: 12px;
}

.deployment-lanes span {
  display: grid;
  grid-template-columns: repeat(6, 16px);
  gap: 6px;
}

.deployment-lanes i {
  width: 16px;
  height: 16px;
  border: 1px solid #baa783;
  border-radius: 999px;
  background: #efe3ca;
}

.deployment-lanes i.filled.consumer {
  background: #2f6f9f;
  border-color: #2f6f9f;
}

.deployment-lanes i.filled.enterprise {
  background: #4d5498;
  border-color: #4d5498;
}

.lab-records {
  grid-column: 1 / -1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.lab-records article {
  min-width: 0;
  overflow: hidden;
}

.lab-records strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-title);
  font-size: 17px;
  line-height: 1;
}

.lab-records p {
  margin: 2px 0 0;
  color: #2f2a20;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.18;
  max-height: none;
  overflow: hidden;
}

.hand-dock {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
  padding: 9px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)), #141817;
  color: #f8efd9;
  min-height: 0;
}

.hand-dock-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 152px 86px;
  gap: 8px;
}

.draw-stack-card,
.play-drop-zone,
.discard-pile-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px dashed rgba(219, 197, 150, .38);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
  color: #d7c39f;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.draw-stack-card strong,
.discard-pile-card strong {
  color: #f8efd9;
  font-family: var(--font-title);
  font-size: 24px;
}

.hand-card-strip {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 154px);
  gap: 8px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}

.hand-card-strip:empty {
  grid-auto-flow: row;
  place-items: center;
  border: 1px dashed rgba(219, 197, 150, .28);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 22px),
    rgba(0,0,0,.14);
}

.hand-card-strip:empty::before {
  content: "No cards in hand";
  color: #a99d87;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hand-card-strip .compact-project-card {
  height: 100%;
  min-height: 0;
}

.hand-card-strip .card-main {
  grid-template-rows: 30px auto minmax(20px, 1fr) auto;
}

.hand-card-strip .compact-project-card p {
  max-height: 32px;
}

.hand-card-strip .compact-project-card button {
  min-height: 22px;
  padding: 3px 6px;
  font-size: 10px;
}

.self-badge {
  border-color: rgba(25, 115, 95, .36);
  background: #e5f5ef;
  color: var(--safety);
}

.active-badge {
  border-color: rgba(240, 173, 46, .6);
  background: #f0ad2e;
  color: #171512;
}

@media (max-width: 1024px) {
  .react-board {
    overflow: auto;
  }

  .global-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-main-grid,
  .market-and-alerts,
  .lab-core-grid {
    grid-template-columns: 1fr;
  }

  .event-incident-stack {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    grid-template-rows: none;
  }

  .action-rail {
    grid-template-rows: auto auto auto auto;
  }

  .action-command-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .project-market-grid {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

  .project-market-stack {
    grid-template-columns: minmax(180px, .55fr) minmax(0, 1fr);
  }

  .market-overlay-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 1400px) {
  .hand-card-strip .compact-project-card {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 5px;
  }

  .hand-card-strip .card-cost-column {
    gap: 3px;
  }

  .hand-card-strip .card-chip {
    min-height: 20px;
    font-size: 8px;
  }

  .hand-card-strip .card-main {
    grid-template-rows: 28px auto auto;
  }

  .hand-card-strip .compact-project-card p,
  .hand-card-strip .card-output-row {
    display: none;
  }

  .hand-card-strip .compact-project-card h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
  }

  .hand-card-strip .hand-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-height: 820px) and (min-width: 1025px) {
  .react-board {
    height: auto;
    min-height: auto;
    grid-template-rows: auto auto auto auto auto;
    overflow: visible;
  }

  .project-market-grid,
  .action-rail,
  .event-incident-stack,
  .hand-dock,
  .hand-card-strip {
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .react-board {
    min-height: auto;
    overflow: visible;
  }

  .scoreboard-row {
    gap: 4px;
  }

  .global-status-strip,
  .your-lab-mat,
  .hand-dock-grid {
    grid-template-columns: 1fr;
  }

  .your-lab-mat {
    height: auto;
    grid-template-areas:
      "head"
      "bank"
      "core";
  }

  .status-block {
    border-right: 0;
    border-bottom: 1px solid rgba(219, 197, 150, .18);
    padding: 0 0 8px;
  }

  .scoreboard-grid,
  .lab-resource-bank,
  .lab-records {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .scoreboard-bank,
  .scoreboard-bank.lower,
  .scoreboard-meters,
  .player-scoreboard footer {
    grid-area: auto;
  }

  .player-scoreboard footer {
    grid-template-columns: 1fr;
  }

  .player-scoreboard footer span {
    white-space: normal;
  }

  .project-market-grid {
    grid-template-columns: 1fr;
  }

  .project-market-stack {
    min-height: 320px;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .stacked-card-preview {
    min-height: 210px;
  }

  .market-overlay-backdrop {
    padding: 10px;
  }

  .market-overlay-panel {
    max-height: 92vh;
    padding: 12px;
  }

  .market-overlay-panel header h2 {
    font-size: 22px;
  }

  .event-incident-stack {
    grid-template-columns: 1fr;
  }

  .action-command-list {
    grid-template-columns: 1fr;
  }

  .hand-card-strip {
    grid-auto-columns: minmax(220px, 80vw);
  }
}

@media (max-width: 560px) {
  .player-scoreboard {
    padding: 6px;
  }

  .player-title {
    flex-direction: column;
    align-items: start;
    gap: 4px;
  }

  .player-title h3 {
    max-width: 100%;
    font-size: 10px;
  }

  .scoreboard-legacy-pill {
    display: grid;
    justify-items: center;
    gap: 1px;
  }

  .scoreboard-legacy-pill b {
    font-size: 12px;
  }

  .scoreboard-inspect-button {
    font-size: 0;
  }

  .scoreboard-inspect-button::before {
    content: "Open";
    font-size: 9px;
  }
}
