:root {
  --bg: #fcfcfc;
  --panel: #ffffff;
  --ink: #111111;
  --ink-soft: #303030;
  --ink-muted: #787878;
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.24);
  --turn: #111111;
  --danger: #cb3c31;
  --success: #1f7a57;
  --display: "Arial Narrow Bold", "Avenir Next Condensed", "Trebuchet MS", "Helvetica Neue", sans-serif;
  --marker: "Permanent Marker", "Arial Narrow Bold", "Avenir Next Condensed", "Trebuchet MS", "Helvetica Neue", sans-serif;
  --sans: "Geist", "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  --mono: "Geist Mono", "IBM Plex Mono", "Menlo", monospace;
  --portrait-size: min(250%, 840px);
  --sidebar-width: clamp(320px, 26vw, 396px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  background: none;
}

img,
svg {
  display: block;
}

.turn-ribbon,
.dialogue-hand,
.seat-peek-tray,
.side-panel-scroll,
.side-section-body,
.stats-table-wrap {
  scrollbar-width: none;
}

.turn-ribbon::-webkit-scrollbar,
.dialogue-hand::-webkit-scrollbar,
.seat-peek-tray::-webkit-scrollbar,
.side-panel-scroll::-webkit-scrollbar,
.side-section-body::-webkit-scrollbar,
.stats-table-wrap::-webkit-scrollbar {
  display: none;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0;
  height: 100dvh;
  overflow: hidden;
  transition: grid-template-columns 220ms ease;
}

.app-shell[data-sidebar-open="true"] {
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
}

.app-main {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  height: 100dvh;
  padding: 12px 20px 20px;
  overflow: hidden;
}

.table-label,
.phase-kicker,
.challenge-label,
.command-kicker,
.launcher-kicker,
.launcher-mode-label,
.panel-meta,
.control-select span,
.launcher-field span,
.drawer-meta,
.orientation-guard__title {
  color: var(--ink-muted);
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.screen-hud {
  display: grid;
  grid-template-columns: minmax(0, 25%) minmax(0, 50%) minmax(0, 25%);
  gap: 22px;
  align-items: end;
  min-height: 132px;
  padding-right: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.hud-claim,
.hud-state,
.hud-turn-order,
.hud-chip-panel {
  min-width: 0;
}

.hud-claim,
.hud-state {
  display: grid;
  gap: 14px;
}

.hud-state {
  padding: 0 20px;
  justify-items: center;
  text-align: center;
}

.hud-turn-order {
  width: 100%;
  padding-left: 0;
  justify-self: center;
  justify-items: center;
}

.hud-chip-panel {
  display: grid;
  gap: 10px;
}

.hud-chip-panel--round {
  justify-items: center;
  justify-self: center;
  transform: translateX(-8px);
}

.hud-chip-panel--discard {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  justify-self: end;
  margin-left: 22px;
}

.hud-chip-header {
  display: grid;
  gap: 6px;
}

.claim-row {
  display: grid;
  grid-template-columns: minmax(136px, 1fr) minmax(96px, auto) minmax(128px, auto);
  align-items: end;
  gap: 10px;
}

.hud-state {
  align-content: center;
  gap: 10px;
}

.claim-stack {
  display: grid;
  align-content: end;
  gap: 6px;
}

.claim-caption {
  display: inline-flex;
  align-items: center;
}

.pending-rank {
  font-family: var(--display);
  font-size: clamp(4.3rem, 7.2vw, 6.6rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.78;
  opacity: 0.72;
}

.pending-display,
.pile-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
}

.pending-subline {
  min-height: 22px;
  color: var(--ink-muted);
  font-family: var(--display);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
}

.pending-display::after,
.pile-display::after,
.cast-seat::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.pending-display::after,
.pile-display::after {
  inset: -8px;
}

.claim-line {
  font-family: var(--display);
  font-size: clamp(2.16rem, 3.7vw, 3.45rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 0.98;
  text-transform: uppercase;
  text-align: center;
}

.claim-line-x {
  text-transform: none;
}

.claim-line--reveal {
  color: var(--danger);
}

.turn-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}

.hud-turn-order {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  align-content: end;
}

.hud-turn-order .turn-ribbon {
  gap: 5px;
  padding-bottom: 0;
  justify-content: center;
  margin-inline: auto;
}

.round-notebook[data-flash^="turn"] {
  animation: notebookFlash 560ms ease;
}

.turn-pill {
  position: relative;
  flex: 0 0 110px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  min-width: 110px;
  padding-top: 18px;
  opacity: 0.56;
  will-change: transform;
}

.turn-pill.is-current,
.turn-pill.is-awaiting-human,
.turn-pill.is-judge {
  opacity: 1;
}

.turn-pill.is-eliminated {
  opacity: 0.24;
}

.turn-index {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.turn-thumb-frame {
  width: 74px;
  height: 74px;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
}

.turn-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(2.52);
  transform-origin: center 38%;
}

.turn-label {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.turn-label--judge {
  color: var(--ink);
  opacity: 1;
}

.turn-label--leader {
  color: var(--ink);
  opacity: 0.62;
}

.turn-label--standby {
  color: var(--ink-muted);
  opacity: 0.42;
}

.turn-arrow {
  flex: 0 0 auto;
  color: var(--ink-muted);
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  will-change: transform;
}

.hud-turn-order .turn-pill {
  flex-basis: 68px;
  min-width: 68px;
  gap: 4px;
}

.hud-turn-order .turn-thumb-frame {
  width: 56px;
  height: 56px;
}

.hud-turn-order .turn-thumb {
  object-position: center 10%;
  transform: scale(3.22);
  transform-origin: center 10%;
}

.table-value {
  font-family: var(--display);
  font-size: clamp(2.4rem, 3.4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.88;
}

.round-notebook {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  width: 104px;
  min-width: 104px;
  min-height: 94px;
  padding: 22px 12px 12px;
  background: linear-gradient(180deg, #fbf7ee 0%, #f4eddc 100%);
  border: 1px solid rgba(17, 17, 17, 0.18);
}

.round-notebook::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 64px;
  transform: translateX(-50%);
  pointer-events: none;
  top: -8px;
  height: 18px;
  background:
    radial-gradient(circle at 8px 9px, rgba(17, 17, 17, 0.72) 0 3.6px, transparent 3.8px),
    radial-gradient(circle at 24px 9px, rgba(17, 17, 17, 0.72) 0 3.6px, transparent 3.8px),
    radial-gradient(circle at 40px 9px, rgba(17, 17, 17, 0.72) 0 3.6px, transparent 3.8px),
    radial-gradient(circle at 56px 9px, rgba(17, 17, 17, 0.72) 0 3.6px, transparent 3.8px);
  background-repeat: no-repeat;
}

.round-value {
  font-size: clamp(1.96rem, 2.8vw, 2.72rem);
  justify-self: center;
  text-align: center;
  opacity: 0.68;
}

.round-caption {
  color: rgba(17, 17, 17, 0.54);
  justify-self: center;
}

.pile-icon {
  position: relative;
  width: 62px;
  height: 70px;
  flex: 0 0 auto;
  opacity: 0.88;
}

.pile-card {
  position: absolute;
  inset: 0;
  display: block;
  filter: drop-shadow(0 3px 3px rgba(17, 17, 17, 0.18));
}

.pile-card svg {
  display: block;
  width: 46px;
  height: 62px;
  opacity: 1;
}

.pile-card--1 {
  z-index: 1;
  transform: translate(-3px, 5px) rotate(-4deg);
}

.pile-card--2 {
  z-index: 2;
  transform: translate(5px, 0) rotate(0.5deg);
}

.pile-card--3 {
  z-index: 3;
  transform: translate(13px, -5px) rotate(4deg);
}

.pile-icon--empty {
  width: 46px;
  height: 62px;
  border: 1px dashed rgba(17, 17, 17, 0.55);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.65);
  box-sizing: border-box;
}

.cinema-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.cast-seat {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.cast-seat:last-child {
  border-right: 0;
}

.cast-seat::before {
  content: attr(data-badge);
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 9;
  color: var(--ink-muted);
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
}

.cast-seat[data-badge]:not([data-badge=""])::before {
  opacity: 1;
}

.cast-seat.is-judging-turn::before,
.cast-seat.is-thinking::before {
  color: #5b5b5b;
}

.cast-seat.is-eliminated {
  opacity: 0.32;
}

.cast-seat.is-inactive::before {
  opacity: 0.3;
}

.cast-seat[data-flash^="turn"]::after,
.pending-display[data-flash^="turn"]::after,
.pile-display[data-flash^="turn"]::after {
  background: rgba(17, 17, 17, 0.07);
  animation: flashSoft 420ms ease;
}

.cast-seat[data-flash^="danger"]::after,
.pending-display[data-flash^="danger"]::after,
.pile-display[data-flash^="danger"]::after {
  background: rgba(203, 60, 49, 0.13);
  animation: flashSoft 520ms ease;
}

.cast-seat[data-flash^="success"]::after,
.pending-display[data-flash^="success"]::after,
.pile-display[data-flash^="success"]::after {
  background: rgba(31, 122, 87, 0.12);
  animation: flashSoft 520ms ease;
}

.cast-seat[data-flash^="winner"]::after,
.pending-display[data-flash^="winner"]::after,
.pile-display[data-flash^="winner"]::after {
  background: rgba(31, 122, 87, 0.18);
  animation: flashWinner 760ms ease;
}

.seat-avatar {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  padding: 6px 0 0;
}

.seat-avatar .character-asset {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: min(236%, var(--portrait-size));
  margin: 0 auto;
}

.character-state-image,
.character-fallback,
.character-asset--generated svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0.22;
  transition: opacity 160ms ease;
}

.cast-seat.is-acting-turn .character-state-image,
.cast-seat.is-acting-turn .character-fallback,
.cast-seat.is-acting-turn .character-asset--generated svg,
.cast-seat.is-judged .character-state-image,
.cast-seat.is-judged .character-fallback,
.cast-seat.is-judged .character-asset--generated svg,
.cast-seat.is-judging-turn .character-state-image,
.cast-seat.is-judging-turn .character-fallback,
.cast-seat.is-judging-turn .character-asset--generated svg,
.cast-seat.is-awaiting-human .character-state-image,
.cast-seat.is-awaiting-human .character-fallback,
.cast-seat.is-awaiting-human .character-asset--generated svg,
.cast-seat.is-winner .character-state-image,
.cast-seat.is-winner .character-fallback,
.cast-seat.is-winner .character-asset--generated svg {
  opacity: 1;
}

.cast-seat.is-thinking .character-state-image,
.cast-seat.is-thinking .character-fallback,
.cast-seat.is-thinking .character-asset--generated svg {
  opacity: 0.82;
}

.cast-seat:not(.is-acting-turn):not(.is-judged):not(.is-judging-turn):not(.is-awaiting-human):not(.is-winner):not(.is-thinking) .character-state-image,
.cast-seat:not(.is-acting-turn):not(.is-judged):not(.is-judging-turn):not(.is-awaiting-human):not(.is-winner):not(.is-thinking) .character-fallback,
.cast-seat:not(.is-acting-turn):not(.is-judged):not(.is-judging-turn):not(.is-awaiting-human):not(.is-winner):not(.is-thinking) .character-asset--generated svg {
  opacity: 0.14;
}

.cast-seat.is-inactive .seat-footer,
.cast-seat.is-inactive .seat-peek-tray,
.cast-seat.is-inactive .seat-shout,
.cast-seat.is-finished-loser .seat-footer,
.cast-seat.is-finished-loser .seat-peek-tray {
  opacity: 0.34;
}

.cast-seat.is-inactive .seat-name,
.cast-seat.is-inactive .seat-chip,
.cast-seat.is-inactive .hand-overflow,
.cast-seat.is-finished-loser .seat-name,
.cast-seat.is-finished-loser .seat-chip,
.cast-seat.is-finished-loser .hand-overflow {
  opacity: 0.5;
}

.cast-seat.is-inactive .seat-peek-tray .table-card,
.cast-seat.is-finished-loser .seat-peek-tray .table-card {
  opacity: 0.46;
}

.cast-seat.is-reveal-focus .seat-footer,
.cast-seat.is-reveal-focus .seat-peek-tray,
.cast-seat.is-reveal-focus .seat-shout {
  opacity: 1;
}

.cast-seat.is-reveal-muted .seat-footer,
.cast-seat.is-reveal-muted .seat-peek-tray,
.cast-seat.is-reveal-muted .seat-shout {
  opacity: 0.26;
}

.cast-seat.is-reveal-muted .seat-name,
.cast-seat.is-reveal-muted .seat-chip,
.cast-seat.is-reveal-muted .hand-overflow,
.cast-seat.is-reveal-muted .seat-peek-tray .table-card {
  opacity: 0.42;
}

.cast-seat.is-reveal-winner .seat-shout {
  background: var(--success);
}

.cast-seat.is-reveal-loser .seat-shout {
  background: var(--danger);
}

.character-fallback {
  display: flex;
}

.seat-shout {
  position: absolute;
  top: 16px;
  left: 12px;
  z-index: 6;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  background: #111111;
  color: #ffffff;
  font-family: var(--display);
  font-size: clamp(0.7rem, 0.9vw, 0.94rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.seat-shout:empty {
  display: none;
}

.cast-seat.is-judged .seat-shout,
.cast-seat.is-acting-turn .seat-shout,
.cast-seat.is-awaiting-human.is-acting-turn .seat-shout {
  background: #111111;
}

.cast-seat.is-judging-turn .seat-shout {
  background: var(--danger);
}

.cast-seat.is-winner .seat-shout {
  background: var(--success);
}

.cast-seat.is-finished-loser .seat-shout {
  background: var(--ink-muted);
}

.seat-whistle {
  position: absolute;
  right: 18%;
  bottom: 59%;
  width: 68px;
  height: 56px;
  z-index: 7;
  pointer-events: none;
  opacity: 0;
}

.cast-seat.is-judged .seat-whistle {
  opacity: 1;
}

.seat-think {
  position: absolute;
  left: 50%;
  top: calc(1% + 8px);
  width: 54px;
  height: 54px;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
}

.cast-seat.is-judging-turn .seat-think,
.cast-seat.is-acting-turn:not(.is-judged) .seat-think {
  opacity: 1;
}

.seat-think svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.seat-think svg path {
  vector-effect: non-scaling-stroke;
}

.whistle-text {
  position: absolute;
  right: 0;
  bottom: 0;
  color: rgba(17, 17, 17, 0.74);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  white-space: nowrap;
  opacity: 0;
  animation: whistleTextDrift 1.85s linear infinite;
}

.whistle-text--1 {
  bottom: 10px;
  animation-delay: 0s;
}

.whistle-text--2 {
  bottom: 22px;
  animation-delay: 0.24s;
}

.whistle-text--3 {
  bottom: 34px;
  animation-delay: 0.48s;
}

.seat-peek-tray {
  position: absolute;
  right: 10px;
  bottom: 34px;
  left: 10px;
  z-index: 7;
  min-height: 64px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 4px 2px;
}

.seat-peek-tray:empty {
  visibility: hidden;
}

.peek-card-wrap {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}

.peek-card-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 64px;
  gap: 0;
}

.seat-peek-tray .table-card {
  width: 40px;
  flex: 0 0 auto;
  margin-inline: 0;
}

.cast-seat[data-peek-layout="grid"] .seat-peek-tray {
  display: block;
  max-height: 188px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 6px 4px;
}

.cast-seat[data-peek-layout="grid"] .peek-card-strip {
  display: grid;
  grid-template-columns: repeat(6, 40px);
  grid-auto-rows: 56px;
  justify-content: center;
  justify-items: center;
  align-content: end;
  row-gap: 6px;
  column-gap: 4px;
}

.cast-seat[data-peek-layout="grid"] .seat-peek-tray .table-card {
  margin-inline: 0;
}

.cast-seat[data-peek-open="true"] .seat-peek-tray .table-card.is-peek-revealed {
  animation: cardReveal 220ms ease both;
  animation-delay: calc(var(--peek-order, 0) * 55ms);
}

.hand-overflow {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 56px;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
}

.seat-footer {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  bottom: auto;
  z-index: 8;
  display: grid;
  gap: 6px;
  align-content: end;
  justify-items: end;
  max-width: calc(100% - 92px);
  padding: 0;
  background: none;
  text-align: right;
}

.seat-name,
.seat-chip {
  text-shadow: 0 1px 0 rgba(250, 250, 250, 0.86);
}

.seat-name {
  overflow: hidden;
  font-family: var(--marker);
  font-size: clamp(1.04rem, 1.42vw, 1.34rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.seat-chip-row,
.status-cluster,
.drawer-actions,
.utility-actions,
.command-buttons,
.selected-cards {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.seat-chip-row {
  justify-content: flex-end;
}

.seat-chip,
.status-chip,
.selected-pill,
.command-mode,
.panel-meta {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.seat-chip:empty,
.status-chip:empty,
.selected-pill:empty {
  display: none;
}

.seat-manual-panel {
  position: absolute;
  right: 12px;
  bottom: 110px;
  left: 12px;
  z-index: 9;
  pointer-events: none;
}

.seat-manual-panel:empty {
  display: none;
}

.seat-manual-panel .dialogue-command-panel {
  pointer-events: auto;
  gap: 10px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.08);
  color: var(--ink);
  overflow: visible;
}

.seat-manual-panel .command-copy {
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.34;
}

.seat-manual-panel .command-mode,
.seat-manual-panel .selected-pill {
  color: var(--ink-soft);
}

.seat-manual-panel .dialogue-hand {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 58px;
  justify-items: center;
  gap: 6px 4px;
  min-height: 0;
  max-height: 188px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 0 2px 2px;
}

.seat-manual-panel .dialogue-hand .table-card {
  width: 44px;
  margin-inline: 0;
}

.seat-manual-panel .command-buttons {
  gap: 8px;
}

.seat-manual-panel .control-btn {
  min-height: 36px;
  padding: 0 10px;
}

.seat-manual-panel .control-btn-primary {
  background: var(--ink);
  color: #ffffff;
}

.dialogue-bar {
  min-height: 0;
}

.dialogue-box {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  height: 224px;
  min-height: 224px;
  padding: 18px 20px 18px;
  border-top: 1px solid var(--line);
  background: #111111;
  color: #ffffff;
}

.dialogue-box[data-command-mode="manual-play"] {
  grid-template-rows: auto minmax(0, 1fr);
  height: 388px;
  min-height: 388px;
  gap: 8px;
}

.dialogue-box[data-command-mode="manual-challenge"] {
  grid-template-rows: auto minmax(0, 1fr);
  height: 312px;
  min-height: 312px;
  gap: 8px;
}

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

.phase-kicker {
  color: rgba(255, 255, 255, 0.7);
}

.phase-timer {
  position: static;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.phase-main {
  overflow: hidden;
  font-family: var(--sans);
  font-size: clamp(1.34rem, 2.1vw, 2rem);
  font-weight: 800;
  line-height: 1.06;
}

.dialogue-feed {
  display: grid;
  gap: 6px;
  align-content: start;
  overflow: hidden;
  padding-bottom: 6px;
}

.dialogue-feed-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 0 0 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dialogue-feed-entry:last-child {
  border-bottom: 0;
}

.dialogue-feed-entry.is-latest .dialogue-feed-title {
  color: #ffffff;
}

.dialogue-feed-entry.is-latest {
  animation: feedSlide 240ms ease;
}

.dialogue-feed-entry--danger .dialogue-feed-title {
  color: #e2685d;
}

.dialogue-feed-entry--success .dialogue-feed-title {
  color: #a9e4c5;
}

.dialogue-feed-entry--live .dialogue-feed-title {
  color: #ffcf8d;
}

.dialogue-feed-main {
  min-width: 0;
}

.dialogue-feed-title {
  color: rgba(255, 255, 255, 0.94);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.12;
}

.dialogue-feed-detail {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  line-height: 1.2;
}

.dialogue-feed-round {
  align-self: end;
  color: rgba(255, 255, 255, 0.38);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialogue-feed-empty {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
  line-height: 1.42;
}

.challenge-banner {
  display: grid;
  gap: 4px;
  min-height: 36px;
  align-content: start;
}

.challenge-banner.is-empty {
  visibility: hidden;
}

.challenge-copy,
.command-copy,
.launcher-note,
.launcher-error,
.log-detail,
.log-note,
.drawer-empty,
.orientation-guard__copy {
  font-size: 0.92rem;
  line-height: 1.42;
}

.challenge-banner[data-state="objection"] .challenge-label,
.challenge-banner[data-state="objection"] .challenge-copy {
  color: var(--danger);
}

.challenge-banner[data-state="sustained"] .challenge-label,
.challenge-banner[data-state="sustained"] .challenge-copy,
.challenge-banner[data-state="overruled"] .challenge-label,
.challenge-banner[data-state="overruled"] .challenge-copy {
  color: #9ae0be;
}

.dialogue-command-panel {
  display: grid;
  gap: 10px;
  min-height: 0;
  align-content: start;
  overflow: hidden;
}

.dialogue-command-home {
  display: contents;
}

.dialogue-box[data-command-mode="manual-play"] .dialogue-command-panel {
  grid-template-rows: auto auto minmax(154px, auto) auto auto;
  gap: 12px;
  align-content: stretch;
  overflow: visible;
}

.dialogue-box[data-command-mode="manual-challenge"] .dialogue-command-panel {
  gap: 12px;
  overflow: visible;
}

.command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.command-rank {
  font-family: var(--display);
  font-size: clamp(0.98rem, 1.4vw, 1.18rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.command-mode,
.selected-pill {
  color: rgba(255, 255, 255, 0.84);
}

.dialogue-hand {
  display: flex;
  gap: 8px;
  min-width: 0;
  min-height: 72px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  align-items: flex-end;
}

.dialogue-box[data-command-mode="manual-play"] .dialogue-hand {
  min-height: 132px;
  padding: 6px 16px 4px 2px;
  align-items: flex-start;
}

.dialogue-box[data-command-mode="manual-challenge"] .dialogue-hand {
  display: none;
}

.table-card {
  width: 58px;
  flex: 0 0 auto;
  transition: transform 160ms ease;
}

.table-card svg {
  width: 100%;
  height: auto;
}

.table-card.is-selectable {
  cursor: pointer;
}

.table-card.is-selectable:hover {
  transform: translateY(-4px);
}

.table-card.is-selected {
  transform: translateY(-8px);
}

.dialogue-box[data-command-mode="manual-play"] .dialogue-hand .table-card {
  width: 56px;
}

.dialogue-box[data-command-mode="manual-play"] .command-buttons .control-btn,
.dialogue-box[data-command-mode="manual-challenge"] .command-buttons .control-btn {
  min-height: 44px;
}

.dialogue-box[data-command-mode="manual-challenge"] .command-buttons {
  padding-bottom: 6px;
}

.selected-pill--muted {
  opacity: 0.68;
}

.control-btn,
.launcher-mode-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.control-btn:hover:not(:disabled),
.launcher-mode-card:hover {
  background: rgba(17, 17, 17, 0.03);
}

.control-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.control-btn-primary {
  background: var(--ink);
  color: #ffffff;
}

.dialogue-box .control-btn {
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.dialogue-box .control-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.dialogue-box .control-btn-primary {
  background: #ffffff;
  color: var(--ink);
}

.utility-toggle {
  position: absolute;
  top: 12px;
  right: 18px;
  z-index: 24;
  display: grid;
  gap: 3px;
  padding: 5px;
  background: #111111;
  cursor: pointer;
}

.utility-toggle span {
  width: 11px;
  height: 1.5px;
  background: #ffffff;
}

.side-panel {
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background: #020202;
  color: #ffffff;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  opacity: 1;
  pointer-events: none;
  transform: none;
  transition: none;
}

.app-shell[data-sidebar-open="true"] .side-panel {
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: #ffffff;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side-panel-header {
  padding-right: 14px;
}

.side-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 14px;
}

.side-tab {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.side-tab.is-active {
  border-color: #ffffff;
  background: #ffffff;
  color: #020202;
}

.side-panel-scroll {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 18px;
}

.side-section {
  display: grid;
  gap: 14px;
}

.experiment-guide {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

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

.experiment-faq-item {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.experiment-faq-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.experiment-faq-item.is-selected .experiment-faq-title,
.experiment-faq-item[open] .experiment-faq-title {
  color: #ffffff;
}

.experiment-faq-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
}

.experiment-faq-item summary {
  display: grid;
  gap: 4px;
  list-style: none;
  cursor: pointer;
}

.experiment-faq-item summary::-webkit-details-marker {
  display: none;
}

.experiment-faq-id {
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.experiment-faq-title {
  color: rgba(255, 255, 255, 0.74);
  font-family: var(--display);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.experiment-faq-line,
.experiment-faq-detail {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  line-height: 1.45;
}

.experiment-faq-detail {
  padding-top: 8px;
}

.experiment-faq-item--single {
  border-top: 0;
  padding-top: 0;
}

.experiment-faq-item--single .experiment-faq-line {
  padding-top: 2px;
}

.side-section-body {
  min-height: 0;
  max-height: calc(100dvh - 290px);
  overflow: auto;
}

.side-section-title {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-transform: uppercase;
}

.side-section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-select,
.launcher-field {
  display: grid;
  gap: 6px;
}

.control-select {
  position: relative;
}

.side-panel .control-select span,
.side-panel .drawer-meta,
.side-panel .panel-meta,
.side-panel .drawer-empty {
  color: rgba(255, 255, 255, 0.58);
}

.control-select select,
.launcher-field select,
.launcher-field input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #ffffff;
}

.launcher-field input[data-filled="true"] {
  letter-spacing: 0.18em;
}

.side-panel .control-select select,
.side-panel .launcher-field select,
.side-panel .launcher-field input {
  background: #020202;
}

.side-panel select option {
  color: #111111;
}

.select-native {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
}

.custom-select-trigger,
.custom-select-option {
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: transparent;
  color: inherit;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-align: left;
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-caret {
  flex: 0 0 auto;
  font-family: var(--display);
  font-size: 0.88rem;
  line-height: 1;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 45;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(17, 17, 17, 0.18);
}

.custom-select-option {
  min-height: 34px;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-align: left;
}

.custom-select-option.is-selected {
  pointer-events: none;
}

.side-panel .custom-select-trigger,
.side-panel .custom-select-option {
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.side-panel .custom-select-trigger,
.side-panel .custom-select-menu {
  background: #020202;
}

.side-panel .custom-select-menu {
  border-color: rgba(255, 255, 255, 0.18);
}

.side-panel .custom-select-trigger:hover:not(:disabled),
.side-panel .custom-select-option:hover:not(.is-selected) {
  background: rgba(255, 255, 255, 0.06);
}

.side-panel .custom-select-option.is-selected {
  background: #ffffff;
  color: #020202;
}

.launcher-panel .custom-select-trigger,
.launcher-panel .custom-select-option {
  border-color: rgba(17, 17, 17, 0.16);
  color: #111111;
  background: #ffffff;
}

.launcher-panel .custom-select-menu {
  border-color: rgba(17, 17, 17, 0.16);
  background: #ffffff;
}

.launcher-panel .custom-select-trigger:hover:not(:disabled),
.launcher-panel .custom-select-option:hover:not(.is-selected) {
  background: rgba(17, 17, 17, 0.04);
}

.launcher-panel .custom-select-option.is-selected {
  background: #111111;
  color: #ffffff;
}

.side-panel .control-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  background: transparent;
}

.side-panel .control-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.side-panel .control-btn:disabled {
  opacity: 0.42;
}

.side-panel .control-btn-primary {
  border-color: #ffffff;
  background: #ffffff;
  color: #020202;
}

.side-panel .control-btn-primary:hover:not(:disabled) {
  background: #ffffff;
}

.utility-actions .control-btn {
  min-height: 70px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 18px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
}

.utility-actions .control-btn::before {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0;
  content: "";
}

#new-game-btn::before {
  content: "+";
}

#auto-play-btn::before {
  content: "▶";
  padding-left: 2px;
}

#setup-toggle-btn::before {
  content: "⚙";
  font-size: 0.94rem;
}

#sound-toggle-btn::before {
  content: "♪";
  font-size: 0.92rem;
}

#sound-toggle-btn {
  position: relative;
}

#sound-toggle-btn::after {
  content: "";
  position: absolute;
  top: 25px;
  left: 50%;
  width: 38px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(-42deg) scaleX(0.7);
  transition: opacity 160ms ease, transform 160ms ease;
}

#sound-toggle-btn.is-sound-off::after {
  opacity: 1;
  transform: translateX(-50%) rotate(-42deg) scaleX(1);
}

#research-stats-link {
  grid-column: 1 / -1;
  min-height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 14px;
}

.side-panel-close {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  justify-content: center;
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1;
}

.side-panel-footer {
  display: grid;
  gap: 6px;
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  justify-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.side-panel-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.side-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.side-social-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.side-social-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.side-social-link text {
  display: none;
}

.side-panel-footer a {
  color: #ffffff;
  text-decoration: none;
}

.side-panel-footer a:hover {
  text-decoration: underline;
}

.log-turn {
  display: grid;
  gap: 10px;
  padding: 12px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.log-turn:last-child {
  border-bottom: 0;
}

.log-turn-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.log-title {
  font-family: var(--display);
  font-size: 0.94rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.log-turn--danger .log-title,
.log-trace-row--danger .log-trace-title {
  color: #ff7a71;
}

.log-turn--success .log-title,
.log-trace-row--success .log-trace-title {
  color: #8fe0ba;
}

.log-turn-body {
  display: grid;
  gap: 10px;
}

.log-trace-row {
  display: grid;
  gap: 2px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.log-trace-label {
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.log-trace-title {
  color: #ffffff;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.log-meta {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.46);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats-table-wrap {
  overflow: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  color: #ffffff;
}

.stats-table th,
.stats-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  text-align: left;
}

.stats-table th {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.58);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats-model {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stats-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.launcher-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 17, 17, 0.42);
}

.launcher-panel {
  width: min(640px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #ffffff;
}

.launcher-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.launcher-header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.launcher-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.launcher-mode-card {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 8px;
  min-height: 112px;
  padding: 14px 14px 13px;
  text-align: left;
}

.launcher-mode-card strong {
  display: block;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.launcher-mode-card > span:last-child {
  display: block;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.3;
}

.launcher-mode-card.is-selected {
  background: var(--ink);
  color: #ffffff;
}

.launcher-mode-card.is-selected .launcher-mode-label,
.launcher-mode-card.is-selected span:last-child {
  color: rgba(255, 255, 255, 0.8);
}

.launcher-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.launcher-panel .launcher-field select,
.launcher-panel .launcher-field input {
  border-color: rgba(17, 17, 17, 0.18);
  background: #ffffff;
  color: #111111;
}

.launcher-panel .launcher-field input::placeholder {
  color: rgba(17, 17, 17, 0.54);
  opacity: 1;
}

.launcher-panel .launcher-field input[data-filled="true"] {
  border-color: rgba(17, 17, 17, 0.22);
  letter-spacing: 0.18em;
}

.launcher-note,
.launcher-error {
  margin-top: 10px;
}

.launcher-error {
  color: var(--danger);
}

.launcher-actions {
  display: block;
  margin-top: 12px;
}

.launcher-actions .control-btn {
  width: 100%;
}

.launcher-actions .control-btn-primary {
  min-height: 42px;
  border-radius: 999px;
}

.fx-card-flight {
  position: fixed;
  z-index: 40;
  width: 40px;
  pointer-events: none;
  opacity: 1;
  transform: translate(0, 0) rotate(0deg) scale(1);
  transition: transform 620ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 620ms ease;
}

.fx-card-flight svg {
  width: 100%;
  height: auto;
}

.app-main.is-shaking {
  animation: stageShake 260ms linear;
}

.orientation-guard {
  display: none;
}

.orientation-guard__panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 260px;
  text-align: center;
}

.orientation-guard__phone {
  position: relative;
  width: 58px;
  height: 92px;
  border: 2px solid #111111;
}

.orientation-guard__phone::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(17, 17, 17, 0.3);
}

.orientation-guard__phone span {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 26px;
  height: 2px;
  background: #111111;
  transform: translate(-50%, -50%) rotate(90deg);
}

.orientation-guard__title {
  color: var(--ink);
}

.orientation-guard__copy {
  color: var(--ink-soft);
}

@keyframes flashSoft {
  0% {
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes flashWinner {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  44% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
  }
}

@keyframes notebookFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(17, 17, 17, 0);
  }
  28% {
    box-shadow: 0 0 0 6px rgba(17, 17, 17, 0.08);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(17, 17, 17, 0);
  }
}

@keyframes actingPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.018);
  }
}

@keyframes cardReveal {
  0% {
    transform: rotateY(90deg);
    opacity: 0.5;
  }
  100% {
    transform: rotateY(0deg);
    opacity: 1;
  }
}

@keyframes feedSlide {
  0% {
    transform: translateY(6px);
    opacity: 0.35;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes stageShake {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  18% {
    transform: translate3d(-4px, 0, 0);
  }
  36% {
    transform: translate3d(4px, 0, 0);
  }
  54% {
    transform: translate3d(-3px, 0, 0);
  }
  72% {
    transform: translate3d(3px, 0, 0);
  }
}

@keyframes whistleTextDrift {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  14% {
    opacity: 0.76;
  }
  100% {
    opacity: 0;
    transform: translate3d(10px, -4px, 0);
  }
}

@media (max-width: 1280px) {
  .screen-hud {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  .turn-pill {
    flex-basis: 104px;
    min-width: 104px;
  }
}

@media (max-width: 1080px) {
  .app-main {
    padding: 14px 16px 16px;
    gap: 14px;
  }

  .screen-hud {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-right: 0;
    gap: 16px;
  }

  .claim-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .hud-state,
  .hud-turn-order {
    padding-left: 0;
    border-left: 0;
  }

  .dialogue-box {
    height: 236px;
    min-height: 236px;
  }

  .app-shell[data-sidebar-open="true"] {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 34vw);
  }
}

@media (max-width: 900px) {
  .cast-grid {
    gap: 6px;
  }

  .cast-seat {
    padding-inline: 8px;
  }

  .seat-peek-tray .table-card {
    width: 32px;
  }

  .turn-thumb {
    width: 54px;
    height: 54px;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .orientation-guard {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(250, 250, 250, 0.98);
  }
}

@media (max-width: 820px) {
  .launcher-mode-grid,
  .launcher-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
