:root {
  --remote-ink: #2c1e16;
  --remote-ink-soft: rgba(44, 30, 22, 0.72);
  --remote-cream: #f7edd8;
  --remote-paper: rgba(251, 244, 229, 0.95);
  --remote-warm-line: rgba(109, 72, 39, 0.18);
  --remote-shadow: 0 20px 48px rgba(22, 14, 10, 0.34);
  --controller-stage-width: 430px;
  --controller-stage-height: 760px;
}

.remote-screen-shell {
  min-height: 100%;
  display: grid;
  place-items: stretch;
  overflow: hidden;
}

.remote-screen-frame {
  width: var(--controller-frame-width, 100%);
  height: var(--controller-frame-height, 100%);
  overflow: hidden;
}

.remote-screen-content {
  width: var(--controller-stage-width);
  height: var(--controller-stage-height);
  transform: scale(var(--controller-stage-scale, 1));
  transform-origin: top left;
}

.remote-shell {
  width: var(--controller-stage-width);
  height: var(--controller-stage-height);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.7rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 216, 145, 0.3), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(255, 243, 208, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(92, 57, 31, 0.26), rgba(35, 24, 18, 0.78)),
    url("/assets/art/universe/table-wood.png") center / cover no-repeat;
  color: #fff7ea;
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
}

.remote-shell-entry {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 214, 126, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(71, 46, 28, 0.42), rgba(24, 18, 14, 0.84)),
    url("/assets/art/universe/table-wood.png") center / cover no-repeat;
}

.remote-header,
.remote-entry-header,
.remote-stage-card,
.remote-command-button,
.remote-entry-card {
  border: 1px solid rgba(255, 235, 200, 0.12);
  box-shadow: var(--remote-shadow);
}

.remote-header {
  display: grid;
  gap: 0.5rem;
  padding: 0.68rem 0.72rem 0.62rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(219, 151, 70, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(60, 38, 23, 0.97), rgba(35, 23, 17, 0.98));
}

.remote-header.is-compact {
  gap: 0.28rem;
  padding: 0.38rem 0.48rem 0.4rem;
}

.remote-header-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.46rem;
  align-items: center;
}

.remote-header-dice {
  display: grid;
  justify-items: center;
  gap: 0.22rem;
  padding: 0.42rem 0.5rem;
  border-radius: 18px;
  background: rgba(255, 248, 233, 0.08);
  border: 1px solid rgba(255, 235, 200, 0.12);
}

.remote-header-dice-pair {
  display: flex;
  gap: 0.34rem;
}

.remote-header-dice .remote-die {
  width: 2.45rem;
  border-radius: 0.68rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(74, 51, 33, 0.14);
}

.remote-header-dice .remote-pip {
  width: 0.36rem;
  height: 0.36rem;
}

.remote-header-dice .remote-pip.pos-top-left,
.remote-header-dice .remote-pip.pos-top-right {
  top: 0.42rem;
}

.remote-header-dice .remote-pip.pos-top-left,
.remote-header-dice .remote-pip.pos-mid-left,
.remote-header-dice .remote-pip.pos-bottom-left {
  left: 0.42rem;
}

.remote-header-dice .remote-pip.pos-top-right,
.remote-header-dice .remote-pip.pos-mid-right,
.remote-header-dice .remote-pip.pos-bottom-right {
  right: 0.42rem;
}

.remote-header-dice .remote-pip.pos-mid-left,
.remote-header-dice .remote-pip.pos-mid-right,
.remote-header-dice .remote-pip.pos-center {
  top: calc(50% - 0.18rem);
}

.remote-header-dice .remote-pip.pos-center {
  left: calc(50% - 0.18rem);
}

.remote-header-dice .remote-pip.pos-bottom-left,
.remote-header-dice .remote-pip.pos-bottom-right {
  bottom: 0.42rem;
}

.remote-header-dice-total {
  min-width: 1.7rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 900;
  color: #fff0cf;
}

.remote-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.remote-accent {
  width: 0.44rem;
  align-self: stretch;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 248, 232, 0.2);
}

.remote-name-stack {
  min-width: 0;
}

.remote-micro,
.remote-overline {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 223, 163, 0.8);
}

.remote-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.remote-name-line h1,
.remote-entry-header h1 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1;
  font-family: "Iowan Old Style", "Georgia", serif;
}

.remote-color-pill {
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2d1f16;
  background: linear-gradient(180deg, rgba(255, 241, 212, 0.96), rgba(245, 220, 165, 0.96));
}

.remote-turn-banner {
  min-width: 7.9rem;
  display: grid;
  gap: 0.14rem;
  padding: 0.48rem 0.64rem;
  border-radius: 16px;
  background: rgba(255, 245, 228, 0.08);
  border: 1px solid rgba(255, 236, 206, 0.12);
  text-align: right;
}

.remote-turn-banner.is-active {
  background: linear-gradient(180deg, rgba(248, 208, 124, 0.95), rgba(223, 134, 64, 0.92));
  border-color: rgba(255, 243, 222, 0.24);
  color: #2f1b0d;
}

.remote-turn-banner span {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 226, 178, 0.78);
}

.remote-turn-banner strong {
  font-size: 0.94rem;
  line-height: 1.05;
}

.remote-turn-banner.is-active span {
  color: rgba(64, 37, 13, 0.72);
}

.remote-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.remote-header-rail {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
}

.remote-score-line-card {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.26rem 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 236, 206, 0.1);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 220, 146, 0.16), transparent 38%),
    rgba(255, 248, 234, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  white-space: nowrap;
}

.remote-score-inline-stat,
.remote-score-inline-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  padding: 0.22rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 236, 206, 0.08);
  background: rgba(255, 250, 240, 0.08);
  color: rgba(255, 243, 219, 0.92);
}

.remote-score-inline-label {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 225, 170, 0.76);
}

.remote-score-inline-stat strong {
  font-size: 0.82rem;
  line-height: 1;
  color: #fff7ea;
}

.remote-score-inline-badge {
  min-width: 1.9rem;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 232, 197, 0.78);
  background: rgba(255, 247, 228, 0.1);
}

.remote-score-inline-badge.is-active {
  color: #2f1b0d;
  border-color: rgba(255, 241, 210, 0.3);
  background: linear-gradient(180deg, rgba(255, 234, 188, 0.98), rgba(243, 195, 112, 0.94));
  box-shadow: 0 8px 18px rgba(34, 22, 15, 0.18);
}

.remote-header.is-compact .remote-score-line-card {
  gap: 0.22rem;
  padding: 0.24rem 0.28rem;
}

.remote-header.is-compact .remote-score-inline-stat,
.remote-header.is-compact .remote-score-inline-badge {
  gap: 0.14rem;
  padding: 0.18rem 0.32rem;
}

.remote-header.is-compact .remote-score-inline-label,
.remote-header.is-compact .remote-score-inline-badge {
  font-size: 0.46rem;
}

.remote-header.is-compact .remote-score-inline-stat strong {
  font-size: 0.72rem;
}

.remote-resource-mini-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.3rem;
}

.remote-resource-mini-pill {
  min-width: 0;
  position: relative;
  display: grid;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 0.52rem;
  min-height: 6.2rem;
  padding: 0.86rem 0.3rem 0.74rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 230, 173, 0.12), transparent 48%),
    rgba(255, 248, 234, 0.08);
  border: 1px solid rgba(255, 236, 206, 0.12);
  overflow: hidden;
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    background 200ms ease,
    box-shadow 200ms ease;
}

.remote-resource-mini-pill.is-gain {
  border-color: rgba(111, 170, 97, 0.44);
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 245, 185, 0.44), transparent 56%),
    linear-gradient(180deg, rgba(236, 251, 228, 0.96), rgba(201, 232, 188, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 16px 30px rgba(56, 104, 59, 0.2);
  animation: remote-resource-flash-gain 2800ms ease;
}

.remote-resource-mini-pill.is-loss {
  border-color: rgba(192, 99, 83, 0.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 205, 196, 0.38), transparent 56%),
    linear-gradient(180deg, rgba(253, 236, 233, 0.96), rgba(237, 194, 184, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 16px 30px rgba(132, 61, 47, 0.2);
  animation: remote-resource-flash-loss 2800ms ease;
}

.remote-resource-mini-pill img {
  width: 2.05rem;
  height: 2.05rem;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.remote-resource-mini-pill strong {
  font-size: 1.34rem;
  color: #fff9ef;
  line-height: 1;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.remote-resource-mini-delta {
  position: absolute;
  top: 0.42rem;
  right: 0.34rem;
  z-index: 2;
  min-width: 2rem;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  text-align: center;
  box-shadow: 0 10px 18px rgba(24, 16, 12, 0.16);
}

.remote-resource-mini-pill.is-gain .remote-resource-mini-delta {
  color: #16311b;
  background: linear-gradient(180deg, rgba(213, 255, 198, 0.98), rgba(141, 212, 125, 0.95));
}

.remote-resource-mini-pill.is-loss .remote-resource-mini-delta {
  color: #4f1611;
  background: linear-gradient(180deg, rgba(255, 223, 216, 0.98), rgba(232, 139, 124, 0.95));
}

.remote-resource-mini-pill:is(.is-gain, .is-loss) .remote-resource-mini-delta {
  animation: remote-resource-delta-pop 2800ms ease;
}

.remote-header.is-compact .remote-resource-mini-strip {
  gap: 0.28rem;
}

.remote-header.is-compact .remote-resource-mini-pill {
  min-height: 3.9rem;
  gap: 0.18rem;
  padding: 0.34rem 0.16rem 0.28rem;
  border-radius: 15px;
}

.remote-header.is-compact .remote-resource-mini-pill img {
  width: 1.18rem;
  height: 1.18rem;
}

.remote-header.is-compact .remote-resource-mini-pill strong {
  font-size: 0.88rem;
}

.remote-header.is-compact .remote-resource-mini-delta {
  top: 0.28rem;
  right: 0.2rem;
  min-width: 1.5rem;
  padding: 0.14rem 0.28rem;
  font-size: 0.5rem;
}

.remote-resource-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.34rem;
}

.remote-resource-pill {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  padding: 0.36rem 0.28rem;
  border-radius: 14px;
  background: rgba(255, 248, 234, 0.08);
  border: 1px solid rgba(255, 236, 206, 0.1);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.remote-resource-pill.is-highlighted {
  transform: translateY(-1px);
  border-color: rgba(255, 228, 166, 0.38);
  background: rgba(255, 226, 154, 0.18);
}

.remote-resource-pill img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

.remote-resource-pill-copy {
  min-width: 0;
  display: grid;
  gap: 0.04rem;
}

.remote-resource-pill strong {
  display: block;
  font-size: 0.94rem;
  color: #fff9ef;
}

.remote-resource-pill span {
  display: block;
  font-size: 0.46rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 231, 192, 0.74);
}

.remote-stage-frame {
  min-height: 0;
  display: grid;
}

.remote-stage-card {
  position: relative;
  min-height: 0;
  height: 100%;
  padding: 0.86rem;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 243, 214, 0.52), transparent 28%),
    linear-gradient(180deg, rgba(248, 241, 226, 0.985), rgba(236, 223, 198, 0.975)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent);
  color: var(--remote-ink);
  animation: none;
}

.remote-stage-card.has-back {
  padding-top: 3rem;
}

.remote-stage-back {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 2;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 250, 239, 0.94), rgba(243, 229, 199, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  border: 1px solid rgba(107, 72, 43, 0.14);
  color: rgba(58, 37, 20, 0.88);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 24px rgba(56, 43, 32, 0.08);
}

.remote-stage-content {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0.42rem;
}

.remote-stage-content-roll {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.remote-stage-content-roll-resolving {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.remote-stage-content-waiting {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.5rem;
}

.remote-stage-content-hub {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.remote-roll-body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.remote-stage-content-roll-resolving .remote-roll-body {
  flex: 1 1 auto;
  justify-content: space-between;
}

.remote-hero-button-ghost {
  min-height: 3.2rem;
}

.remote-stage-content-trade {
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

.remote-stage-content-trade,
.remote-stage-content-spatial-legal,
.remote-stage-content-confirmed {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.42rem;
}

.remote-stage-content-roll .remote-dice-stage,
.remote-stage-content-roll-resolving .remote-dice-stage {
  width: 100%;
  align-self: center;
  align-content: center;
}

.remote-stage-content-roll .remote-dice-pair,
.remote-stage-content-roll-resolving .remote-dice-pair {
  gap: 0.72rem;
}

.remote-stage-content-roll .remote-die,
.remote-stage-content-roll-resolving .remote-die {
  width: 8.35rem;
  border-radius: 1.5rem;
}

:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-top-left,
:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-top-right {
  top: 1.08rem;
}

:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-top-left,
:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-mid-left,
:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-bottom-left {
  left: 1.08rem;
}

:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-top-right,
:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-mid-right,
:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-bottom-right {
  right: 1.08rem;
}

:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-mid-left,
:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-mid-right,
:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-center {
  top: calc(50% - 0.46rem);
}

:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-center {
  left: calc(50% - 0.46rem);
}

:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-bottom-left,
:is(.remote-stage-content-roll, .remote-stage-content-roll-resolving) .remote-pip.pos-bottom-right {
  bottom: 1.08rem;
}

.remote-stage-content h2 {
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.01;
  font-family: "Iowan Old Style", "Georgia", serif;
}

.remote-stage-copy {
  margin: 0;
  color: var(--remote-ink-soft);
  line-height: 1.28;
  max-width: 34ch;
  font-size: 0.9rem;
}

.remote-waiting-hero {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.84rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 224, 168, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(255, 248, 234, 0.9), rgba(244, 232, 208, 0.96));
  border: 1px solid rgba(109, 72, 39, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.remote-waiting-hero span {
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(92, 57, 31, 0.66);
}

.remote-waiting-hero strong {
  font-size: 1.06rem;
  line-height: 1.08;
  color: #382316;
}

.remote-waiting-hero small {
  font-size: 0.72rem;
  line-height: 1.18;
  color: rgba(72, 49, 33, 0.72);
}

.tone-roll {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 209, 107, 0.26), transparent 24%),
    linear-gradient(180deg, rgba(252, 242, 216, 0.98), rgba(243, 223, 180, 0.98));
}

.tone-build {
  background:
    radial-gradient(circle at 85% 8%, rgba(145, 192, 154, 0.22), transparent 22%),
    linear-gradient(180deg, rgba(245, 241, 222, 0.98), rgba(225, 234, 214, 0.97));
}

.tone-trade {
  background:
    radial-gradient(circle at 86% 10%, rgba(255, 183, 119, 0.24), transparent 24%),
    linear-gradient(180deg, rgba(252, 241, 222, 0.98), rgba(245, 220, 193, 0.97));
}

.tone-cards {
  background:
    radial-gradient(circle at 18% 0%, rgba(159, 180, 201, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(244, 240, 230, 0.98), rgba(222, 229, 235, 0.97));
}

.tone-robber {
  background:
    radial-gradient(circle at 90% 10%, rgba(215, 100, 70, 0.2), transparent 24%),
    linear-gradient(180deg, rgba(248, 237, 227, 0.98), rgba(240, 213, 200, 0.97));
}

.tone-calm,
.tone-hub,
.tone-success {
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 227, 171, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(247, 239, 221, 0.98), rgba(234, 226, 211, 0.98));
}

.remote-action-grid,
.remote-mode-grid,
.remote-build-grid,
.remote-choice-grid,
.remote-dev-grid,
.remote-pick-grid,
.remote-rate-grid,
.remote-stepper-grid,
.remote-receive-grid,
.remote-victim-grid,
.remote-waiting-panel {
  display: grid;
  gap: 0.62rem;
}

.remote-action-grid,
.remote-mode-grid,
.remote-build-grid,
.remote-waiting-panel,
.remote-finish-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.remote-action-grid-hub {
  height: 100%;
  align-self: stretch;
  align-content: stretch;
  grid-auto-rows: minmax(6.25rem, 1fr);
  align-items: stretch;
}

.remote-hub-insights {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.remote-hub-insight {
  display: grid;
  gap: 0.12rem;
  padding: 0.58rem 0.68rem;
  border-radius: 18px;
  background: rgba(255, 249, 239, 0.82);
  border: 1px solid rgba(107, 72, 43, 0.1);
}

.remote-hub-insight span,
.remote-waiting-footer span {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(79, 54, 35, 0.72);
}

.remote-hub-insight strong,
.remote-waiting-footer strong {
  font-size: 0.84rem;
  line-height: 1.14;
  color: rgba(44, 30, 22, 0.94);
}

.remote-hub-insight.is-warning,
.remote-waiting-footer.is-warning {
  background: linear-gradient(180deg, rgba(252, 236, 210, 0.96), rgba(245, 220, 188, 0.96));
  border-color: rgba(206, 127, 76, 0.18);
}

.remote-hub-insight.is-positive,
.remote-waiting-footer.is-positive {
  background: linear-gradient(180deg, rgba(241, 247, 235, 0.96), rgba(227, 239, 223, 0.96));
  border-color: rgba(94, 137, 91, 0.18);
}

.remote-finish-banner {
  display: grid;
  gap: 0.18rem;
  padding: 0.78rem 0.9rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 220, 145, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(247, 234, 205, 0.98), rgba(238, 221, 186, 0.98));
  border: 1px solid rgba(212, 168, 88, 0.24);
  color: #2f2419;
}

.remote-finish-banner span {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(80, 56, 28, 0.72);
}

.remote-finish-banner strong {
  font-size: 1.62rem;
  line-height: 1;
}

.remote-finish-banner small {
  color: rgba(80, 56, 28, 0.82);
}

.remote-roll-guidance {
  width: 100%;
  grid-auto-rows: 1fr;
}

.remote-roll-chip-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.44rem;
}

.remote-roll-chip {
  display: grid;
  gap: 0.12rem;
  padding: 0.66rem 0.72rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 224, 168, 0.18), transparent 36%),
    rgba(255, 249, 237, 0.78);
  border: 1px solid rgba(109, 72, 39, 0.12);
}

.remote-roll-chip span {
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(92, 57, 31, 0.62);
}

.remote-roll-chip strong {
  font-size: 0.9rem;
  line-height: 1.14;
  color: #342114;
}

.remote-roll-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
}

.remote-roll-progress {
  display: grid;
  gap: 0.18rem;
  padding: 0.76rem 0.86rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 220, 145, 0.18), transparent 34%),
    rgba(255, 248, 232, 0.72);
  border: 1px solid rgba(121, 84, 50, 0.12);
}

.remote-roll-progress span {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(86, 58, 31, 0.68);
}

.remote-roll-progress strong {
  font-size: 0.96rem;
  line-height: 1.2;
  color: rgba(44, 30, 22, 0.92);
}

.remote-waiting-event {
  align-content: start;
}

.remote-waiting-panel-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.remote-waiting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.36rem;
}

.remote-waiting-footer {
  display: grid;
  gap: 0.08rem;
  margin-top: auto;
  padding: 0.64rem 0.78rem;
  border-radius: 20px;
  background: rgba(255, 250, 242, 0.84);
  border: 1px solid rgba(107, 72, 43, 0.1);
}

.remote-waiting-footer small {
  display: none;
}

.remote-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  min-height: 0;
}

.remote-stage-content-spatial {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.remote-stage-content-spatial-legal {
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

.remote-board-map-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 18rem;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(104, 76, 48, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 250, 239, 0.92), rgba(246, 236, 214, 0.88)),
    radial-gradient(circle at 50% 35%, rgba(149, 204, 223, 0.32), transparent 52%),
    linear-gradient(180deg, rgba(196, 227, 236, 0.96), rgba(161, 204, 219, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 12px 28px rgba(63, 43, 28, 0.12);
}

.remote-board-map-viewport {
  width: 100%;
  height: 100%;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
}

.remote-board-map-viewport.is-zoomed {
  cursor: grab;
}

.remote-board-map-viewport.is-zoomed:active {
  cursor: grabbing;
}

.remote-board-map {
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: 50% 50%;
  transition: transform 120ms ease;
  filter: drop-shadow(0 12px 24px rgba(34, 22, 14, 0.1));
  will-change: transform;
}

.remote-board-tile {
  fill: transparent;
  stroke: rgba(28, 19, 12, 0.82);
  stroke-width: 3.2;
}

.remote-board-tile-surface {
  stroke: none;
}

.remote-board-tile-texture {
  opacity: 0.88;
  mix-blend-mode: normal;
  pointer-events: none;
  filter: saturate(1.15) contrast(1.08) brightness(1.02);
}

.remote-board-tile.is-legal {
  stroke: rgba(243, 188, 55, 0.98);
  stroke-width: 5.1;
}

.remote-board-tile.is-selected {
  stroke: rgba(35, 126, 90, 0.98);
  stroke-width: 5.8;
}

.remote-board-tile-legal-fill {
  fill: rgba(255, 214, 92, 0.22);
  stroke: rgba(255, 248, 231, 0.72);
  stroke-width: 1.2;
}

.remote-board-tile-legal-fill.is-selected {
  fill: rgba(57, 163, 118, 0.26);
  stroke: rgba(235, 255, 246, 0.82);
}

.remote-board-token circle {
  fill: rgba(255, 249, 235, 0.98);
  stroke: rgba(75, 45, 25, 0.5);
  stroke-width: 2.6;
  filter: drop-shadow(0 5px 10px rgba(33, 20, 11, 0.12));
}

.remote-board-token text {
  font-size: 1.35rem;
  font-weight: 950;
  text-anchor: middle;
  fill: #2e2014;
  paint-order: stroke;
  stroke: rgba(255, 249, 235, 0.9);
  stroke-width: 2.2px;
  stroke-linejoin: round;
}

.remote-board-robber text {
  font-size: 1rem;
  font-weight: 900;
  text-anchor: middle;
  fill: #2e2014;
}

.remote-board-robber circle {
  fill: rgba(51, 35, 25, 0.92);
  stroke: rgba(255, 238, 206, 0.54);
  stroke-width: 1.8;
  filter: drop-shadow(0 5px 10px rgba(16, 10, 6, 0.22));
}

.remote-board-robber text {
  fill: #fff7ea;
}

.remote-board-edge-outline {
  stroke: rgba(12, 10, 8, 0.94);
  stroke-width: 11;
  stroke-linecap: round;
  opacity: 0.66;
}

.remote-board-edge-outline.is-owned {
  stroke-width: 15;
  opacity: 0.98;
}

.remote-board-edge-outline.is-legal {
  stroke: rgba(74, 51, 12, 0.98);
  stroke-width: 17;
  opacity: 1;
}

.remote-board-edge-outline.is-selected {
  stroke: rgba(11, 55, 38, 0.98);
  stroke-width: 18;
  opacity: 1;
}

.remote-board-edge {
  stroke: rgba(138, 112, 88, 0.34);
  stroke-width: 8.2;
  stroke-linecap: round;
}

.remote-board-edge.is-owned {
  stroke: var(--road-color);
  stroke-width: 11.8;
}

.remote-board-edge.is-legal {
  stroke: rgba(255, 213, 95, 0.98);
  stroke-width: 13.4;
}

.remote-board-edge.is-selected {
  stroke: rgba(54, 181, 129, 0.98);
  stroke-width: 14.4;
}

.remote-board-structure-shadow {
  fill: rgba(12, 10, 8, 0.9);
  transform: translateY(2px);
}

.remote-board-structure-shadow.is-city {
  fill: rgba(12, 10, 8, 0.96);
}

.remote-board-structure {
  fill: var(--structure-color);
  stroke: rgba(12, 10, 8, 0.96);
  stroke-width: 2.8;
  filter: drop-shadow(0 5px 12px rgba(33, 20, 11, 0.18));
}

.remote-board-structure.is-city {
  stroke-width: 3.1;
}

.remote-board-legal-point {
  fill: rgba(255, 201, 78, 0.98);
  stroke: rgba(255, 249, 236, 0.96);
  stroke-width: 3;
}

.remote-board-legal-ring {
  fill: rgba(255, 220, 131, 0.34);
  stroke: rgba(255, 247, 227, 0.88);
  stroke-width: 2.6;
}

.remote-board-legal-ring.is-selected {
  fill: rgba(49, 153, 110, 0.38);
  stroke: rgba(213, 255, 238, 0.92);
}

.remote-board-legal-point.is-selected {
  fill: rgba(42, 133, 94, 0.96);
}

.remote-board-road-pad {
  fill: rgba(255, 203, 84, 0.34);
  stroke: rgba(255, 248, 229, 0.92);
  stroke-width: 2.4;
}

.remote-board-road-pad.is-selected {
  fill: rgba(49, 153, 110, 0.38);
  stroke: rgba(213, 255, 238, 0.92);
}

.remote-board-hit-target,
.remote-board-hit-area,
.remote-board-hit-dot {
  cursor: pointer;
  fill: transparent;
  stroke: transparent;
  touch-action: manipulation;
}

.remote-board-hit-target {
  stroke-width: 52;
}

.remote-board-hit-dot-road {
  pointer-events: auto;
}

.remote-choice-hint,
.remote-choice-page-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0 0.1rem;
}

.remote-choice-hint strong,
.remote-choice-page-readout {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(75, 52, 33, 0.74);
}

.remote-choice-hint span {
  font-size: 0.86rem;
  color: rgba(52, 37, 24, 0.72);
  text-align: right;
}

.remote-choice-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.72rem 0.82rem;
  border-radius: 18px;
  border: 1px solid rgba(98, 67, 43, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(244, 233, 212, 0.96));
}

.remote-choice-selected > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.remote-choice-selected strong {
  font-size: 0.96rem;
}

.remote-choice-selected span,
.remote-choice-selected small {
  color: var(--remote-ink-soft);
}

.remote-choice-selected small {
  flex-shrink: 0;
  font-size: 0.72rem;
}

.remote-choice-selected.is-empty {
  background: rgba(255, 249, 239, 0.7);
}

.remote-choice-list-button {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(98, 67, 43, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.94), rgba(244, 233, 212, 0.94));
  color: var(--remote-ink);
  text-align: left;
}

.remote-choice-list-button > div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.remote-choice-list-button strong {
  font-size: 0.98rem;
}

.remote-choice-list-button.is-selected {
  border-color: rgba(58, 122, 84, 0.28);
  box-shadow: 0 10px 22px rgba(56, 43, 32, 0.1);
}

.remote-choice-list-button span,
.remote-choice-list-button small {
  color: var(--remote-ink-soft);
}

.remote-choice-list-button small {
  flex-shrink: 0;
  font-size: 0.74rem;
  text-align: right;
}

.remote-dev-grid,
.remote-pick-grid,
.remote-rate-grid,
.remote-receive-grid,
.remote-stepper-grid,
.remote-victim-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.remote-rate-grid,
.remote-receive-grid,
.remote-stepper-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.remote-action-tile,
.remote-build-card,
.remote-choice-card,
.remote-dev-card,
.remote-rate-card,
.remote-receive-token,
.remote-pick-token,
.remote-victim-chip,
.remote-seat-card,
.remote-stepper-token {
  min-width: 0;
  display: grid;
  gap: 0.42rem;
  padding: 0.74rem 0.78rem;
  border-radius: 24px;
  border: 1px solid rgba(98, 67, 43, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.94), rgba(244, 233, 212, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: var(--remote-ink);
}

.remote-action-tile strong,
.remote-build-card strong,
.remote-choice-card strong,
.remote-dev-card strong,
.remote-rate-card strong,
.remote-pick-token strong,
.remote-victim-chip strong,
.remote-seat-card strong {
  font-size: 0.94rem;
}

.remote-action-tile span,
.remote-build-card span,
.remote-choice-card span,
.remote-dev-card p,
.remote-rate-card span,
.remote-victim-chip span,
.remote-seat-card span,
.remote-waiting-card small {
  line-height: 1.22;
  color: var(--remote-ink-soft);
}

.remote-action-tile {
  display: grid;
  align-content: end;
  min-height: 6.75rem;
  text-align: left;
}

.remote-action-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.remote-action-tile-badge {
  padding: 0.16rem 0.36rem;
  border-radius: 999px;
  background: rgba(95, 67, 41, 0.1);
  color: rgba(79, 53, 29, 0.88);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.remote-action-grid-hub .remote-action-tile {
  min-height: 0;
  height: 100%;
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.68rem;
  padding-top: 0.88rem;
  padding-bottom: 0.82rem;
}

.remote-action-tile-body {
  display: grid;
  gap: 0.18rem;
  align-content: start;
}

.remote-action-tile-body strong {
  font-size: 0.88rem;
  line-height: 1.14;
}

.remote-action-tile-body small {
  font-size: 0.72rem;
  line-height: 1.22;
  color: rgba(79, 54, 35, 0.76);
}

.remote-action-tile.is-muted {
  background: rgba(255, 250, 242, 0.62);
}

.remote-action-tile:disabled {
  opacity: 0.64;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.remote-action-tile > span:last-child {
  font-size: 0.82rem;
  line-height: 1.18;
}

.remote-build-card {
  min-height: 8.2rem;
  align-content: space-between;
  text-align: left;
}

.remote-build-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.remote-build-card-head span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.remote-build-card small {
  color: var(--remote-ink-soft);
}

.remote-build-card.is-available,
.remote-build-card.is-ready,
.remote-build-card.is-selected {
  border-color: rgba(84, 144, 95, 0.22);
}

.remote-build-card.is-selected {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(84, 144, 95, 0.22), 0 14px 28px rgba(52, 41, 32, 0.12);
}

.remote-build-card.is-unavailable {
  opacity: 0.5;
}

.remote-confirm-card,
.remote-incoming-card,
.remote-incoming-summary,
.remote-trade-summary,
.remote-note-strip,
.remote-waiting-card,
.remote-entry-card {
  display: grid;
  gap: 0.44rem;
  padding: 0.82rem 0.88rem;
  border-radius: 24px;
  background: rgba(255, 249, 239, 0.76);
  border: 1px solid rgba(107, 72, 43, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.remote-confirm-card p,
.remote-note-strip span,
.remote-note-strip strong,
.remote-zone-label {
  margin: 0;
}

.remote-waiting-card span,
.remote-note-strip span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(86, 58, 31, 0.68);
}

.remote-waiting-card strong,
.remote-confirm-card strong,
.remote-note-strip strong {
  font-size: 1rem;
  line-height: 1.08;
  color: rgba(44, 30, 22, 0.94);
}

.remote-waiting-card small,
.remote-confirm-card p {
  font-size: 0.82rem;
  line-height: 1.26;
}

.remote-waiting-card.is-compact,
.remote-confirm-card.is-compact {
  gap: 0.3rem;
  padding: 0.62rem 0.72rem;
  border-radius: 20px;
}

.remote-waiting-grid .is-wide {
  grid-column: 1 / -1;
}

.remote-waiting-card.is-compact strong,
.remote-confirm-card.is-compact strong {
  font-size: 0.88rem;
  line-height: 1.14;
}

.remote-waiting-card.is-compact small,
.remote-confirm-card.is-compact p {
  font-size: 0.72rem;
  line-height: 1.24;
}

.remote-waiting-event p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.remote-incoming-summary.is-ready,
.remote-trade-summary.is-ready {
  background: rgba(225, 244, 223, 0.72);
  border-color: rgba(73, 121, 76, 0.24);
}

.remote-incoming-summary.is-blocked,
.remote-trade-summary.is-blocked {
  background: rgba(250, 230, 220, 0.78);
  border-color: rgba(166, 90, 59, 0.24);
}

.remote-trade-summary.is-neutral {
  background: rgba(244, 234, 219, 0.78);
  border-color: rgba(107, 72, 43, 0.2);
}

.remote-trade-choice-grid {
  display: grid;
  gap: 0.7rem;
}

.remote-trade-choice-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  padding: 0.95rem 1rem;
  border-radius: 22px;
  background: rgba(255, 249, 239, 0.74);
  border: 1px solid rgba(107, 72, 43, 0.12);
  color: var(--remote-ink);
}

.remote-trade-choice-player {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  min-width: 0;
}

.remote-trade-choice-dot {
  width: 0.72rem;
  height: 2rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.remote-cost-strip,
.remote-trade-row,
.remote-page-dots,
.remote-seat-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.remote-cost-chip {
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 237, 206, 0.92);
  border: 1px solid rgba(117, 83, 49, 0.14);
}

.remote-cost-chip img,
.remote-trade-pill img,
.remote-rate-card img,
.remote-receive-token img,
.remote-pick-token img,
.remote-stepper-token img {
  width: 1.45rem;
  height: 1.45rem;
  object-fit: contain;
}

.remote-cost-chip.is-empty {
  width: auto;
  padding: 0 0.7rem;
  font-size: 0.74rem;
}

.remote-choice-card {
  min-height: 6.9rem;
  text-align: left;
  align-content: start;
}

.remote-choice-card small {
  color: rgba(44, 30, 22, 0.52);
  font-size: 0.74rem;
}

.remote-choice-card.tone-port {
  background: linear-gradient(180deg, rgba(255, 244, 218, 0.96), rgba(248, 225, 190, 0.96));
}

.remote-choice-list-button.tone-port {
  background: linear-gradient(180deg, rgba(255, 244, 218, 0.96), rgba(248, 225, 190, 0.96));
}

.remote-choice-card.tone-coast {
  background: linear-gradient(180deg, rgba(243, 248, 247, 0.96), rgba(220, 234, 231, 0.96));
}

.remote-choice-list-button.tone-coast {
  background: linear-gradient(180deg, rgba(243, 248, 247, 0.96), rgba(220, 234, 231, 0.96));
}

.remote-choice-card.tone-hot {
  background: linear-gradient(180deg, rgba(255, 243, 225, 0.96), rgba(248, 220, 195, 0.96));
}

.remote-choice-list-button.tone-hot {
  background: linear-gradient(180deg, rgba(255, 243, 225, 0.96), rgba(248, 220, 195, 0.96));
}

.remote-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.remote-page-dots {
  justify-content: center;
}

.remote-page-dots span {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  background: rgba(84, 62, 45, 0.18);
}

.remote-page-dots span.is-active {
  background: var(--player-accent);
}

.remote-trade-stack {
  display: grid;
  gap: 0.58rem;
}

.remote-stage-content-trade .remote-trade-stack {
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.remote-trade-zone {
  display: grid;
  gap: 0.58rem;
  padding: 0.72rem;
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.9);
  border: 1px solid rgba(107, 72, 43, 0.08);
}

body.controller-body .remote-trade-zone .remote-stepper-token {
  gap: 0.24rem;
  padding: 0.34rem 0.2rem 0.2rem;
  border-radius: 18px;
}

body.controller-body .remote-trade-zone .remote-stepper-token img {
  width: 1.2rem;
  height: 1.2rem;
}

.remote-zone-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
}

.remote-zone-label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(79, 54, 35, 0.8);
}

.remote-zone-total {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.56rem;
  border-radius: 999px;
  background: rgba(96, 65, 42, 0.08);
  border: 1px solid rgba(96, 65, 42, 0.1);
  font-size: 0.82rem;
  color: rgba(47, 31, 20, 0.9);
}

.remote-stepper-token {
  gap: 0.28rem;
  align-content: start;
  padding: 0.38rem 0.24rem 0.24rem;
  border-radius: 20px;
  border: 1px solid rgba(98, 67, 43, 0.08);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(245, 236, 219, 0.96));
  justify-items: center;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 8px 18px rgba(83, 59, 38, 0.06);
}

.remote-stepper-token.is-active {
  border-color: rgba(214, 152, 74, 0.32);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 216, 135, 0.28), transparent 42%),
    linear-gradient(180deg, rgba(255, 251, 242, 0.98), rgba(246, 231, 203, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 12px 22px rgba(111, 74, 32, 0.1);
}

.remote-stepper-token span {
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(79, 54, 35, 0.72);
}

.remote-stepper-tap {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 0.24rem;
  padding: 0.16rem 0.08rem 0.08rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}

.remote-stepper-tap:disabled {
  opacity: 0.72;
}

.remote-stepper-meter {
  display: grid;
  justify-items: center;
  gap: 0.08rem;
  min-width: 100%;
  padding: 0.24rem 0.12rem 0.18rem;
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 251, 242, 0.98), rgba(241, 231, 210, 0.96));
  border: 1px solid rgba(120, 86, 52, 0.1);
}

.remote-stepper-meter strong {
  font-size: 1.18rem;
  line-height: 1;
}

.remote-stepper-meter small {
  font-size: 0.44rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(88, 60, 38, 0.7);
}

.remote-stepper-token img {
  width: 1.48rem;
  height: 1.48rem;
}

.remote-stepper-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  width: 100%;
}

.remote-stepper-controls button,
.remote-pagination button,
.remote-hero-button,
.remote-entry-label input,
.remote-entry-label button {
  border-radius: 18px;
}

.remote-stepper-controls button {
  min-height: 1.74rem;
  font-size: 0.92rem;
  font-weight: 900;
  border: 1px solid rgba(107, 72, 43, 0.12);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 6px 12px rgba(72, 49, 31, 0.06);
}

.remote-stepper-controls button:first-child,
.remote-stepper-controls button:last-child {
  background: linear-gradient(180deg, rgba(244, 236, 221, 0.98), rgba(226, 213, 188, 0.96));
  color: rgba(73, 51, 33, 0.9);
}

.remote-stepper-controls button:disabled {
  background: linear-gradient(180deg, rgba(210, 198, 181, 0.92), rgba(190, 176, 157, 0.94));
  color: rgba(108, 89, 70, 0.72);
  box-shadow: none;
}

.remote-trade-dock {
  display: grid;
  gap: 0.44rem;
  margin-top: auto;
  padding: 0.18rem 0 0;
}

.remote-trade-dock.is-compact {
  gap: 0.42rem;
  padding-top: 0;
}

.remote-trade-dock.is-summary-hidden {
  margin-top: 0.18rem;
}

.remote-stage-content-endturn .remote-stage-copy {
  max-width: 30ch;
}

.remote-endturn-stack {
  display: grid;
  gap: 0.5rem;
  flex: 1 1 auto;
  align-content: start;
}

.remote-stage-content-endturn .remote-confirm-card,
.remote-stage-content-endturn .remote-waiting-card {
  padding: 0.82rem 0.88rem;
}

.remote-stage-content-endturn .remote-trade-dock {
  margin-top: auto;
}

.remote-trade-dock-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.68rem 0.8rem;
  border-radius: 18px;
  background: rgba(255, 249, 239, 0.86);
  border: 1px solid rgba(107, 72, 43, 0.1);
}

.remote-trade-dock-summary strong {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(44, 30, 22, 0.92);
  text-align: center;
}

.remote-trade-dock-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0.42rem;
}

.remote-trade-dock-actions.is-single {
  grid-template-columns: 1fr;
}

.remote-trade-dock-actions.is-triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.remote-trade-dock-button {
  min-height: 3.28rem;
  border-radius: 20px;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.remote-stage-card.stage-card-build_pick_location,
.remote-stage-card.stage-card-robber_pick_tile,
.remote-stage-card.stage-card-robber_pick_victim {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.remote-stage-card.stage-card-build_pick_location::-webkit-scrollbar,
.remote-stage-card.stage-card-robber_pick_tile::-webkit-scrollbar,
.remote-stage-card.stage-card-robber_pick_victim::-webkit-scrollbar {
  display: none;
}

.remote-trade-dock-button.tone-secondary {
  background:
    linear-gradient(180deg, rgba(255, 249, 239, 0.96), rgba(230, 214, 187, 0.96));
  color: #332116;
  border: 1px solid rgba(107, 72, 43, 0.12);
}

.remote-trade-dock-button.tone-primary {
  background: linear-gradient(180deg, #f5cc74, #df8740);
  color: #2f1b0d;
  border: 1px solid rgba(255, 245, 220, 0.28);
}

.remote-trade-dock-button.tone-danger {
  background: linear-gradient(180deg, #e98867, #c65f40);
  color: #fff7f2;
  border: 1px solid rgba(255, 236, 230, 0.22);
}

.remote-trade-dock-button:disabled {
  opacity: 0.74;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.remote-trade-dock-button.tone-primary:disabled,
.remote-trade-dock-button.tone-danger:disabled {
  color: rgba(62, 41, 24, 0.76);
  background: linear-gradient(180deg, rgba(237, 220, 183, 0.96), rgba(223, 201, 164, 0.94));
  border-color: rgba(129, 93, 58, 0.16);
}

.remote-stage-action-dock {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.1rem;
  margin-top: auto;
}

.remote-stage-action-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.78rem 0.88rem;
  border-radius: 20px;
  background: rgba(255, 249, 239, 0.86);
  border: 1px solid rgba(107, 72, 43, 0.1);
}

.remote-stage-action-summary span {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(79, 54, 35, 0.76);
}

.remote-stage-action-summary strong {
  margin: 0;
  font-size: 0.94rem;
  color: rgba(44, 30, 22, 0.92);
  text-align: right;
}

.remote-stage-action-button {
  min-height: 3.55rem;
  border-radius: 22px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.remote-stage-action-button.tone-primary {
  background: linear-gradient(180deg, #f5cc74, #df8740);
  color: #2f1b0d;
  border: 1px solid rgba(255, 245, 220, 0.28);
}

.remote-stage-action-button:disabled {
  opacity: 0.52;
}

body.controller-body .remote-stage-content-spatial-legal {
  gap: 0.4rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-stage-copy {
  font-size: 0.88rem;
  line-height: 1.12;
}

body.controller-body .stage-card-build_pick_location.has-back {
  padding-top: 2.95rem;
}

body.controller-body .stage-card-build_pick_location .remote-stage-content-spatial-legal {
  gap: 0.32rem;
}

body.controller-body .stage-card-build_pick_location .remote-board-map-shell {
  flex: 1 1 auto;
  min-height: 13.2rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-choice-selected {
  gap: 0.6rem;
  padding: 0.62rem 0.72rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-choice-selected strong {
  font-size: 0.9rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-choice-selected span,
body.controller-body .remote-stage-content-spatial-legal .remote-choice-selected small {
  font-size: 0.68rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-stage-action-summary {
  padding: 0.64rem 0.72rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-stage-action-button {
  min-height: 3.1rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-trade-dock {
  gap: 0.36rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-trade-dock-summary {
  padding: 0.58rem 0.72rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-trade-dock-summary strong {
  font-size: 0.82rem;
}

body.controller-body .remote-stage-content-spatial-legal .remote-trade-dock-button {
  min-height: 3rem;
  border-radius: 18px;
}

body.controller-body .remote-waiting-panel-compact {
  gap: 0.42rem;
}

body.controller-body .remote-waiting-card.is-compact,
body.controller-body .remote-confirm-card.is-compact {
  padding: 0.58rem 0.66rem;
}

body.controller-body .remote-waiting-card.is-compact strong,
body.controller-body .remote-confirm-card.is-compact strong {
  font-size: 0.88rem;
}

body.controller-body .remote-waiting-card.is-compact small,
body.controller-body .remote-confirm-card.is-compact p {
  font-size: 0.7rem;
}

body.controller-body .remote-roll-guidance,
body.controller-body .remote-roll-metrics {
  gap: 0.42rem;
}

body.controller-body .remote-roll-chip-row {
  gap: 0.38rem;
}

body.controller-body .remote-roll-chip {
  padding: 0.58rem 0.64rem;
}

body.controller-body .remote-roll-chip strong {
  font-size: 0.82rem;
}

body.controller-body .remote-roll-progress {
  padding: 0.64rem 0.72rem;
}

body.controller-body .remote-roll-progress strong {
  font-size: 0.88rem;
}

@media (max-height: 820px) {
  body.controller-body .remote-stage-back {
    top: 0.62rem;
    left: 0.62rem;
    padding: 0.34rem 0.68rem;
  }

  body.controller-body .remote-stage-content-spatial-legal h2 {
    font-size: 1.34rem;
  }

  body.controller-body .remote-stage-content-spatial-legal .remote-board-map-shell {
    min-height: 12.2rem;
    border-radius: 20px;
  }

  body.controller-body .remote-stage-content-spatial-legal .remote-stage-action-dock {
    gap: 0.38rem;
  }

  body.controller-body .stage-card-build_pick_location.has-back {
    padding-top: 2.78rem;
  }

  body.controller-body .remote-stage-content-spatial-legal .remote-choice-selected {
    padding: 0.52rem 0.66rem;
  }

  body.controller-body .remote-stage-content-spatial-legal .remote-trade-dock {
    gap: 0.3rem;
  }

  body.controller-body .remote-stage-content-spatial-legal .remote-trade-dock-button {
    min-height: 2.82rem;
  }

  body.controller-body .remote-waiting-panel-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.controller-body .remote-roll-metrics {
    grid-template-columns: 1fr;
  }
}

.remote-dev-card {
  min-height: 8.4rem;
  text-align: left;
}

.remote-dev-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.remote-dev-card-head span {
  padding: 0.26rem 0.46rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.38);
}

.remote-dev-card p {
  margin: 0;
}

.remote-dev-card small {
  color: rgba(44, 30, 22, 0.56);
}

.remote-dev-card.tone-danger {
  background: linear-gradient(180deg, rgba(252, 236, 228, 0.98), rgba(240, 205, 191, 0.96));
}

.remote-dev-card.tone-build {
  background: linear-gradient(180deg, rgba(243, 244, 228, 0.98), rgba(217, 228, 204, 0.96));
}

.remote-dev-card.tone-trade {
  background: linear-gradient(180deg, rgba(252, 241, 222, 0.98), rgba(246, 218, 191, 0.96));
}

.remote-dev-card.tone-cards {
  background: linear-gradient(180deg, rgba(241, 244, 247, 0.98), rgba(214, 224, 235, 0.96));
}

.remote-fresh-strip {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem 0.95rem;
  border-radius: 20px;
  background: rgba(255, 249, 239, 0.68);
  border: 1px solid rgba(107, 72, 43, 0.12);
}

.remote-card-picker,
.remote-dice-stage {
  display: grid;
  gap: 0.9rem;
  align-content: center;
  justify-items: center;
  min-height: 0;
}

.remote-card-picker-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  border-radius: 22px;
  background: rgba(255, 249, 239, 0.72);
  border: 1px solid rgba(107, 72, 43, 0.12);
}

.remote-pick-token,
.remote-rate-card,
.remote-receive-token {
  justify-items: center;
  text-align: center;
}

.remote-pick-token span,
.remote-rate-card span,
.remote-receive-token span {
  color: var(--remote-ink-soft);
}

.remote-pick-token.is-selected,
.remote-rate-card.is-selected,
.remote-receive-token.is-selected,
.remote-victim-chip.is-selected,
.remote-seat-card.is-selected {
  transform: translateY(-1px);
  border-color: rgba(58, 122, 84, 0.28);
  box-shadow: 0 10px 22px rgba(56, 43, 32, 0.1);
}

.remote-rate-card.is-disabled,
.remote-seat-card.is-disabled {
  opacity: 0.46;
}

.remote-victim-grid {
  align-content: start;
}

.remote-victim-chip {
  grid-template-columns: auto 1fr;
  align-items: center;
  text-align: left;
}

.remote-victim-color,
.remote-seat-swatch {
  width: 0.7rem;
  height: 2.2rem;
  border-radius: 999px;
}

.remote-dice-pair {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  justify-content: center;
}

.remote-die {
  position: relative;
  width: 6rem;
  aspect-ratio: 1;
  border-radius: 1.45rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 230, 205, 0.98));
  border: 1px solid rgba(116, 80, 46, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 20px 40px rgba(74, 51, 33, 0.18);
}

.remote-dice-stage.is-rolling .remote-die {
  animation: remote-die-roll 620ms cubic-bezier(0.18, 0.82, 0.2, 1) infinite;
}

.remote-dice-stage.is-result .remote-die {
  animation: remote-die-settle 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.remote-pip {
  position: absolute;
  width: 0.92rem;
  height: 0.92rem;
  border-radius: 999px;
  background: #332116;
}

.remote-pip.pos-top-left {
  top: 0.98rem;
  left: 0.98rem;
}

.remote-pip.pos-top-right {
  top: 0.98rem;
  right: 0.98rem;
}

.remote-pip.pos-mid-left {
  top: calc(50% - 0.46rem);
  left: 0.98rem;
}

.remote-pip.pos-mid-right {
  top: calc(50% - 0.46rem);
  right: 0.98rem;
}

.remote-pip.pos-center {
  top: calc(50% - 0.46rem);
  left: calc(50% - 0.46rem);
}

.remote-pip.pos-bottom-left {
  bottom: 0.98rem;
  left: 0.98rem;
}

.remote-pip.pos-bottom-right {
  bottom: 0.98rem;
  right: 0.98rem;
}

.remote-dice-total {
  min-width: 4.2rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(255, 249, 239, 0.78);
  border: 1px solid rgba(107, 72, 43, 0.12);
}

.remote-hero-button {
  justify-self: center;
  min-width: min(20rem, 100%);
  min-height: 3.75rem;
  padding: 1.12rem 1.5rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #f6ca70, #de8439);
  border: 1px solid rgba(255, 245, 220, 0.28);
  color: #2b1a0e;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 16px 26px rgba(117, 69, 31, 0.22);
}

.remote-empty-inline,
.remote-empty-block {
  color: rgba(44, 30, 22, 0.56);
}

.remote-empty-block {
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 249, 239, 0.72);
  border: 1px dashed rgba(107, 72, 43, 0.14);
}

.remote-command-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.remote-command-button {
  min-width: 0;
  min-height: 4.05rem;
  display: grid;
  align-content: center;
  gap: 0.2rem;
  padding: 0.66rem 0.7rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(59, 38, 24, 0.96), rgba(37, 24, 18, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
  color: #fff8ee;
  text-align: left;
}

.remote-command-button strong {
  min-width: 0;
  font-size: 0.94rem;
  line-height: 1.02;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.remote-command-button span {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: rgba(255, 232, 190, 0.76);
  font-size: 0.68rem;
  line-height: 1.12;
}

.remote-command-button.tone-primary {
  background: linear-gradient(180deg, #f5cc74, #df8740);
  color: #2f1b0d;
}

.remote-command-button.tone-primary span {
  color: rgba(53, 32, 14, 0.68);
}

.remote-command-button.tone-secondary {
  background:
    linear-gradient(180deg, rgba(246, 241, 231, 0.96), rgba(224, 210, 185, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
  color: #2f1b0d;
}

.remote-command-button.tone-secondary span,
.remote-command-button.is-static.tone-ghost span {
  color: rgba(47, 27, 13, 0.68);
}

.remote-command-button.tone-danger {
  background: linear-gradient(180deg, #e98867, #c65f40);
  color: #fff7f2;
}

.remote-command-button.is-static {
  cursor: default;
}

.remote-command-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.remote-toast-layer {
  pointer-events: none;
  position: fixed;
  top: calc(env(safe-area-inset-top) + 0.8rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
}

.remote-toast {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(39, 24, 17, 0.92);
  border: 1px solid rgba(255, 230, 194, 0.18);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  font-size: 0.94rem;
}

.remote-entry-header {
  padding: 0.96rem 1rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(60, 38, 23, 0.96), rgba(37, 24, 17, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.remote-entry-header p {
  margin: 0.36rem 0 0;
  max-width: 28ch;
  color: rgba(255, 236, 204, 0.76);
  line-height: 1.34;
}

.remote-entry-stage {
  min-height: 0;
}

.remote-entry-card {
  height: 100%;
  padding: 0.8rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(247, 239, 221, 0.98), rgba(237, 224, 199, 0.97)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
  color: var(--remote-ink);
}

.remote-entry-label {
  display: grid;
  gap: 0.38rem;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(58, 37, 20, 0.64);
}

.remote-entry-label input {
  width: 100%;
  border: 1px solid rgba(117, 83, 49, 0.14);
  background: rgba(255, 250, 241, 0.9);
  color: var(--remote-ink);
  padding: 0.74rem 0.82rem;
  font-size: 0.98rem;
}

.remote-seat-preview {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
}

.remote-seat-card {
  min-height: 5.3rem;
  align-content: start;
  text-align: left;
  gap: 0.28rem;
}

.remote-stepper-controls button,
.remote-pagination button,
.remote-command-button,
.remote-action-tile,
.remote-build-card,
.remote-choice-card,
.remote-choice-list-button,
.remote-dev-card,
.remote-rate-card,
.remote-receive-token,
.remote-pick-token,
.remote-victim-chip,
.remote-seat-card,
.remote-hero-button {
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    filter 140ms ease;
}

.remote-stepper-controls button:hover,
.remote-pagination button:hover,
.remote-command-button:hover,
.remote-action-tile:hover,
.remote-build-card:hover,
.remote-choice-card:hover,
.remote-choice-list-button:hover,
.remote-dev-card:hover,
.remote-rate-card:hover,
.remote-receive-token:hover,
.remote-pick-token:hover,
.remote-victim-chip:hover,
.remote-seat-card:hover,
.remote-hero-button:hover,
.remote-stepper-controls button:focus-visible,
.remote-pagination button:focus-visible,
.remote-command-button:focus-visible,
.remote-action-tile:focus-visible,
.remote-build-card:focus-visible,
.remote-choice-card:focus-visible,
.remote-choice-list-button:focus-visible,
.remote-dev-card:focus-visible,
.remote-rate-card:focus-visible,
.remote-receive-token:focus-visible,
.remote-pick-token:focus-visible,
.remote-victim-chip:focus-visible,
.remote-seat-card:focus-visible,
.remote-hero-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 12px 24px rgba(56, 43, 32, 0.12);
}

@keyframes remote-stage-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes remote-die-roll {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  50% {
    transform: translateY(-10px) rotate(16deg) scale(1.04);
  }

  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes remote-die-settle {
  from {
    transform: translateY(-8px) scale(1.03);
  }

  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes remote-resource-flash-gain {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  12% {
    transform: translateY(-2px) scale(1.04);
  }

  24% {
    transform: translateY(0) scale(1.01);
  }
}

@keyframes remote-resource-flash-loss {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  12% {
    transform: translateY(-2px) scale(1.04);
  }

  24% {
    transform: translateY(0) scale(1.01);
  }
}

@keyframes remote-resource-delta-pop {
  0% {
    transform: translateY(6px) scale(0.92);
    opacity: 0;
  }

  10%,
  84% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-4px) scale(0.96);
    opacity: 0;
  }
}

@media (max-width: 560px) {
  body:not(.controller-body) .remote-shell {
    padding:
      calc(env(safe-area-inset-top) + 0.55rem)
      calc(env(safe-area-inset-right) + 0.55rem)
      calc(env(safe-area-inset-bottom) + 0.55rem)
      calc(env(safe-area-inset-left) + 0.55rem);
  }

  body:not(.controller-body) .remote-header-top {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.controller-body) .remote-turn-banner {
    min-width: 0;
    text-align: left;
  }

  body:not(.controller-body) .remote-resource-strip,
  body:not(.controller-body) .remote-rate-grid,
  body:not(.controller-body) .remote-receive-grid,
  body:not(.controller-body) .remote-stepper-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body:not(.controller-body) .remote-score-line-card {
    gap: 0.18rem;
    padding: 0.22rem 0.24rem;
  }

  body:not(.controller-body) .remote-score-inline-stat,
  body:not(.controller-body) .remote-score-inline-badge {
    gap: 0.12rem;
    padding: 0.18rem 0.26rem;
  }

  body:not(.controller-body) .remote-score-inline-label,
  body:not(.controller-body) .remote-score-inline-badge {
    font-size: 0.44rem;
  }

  body:not(.controller-body) .remote-score-inline-stat strong {
    font-size: 0.7rem;
  }

  body:not(.controller-body) .remote-resource-pill {
    gap: 0.24rem;
    padding: 0.34rem 0.18rem;
  }

  body:not(.controller-body) .remote-resource-pill img {
    width: 0.94rem;
    height: 0.94rem;
  }

  body:not(.controller-body) .remote-resource-pill span {
    font-size: 0.42rem;
  }

  body:not(.controller-body) .remote-resource-pill strong {
    font-size: 0.82rem;
  }

  body:not(.controller-body) .remote-action-grid,
  body:not(.controller-body) .remote-mode-grid,
  body:not(.controller-body) .remote-build-grid,
  body:not(.controller-body) .remote-dev-grid,
  body:not(.controller-body) .remote-pick-grid,
  body:not(.controller-body) .remote-choice-grid,
  body:not(.controller-body) .remote-victim-grid,
  body:not(.controller-body) .remote-seat-preview,
  body:not(.controller-body) .remote-waiting-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.controller-body) .remote-choice-card,
  body:not(.controller-body) .remote-action-tile,
  body:not(.controller-body) .remote-build-card,
  body:not(.controller-body) .remote-dev-card {
    min-height: 5.7rem;
    padding: 0.72rem;
  }

  body:not(.controller-body) .remote-board-map-shell {
    min-height: clamp(14.5rem, 38vh, 19rem);
  }

  body:not(.controller-body) .remote-stepper-token {
    padding-inline: 0.25rem;
  }

  body:not(.controller-body) .remote-stepper-token strong {
    font-size: 0.94rem;
  }

  body:not(.controller-body) .remote-command-row {
    gap: 0.5rem;
  }

  body:not(.controller-body) .remote-command-button {
    min-height: 3.72rem;
    padding: 0.54rem 0.58rem;
  }
}

@media (min-width: 760px) {
  body:not(.controller-body) .remote-action-grid-hub {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body:not(.controller-body) .remote-action-grid-hub .remote-action-tile {
    min-height: clamp(5.8rem, 16vh, 7rem);
    aspect-ratio: auto;
  }
}

/* Catan controller overhaul: compact iOS command deck with the TV board art direction. */
body.controller-body {
  position: fixed;
  inset: 0;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(9, 46, 54, 0.88), rgba(18, 45, 39, 0.9)),
    url("/assets/art/universe/live/backgrounds/seafarer-water.png") center / cover no-repeat;
}

body.controller-body * {
  -webkit-tap-highlight-color: transparent;
}

body.controller-body .remote-screen-shell,
body.controller-body .remote-screen-frame {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

body.controller-body .remote-shell {
  gap: 0.48rem;
  padding:
    calc(env(safe-area-inset-top) + 0.48rem)
    calc(env(safe-area-inset-right) + 0.48rem)
    calc(env(safe-area-inset-bottom) + 0.48rem)
    calc(env(safe-area-inset-left) + 0.48rem);
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 223, 150, 0.26), transparent 25%),
    linear-gradient(180deg, rgba(23, 47, 44, 0.58), rgba(27, 17, 10, 0.72)),
    url("/assets/art/universe/table-wood.png") center / 620px 620px repeat;
}

body.controller-body .remote-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 232, 180, 0.08), transparent 28%),
    radial-gradient(circle at 50% 50%, transparent 46%, rgba(5, 14, 15, 0.34));
}

body.controller-body .remote-header {
  gap: 0.4rem;
  padding: 0.58rem 0.62rem 0.56rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 238, 190, 0.14), rgba(54, 29, 13, 0.16)),
    url("/assets/art/universe/table-wood.png") center / 380px 380px repeat,
    rgba(42, 23, 12, 0.94);
  border-color: rgba(255, 224, 154, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.16),
    0 12px 24px rgba(10, 5, 2, 0.28);
}

body.controller-body .remote-header-top {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.controller-body .remote-micro,
body.controller-body .remote-header-dice-total,
body.controller-body .remote-stage-copy,
body.controller-body .remote-action-tile-body small,
body.controller-body .remote-action-tile > span:last-child,
body.controller-body .remote-command-button span {
  display: none;
}

body.controller-body .remote-name-line {
  gap: 0.38rem;
}

body.controller-body .remote-name-line h1 {
  font-size: 1.18rem;
  letter-spacing: 0;
  color: #fff6df;
  text-shadow: 0 2px 0 rgba(34, 17, 6, 0.5);
}

body.controller-body .remote-color-pill {
  padding: 0.2rem 0.42rem;
  font-size: 0.54rem;
  color: #2b1a0a;
  background: linear-gradient(180deg, #fff1c9, #d7a752);
}

body.controller-body .remote-turn-banner {
  min-width: 5.9rem;
  padding: 0.38rem 0.46rem;
  border-radius: 14px;
  background: rgba(255, 244, 216, 0.1);
}

body.controller-body .remote-turn-banner strong {
  font-size: 0.8rem;
}

body.controller-body .remote-header-dice {
  display: none;
}

body.controller-body .remote-score-line-card {
  padding: 0.22rem;
  gap: 0.16rem;
  background: rgba(18, 10, 5, 0.24);
  border-color: rgba(255, 231, 177, 0.12);
}

body.controller-body .remote-score-inline-stat,
body.controller-body .remote-score-inline-badge {
  padding: 0.18rem 0.32rem;
  background: rgba(255, 246, 222, 0.08);
}

body.controller-body .remote-score-inline-stat strong {
  font-size: 0.74rem;
}

body.controller-body .remote-score-inline-label,
body.controller-body .remote-score-inline-badge {
  font-size: 0.46rem;
}

body.controller-body .remote-resource-mini-strip {
  gap: 0.22rem;
}

body.controller-body .remote-resource-mini-pill {
  min-height: 3.86rem;
  gap: 0.2rem;
  padding: 0.42rem 0.18rem 0.38rem;
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 224, 160, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(61, 36, 18, 0.76), rgba(30, 18, 10, 0.8));
  border-color: rgba(255, 226, 166, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.12);
}

body.controller-body .remote-resource-mini-pill img {
  width: 1.62rem;
  height: 1.62rem;
  filter: drop-shadow(0 3px 5px rgba(6, 3, 1, 0.28));
}

body.controller-body .remote-resource-mini-pill strong {
  font-size: 1.04rem;
}

body.controller-body .remote-stage-card {
  padding: 0.68rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 246, 218, 0.08), rgba(67, 35, 15, 0.1)),
    url("/assets/art/universe/table-wood.png") center / 480px 480px repeat,
    rgba(46, 25, 12, 0.94);
  border-color: rgba(255, 224, 154, 0.2);
  color: #fff5dc;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.15),
    0 18px 34px rgba(7, 3, 1, 0.28);
}

body.controller-body .remote-stage-card.has-back {
  padding-top: 2.58rem;
}

body.controller-body .remote-stage-back {
  top: 0.62rem;
  left: 0.62rem;
  min-width: 4.25rem;
  min-height: 2.18rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  color: #2b1a0a;
  background: linear-gradient(180deg, #fff1c9, #d7a752);
  border-color: rgba(255, 246, 222, 0.28);
}

body.controller-body .remote-stage-content {
  gap: 0.38rem;
}

body.controller-body .remote-stage-content-roll,
body.controller-body .remote-stage-content-roll-resolving,
body.controller-body .tone-roll,
body.controller-body .tone-build,
body.controller-body .tone-trade,
body.controller-body .tone-cards,
body.controller-body .tone-robber,
body.controller-body .tone-calm,
body.controller-body .tone-hub,
body.controller-body .tone-success {
  background: transparent;
}

body.controller-body .remote-stage-content-roll {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

body.controller-body .remote-stage-content-roll .remote-roll-body {
  justify-content: center;
}

body.controller-body .remote-stage-content-roll .remote-dice-stage {
  min-height: 0;
}

body.controller-body .remote-stage-content-roll .remote-die {
  width: 7.4rem;
}

body.controller-body .remote-stage-content h2 {
  font-size: 1.22rem;
  color: #fff0c8;
  text-shadow: 0 2px 0 rgba(33, 14, 4, 0.5);
}

body.controller-body .remote-action-grid,
body.controller-body .remote-mode-grid,
body.controller-body .remote-build-grid,
body.controller-body .remote-choice-grid,
body.controller-body .remote-dev-grid,
body.controller-body .remote-pick-grid,
body.controller-body .remote-rate-grid,
body.controller-body .remote-stepper-grid,
body.controller-body .remote-receive-grid,
body.controller-body .remote-victim-grid,
body.controller-body .remote-waiting-panel {
  gap: 0.42rem;
}

body.controller-body .remote-action-grid-hub {
  grid-auto-rows: minmax(5.1rem, 1fr);
}

body.controller-body .remote-action-tile,
body.controller-body .remote-build-card,
body.controller-body .remote-choice-card,
body.controller-body .remote-dev-card,
body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token,
body.controller-body .remote-victim-chip,
body.controller-body .remote-stepper-token,
body.controller-body .remote-waiting-card,
body.controller-body .remote-confirm-card,
body.controller-body .remote-choice-selected,
body.controller-body .remote-stage-action-summary,
body.controller-body .remote-trade-dock-summary {
  border-radius: 18px;
  color: #fff4d8;
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.11), rgba(37, 19, 8, 0.16)),
    rgba(30, 16, 8, 0.44);
  border-color: rgba(255, 225, 158, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.11),
    0 8px 18px rgba(7, 3, 1, 0.16);
}

body.controller-body .remote-action-tile {
  min-height: 5.25rem;
  padding: 0.68rem;
}

body.controller-body .remote-action-grid-hub .remote-action-tile {
  padding: 0.72rem;
}

body.controller-body .remote-action-tile strong,
body.controller-body .remote-action-tile-body strong,
body.controller-body .remote-build-card strong,
body.controller-body .remote-choice-card strong,
body.controller-body .remote-dev-card strong,
body.controller-body .remote-rate-card strong,
body.controller-body .remote-pick-token strong,
body.controller-body .remote-victim-chip strong,
body.controller-body .remote-stage-action-summary strong,
body.controller-body .remote-trade-dock-summary strong {
  color: #fff4d8;
}

body.controller-body .remote-action-tile span,
body.controller-body .remote-build-card span,
body.controller-body .remote-choice-card span,
body.controller-body .remote-dev-card p,
body.controller-body .remote-rate-card span,
body.controller-body .remote-victim-chip span,
body.controller-body .remote-choice-selected span,
body.controller-body .remote-choice-selected small {
  color: rgba(255, 226, 171, 0.72);
}

body.controller-body .remote-stage-content-spatial-legal .remote-choice-selected small {
  display: none;
}

body.controller-body .remote-action-tile-badge {
  color: #2b1a0a;
  background: linear-gradient(180deg, #f4d38b, #bc8034);
}

body.controller-body .remote-hub-insights {
  gap: 0.32rem;
}

body.controller-body .remote-hub-insight {
  padding: 0.44rem 0.5rem;
  border-radius: 15px;
  background: rgba(16, 9, 5, 0.28);
  border-color: rgba(255, 225, 158, 0.12);
}

body.controller-body .remote-hub-insight span {
  font-size: 0.5rem;
  color: rgba(255, 219, 152, 0.64);
}

body.controller-body .remote-hub-insight strong {
  font-size: 0.76rem;
  color: #fff4d8;
}

body.controller-body .remote-board-map-shell {
  min-height: 17.8rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(80, 172, 184, 0.36), transparent 52%),
    linear-gradient(180deg, rgba(27, 96, 112, 0.98), rgba(19, 83, 91, 0.98));
  border-color: rgba(255, 224, 154, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.16),
    inset 0 -18px 36px rgba(5, 19, 20, 0.18),
    0 12px 26px rgba(5, 2, 1, 0.22);
}

body.controller-body .stage-card-build_pick_location .remote-board-map-shell,
body.controller-body .stage-card-robber_pick_tile .remote-board-map-shell {
  flex: 1 1 auto;
  min-height: 18.5rem;
}

body.controller-body .remote-board-map-viewport {
  touch-action: none;
  cursor: grab;
}

body.controller-body .remote-board-map {
  filter:
    saturate(1.14)
    contrast(1.08)
    drop-shadow(0 10px 18px rgba(5, 2, 1, 0.24));
}

body.controller-body .remote-board-tile {
  stroke: rgba(255, 230, 168, 0.74);
  stroke-width: 3.4;
}

body.controller-body .remote-board-tile-surface {
  filter: drop-shadow(0 3px 4px rgba(27, 13, 4, 0.18));
}

body.controller-body .remote-board-tile-texture {
  opacity: 0.96;
  mix-blend-mode: normal;
  filter: saturate(1.18) contrast(1.1) brightness(1.03);
}

body.controller-body .remote-board-token circle {
  fill: #f5e6bd;
  stroke: #8a5c21;
  stroke-width: 4;
  filter: drop-shadow(0 5px 8px rgba(28, 13, 4, 0.3));
}

body.controller-body .remote-board-token.is-hot circle {
  fill: #f4d28d;
  stroke: #b14b24;
}

body.controller-body .remote-board-token text {
  font-size: 1.72rem;
  fill: #211106;
  stroke: rgba(255, 246, 216, 0.74);
  stroke-width: 2.5px;
}

body.controller-body .remote-board-token.is-hot text {
  fill: #a83227;
}

body.controller-body .remote-board-edge-outline {
  stroke: rgba(46, 24, 8, 0.9);
}

body.controller-body .remote-board-edge {
  stroke: rgba(255, 234, 180, 0.36);
}

body.controller-body .remote-board-edge.is-legal,
body.controller-body .remote-board-road-pad,
body.controller-body .remote-board-legal-point {
  stroke: rgba(255, 247, 220, 0.94);
  fill: rgba(235, 174, 57, 0.92);
}

body.controller-body .remote-board-edge.is-selected,
body.controller-body .remote-board-road-pad.is-selected,
body.controller-body .remote-board-legal-point.is-selected {
  fill: rgba(75, 196, 137, 0.95);
  stroke: rgba(231, 255, 241, 0.96);
}

body.controller-body .remote-command-row {
  gap: 0.34rem;
}

body.controller-body .remote-command-button,
body.controller-body .remote-stage-action-button,
body.controller-body .remote-trade-dock-button,
body.controller-body .remote-hero-button {
  min-height: 3.18rem;
  border-radius: 18px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.18),
    0 10px 20px rgba(7, 3, 1, 0.18);
}

body.controller-body .remote-hero-button {
  align-self: end;
  justify-self: stretch;
  height: auto;
  padding: 0.88rem 1rem;
}

body.controller-body .remote-command-button strong {
  font-size: 0.88rem;
}

body.controller-body .remote-command-button.tone-primary,
body.controller-body .remote-stage-action-button.tone-primary,
body.controller-body .remote-trade-dock-button {
  background: linear-gradient(180deg, #f2cc73, #c2742d);
  color: #2a1707;
}

body.controller-body .remote-build-card.is-unavailable,
body.controller-body .remote-action-tile.is-muted,
body.controller-body .remote-rate-card.is-disabled,
body.controller-body .remote-receive-token:disabled,
body.controller-body .remote-stepper-tap:disabled {
  opacity: 0.54;
}

body.controller-body .remote-build-card.is-unavailable strong,
body.controller-body .remote-build-card.is-unavailable span,
body.controller-body .remote-build-card.is-unavailable small,
body.controller-body .remote-action-tile.is-muted strong,
body.controller-body .remote-action-tile.is-muted span,
body.controller-body .remote-rate-card.is-disabled strong,
body.controller-body .remote-rate-card.is-disabled span {
  color: rgba(255, 235, 194, 0.72);
}

body.controller-body .remote-build-card-head span,
body.controller-body .remote-dev-card-head span,
body.controller-body .remote-zone-label,
body.controller-body .remote-note-strip span,
body.controller-body .remote-waiting-card span,
body.controller-body .remote-finish-banner span,
body.controller-body .remote-card-picker-head span {
  color: rgba(244, 202, 122, 0.82);
  letter-spacing: 0.13em;
}

body.controller-body .remote-note-strip,
body.controller-body .remote-incoming-card,
body.controller-body .remote-incoming-summary,
body.controller-body .remote-trade-choice-card,
body.controller-body .remote-fresh-strip,
body.controller-body .remote-finish-banner,
body.controller-body .remote-empty-block,
body.controller-body .remote-card-picker-head,
body.controller-body .remote-trade-zone {
  border-radius: 18px;
  color: #fff4d8;
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.1), rgba(35, 17, 7, 0.15)),
    rgba(24, 13, 7, 0.42);
  border: 1px solid rgba(255, 225, 158, 0.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.1),
    0 8px 18px rgba(7, 3, 1, 0.14);
}

body.controller-body .remote-note-strip strong,
body.controller-body .remote-incoming-summary strong,
body.controller-body .remote-trade-choice-card strong,
body.controller-body .remote-fresh-strip strong,
body.controller-body .remote-finish-banner strong,
body.controller-body .remote-card-picker-head strong {
  color: #fff2cf;
}

body.controller-body .remote-incoming-summary span,
body.controller-body .remote-trade-choice-card span,
body.controller-body .remote-fresh-strip span,
body.controller-body .remote-finish-banner small,
body.controller-body .remote-empty-block {
  color: rgba(255, 226, 171, 0.78);
}

body.controller-body .remote-stage-content-trade {
  gap: 0.36rem;
}

body.controller-body .remote-trade-stack {
  gap: 0.4rem;
  min-height: 0;
}

body.controller-body .remote-trade-zone {
  gap: 0.38rem;
  padding: 0.54rem;
}

body.controller-body .remote-zone-head {
  align-items: center;
}

body.controller-body .remote-zone-total {
  padding: 0.18rem 0.42rem;
  color: #2a1707;
  background: linear-gradient(180deg, #f1d18a, #bd843b);
  border-color: rgba(255, 246, 222, 0.25);
  font-size: 0.72rem;
}

body.controller-body .remote-stepper-grid,
body.controller-body .remote-rate-grid,
body.controller-body .remote-receive-grid {
  gap: 0.3rem;
}

body.controller-body .remote-stepper-token {
  min-height: 5.85rem;
  gap: 0.18rem;
  padding: 0.32rem 0.18rem 0.2rem;
  border-radius: 16px;
}

body.controller-body .remote-stepper-tap {
  min-height: 4.3rem;
  gap: 0.16rem;
  padding: 0.12rem 0.06rem 0.04rem;
}

body.controller-body .remote-stepper-token img,
body.controller-body .remote-rate-card img,
body.controller-body .remote-receive-token img,
body.controller-body .remote-pick-token img {
  width: 1.58rem;
  height: 1.58rem;
}

body.controller-body .remote-stepper-token span,
body.controller-body .remote-receive-token span,
body.controller-body .remote-pick-token span {
  font-size: 0.46rem;
  color: rgba(255, 226, 171, 0.7);
}

body.controller-body .remote-stepper-meter {
  padding: 0.2rem 0.08rem 0.14rem;
  background: rgba(10, 5, 3, 0.26);
  border-color: rgba(255, 225, 158, 0.1);
}

body.controller-body .remote-stepper-meter strong {
  color: #fff4d8;
  font-size: 1.08rem;
}

body.controller-body .remote-stepper-meter small {
  display: none;
}

body.controller-body .remote-stepper-controls button {
  min-height: 2.28rem;
  border-radius: 14px;
  color: #fff4d8;
  background: rgba(12, 6, 3, 0.34);
  border-color: rgba(255, 225, 158, 0.14);
}

body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token {
  min-height: 5.45rem;
  justify-items: center;
  align-content: center;
  text-align: center;
  padding: 0.48rem 0.24rem;
}

body.controller-body .remote-rate-card strong,
body.controller-body .remote-pick-token strong {
  font-size: 0.78rem;
}

body.controller-body .remote-rate-card.is-selected,
body.controller-body .remote-receive-token.is-selected,
body.controller-body .remote-pick-token.is-selected,
body.controller-body .remote-dev-card.is-selected,
body.controller-body .remote-victim-chip.is-selected {
  border-color: rgba(255, 224, 132, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 226, 154, 0.32),
    0 0 0 2px rgba(129, 84, 30, 0.28),
    0 12px 24px rgba(7, 3, 1, 0.22);
}

body.controller-body .remote-dev-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

body.controller-body .remote-dev-card {
  min-height: 6.1rem;
  padding: 0.66rem;
}

body.controller-body .remote-dev-card-head {
  gap: 0.34rem;
}

body.controller-body .remote-dev-card-head strong {
  font-size: 0.92rem;
  line-height: 1.08;
}

body.controller-body .remote-dev-card p {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(255, 226, 171, 0.72);
}

body.controller-body .remote-dev-card small {
  color: rgba(244, 202, 122, 0.82);
  font-size: 0.62rem;
}

body.controller-body .remote-card-picker {
  gap: 0.5rem;
}

body.controller-body .remote-pick-grid,
body.controller-body .remote-victim-grid,
body.controller-body .remote-trade-choice-grid {
  gap: 0.42rem;
}

body.controller-body .remote-victim-chip,
body.controller-body .remote-trade-choice-card {
  min-height: 3.72rem;
  padding: 0.58rem 0.66rem;
}

body.controller-body .remote-victim-color,
body.controller-body .remote-trade-choice-dot {
  width: 0.7rem;
  height: 2rem;
  border: 1px solid rgba(255, 246, 222, 0.22);
}

body.controller-body .remote-incoming-card {
  gap: 0.62rem;
}

body.controller-body .remote-trade-row {
  gap: 0.34rem;
}

body.controller-body .remote-trade-pill,
body.controller-body .remote-cost-chip {
  background: rgba(255, 244, 218, 0.86);
  border-color: rgba(117, 75, 31, 0.22);
}

body.controller-body .remote-trade-dock {
  gap: 0.34rem;
}

body.controller-body .remote-trade-dock-summary {
  min-height: 2.6rem;
  padding: 0.44rem 0.62rem;
}

body.controller-body .remote-trade-dock-summary strong {
  color: #fff4d8;
  font-size: 0.84rem;
}

body.controller-body .remote-trade-dock-actions {
  gap: 0.36rem;
}

body.controller-body .remote-trade-dock-actions.is-triple {
  grid-template-columns: 0.82fr 0.88fr 1fr;
}

body.controller-body .remote-trade-dock-button {
  min-height: 3.32rem;
  padding-inline: 0.32rem;
  font-size: 0.86rem;
}

body.controller-body .remote-trade-dock-button.tone-secondary {
  color: #fff4d8;
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.12), rgba(35, 17, 7, 0.18)),
    rgba(20, 10, 5, 0.5);
  border-color: rgba(255, 225, 158, 0.16);
}

body.controller-body .remote-trade-dock-button.tone-danger {
  color: #fff7f2;
  background: linear-gradient(180deg, #c96749, #8e321e);
}

body.controller-body .remote-trade-dock-button:disabled {
  color: rgba(58, 38, 19, 0.78);
  background: linear-gradient(180deg, rgba(234, 219, 188, 0.96), rgba(204, 187, 154, 0.94));
  border-color: rgba(129, 93, 58, 0.16);
  opacity: 0.72;
}

body.controller-body .remote-stage-back,
body.controller-body .remote-action-tile,
body.controller-body .remote-build-card,
body.controller-body .remote-dev-card,
body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token,
body.controller-body .remote-victim-chip,
body.controller-body .remote-trade-choice-card,
body.controller-body .remote-stepper-tap,
body.controller-body .remote-stepper-controls button,
body.controller-body .remote-trade-dock-button,
body.controller-body .remote-command-button,
body.controller-body .remote-hero-button {
  touch-action: manipulation;
}

body.controller-body .remote-finish-banner {
  padding: 0.72rem;
}

body.controller-body .remote-finish-banner strong {
  font-size: 1.1rem;
}

body.controller-body .remote-waiting-hero {
  color: #fff4d8;
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.1), rgba(35, 17, 7, 0.16)),
    rgba(24, 13, 7, 0.42);
  border-color: rgba(255, 225, 158, 0.15);
}

body.controller-body .remote-waiting-hero span {
  color: rgba(244, 202, 122, 0.82);
}

body.controller-body .remote-waiting-hero strong {
  color: #fff2cf;
}

body.controller-body .remote-waiting-hero small {
  color: rgba(255, 226, 171, 0.76);
}

@media (max-height: 780px) {
  body.controller-body .remote-shell {
    gap: 0.36rem;
    padding:
      calc(env(safe-area-inset-top) + 0.36rem)
      calc(env(safe-area-inset-right) + 0.4rem)
      calc(env(safe-area-inset-bottom) + 0.38rem)
      calc(env(safe-area-inset-left) + 0.4rem);
  }

  body.controller-body .remote-resource-mini-pill {
    min-height: 3.42rem;
  }

  body.controller-body .remote-stage-card {
    padding: 0.58rem;
  }

  body.controller-body .remote-stage-card.has-back {
    padding-top: 2.42rem;
  }

  body.controller-body .remote-action-grid-hub {
    grid-auto-rows: minmax(4.72rem, 1fr);
  }

  body.controller-body .stage-card-build_pick_location .remote-board-map-shell,
  body.controller-body .stage-card-robber_pick_tile .remote-board-map-shell {
    min-height: 16.6rem;
  }

  body.controller-body .remote-header {
    padding: 0.5rem 0.56rem;
  }

  body.controller-body .remote-resource-mini-pill {
    padding-block: 0.32rem;
  }

  body.controller-body .remote-trade-zone {
    padding: 0.44rem;
  }

  body.controller-body .remote-stepper-token {
    min-height: 5.25rem;
  }

  body.controller-body .remote-stepper-tap {
    min-height: 3.82rem;
  }

  body.controller-body .remote-dev-card,
  body.controller-body .remote-rate-card,
  body.controller-body .remote-receive-token,
  body.controller-body .remote-pick-token {
    min-height: 4.9rem;
  }
}

/* Option B: Apple-native Catan controller.
   Systematic iOS sizing first: 8pt rhythm, SF stack, 44pt+ targets, compact material surfaces. */
body.controller-body {
  --ios-gap-1: 0.25rem;
  --ios-gap-2: 0.5rem;
  --ios-gap-3: 0.75rem;
  --ios-radius-panel: 1.25rem;
  --ios-radius-control: 0.875rem;
  --ios-text-primary: #1f1710;
  --ios-text-secondary: rgba(31, 23, 16, 0.68);
  --ios-gold: #c98a2e;
  --ios-gold-light: #f3c869;
  --ios-material: rgba(252, 247, 236, 0.92);
  --ios-material-dark: rgba(20, 18, 16, 0.72);
  background:
    linear-gradient(180deg, rgba(19, 81, 91, 0.74), rgba(17, 32, 31, 0.9)),
    url("/assets/art/universe/live/backgrounds/seafarer-water.png") center / cover no-repeat;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Avenir Next", system-ui, sans-serif;
}

body.controller-body .remote-shell {
  gap: var(--ios-gap-2);
  padding:
    calc(env(safe-area-inset-top) + 0.5rem)
    calc(env(safe-area-inset-right) + 0.625rem)
    calc(env(safe-area-inset-bottom) + 0.625rem)
    calc(env(safe-area-inset-left) + 0.625rem);
  background:
    radial-gradient(circle at 50% -4%, rgba(255, 220, 142, 0.22), transparent 25%),
    linear-gradient(180deg, rgba(6, 18, 21, 0.1), rgba(6, 10, 9, 0.2));
}

body.controller-body .remote-shell::before {
  opacity: 0.42;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 50% 50%, transparent 54%, rgba(0, 0, 0, 0.24));
}

body.controller-body .remote-header {
  gap: var(--ios-gap-2);
  padding: 0.625rem;
  border-radius: var(--ios-radius-panel);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06)),
    var(--ios-material-dark);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0.75rem 1.75rem rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(22px) saturate(1.28);
}

body.controller-body .remote-header-top {
  grid-template-columns: minmax(0, 1fr) minmax(5.75rem, auto);
  gap: var(--ios-gap-2);
}

body.controller-body .remote-identity {
  min-width: 0;
}

body.controller-body .remote-accent {
  width: 0.34rem;
  height: 2.75rem;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}

body.controller-body .remote-name-line h1 {
  color: #fff8eb;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.04;
  text-shadow: none;
}

body.controller-body .remote-color-pill {
  min-height: 1.75rem;
  padding: 0 0.58rem;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #2a1807;
  background: linear-gradient(180deg, var(--ios-gold-light), #d59d3c);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.controller-body .remote-turn-banner {
  min-height: 3.25rem;
  min-width: 0;
  padding: 0.42rem 0.56rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  text-align: right;
}

body.controller-body .remote-turn-banner span {
  color: rgba(255, 242, 214, 0.66);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

body.controller-body .remote-turn-banner strong {
  color: #fff8eb;
  font-size: 0.96rem;
  font-weight: 800;
}

body.controller-body .remote-turn-banner.is-active {
  background: linear-gradient(180deg, #f6cc73, #d88a33);
  color: #2a1807;
}

body.controller-body .remote-turn-banner.is-active strong,
body.controller-body .remote-turn-banner.is-active span {
  color: #2a1807;
}

body.controller-body .remote-score-line-card {
  gap: 0.25rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.controller-body .remote-score-inline-stat,
body.controller-body .remote-score-inline-badge {
  min-height: 2rem;
  padding: 0 0.52rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff8eb;
}

body.controller-body .remote-score-inline-stat strong {
  color: #fff8eb;
  font-size: 0.86rem;
}

body.controller-body .remote-score-inline-label,
body.controller-body .remote-score-inline-badge {
  color: rgba(255, 236, 198, 0.72);
  font-size: 0.56rem;
  letter-spacing: 0.05em;
}

body.controller-body .remote-resource-mini-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.375rem;
}

body.controller-body .remote-resource-mini-pill {
  min-height: 3.25rem;
  grid-template-columns: auto auto;
  grid-template-rows: 1fr;
  justify-content: center;
  gap: 0.36rem;
  padding: 0.34rem 0.24rem;
  border-radius: var(--ios-radius-control);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

body.controller-body .remote-resource-mini-pill img {
  width: 1.35rem;
  height: 1.35rem;
}

body.controller-body .remote-resource-mini-pill strong {
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff8eb;
}

body.controller-body .remote-stage-card {
  padding: 0.75rem;
  border-radius: 1.5rem;
  color: var(--ios-text-primary);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42)),
    var(--ios-material);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1rem 2.25rem rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(1.12);
}

body.controller-body .remote-stage-card.has-back {
  padding-top: 3.3rem;
}

body.controller-body .remote-stage-back {
  top: 0.75rem;
  left: 0.75rem;
  min-width: 4.75rem;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  color: #2a1807;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

body.controller-body .remote-stage-content {
  gap: var(--ios-gap-2);
}

body.controller-body .remote-stage-content h2 {
  color: var(--ios-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  text-shadow: none;
}

body.controller-body .remote-action-grid-hub {
  grid-auto-rows: minmax(5.75rem, 1fr);
}

body.controller-body .remote-action-tile,
body.controller-body .remote-build-card,
body.controller-body .remote-dev-card,
body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token,
body.controller-body .remote-victim-chip,
body.controller-body .remote-stepper-token,
body.controller-body .remote-choice-selected,
body.controller-body .remote-note-strip,
body.controller-body .remote-incoming-card,
body.controller-body .remote-incoming-summary,
body.controller-body .remote-trade-choice-card,
body.controller-body .remote-fresh-strip,
body.controller-body .remote-finish-banner,
body.controller-body .remote-empty-block,
body.controller-body .remote-card-picker-head,
body.controller-body .remote-trade-zone,
body.controller-body .remote-trade-dock-summary {
  border-radius: var(--ios-radius-panel);
  color: var(--ios-text-primary);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(48, 34, 20, 0.1);
  box-shadow: none;
}

body.controller-body .remote-action-tile {
  min-height: 5.75rem;
  padding: 0.86rem;
}

body.controller-body .remote-action-tile strong,
body.controller-body .remote-action-tile-body strong,
body.controller-body .remote-build-card strong,
body.controller-body .remote-choice-card strong,
body.controller-body .remote-dev-card strong,
body.controller-body .remote-rate-card strong,
body.controller-body .remote-pick-token strong,
body.controller-body .remote-victim-chip strong,
body.controller-body .remote-stage-action-summary strong,
body.controller-body .remote-trade-dock-summary strong,
body.controller-body .remote-note-strip strong,
body.controller-body .remote-incoming-summary strong,
body.controller-body .remote-trade-choice-card strong,
body.controller-body .remote-fresh-strip strong,
body.controller-body .remote-finish-banner strong,
body.controller-body .remote-card-picker-head strong {
  color: var(--ios-text-primary);
}

body.controller-body .remote-action-tile span,
body.controller-body .remote-build-card span,
body.controller-body .remote-choice-card span,
body.controller-body .remote-dev-card p,
body.controller-body .remote-rate-card span,
body.controller-body .remote-victim-chip span,
body.controller-body .remote-choice-selected span,
body.controller-body .remote-choice-selected small,
body.controller-body .remote-note-strip span,
body.controller-body .remote-incoming-summary span,
body.controller-body .remote-trade-choice-card span,
body.controller-body .remote-fresh-strip span,
body.controller-body .remote-finish-banner small,
body.controller-body .remote-zone-label,
body.controller-body .remote-build-card small,
body.controller-body .remote-dev-card small {
  color: var(--ios-text-secondary);
}

body.controller-body .remote-action-tile-badge,
body.controller-body .remote-zone-total {
  min-height: 1.75rem;
  padding: 0 0.54rem;
  display: inline-flex;
  align-items: center;
  color: #2a1807;
  border-radius: 999px;
  background: linear-gradient(180deg, #f3c869, #ca8f34);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

body.controller-body .remote-trade-zone {
  gap: 0.5rem;
  padding: 0.625rem;
}

body.controller-body .remote-stepper-grid,
body.controller-body .remote-rate-grid,
body.controller-body .remote-receive-grid,
body.controller-body .remote-pick-grid {
  gap: 0.375rem;
}

body.controller-body .remote-stepper-token {
  min-height: 5.75rem;
  padding: 0.36rem 0.24rem 0.24rem;
}

body.controller-body .remote-stepper-tap {
  min-height: 4.125rem;
}

body.controller-body .remote-stepper-controls button {
  min-height: 2.75rem;
  color: var(--ios-text-primary);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(48, 34, 20, 0.08);
}

body.controller-body .remote-stepper-meter {
  background: rgba(255, 255, 255, 0.55);
}

body.controller-body .remote-stepper-meter strong {
  color: var(--ios-text-primary);
}

body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token,
body.controller-body .remote-dev-card,
body.controller-body .remote-victim-chip,
body.controller-body .remote-trade-choice-card {
  min-height: 5.5rem;
}

body.controller-body .remote-board-map-shell {
  border-radius: 1.375rem;
  background:
    radial-gradient(circle at 50% 42%, rgba(80, 172, 184, 0.28), transparent 52%),
    linear-gradient(180deg, rgba(33, 110, 124, 0.96), rgba(26, 92, 99, 0.96));
  border-color: rgba(255, 255, 255, 0.32);
}

body.controller-body .remote-trade-dock-summary {
  min-height: 2.75rem;
  padding: 0.5rem 0.7rem;
}

body.controller-body .remote-trade-dock-button,
body.controller-body .remote-command-button,
body.controller-body .remote-hero-button,
body.controller-body .remote-stage-action-button {
  min-height: 3.25rem;
  border-radius: 1rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

body.controller-body .remote-trade-dock-button.tone-primary,
body.controller-body .remote-command-button.tone-primary,
body.controller-body .remote-hero-button,
body.controller-body .remote-stage-action-button.tone-primary {
  color: #2a1807;
  background: linear-gradient(180deg, #f4cf76, #ce8532);
}

body.controller-body .remote-trade-dock-button.tone-secondary,
body.controller-body .remote-command-button.tone-secondary {
  color: var(--ios-text-primary);
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(48, 34, 20, 0.1);
}

body.controller-body .remote-trade-dock-button.tone-danger {
  color: #fffaf4;
  background: linear-gradient(180deg, #dd765a, #b3472c);
}

body.controller-body .remote-trade-dock-button:disabled,
body.controller-body .remote-build-card.is-unavailable,
body.controller-body .remote-rate-card.is-disabled,
body.controller-body .remote-receive-token:disabled {
  opacity: 0.48;
}

@media (max-height: 780px) {
  body.controller-body .remote-shell {
    gap: 0.375rem;
    padding:
      calc(env(safe-area-inset-top) + 0.375rem)
      calc(env(safe-area-inset-right) + 0.5rem)
      calc(env(safe-area-inset-bottom) + 0.5rem)
      calc(env(safe-area-inset-left) + 0.5rem);
  }

  body.controller-body .remote-header {
    padding: 0.5rem;
  }

  body.controller-body .remote-resource-mini-pill {
    min-height: 2.9rem;
  }

  body.controller-body .remote-stage-card {
    padding: 0.625rem;
  }

  body.controller-body .remote-stage-card.has-back {
    padding-top: 3rem;
  }
}

/* Option C: Apple-structured, fantasy-skinned controller.
   Keeps iOS sizing and component discipline while restoring the Catan table atmosphere. */
body.controller-body {
  --ios-text-primary: #fff4d8;
  --ios-text-secondary: rgba(255, 226, 171, 0.76);
  --ios-material: rgba(42, 24, 12, 0.86);
  --ios-material-dark: rgba(24, 14, 8, 0.82);
  background:
    linear-gradient(180deg, rgba(9, 52, 62, 0.78), rgba(18, 31, 27, 0.92)),
    url("/assets/art/universe/live/backgrounds/seafarer-water.png") center / cover no-repeat;
}

body.controller-body .remote-shell {
  background:
    radial-gradient(circle at 50% -7%, rgba(255, 218, 139, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(12, 41, 45, 0.2), rgba(12, 7, 4, 0.26));
}

body.controller-body .remote-header {
  background:
    linear-gradient(180deg, rgba(255, 241, 202, 0.11), rgba(52, 28, 13, 0.16)),
    url("/assets/art/universe/table-wood.png") center / 520px 520px repeat,
    rgba(31, 18, 10, 0.9);
  border-color: rgba(255, 225, 158, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.16),
    0 0.75rem 1.75rem rgba(7, 3, 1, 0.28);
  backdrop-filter: blur(16px) saturate(1.12);
}

body.controller-body .remote-name-line h1,
body.controller-body .remote-turn-banner strong,
body.controller-body .remote-score-inline-stat strong,
body.controller-body .remote-resource-mini-pill strong {
  color: #fff5df;
}

body.controller-body .remote-turn-banner {
  background: rgba(18, 9, 4, 0.28);
  border-color: rgba(255, 225, 158, 0.16);
}

body.controller-body .remote-turn-banner.is-active,
body.controller-body .remote-color-pill,
body.controller-body .remote-action-tile-badge,
body.controller-body .remote-zone-total {
  background: linear-gradient(180deg, #f5cf76, #c9852f);
  color: #2a1707;
}

body.controller-body .remote-score-inline-stat,
body.controller-body .remote-score-inline-badge,
body.controller-body .remote-resource-mini-pill {
  background: rgba(12, 6, 3, 0.28);
  border-color: rgba(255, 225, 158, 0.14);
}

body.controller-body .remote-stage-card {
  color: #fff4d8;
  background:
    linear-gradient(180deg, rgba(255, 240, 199, 0.1), rgba(58, 31, 14, 0.14)),
    url("/assets/art/universe/table-wood.png") center / 620px 620px repeat,
    rgba(43, 24, 12, 0.94);
  border-color: rgba(255, 225, 158, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.16),
    0 1rem 2.25rem rgba(7, 3, 1, 0.3);
  backdrop-filter: none;
  background-attachment: scroll;
}

body.controller-body .remote-stage-card::before {
  content: "";
  position: absolute;
  top: 0.62rem;
  left: 0.75rem;
  right: 0.75rem;
  height: 4.9rem;
  pointer-events: none;
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(20, 10, 5, 0.24), rgba(28, 14, 7, 0.1) 45%, rgba(20, 10, 5, 0.2)),
    url("/assets/art/universe/table-wood.png") center top / 620px 620px repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 166, 0.1),
    inset 0 -1px 0 rgba(13, 6, 3, 0.18);
  z-index: 0;
}

body.controller-body .remote-stage-card > * {
  position: relative;
  z-index: 1;
}

body.controller-body .remote-stage-content h2 {
  color: #fff1cc;
  font-family: "Iowan Old Style", "New York", Georgia, serif;
  font-weight: 800;
  text-shadow: 0 2px 0 rgba(28, 12, 4, 0.45);
}

body.controller-body .remote-stage-back {
  color: #2a1707;
  background: linear-gradient(180deg, #fff0bd, #d8a14a);
  border-color: rgba(255, 246, 222, 0.26);
}

body.controller-body .remote-action-tile,
body.controller-body .remote-build-card,
body.controller-body .remote-dev-card,
body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token,
body.controller-body .remote-victim-chip,
body.controller-body .remote-stepper-token,
body.controller-body .remote-choice-selected,
body.controller-body .remote-note-strip,
body.controller-body .remote-incoming-card,
body.controller-body .remote-incoming-summary,
body.controller-body .remote-trade-choice-card,
body.controller-body .remote-fresh-strip,
body.controller-body .remote-finish-banner,
body.controller-body .remote-empty-block,
body.controller-body .remote-card-picker-head,
body.controller-body .remote-trade-zone,
body.controller-body .remote-trade-dock-summary {
  color: #fff4d8;
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.1), rgba(35, 17, 7, 0.18)),
    rgba(21, 11, 6, 0.48);
  border-color: rgba(255, 225, 158, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.1),
    0 0.5rem 1rem rgba(7, 3, 1, 0.14);
}

body.controller-body .remote-action-tile strong,
body.controller-body .remote-action-tile-body strong,
body.controller-body .remote-build-card strong,
body.controller-body .remote-choice-card strong,
body.controller-body .remote-dev-card strong,
body.controller-body .remote-rate-card strong,
body.controller-body .remote-pick-token strong,
body.controller-body .remote-victim-chip strong,
body.controller-body .remote-stage-action-summary strong,
body.controller-body .remote-trade-dock-summary strong,
body.controller-body .remote-note-strip strong,
body.controller-body .remote-incoming-summary strong,
body.controller-body .remote-trade-choice-card strong,
body.controller-body .remote-fresh-strip strong,
body.controller-body .remote-finish-banner strong,
body.controller-body .remote-card-picker-head strong,
body.controller-body .remote-zone-label {
  color: #fff4d8;
}

body.controller-body .remote-action-tile span,
body.controller-body .remote-build-card span,
body.controller-body .remote-choice-card span,
body.controller-body .remote-dev-card p,
body.controller-body .remote-rate-card span,
body.controller-body .remote-victim-chip span,
body.controller-body .remote-choice-selected span,
body.controller-body .remote-choice-selected small,
body.controller-body .remote-note-strip span,
body.controller-body .remote-incoming-summary span,
body.controller-body .remote-trade-choice-card span,
body.controller-body .remote-fresh-strip span,
body.controller-body .remote-finish-banner small,
body.controller-body .remote-build-card small,
body.controller-body .remote-dev-card small,
body.controller-body .remote-stepper-token span,
body.controller-body .remote-receive-token span,
body.controller-body .remote-pick-token span {
  color: rgba(255, 226, 171, 0.76);
}

body.controller-body .remote-hub-insight {
  background: rgba(14, 7, 4, 0.3);
  border-color: rgba(255, 225, 158, 0.13);
}

body.controller-body .remote-hub-insight span {
  color: rgba(244, 202, 122, 0.78);
}

body.controller-body .remote-hub-insight strong {
  color: #fff4d8;
}

body.controller-body .remote-stepper-controls button,
body.controller-body .remote-stepper-meter {
  color: #fff4d8;
  background: rgba(10, 5, 3, 0.3);
  border-color: rgba(255, 225, 158, 0.12);
}

body.controller-body .remote-stepper-meter strong {
  color: #fff4d8;
}

body.controller-body .remote-trade-dock-button.tone-secondary,
body.controller-body .remote-command-button.tone-secondary {
  color: #fff4d8;
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.12), rgba(35, 17, 7, 0.2)),
    rgba(18, 9, 5, 0.52);
  border-color: rgba(255, 225, 158, 0.16);
}

body.controller-body .remote-trade-dock-button.tone-primary,
body.controller-body .remote-command-button.tone-primary,
body.controller-body .remote-hero-button,
body.controller-body .remote-stage-action-button.tone-primary {
  color: #2a1707;
  background: linear-gradient(180deg, #f5cf76, #c9852f);
}

body.controller-body .remote-trade-dock-button:disabled,
body.controller-body .remote-build-card.is-unavailable,
body.controller-body .remote-rate-card.is-disabled,
body.controller-body .remote-receive-token:disabled {
  opacity: 0.52;
}

body.controller-body .remote-trade-dock-button:disabled {
  color: rgba(55, 34, 14, 0.72);
  background: linear-gradient(180deg, rgba(235, 217, 176, 0.9), rgba(197, 171, 125, 0.88));
}

/* Your Turn hub refinement: compact iOS command panel, not a full-page poster. */
body.controller-body .remote-header {
  gap: 0.38rem;
  padding: 0.5rem;
}

body.controller-body .remote-header-top {
  grid-template-columns: minmax(0, 1fr) minmax(5.2rem, auto);
}

body.controller-body .remote-accent {
  height: 2.35rem;
}

body.controller-body .remote-name-line h1 {
  font-size: 1.16rem;
}

body.controller-body .remote-color-pill {
  min-height: 1.55rem;
  padding-inline: 0.48rem;
  font-size: 0.64rem;
}

body.controller-body .remote-turn-banner {
  min-height: 2.72rem;
  padding: 0.34rem 0.48rem;
  border-radius: 0.88rem;
}

body.controller-body .remote-turn-banner span {
  font-size: 0.56rem;
}

body.controller-body .remote-turn-banner strong {
  font-size: 0.82rem;
}

body.controller-body .remote-score-inline-stat,
body.controller-body .remote-score-inline-badge {
  min-height: 1.72rem;
  padding-inline: 0.42rem;
}

body.controller-body .remote-score-inline-stat strong {
  font-size: 0.76rem;
}

body.controller-body .remote-score-inline-label,
body.controller-body .remote-score-inline-badge {
  font-size: 0.5rem;
}

body.controller-body .remote-resource-mini-strip {
  gap: 0.28rem;
}

body.controller-body .remote-resource-mini-pill {
  min-height: 2.62rem;
  gap: 0.26rem;
  padding: 0.24rem 0.16rem;
  border-radius: 0.78rem;
}

body.controller-body .remote-resource-mini-pill img {
  width: 1.08rem;
  height: 1.08rem;
}

body.controller-body .remote-resource-mini-pill strong {
  font-size: 0.96rem;
}

body.controller-body .stage-card-action_hub {
  align-self: stretch;
  height: 100%;
  min-height: 0;
}

body.controller-body .stage-card-action_hub .remote-stage-content-hub {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
  gap: 0.58rem;
}

body.controller-body .stage-card-action_hub h2 {
  margin: 0;
  min-height: 4.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0 0;
  font-size: 1.5rem;
  line-height: 1.02;
  text-align: center;
}

body.controller-body .stage-card-action_hub .remote-hub-insights {
  gap: 0.34rem;
}

body.controller-body .stage-card-action_hub .remote-hub-insight {
  min-height: 3rem;
  padding: 0.42rem 0.48rem;
  align-content: center;
  border-radius: 0.88rem;
}

body.controller-body .stage-card-action_hub .remote-hub-insight span {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
}

body.controller-body .stage-card-action_hub .remote-hub-insight strong {
  font-size: 0.72rem;
  line-height: 1.06;
}

body.controller-body .stage-card-action_hub .remote-action-grid-hub {
  height: auto;
  min-height: 0;
  align-self: stretch;
  align-content: start;
  margin-top: 0;
  grid-template-rows: repeat(2, 5.8rem);
  grid-auto-rows: unset;
  gap: 0.5rem;
}

body.controller-body .stage-card-action_hub .remote-action-tile {
  position: relative;
  min-height: 0;
  height: 5.8rem;
  padding: 0.76rem;
  border-radius: 0.95rem;
  align-content: center;
  justify-content: stretch;
  overflow: hidden;
}

body.controller-body .stage-card-action_hub .remote-action-tile::after {
  content: "";
  position: absolute;
  right: 0.68rem;
  bottom: 0.68rem;
  width: 0.44rem;
  height: 0.44rem;
  border-top: 2px solid rgba(255, 226, 171, 0.72);
  border-right: 2px solid rgba(255, 226, 171, 0.72);
  transform: rotate(45deg);
  opacity: 0.78;
}

body.controller-body .stage-card-action_hub .remote-action-tile.is-featured {
  border-color: rgba(255, 219, 129, 0.56);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 213, 119, 0.26), transparent 48%),
    linear-gradient(180deg, rgba(255, 241, 199, 0.14), rgba(35, 17, 7, 0.18)),
    rgba(36, 18, 8, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 233, 174, 0.14),
    inset 0 1px 0 rgba(255, 244, 210, 0.16),
    0 0.55rem 1.1rem rgba(7, 3, 1, 0.22);
}

body.controller-body .stage-card-action_hub .remote-action-tile-head {
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
}

body.controller-body .stage-card-action_hub .remote-action-tile-body {
  display: none;
}

body.controller-body .stage-card-action_hub .remote-action-tile-body strong,
body.controller-body .stage-card-action_hub .remote-action-tile strong {
  font-size: 1.15rem;
  line-height: 1.05;
}

body.controller-body .stage-card-action_hub .remote-action-tile-body small {
  display: block;
  overflow: hidden;
  color: rgba(255, 226, 171, 0.68);
  font-size: 0.62rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.controller-body .stage-card-action_hub .remote-action-tile > span:last-child {
  display: none;
}

body.controller-body .stage-card-action_hub .remote-action-tile-badge {
  min-height: 1.55rem;
  padding-inline: 0.48rem;
  font-size: 0.6rem;
}

body.controller-body .stage-card-action_hub .remote-action-tile.is-featured .remote-action-tile-badge {
  background: linear-gradient(180deg, #fff0ad, #d99a38);
}

body.controller-body .remote-stage-content-roll {
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
}

body.controller-body .remote-stage-content-roll h2 {
  margin: 0;
  min-height: 4.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0 0;
  font-size: 1.5rem;
  line-height: 1.04;
  text-align: center;
}

body.controller-body .remote-roll-body-direct {
  justify-content: center;
}

body.controller-body .stage-card-build_pick_type .remote-build-grid,
body.controller-body .stage-card-trade_pick_mode .remote-mode-grid,
body.controller-body .stage-card-cards_mode .remote-dev-grid,
body.controller-body .stage-card-robber_pick_victim .remote-victim-grid {
  height: 100%;
  min-height: 0;
  grid-auto-rows: minmax(4.75rem, 1fr);
  align-content: stretch;
}

body.controller-body .stage-card-build_pick_type .remote-build-card,
body.controller-body .stage-card-trade_pick_mode .remote-action-tile,
body.controller-body .stage-card-cards_mode .remote-dev-card,
body.controller-body .stage-card-robber_pick_victim .remote-victim-chip {
  height: 100%;
  min-height: 4.75rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-action-tile-body {
  display: none;
}

body.controller-body .stage-card-trade_domestic .remote-trade-stack,
body.controller-body .stage-card-discard_cards .remote-trade-zone {
  flex: 1 1 auto;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-token,
body.controller-body .stage-card-discard_cards .remote-stepper-token {
  min-height: 5.25rem;
}

body.controller-body .stage-card-build_pick_location .remote-stage-content-spatial-legal,
body.controller-body .stage-card-robber_pick_tile .remote-stage-content-spatial-legal {
  height: 100%;
}

body.controller-body .remote-stage-frame {
  view-transition-name: controller-stage;
  contain: layout paint;
}

body.controller-body .remote-action-tile:active,
body.controller-body .remote-build-card:active,
body.controller-body .remote-dev-card:active,
body.controller-body .remote-rate-card:active,
body.controller-body .remote-receive-token:active,
body.controller-body .remote-pick-token:active,
body.controller-body .remote-victim-chip:active,
body.controller-body .remote-trade-choice-card:active,
body.controller-body .remote-stage-back:active,
body.controller-body .remote-trade-dock-button:active,
body.controller-body .remote-hero-button:active {
  transform: scale(0.985);
  filter: brightness(1.06);
}

::view-transition-old(controller-stage) {
  animation: controller-page-roll-out 220ms cubic-bezier(0.2, 0.78, 0.22, 1);
  transform-origin: 50% 100%;
}

::view-transition-new(controller-stage) {
  animation: controller-page-roll-in 260ms cubic-bezier(0.2, 0.78, 0.22, 1);
  transform-origin: 50% 100%;
}

@keyframes controller-page-roll-out {
  from {
    opacity: 1;
    transform: perspective(900px) rotateX(0deg) translateY(0);
    filter: brightness(1);
  }

  to {
    opacity: 0;
    transform: perspective(900px) rotateX(8deg) translateY(-8px);
    filter: brightness(0.88);
  }
}

@keyframes controller-page-roll-in {
  from {
    opacity: 0;
    transform: perspective(900px) rotateX(-7deg) translateY(10px);
    filter: brightness(1.12);
  }

  to {
    opacity: 1;
    transform: perspective(900px) rotateX(0deg) translateY(0);
    filter: brightness(1);
  }
}

/* Controller-wide phone fit pass.
   Every game state uses the same fixed title band, 44px+ hit targets,
   compact fantasy panels, and scroll-safe content areas on short iPhones. */
body.controller-body .remote-stage-card {
  --controller-title-band: 4.7rem;
  --controller-gap: 0.48rem;
  --controller-control: 3.25rem;
  padding: 0.68rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  box-sizing: border-box;
}

body.controller-body .remote-stage-card.has-back {
  padding-top: 3.15rem;
}

body.controller-body .remote-stage-content,
body.controller-body .remote-stage-content-confirmed,
body.controller-body .remote-stage-content-trade,
body.controller-body .remote-stage-content-spatial-legal {
  height: auto;
  min-height: 0;
  gap: var(--controller-gap);
  overflow: hidden;
}

body.controller-body .remote-stage-content > h2 {
  min-height: var(--controller-title-band);
  margin: 0;
  padding: 0.14rem 3.7rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: clamp(1.28rem, 1.5rem, 1.58rem);
  line-height: 1.02;
  text-align: center;
}

body.controller-body .remote-stage-back {
  top: 0.82rem;
  left: 0.82rem;
  min-width: 4.75rem;
  min-height: 3rem;
  padding: 0 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  line-height: 1;
}

body.controller-body .remote-stage-copy {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.76rem;
  line-height: 1.12;
  text-align: center;
}

body.controller-body .stage-card-build_pick_location .remote-stage-copy,
body.controller-body .stage-card-robber_pick_tile .remote-stage-copy {
  display: none;
}

body.controller-body .stage-card-action_hub .remote-stage-content-hub {
  grid-template-rows: auto auto auto;
  align-content: start;
}

body.controller-body .stage-card-action_hub .remote-hub-insights {
  flex: 0 0 auto;
}

body.controller-body .stage-card-action_hub .remote-action-grid-hub {
  height: auto;
  grid-template-rows: repeat(2, 5.8rem);
  align-content: start;
}

body.controller-body .stage-card-action_hub .remote-action-tile {
  height: 5.8rem;
  min-height: 5.8rem;
  display: grid;
  place-content: center;
}

body.controller-body .stage-card-action_hub .remote-action-tile-head {
  display: grid;
  justify-items: center;
}

body.controller-body .stage-card-build_pick_type .remote-stage-content,
body.controller-body .stage-card-trade_pick_mode .remote-stage-content,
body.controller-body .stage-card-cards_mode .remote-stage-content,
body.controller-body .stage-card-robber_pick_victim .remote-stage-content,
body.controller-body .stage-card-trade_choose_partner .remote-stage-content {
  display: flex;
  flex-direction: column;
}

body.controller-body .stage-card-build_pick_type .remote-build-grid,
body.controller-body .stage-card-trade_pick_mode .remote-mode-grid,
body.controller-body .stage-card-cards_mode .remote-dev-grid,
body.controller-body .stage-card-robber_pick_victim .remote-victim-grid,
body.controller-body .stage-card-trade_choose_partner .remote-trade-choice-grid {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 0.1rem;
  scrollbar-width: none;
}

body.controller-body .stage-card-build_pick_type .remote-build-grid::-webkit-scrollbar,
body.controller-body .stage-card-trade_pick_mode .remote-mode-grid::-webkit-scrollbar,
body.controller-body .stage-card-cards_mode .remote-dev-grid::-webkit-scrollbar,
body.controller-body .stage-card-robber_pick_victim .remote-victim-grid::-webkit-scrollbar,
body.controller-body .stage-card-trade_choose_partner .remote-trade-choice-grid::-webkit-scrollbar {
  display: none;
}

body.controller-body .stage-card-build_pick_type .remote-build-grid,
body.controller-body .stage-card-cards_mode .remote-dev-grid,
body.controller-body .stage-card-robber_pick_victim .remote-victim-grid {
  grid-auto-rows: minmax(5.55rem, max-content);
}

body.controller-body .stage-card-trade_pick_mode .remote-mode-grid {
  flex: 0 0 auto;
  grid-auto-rows: 6.45rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-note-strip {
  margin-top: auto;
}

body.controller-body .stage-card-build_pick_type .remote-build-card,
body.controller-body .stage-card-trade_pick_mode .remote-action-tile,
body.controller-body .stage-card-cards_mode .remote-dev-card,
body.controller-body .stage-card-robber_pick_victim .remote-victim-chip,
body.controller-body .stage-card-trade_choose_partner .remote-trade-choice-card {
  height: auto;
  min-height: 5.55rem;
  padding: 0.72rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-action-tile {
  min-height: 6.45rem;
  display: grid;
  place-items: center;
}

body.controller-body .stage-card-trade_pick_mode .remote-action-tile-body,
body.controller-body .stage-card-trade_pick_mode .remote-action-tile > span:last-child {
  display: none;
}

body.controller-body .stage-card-build_pick_type .remote-build-card small,
body.controller-body .stage-card-cards_mode .remote-dev-card small,
body.controller-body .stage-card-cards_mode .remote-dev-card p {
  line-height: 1.08;
}

body.controller-body .stage-card-build_pick_location .remote-stage-content-spatial-legal,
body.controller-body .stage-card-robber_pick_tile .remote-stage-content-spatial-legal {
  display: flex;
  flex-direction: column;
}

body.controller-body .stage-card-build_pick_location .remote-board-map-shell,
body.controller-body .stage-card-robber_pick_tile .remote-board-map-shell {
  flex: 1 1 auto;
  min-height: 15.25rem;
  max-height: none;
}

body.controller-body .stage-card-build_pick_location .remote-choice-selected,
body.controller-body .stage-card-robber_pick_tile .remote-choice-selected {
  flex: 0 0 auto;
  min-height: 3.2rem;
  padding: 0.52rem 0.68rem;
}

body.controller-body .stage-card-build_pick_location .remote-choice-selected strong,
body.controller-body .stage-card-robber_pick_tile .remote-choice-selected strong {
  font-size: 0.92rem;
}

body.controller-body .stage-card-build_pick_location .remote-choice-selected span,
body.controller-body .stage-card-build_pick_location .remote-choice-selected small,
body.controller-body .stage-card-robber_pick_tile .remote-choice-selected span,
body.controller-body .stage-card-robber_pick_tile .remote-choice-selected small {
  font-size: 0.7rem;
  line-height: 1.05;
}

body.controller-body .stage-card-trade_domestic .remote-stage-content-trade,
body.controller-body .stage-card-discard_cards .remote-stage-content-confirmed {
  display: flex;
  flex-direction: column;
}

body.controller-body .stage-card-trade_domestic .remote-trade-stack,
body.controller-body .stage-card-discard_cards .remote-trade-zone {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

body.controller-body .stage-card-trade_domestic .remote-trade-stack::-webkit-scrollbar,
body.controller-body .stage-card-discard_cards .remote-trade-zone::-webkit-scrollbar {
  display: none;
}

body.controller-body .stage-card-trade_domestic .remote-trade-stack {
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

body.controller-body .stage-card-trade_domestic .remote-trade-zone,
body.controller-body .stage-card-discard_cards .remote-trade-zone {
  gap: 0.42rem;
  padding: 0.56rem;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-grid,
body.controller-body .stage-card-discard_cards .remote-stepper-grid {
  gap: 0.32rem;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-token,
body.controller-body .stage-card-discard_cards .remote-stepper-token {
  min-height: 4.72rem;
  padding: 0.24rem 0.18rem 0.18rem;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-tap,
body.controller-body .stage-card-discard_cards .remote-stepper-tap {
  min-height: 3.15rem;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-token img,
body.controller-body .stage-card-discard_cards .remote-stepper-token img {
  width: 1.05rem;
  height: 1.05rem;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-meter strong,
body.controller-body .stage-card-discard_cards .remote-stepper-meter strong {
  font-size: 1rem;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-controls button,
body.controller-body .stage-card-discard_cards .remote-stepper-controls button {
  min-height: 2.38rem;
  border-radius: 0.8rem;
}

body.controller-body .stage-card-trade_domestic .remote-note-strip {
  flex: 0 0 auto;
  min-height: 2.45rem;
  padding: 0.46rem 0.62rem;
}

body.controller-body .stage-card-trade_maritime .remote-stage-content-confirmed,
body.controller-body .stage-card-trade_incoming .remote-stage-content-confirmed,
body.controller-body .stage-card-confirm_end_turn .remote-stage-content-confirmed {
  display: flex;
  flex-direction: column;
}

body.controller-body .stage-card-trade_maritime .remote-rate-grid,
body.controller-body .stage-card-trade_maritime .remote-receive-grid {
  flex: 0 0 auto;
  gap: 0.38rem;
}

body.controller-body .stage-card-trade_maritime .remote-rate-card,
body.controller-body .stage-card-trade_maritime .remote-receive-token,
body.controller-body .stage-card-cards_mode .remote-pick-token {
  min-height: 4.75rem;
  padding: 0.54rem 0.3rem;
}

body.controller-body .stage-card-trade_maritime .remote-rate-card img,
body.controller-body .stage-card-trade_maritime .remote-receive-token img,
body.controller-body .stage-card-cards_mode .remote-pick-token img {
  width: 1.75rem;
  height: 1.75rem;
}

body.controller-body .stage-card-cards_mode .remote-card-picker {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.controller-body .stage-card-cards_mode .remote-pick-grid {
  gap: 0.38rem;
}

body.controller-body .stage-card-confirm_end_turn .remote-finish-banner {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-content: center;
  gap: 0.22rem;
  padding: 1rem;
  text-align: center;
}

body.controller-body .remote-trade-dock {
  flex: 0 0 auto;
  gap: 0.34rem;
  padding-top: 0;
}

body.controller-body .remote-trade-dock-summary {
  min-height: 2.45rem;
  padding: 0.42rem 0.62rem;
}

body.controller-body .remote-trade-dock-summary strong {
  font-size: 0.8rem;
  line-height: 1.1;
}

body.controller-body .remote-trade-dock-actions {
  gap: 0.36rem;
}

body.controller-body .remote-trade-dock-actions.is-triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.controller-body .remote-trade-dock-button,
body.controller-body .remote-hero-button {
  min-height: var(--controller-control);
  padding-inline: 0.5rem;
  border-radius: 0.95rem;
  font-size: 0.95rem;
  line-height: 1;
  white-space: normal;
}

@media (max-height: 740px) {
  body.controller-body .remote-stage-card {
    --controller-title-band: 4.1rem;
    --controller-gap: 0.36rem;
    --controller-control: 3rem;
    padding: 0.55rem;
  }

  body.controller-body .remote-stage-card.has-back {
    padding-top: 2.88rem;
  }

  body.controller-body .remote-stage-card::before {
    top: 0.48rem;
    left: 0.56rem;
    right: 0.56rem;
    height: 4.3rem;
  }

  body.controller-body .remote-stage-content > h2 {
    padding-inline: 3.25rem;
    font-size: 1.28rem;
  }

  body.controller-body .remote-stage-back {
    top: 0.62rem;
    left: 0.62rem;
    min-height: 2.88rem;
    min-width: 4.35rem;
  }

  body.controller-body .stage-card-action_hub .remote-hub-insight {
    min-height: 2.45rem;
  }

  body.controller-body .stage-card-action_hub .remote-action-grid-hub {
    grid-template-rows: repeat(2, 5.1rem);
  }

  body.controller-body .stage-card-action_hub .remote-action-tile,
  body.controller-body .stage-card-build_pick_type .remote-build-card,
  body.controller-body .stage-card-cards_mode .remote-dev-card,
  body.controller-body .stage-card-robber_pick_victim .remote-victim-chip,
  body.controller-body .stage-card-trade_choose_partner .remote-trade-choice-card {
    min-height: 5.1rem;
  }

  body.controller-body .stage-card-action_hub .remote-action-tile {
    height: 5.1rem;
  }

  body.controller-body .stage-card-trade_pick_mode .remote-mode-grid {
    grid-auto-rows: 5.55rem;
  }

  body.controller-body .stage-card-trade_pick_mode .remote-action-tile {
    min-height: 5.55rem;
  }

  body.controller-body .stage-card-build_pick_location .remote-board-map-shell,
  body.controller-body .stage-card-robber_pick_tile .remote-board-map-shell {
    min-height: 12.5rem;
  }

  body.controller-body .stage-card-trade_domestic .remote-stepper-token,
  body.controller-body .stage-card-discard_cards .remote-stepper-token {
    min-height: 4.25rem;
  }

  body.controller-body .stage-card-trade_domestic .remote-stepper-tap,
  body.controller-body .stage-card-discard_cards .remote-stepper-tap {
    min-height: 2.82rem;
  }
}

/* Controller professional polish: stronger fantasy controls, clear selections, fast baked minimap. */
body.controller-body .remote-stage-card {
  animation: remote-stage-book-enter 260ms cubic-bezier(0.2, 0.78, 0.18, 1);
  transform-origin: 50% 12%;
}

body.controller-body .remote-turn-overline {
  margin: 0;
  justify-self: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: #2a1605;
  background: linear-gradient(180deg, #ffe39a, #c8882f);
  box-shadow:
    inset 0 1px 0 rgba(255, 251, 224, 0.72),
    0 0.55rem 1rem rgba(12, 5, 1, 0.24);
  font-size: 0.64rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.controller-body .remote-turn-callout,
body.controller-body .remote-last-roll-banner,
body.controller-body .remote-roll-result-card {
  border: 1px solid rgba(255, 229, 157, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.16), rgba(34, 16, 7, 0.3)),
    url("/assets/art/universe/table-wood.png") center / 460px 460px repeat,
    rgba(25, 12, 5, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 210, 0.16),
    inset 0 0 0 1px rgba(98, 48, 14, 0.44),
    0 0.75rem 1.45rem rgba(7, 3, 1, 0.26);
}

body.controller-body .remote-turn-callout {
  display: grid;
  gap: 0.2rem;
  padding: 0.82rem 0.9rem;
  border-radius: 1.15rem;
  text-align: center;
}

body.controller-body .remote-turn-callout span,
body.controller-body .remote-last-roll-banner span,
body.controller-body .remote-roll-result-card span {
  color: rgba(255, 220, 146, 0.76);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body.controller-body .remote-turn-callout strong {
  color: #fff4d8;
  font-size: 1rem;
}

body.controller-body .remote-last-roll-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  padding: 0.58rem 0.72rem;
  border-radius: 1rem;
}

body.controller-body .remote-last-roll-banner strong,
body.controller-body .remote-roll-result-card strong {
  color: #fff6d8;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 1000;
  text-shadow:
    0 2px 0 rgba(58, 25, 6, 0.9),
    0 0 18px rgba(255, 204, 93, 0.34);
}

body.controller-body .remote-last-roll-banner strong {
  min-width: 3.3rem;
  text-align: center;
  font-size: 2.15rem;
  line-height: 0.96;
}

body.controller-body .remote-last-roll-banner small {
  justify-self: end;
  color: rgba(255, 229, 169, 0.82);
  font-size: 0.66rem;
  font-weight: 850;
}

body.controller-body .remote-roll-result-card {
  display: grid;
  justify-items: center;
  gap: 0.24rem;
  padding: 0.72rem;
  border-radius: 1.15rem;
}

body.controller-body .remote-roll-result-card strong {
  font-size: 3.85rem;
  line-height: 0.92;
}

body.controller-body .remote-roll-result-card small {
  color: rgba(255, 232, 176, 0.82);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
}

body.controller-body .remote-roll-result-card.is-final {
  animation: remote-roll-result-pop 360ms cubic-bezier(0.18, 0.86, 0.22, 1);
  border-color: rgba(255, 229, 139, 0.58);
}

body.controller-body .remote-roll-dice-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.05rem;
  width: min(19rem, 100%);
  min-height: 12rem;
  border-radius: 1.4rem;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 220, 120, 0.18), transparent 56%),
    linear-gradient(180deg, rgba(255, 241, 199, 0.1), rgba(35, 17, 7, 0.18));
  border: 1px solid rgba(255, 229, 157, 0.14);
}

body.controller-body .remote-roll-dice-preview .remote-die {
  width: 5.9rem;
  border-color: rgba(104, 59, 18, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -8px 18px rgba(128, 77, 24, 0.16),
    0 1rem 1.7rem rgba(7, 3, 1, 0.28);
}

body.controller-body .remote-header-dice {
  border-color: rgba(255, 225, 158, 0.24);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 218, 128, 0.18), transparent 48%),
    rgba(12, 6, 3, 0.34);
}

body.controller-body .remote-header-dice-total {
  min-width: 2.2rem;
  color: #ffe49c;
  font-size: 1rem;
  text-shadow: 0 1px 0 rgba(40, 17, 5, 0.8);
}

body.controller-body .remote-command-button,
body.controller-body .remote-action-tile,
body.controller-body .remote-build-card,
body.controller-body .remote-choice-card,
body.controller-body .remote-choice-list-button,
body.controller-body .remote-dev-card,
body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token,
body.controller-body .remote-victim-chip,
body.controller-body .remote-seat-card,
body.controller-body .remote-stepper-token,
body.controller-body .remote-hero-button {
  border-color: rgba(255, 229, 157, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 240, 190, 0.16), rgba(43, 21, 8, 0.28)),
    url("/assets/art/universe/table-wood.png") center / 440px 440px repeat,
    rgba(30, 14, 5, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 210, 0.15),
    inset 0 -1px 0 rgba(53, 23, 6, 0.74),
    0 0.62rem 1.18rem rgba(7, 3, 1, 0.22);
}

body.controller-body .remote-action-tile.is-featured,
body.controller-body .remote-command-button.tone-primary,
body.controller-body .remote-hero-button {
  color: #281503;
  border-color: rgba(255, 244, 204, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 253, 226, 0.42), rgba(165, 91, 18, 0.12)),
    url("/assets/art/universe/table-wood.png") center / 360px 360px repeat,
    linear-gradient(180deg, #f8d874 0%, #d28a2e 62%, #9a541d 100%);
}

body.controller-body .remote-action-tile.is-featured strong,
body.controller-body .remote-command-button.tone-primary strong,
body.controller-body .remote-hero-button {
  color: #271404;
  text-shadow: 0 1px 0 rgba(255, 238, 174, 0.5);
}

body.controller-body .remote-command-button.tone-secondary {
  color: #fff2d1;
  background:
    linear-gradient(180deg, rgba(255, 240, 190, 0.13), rgba(23, 11, 5, 0.2)),
    url("/assets/art/universe/table-wood.png") center / 460px 460px repeat,
    rgba(25, 12, 5, 0.86);
}

body.controller-body .remote-command-button:active,
body.controller-body .remote-action-tile:active,
body.controller-body .remote-build-card:active,
body.controller-body .remote-choice-card:active,
body.controller-body .remote-choice-list-button:active,
body.controller-body .remote-dev-card:active,
body.controller-body .remote-rate-card:active,
body.controller-body .remote-receive-token:active,
body.controller-body .remote-pick-token:active,
body.controller-body .remote-victim-chip:active,
body.controller-body .remote-hero-button:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(1.06);
}

body.controller-body .remote-build-card.is-selected,
body.controller-body .remote-choice-card.is-selected,
body.controller-body .remote-choice-list-button.is-selected,
body.controller-body .remote-dev-card.is-selected,
body.controller-body .remote-rate-card.is-selected,
body.controller-body .remote-receive-token.is-selected,
body.controller-body .remote-pick-token.is-selected,
body.controller-body .remote-victim-chip.is-selected,
body.controller-body .remote-seat-card.is-selected,
body.controller-body .remote-stepper-token.is-active {
  transform: translateY(-1px);
  border-color: rgba(255, 237, 161, 0.92);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 219, 107, 0.28), transparent 46%),
    url("/assets/art/universe/table-wood.png") center / 380px 380px repeat,
    linear-gradient(180deg, rgba(83, 50, 16, 0.96), rgba(37, 18, 6, 0.96));
  box-shadow:
    inset 0 0 0 2px rgba(255, 245, 198, 0.16),
    0 0 0 3px rgba(255, 197, 69, 0.22),
    0 0 1.2rem rgba(255, 185, 55, 0.22),
    0 0.72rem 1.25rem rgba(7, 3, 1, 0.28);
}

body.controller-body .remote-board-surface-image {
  pointer-events: none;
  image-rendering: auto;
}

body.controller-body .remote-board-map.has-baked-surface .remote-board-tile-surface {
  opacity: 0;
}

body.controller-body .remote-board-map:not(.has-baked-surface) .remote-board-tile-surface {
  opacity: 0.82;
}

body.controller-body .remote-board-map .remote-board-tile {
  fill: transparent;
  stroke: rgba(255, 233, 165, 0.32);
  stroke-width: 2;
}

body.controller-body .remote-board-map .remote-board-tile.is-legal {
  stroke: rgba(255, 223, 91, 1);
  stroke-width: 8.2;
  filter: url("#remote-map-selection-glow");
}

body.controller-body .remote-board-map .remote-board-tile.is-selected,
body.controller-body .remote-board-map .remote-board-edge.is-selected,
body.controller-body .remote-board-map .remote-board-road-pad.is-selected,
body.controller-body .remote-board-map .remote-board-legal-point.is-selected {
  stroke: rgba(244, 255, 232, 1);
  fill: rgba(48, 208, 128, 0.98);
  filter:
    drop-shadow(0 0 9px rgba(255, 218, 93, 0.88))
    drop-shadow(0 0 18px rgba(44, 200, 119, 0.44));
}

body.controller-body .remote-board-map .remote-board-legal-ring {
  fill: rgba(255, 205, 67, 0.42);
  stroke: rgba(255, 248, 220, 1);
  stroke-width: 4.4;
  filter: drop-shadow(0 0 9px rgba(255, 208, 76, 0.74));
}

body.controller-body .remote-board-map .remote-board-legal-point,
body.controller-body .remote-board-map .remote-board-road-pad {
  fill: rgba(255, 198, 47, 0.98);
  stroke: rgba(255, 255, 235, 1);
  stroke-width: 4.8;
}

body.controller-body .remote-board-map .remote-board-edge.is-legal {
  stroke: rgba(255, 206, 54, 1);
  stroke-width: 17;
  filter: drop-shadow(0 0 10px rgba(255, 205, 67, 0.74));
}

body.controller-body .remote-board-map-viewport {
  background:
    linear-gradient(180deg, #58bdd4 0%, #44a9c5 54%, #2f8eae 100%);
}

@keyframes remote-stage-book-enter {
  from {
    opacity: 0;
    transform: translateY(10px) rotateX(5deg) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

@keyframes remote-roll-result-pop {
  0% {
    transform: scale(0.88);
  }

  62% {
    transform: scale(1.055);
  }

  100% {
    transform: scale(1);
  }
}

/* Unified fantasy control system: consistent text scale plus representative button textures. */
body.controller-body {
  --controller-font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --controller-font-title: "Iowan Old Style", "New York", Georgia, serif;
  --controller-panel-line: rgba(255, 225, 158, 0.2);
  --controller-panel-shadow:
    inset 0 1px 0 rgba(255, 242, 209, 0.14),
    inset 0 -1px 0 rgba(10, 4, 1, 0.22),
    0 0.54rem 1rem rgba(7, 3, 1, 0.18);
  --controller-text-main: #fff4d8;
  --controller-text-muted: rgba(255, 226, 171, 0.78);
}

body.controller-body .remote-stage-content,
body.controller-body .remote-stage-content button,
body.controller-body .remote-trade-dock,
body.controller-body .remote-note-strip,
body.controller-body .remote-zone-head,
body.controller-body .remote-finish-banner {
  font-family: var(--controller-font-body);
  letter-spacing: 0;
}

body.controller-body .remote-stage-content > h2 {
  color: #fff1cc;
  font-family: var(--controller-font-title);
  font-weight: 800;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(255, 238, 188, 0.12),
    0 2px 0 rgba(24, 10, 4, 0.58);
}

body.controller-body :is(
  .remote-action-tile,
  .remote-build-card,
  .remote-dev-card,
  .remote-rate-card,
  .remote-receive-token,
  .remote-pick-token,
  .remote-victim-chip,
  .remote-trade-choice-card,
  .remote-trade-dock-button,
  .remote-stepper-token
) {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--controller-panel-line);
  color: var(--controller-text-main);
  background:
    linear-gradient(180deg, rgba(255, 243, 204, 0.14), rgba(34, 16, 7, 0.28)),
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    rgba(30, 16, 8, 0.8);
  background-blend-mode: normal, multiply, normal;
  box-shadow: var(--controller-panel-shadow);
}

body.controller-body :is(
  .remote-action-tile,
  .remote-build-card,
  .remote-dev-card,
  .remote-rate-card,
  .remote-receive-token,
  .remote-pick-token,
  .remote-victim-chip,
  .remote-trade-choice-card,
  .remote-trade-dock-button
)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 247, 216, 0.13), transparent 34%),
    radial-gradient(circle at 50% 0%, rgba(255, 213, 119, 0.13), transparent 48%);
  opacity: 0.94;
  z-index: 0;
}

body.controller-body :is(
  .remote-action-tile,
  .remote-build-card,
  .remote-dev-card,
  .remote-rate-card,
  .remote-receive-token,
  .remote-pick-token,
  .remote-victim-chip,
  .remote-trade-choice-card,
  .remote-trade-dock-button
) > * {
  position: relative;
  z-index: 1;
}

body.controller-body .remote-action-tile strong,
body.controller-body .remote-build-card strong,
body.controller-body .remote-dev-card strong,
body.controller-body .remote-rate-card strong,
body.controller-body .remote-receive-token strong,
body.controller-body .remote-pick-token strong,
body.controller-body .remote-victim-chip strong,
body.controller-body .remote-trade-choice-card strong,
body.controller-body .remote-finish-banner strong {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

body.controller-body .remote-action-tile span,
body.controller-body .remote-build-card span,
body.controller-body .remote-build-card small,
body.controller-body .remote-dev-card p,
body.controller-body .remote-dev-card small,
body.controller-body .remote-rate-card span,
body.controller-body .remote-receive-token span,
body.controller-body .remote-pick-token span,
body.controller-body .remote-victim-chip span,
body.controller-body .remote-trade-choice-card span,
body.controller-body .remote-note-strip span,
body.controller-body .remote-note-strip strong,
body.controller-body .remote-zone-label,
body.controller-body .remote-zone-total,
body.controller-body .remote-trade-dock-summary strong {
  font-size: 0.76rem;
  line-height: 1.1;
  letter-spacing: 0;
}

body.controller-body .remote-zone-label,
body.controller-body .remote-note-strip span,
body.controller-body .remote-build-card-head span,
body.controller-body .remote-dev-card-head span,
body.controller-body .remote-action-tile-badge,
body.controller-body .remote-zone-total {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.controller-body .remote-action-tile-badge,
body.controller-body .remote-zone-total {
  color: #2a1707;
  background:
    linear-gradient(180deg, rgba(255, 246, 203, 0.96), rgba(214, 147, 50, 0.96)),
    url("/assets/art/universe/table-wood.png") center / 260px 260px repeat;
  border: 1px solid rgba(255, 245, 217, 0.2);
}

body.controller-body .remote-action-tile.command-build {
  background:
    radial-gradient(circle at 92% 20%, rgba(113, 151, 86, 0.44), transparent 38%),
    linear-gradient(180deg, rgba(255, 243, 204, 0.16), rgba(44, 24, 8, 0.34)),
    url("/assets/art/hexes/forest.png") center / cover,
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat;
}

body.controller-body .remote-action-tile.command-trade,
body.controller-body .remote-action-tile.command-table-trade {
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 210, 116, 0.34), transparent 38%),
    linear-gradient(180deg, rgba(255, 243, 204, 0.16), rgba(38, 19, 7, 0.32)),
    url("/assets/art/universe/live/trade/trade-icon.png") right 0.5rem top 0.42rem / 3.35rem 3.35rem no-repeat,
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    rgba(31, 15, 6, 0.86);
}

body.controller-body .remote-action-tile.command-sea-trade {
  background:
    radial-gradient(circle at 88% 16%, rgba(85, 175, 198, 0.4), transparent 38%),
    linear-gradient(180deg, rgba(255, 243, 204, 0.14), rgba(12, 47, 55, 0.34)),
    url("/assets/art/universe/live/trade/ship-badge.png") right 0.5rem top 0.42rem / 3.3rem 3.3rem no-repeat,
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    rgba(20, 48, 52, 0.86);
}

body.controller-body .remote-action-tile.command-cards {
  background:
    radial-gradient(circle at 88% 18%, rgba(143, 91, 185, 0.3), transparent 38%),
    linear-gradient(180deg, rgba(255, 243, 204, 0.15), rgba(32, 17, 18, 0.32)),
    url("/assets/art/cards/knight.png") right -0.2rem center / 3.9rem auto no-repeat,
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    rgba(31, 15, 8, 0.86);
}

body.controller-body .remote-action-tile.command-end-turn {
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 234, 160, 0.32), transparent 38%),
    linear-gradient(180deg, rgba(255, 243, 204, 0.15), rgba(37, 18, 7, 0.28)),
    url("/assets/art/universe/live/dice/roll-icon.png") right 0.58rem center / 3.1rem 3.1rem no-repeat,
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    rgba(31, 15, 6, 0.86);
}

body.controller-body .remote-build-card.build-card-road {
  background:
    linear-gradient(180deg, rgba(255, 243, 204, 0.15), rgba(30, 15, 6, 0.3)),
    url("/assets/art/universe/live/resources/lumber.png") right 0.45rem top 0.36rem / 2.5rem 2.5rem no-repeat,
    url("/assets/art/hexes/hill.png") center / cover,
    rgba(31, 15, 6, 0.84);
}

body.controller-body .remote-build-card.build-card-settlement {
  background:
    linear-gradient(180deg, rgba(255, 243, 204, 0.15), rgba(30, 15, 6, 0.3)),
    url("/assets/art/universe/settlement-white.png") right 0.45rem top 0.3rem / 2.8rem auto no-repeat,
    url("/assets/art/hexes/pasture.png") center / cover,
    rgba(31, 15, 6, 0.84);
}

body.controller-body .remote-build-card.build-card-city {
  background:
    linear-gradient(180deg, rgba(255, 243, 204, 0.15), rgba(30, 15, 6, 0.3)),
    url("/assets/art/universe/city-white.png") right 0.36rem top 0.25rem / 3rem auto no-repeat,
    url("/assets/art/hexes/mountain.png") center / cover,
    rgba(31, 15, 6, 0.84);
}

body.controller-body .remote-build-card.build-card-development-card {
  background:
    linear-gradient(180deg, rgba(255, 243, 204, 0.15), rgba(30, 15, 6, 0.3)),
    url("/assets/art/cards/knight.png") right -0.2rem top 0.12rem / 3.55rem auto no-repeat,
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    rgba(31, 15, 6, 0.86);
}

body.controller-body .remote-dev-card.tone-danger {
  background:
    linear-gradient(180deg, rgba(255, 243, 204, 0.15), rgba(30, 15, 6, 0.3)),
    url("/assets/art/cards/knight.png") right -0.2rem center / 3.6rem auto no-repeat,
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat;
}

body.controller-body .remote-build-card.is-selected,
body.controller-body .remote-dev-card.is-selected,
body.controller-body .remote-rate-card.is-selected,
body.controller-body .remote-receive-token.is-selected,
body.controller-body .remote-pick-token.is-selected,
body.controller-body .remote-victim-chip.is-selected {
  border-color: rgba(255, 231, 154, 0.68);
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 185, 0.22),
    0 0 0 2px rgba(201, 133, 47, 0.28),
    0 0.7rem 1.3rem rgba(7, 3, 1, 0.24);
}

body.controller-body .remote-trade-dock-button.tone-secondary {
  color: #fff4d8;
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.14), rgba(34, 16, 7, 0.22)),
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    rgba(30, 16, 8, 0.86);
}

body.controller-body .remote-trade-dock-button.tone-primary {
  color: #2a1707;
  background:
    linear-gradient(180deg, rgba(255, 250, 220, 0.34), rgba(190, 110, 31, 0.1)),
    url("/assets/art/universe/table-wood.png") center / 360px 360px repeat,
    linear-gradient(180deg, #f6d376, #c57d2d);
}

body.controller-body .remote-trade-dock-button.tone-danger {
  color: #fff7f0;
  background:
    linear-gradient(180deg, rgba(255, 223, 203, 0.18), rgba(80, 18, 9, 0.18)),
    url("/assets/art/universe/table-wood.png") center / 360px 360px repeat,
    linear-gradient(180deg, #dd7758, #a93a25);
}

body.controller-body .remote-trade-dock-button:disabled,
body.controller-body .remote-build-card.is-unavailable,
body.controller-body .remote-action-tile.is-muted,
body.controller-body .remote-rate-card.is-disabled,
body.controller-body .remote-receive-token:disabled {
  filter: saturate(0.7) brightness(0.82);
  opacity: 0.58;
}

body.controller-body .remote-note-strip,
body.controller-body .remote-trade-dock-summary,
body.controller-body .remote-choice-selected,
body.controller-body .remote-trade-zone,
body.controller-body .remote-finish-banner,
body.controller-body .remote-incoming-card,
body.controller-body .remote-incoming-summary {
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.1), rgba(35, 17, 7, 0.18)),
    url("/assets/art/universe/table-wood.png") center / 520px 520px repeat,
    rgba(20, 10, 5, 0.58);
  border-color: rgba(255, 225, 158, 0.16);
  box-shadow: var(--controller-panel-shadow);
}

body.controller-body .remote-stepper-token.is-active {
  border-color: rgba(255, 231, 154, 0.58);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 216, 135, 0.28), transparent 42%),
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    rgba(34, 18, 8, 0.88);
}

body.controller-body .remote-stepper-meter,
body.controller-body .remote-stepper-controls button {
  border-color: rgba(255, 225, 158, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 241, 199, 0.1), rgba(35, 17, 7, 0.18)),
    rgba(10, 5, 3, 0.35);
}

body.controller-body .remote-stage-card > .remote-stage-back {
  position: absolute !important;
  top: 0.72rem !important;
  left: 0.72rem !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 4.85rem;
  min-height: 3.2rem;
  z-index: 3;
}

body.controller-body .remote-trade-dock-button,
body.controller-body .remote-hero-button,
body.controller-body .remote-stepper-controls button {
  min-height: 3.65rem !important;
}

@media (max-height: 740px) {
  body.controller-body .stage-card-trade_domestic .remote-trade-stack {
    gap: 0.28rem;
  }

  body.controller-body .stage-card-trade_domestic .remote-trade-zone,
  body.controller-body .stage-card-discard_cards .remote-trade-zone {
    gap: 0.26rem;
    padding: 0.38rem;
  }

  body.controller-body .stage-card-trade_domestic .remote-zone-head,
  body.controller-body .stage-card-discard_cards .remote-zone-head {
    min-height: 1.35rem;
    align-items: center;
  }
}

/* Final controller audit: console-grade contrast and stable fairytale surfaces. */
body.controller-body {
  --controller-text-main: #fff8e9;
  --controller-text-muted: #efd6a5;
  --controller-panel-line: rgba(255, 220, 145, 0.38);
  --controller-panel-shadow:
    inset 0 1px 0 rgba(255, 243, 205, 0.18),
    inset 0 -1px 0 rgba(12, 5, 2, 0.5),
    0 0.42rem 0.9rem rgba(5, 2, 1, 0.24);
}

body.controller-body .remote-stage-card {
  animation: controller-panel-arrive 150ms ease-out both;
}

body.controller-body .remote-stage-card,
body.controller-body .remote-stage-card::before {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.controller-body .remote-stage-content > h2 {
  color: #fff5d7;
  text-shadow:
    0 2px 0 #351608,
    0 0 12px rgba(255, 201, 91, 0.2);
}

body.controller-body .remote-stage-copy,
body.controller-body .remote-note-strip span,
body.controller-body .remote-note-strip strong,
body.controller-body .remote-zone-label,
body.controller-body .remote-zone-total,
body.controller-body .remote-trade-dock-summary strong,
body.controller-body .remote-choice-selected span,
body.controller-body .remote-choice-selected small,
body.controller-body .remote-finish-banner span,
body.controller-body .remote-finish-banner small {
  color: #f0d8aa;
}

body.controller-body :is(
  .remote-note-strip,
  .remote-trade-dock-summary,
  .remote-choice-selected,
  .remote-trade-zone,
  .remote-finish-banner,
  .remote-incoming-card,
  .remote-incoming-summary,
  .remote-waiting-card,
  .remote-confirm-card,
  .remote-roll-progress,
  .remote-roll-chip,
  .remote-hub-insight
) {
  background:
    linear-gradient(180deg, rgba(107, 63, 30, 0.24), rgba(23, 10, 4, 0.2)),
    url("/assets/art/universe/table-wood.png") center / 500px 500px repeat,
    #2a160b;
  background-blend-mode: normal, multiply, normal;
  border-color: rgba(255, 220, 145, 0.32);
  box-shadow: var(--controller-panel-shadow);
}

body.controller-body :is(
  .remote-note-strip,
  .remote-trade-dock-summary,
  .remote-choice-selected,
  .remote-trade-zone,
  .remote-finish-banner,
  .remote-incoming-card,
  .remote-incoming-summary,
  .remote-waiting-card,
  .remote-confirm-card,
  .remote-roll-progress,
  .remote-roll-chip,
  .remote-hub-insight
) :is(strong, p) {
  color: #fff7e4;
}

body.controller-body .remote-incoming-summary.is-ready {
  background:
    linear-gradient(180deg, rgba(79, 137, 72, 0.38), rgba(18, 41, 19, 0.2)),
    url("/assets/art/universe/table-wood.png") center / 500px 500px repeat,
    #21341f;
  border-color: rgba(174, 225, 137, 0.5);
}

body.controller-body .remote-incoming-summary.is-blocked {
  background:
    linear-gradient(180deg, rgba(157, 69, 47, 0.36), rgba(54, 13, 8, 0.2)),
    url("/assets/art/universe/table-wood.png") center / 500px 500px repeat,
    #3a1710;
  border-color: rgba(239, 145, 112, 0.48);
}

body.controller-body .remote-action-tile,
body.controller-body .remote-build-card,
body.controller-body .remote-dev-card,
body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token,
body.controller-body .remote-victim-chip,
body.controller-body .remote-trade-choice-card,
body.controller-body .remote-stepper-token {
  border-color: rgba(255, 220, 145, 0.34);
  color: #fff7e5;
}

body.controller-body :is(
  .remote-action-tile,
  .remote-build-card,
  .remote-dev-card,
  .remote-rate-card,
  .remote-receive-token,
  .remote-pick-token,
  .remote-victim-chip,
  .remote-trade-choice-card,
  .remote-stepper-token
) :is(strong, span, small, p) {
  color: #fff7e5;
  text-shadow: 0 1px 2px rgba(22, 8, 2, 0.88);
}

body.controller-body :is(
  .remote-action-tile,
  .remote-build-card,
  .remote-dev-card
)::after {
  background: linear-gradient(90deg, rgba(20, 8, 3, 0.58), rgba(20, 8, 3, 0.18) 70%, rgba(20, 8, 3, 0.08));
}

body.controller-body .remote-action-tile.is-featured {
  color: #2a1505;
  border-color: #ffe29a;
  background:
    linear-gradient(180deg, rgba(255, 250, 218, 0.5), rgba(168, 85, 16, 0.1)),
    url("/assets/art/universe/table-wood.png") center / 360px 360px repeat,
    linear-gradient(180deg, #f9dc83, #cb7d27);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 234, 0.68),
    inset 0 -2px 0 rgba(104, 45, 8, 0.34),
    0 0 0 2px rgba(255, 210, 100, 0.24),
    0 0.6rem 1.1rem rgba(7, 3, 1, 0.28);
}

body.controller-body .remote-action-tile.is-featured :is(strong, span, small) {
  color: #2a1505;
  text-shadow: 0 1px 0 rgba(255, 242, 186, 0.64);
}

body.controller-body .stage-card-action_hub .remote-action-tile.is-featured {
  color: #2a1505;
  border-color: #ffe29a;
  background:
    linear-gradient(180deg, rgba(255, 250, 218, 0.5), rgba(168, 85, 16, 0.1)),
    url("/assets/art/universe/table-wood.png") center / 360px 360px repeat,
    linear-gradient(180deg, #f9dc83, #cb7d27);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 234, 0.68),
    inset 0 -2px 0 rgba(104, 45, 8, 0.34),
    0 0 0 2px rgba(255, 210, 100, 0.24),
    0 0.6rem 1.1rem rgba(7, 3, 1, 0.28);
}

body.controller-body .stage-card-action_hub .remote-action-tile.is-featured :is(strong, span, small) {
  color: #2a1505;
  text-shadow: 0 1px 0 rgba(255, 242, 186, 0.64);
}

body.controller-body .remote-action-tile.is-featured .remote-action-tile-badge {
  color: #fff7e5;
  background: #4b250c;
  border-color: rgba(255, 231, 165, 0.52);
  text-shadow: none;
}

body.controller-body .remote-shell-entry .remote-entry-card {
  background: linear-gradient(180deg, #fff9eb, #e8dbc1);
  border-color: rgba(91, 56, 30, 0.34);
  color: #2a190f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 0.6rem 1.2rem rgba(5, 2, 1, 0.22);
}

body.controller-body .remote-shell-entry .remote-entry-label,
body.controller-body .remote-shell-entry .remote-entry-label input {
  color: #2a190f;
}

body.controller-body .remote-shell-entry .remote-seat-card {
  color: #fff7e5;
  background:
    linear-gradient(180deg, rgba(101, 57, 27, 0.24), rgba(18, 8, 3, 0.25)),
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    #2a160b;
  border-color: rgba(255, 220, 145, 0.34);
}

body.controller-body .remote-shell-entry .remote-seat-card :is(strong, span) {
  color: #fff7e5;
  text-shadow: 0 1px 2px rgba(17, 6, 2, 0.88);
}

body.controller-body .remote-shell-entry .remote-seat-card.is-selected {
  border-color: #ffe29a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 243, 192, 0.22),
    0 0 0 2px rgba(225, 154, 49, 0.28),
    0 0.65rem 1.1rem rgba(5, 2, 1, 0.24);
}

body.controller-body .remote-trade-zone,
body.controller-body .remote-incoming-card,
body.controller-body .remote-trade-choice-grid,
body.controller-body .remote-trade-dock,
body.controller-body .remote-stepper-grid {
  contain: layout paint style;
}

body.controller-body .stage-card-trade_domestic .remote-trade-stack {
  gap: 0.5rem;
}

body.controller-body .remote-stepper-token {
  background:
    linear-gradient(180deg, rgba(86, 47, 20, 0.2), rgba(10, 4, 2, 0.28)),
    url("/assets/art/universe/table-wood.png") center / 380px 380px repeat,
    #211006;
  box-shadow:
    inset 0 1px 0 rgba(255, 233, 185, 0.12),
    0 0.35rem 0.7rem rgba(6, 2, 1, 0.2);
}

body.controller-body .remote-stepper-token.is-active {
  border-color: #ffd77b;
  background:
    linear-gradient(180deg, rgba(154, 94, 30, 0.38), rgba(23, 9, 2, 0.22)),
    url("/assets/art/universe/table-wood.png") center / 380px 380px repeat,
    #3a1c08;
  box-shadow:
    inset 0 0 0 1px rgba(255, 235, 177, 0.22),
    0 0 0 2px rgba(226, 157, 55, 0.2);
}

body.controller-body .remote-stepper-meter {
  background: #1b0d06;
  border-color: rgba(255, 218, 139, 0.28);
}

body.controller-body .remote-stepper-meter strong {
  color: #fff8e8;
}

body.controller-body .remote-stepper-controls button {
  background:
    linear-gradient(180deg, rgba(106, 61, 27, 0.28), rgba(16, 6, 2, 0.26)),
    #261208;
  border-color: rgba(255, 218, 139, 0.28);
  color: #fff2cf;
  box-shadow: none;
}

body.controller-body .remote-stepper-controls button:disabled {
  opacity: 1;
  color: #9d8767;
  background: #1a0e08;
  border-color: rgba(174, 145, 101, 0.22);
}

body.controller-body .remote-trade-dock-button,
body.controller-body .remote-stepper-token,
body.controller-body .remote-stepper-controls button,
body.controller-body .remote-trade-zone *,
body.controller-body .remote-incoming-card *,
body.controller-body .remote-trade-choice-grid * {
  transition: none !important;
}

body.controller-body .remote-trade-dock-button:disabled,
body.controller-body .remote-build-card.is-unavailable,
body.controller-body .remote-action-tile.is-muted,
body.controller-body .remote-rate-card.is-disabled,
body.controller-body .remote-receive-token:disabled {
  filter: none;
  opacity: 1;
}

body.controller-body .remote-trade-dock-button:disabled,
body.controller-body .remote-receive-token:disabled {
  color: #9f8b6e;
  background:
    linear-gradient(180deg, rgba(74, 52, 35, 0.3), rgba(20, 11, 7, 0.28)),
    #2a1b12;
  border-color: rgba(174, 145, 101, 0.26);
}

body.controller-body :is(
  .remote-trade-dock-button.tone-primary,
  .remote-command-button.tone-primary,
  .remote-hero-button
):not(:disabled) {
  color: #241204;
  background:
    linear-gradient(180deg, rgba(255, 253, 221, 0.48), rgba(162, 79, 14, 0.08)),
    url("/assets/art/universe/table-wood.png") center / 360px 360px repeat,
    linear-gradient(180deg, #ffe49a 0%, #dfa044 58%, #b7621d 100%);
  border-color: #ffe9ab;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 237, 0.74),
    inset 0 -2px 0 rgba(97, 40, 6, 0.32),
    0 0.55rem 1rem rgba(6, 2, 1, 0.25);
  text-shadow: 0 1px 0 rgba(255, 241, 179, 0.68);
}

body.controller-body .remote-build-card.is-unavailable,
body.controller-body .remote-action-tile.is-muted,
body.controller-body .remote-rate-card.is-disabled {
  color: #d1bd9b;
  background:
    linear-gradient(180deg, rgba(70, 48, 30, 0.3), rgba(20, 10, 5, 0.28)),
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    #2a180d;
}

body.controller-body :is(
  .remote-build-card.is-unavailable,
  .remote-action-tile.is-muted,
  .remote-rate-card.is-disabled
) :is(strong, span, small, p) {
  color: #d1bd9b;
}

body.controller-body .remote-dice-stage {
  contain: layout paint style;
}

body.controller-body .remote-die {
  backface-visibility: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -7px 14px rgba(116, 66, 24, 0.14),
    0 0.7rem 1.2rem rgba(7, 3, 1, 0.26);
}

body.controller-body .remote-dice-stage.is-rolling .remote-die {
  animation: controller-die-toss 460ms cubic-bezier(0.2, 0.76, 0.2, 1) 1 both;
}

body.controller-body .remote-dice-stage.is-rolling .remote-die:nth-child(2) {
  animation-delay: 55ms;
}

body.controller-body .remote-dice-stage.is-result .remote-die,
body.controller-body .remote-roll-result-card.is-final {
  animation: controller-result-settle 180ms ease-out 1 both;
}

body.controller-body button:focus-visible {
  outline: 3px solid #ffe29a;
  outline-offset: 2px;
  box-shadow:
    0 0 0 5px rgba(125, 62, 13, 0.92),
    0 0 0 8px rgba(255, 201, 85, 0.34);
}

@keyframes controller-panel-arrive {
  from { opacity: 0.84; }
  to { opacity: 1; }
}

@keyframes controller-die-toss {
  0% { transform: translate3d(0, -8px, 0) rotate(-6deg) scale(0.97); }
  58% { transform: translate3d(0, 3px, 0) rotate(3deg) scale(1.02); }
  100% { transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}

@keyframes controller-result-settle {
  from { transform: scale(0.96); opacity: 0.86; }
  to { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body.controller-body *,
  body.controller-body *::before,
  body.controller-body *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* Nintendo-style controller redesign: bold, readable, tactile, and fairytale themed. */
body.controller-body {
  --controller-ink: #281405;
  --controller-cream: #fff6da;
  --controller-cream-strong: #fffbe9;
  --controller-gold: #ffc94e;
  --controller-gold-deep: #b9631d;
  --controller-shadow-soft: 0 1rem 1.65rem rgba(6, 2, 1, 0.26);
  --controller-rim:
    inset 0 1px 0 rgba(255, 250, 224, 0.46),
    inset 0 -2px 0 rgba(52, 20, 4, 0.5);
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 218, 120, 0.24), transparent 30%),
    linear-gradient(180deg, rgba(31, 63, 58, 0.94), rgba(9, 34, 35, 0.98));
}

body.controller-body .remote-screen-frame {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 228, 142, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(31, 78, 75, 0.82), rgba(12, 42, 42, 0.96));
}

body.controller-body .remote-header,
body.controller-body .remote-entry-header {
  border: 2px solid rgba(255, 211, 107, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 231, 156, 0.13), rgba(41, 19, 7, 0.22)),
    url("/assets/art/universe/table-wood.png") center / 430px 430px repeat,
    #4a2810;
  box-shadow:
    var(--controller-rim),
    0 0.46rem 0 rgba(32, 13, 3, 0.62),
    0 0.9rem 1.35rem rgba(4, 2, 1, 0.24);
}

body.controller-body .remote-header h1,
body.controller-body .remote-entry-header h1 {
  color: var(--controller-cream-strong);
  font-size: 1.24rem;
  line-height: 1;
  text-shadow:
    0 2px 0 #321205,
    0 0 10px rgba(255, 207, 84, 0.18);
}

body.controller-body .remote-score-inline-stat,
body.controller-body .remote-score-inline-badge,
body.controller-body .remote-header-dice {
  border: 1px solid rgba(255, 224, 151, 0.28);
  background: rgba(31, 13, 4, 0.58);
  color: #fff2cb;
  box-shadow: inset 0 1px 0 rgba(255, 239, 198, 0.12);
}

body.controller-body .remote-resource-mini-pill {
  min-height: 2.82rem;
  border: 1px solid rgba(255, 238, 187, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 251, 231, 0.16), rgba(35, 15, 4, 0.2)),
    rgba(44, 19, 6, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 209, 0.22),
    0 0.28rem 0 rgba(32, 13, 3, 0.42);
}

body.controller-body .remote-resource-mini-pill img {
  width: 1.26rem;
  height: 1.26rem;
  filter: drop-shadow(0 2px 2px rgba(20, 7, 2, 0.48));
}

body.controller-body .remote-resource-mini-pill strong {
  color: var(--controller-cream-strong);
  font-size: 1.05rem;
  text-shadow: 0 2px 0 rgba(38, 14, 4, 0.72);
}

body.controller-body .remote-stage-card {
  --controller-title-band: 4.45rem;
  --controller-gap: 0.58rem;
  --controller-control: 3.72rem;
  border: 2px solid rgba(255, 215, 122, 0.52);
  border-radius: 1.35rem;
  background:
    linear-gradient(180deg, rgba(255, 224, 145, 0.12), rgba(46, 20, 7, 0.08)),
    url("/assets/art/universe/table-wood.png") center / 560px 560px repeat,
    #5a3317;
  box-shadow:
    var(--controller-rim),
    0 0.52rem 0 rgba(34, 14, 3, 0.7),
    0 1.1rem 1.8rem rgba(4, 2, 1, 0.28);
}

body.controller-body .remote-stage-card::before {
  top: 0.72rem;
  left: 0.72rem;
  right: 0.72rem;
  height: 4.95rem;
  border: 1px solid rgba(255, 220, 136, 0.2);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 214, 99, 0.16), transparent 54%),
    linear-gradient(180deg, rgba(20, 7, 2, 0.96), rgba(39, 17, 6, 0.92)),
    url("/assets/art/universe/table-wood.png") center / 520px 520px repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 177, 0.12),
    inset 0 -2px 0 rgba(2, 1, 0, 0.5),
    0 0.38rem 0 rgba(30, 11, 2, 0.58);
}

body.controller-body .remote-stage-content > h2 {
  color: #fff3cf;
  font-size: 1.66rem;
  font-weight: 900;
  text-shadow:
    0 2px 0 #361407,
    0 4px 8px rgba(0, 0, 0, 0.34);
}

body.controller-body .remote-stage-copy {
  color: #ffe6ae;
  font-size: 0.9rem;
  font-weight: 800;
  text-shadow: 0 2px 0 rgba(40, 14, 4, 0.62);
}

body.controller-body .remote-stage-back {
  min-width: 4.8rem;
  min-height: 3.35rem;
  border: 0;
  border-radius: 999px;
  color: var(--controller-ink);
  background: linear-gradient(180deg, #fff4bb, #ffc44f 62%, #d98a2c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 236, 0.86),
    inset 0 -2px 0 rgba(98, 43, 7, 0.34),
    0 0.34rem 0 #74370e,
    0 0.7rem 1rem rgba(6, 2, 1, 0.24);
  text-shadow: 0 1px 0 rgba(255, 246, 194, 0.66);
}

body.controller-body :is(
  .remote-action-tile,
  .remote-build-card,
  .remote-dev-card,
  .remote-rate-card,
  .remote-receive-token,
  .remote-pick-token,
  .remote-victim-chip,
  .remote-trade-choice-card,
  .remote-stepper-token,
  .remote-seat-card
) {
  border: 2px solid rgba(255, 224, 143, 0.36);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 241, 194, 0.2), rgba(34, 13, 4, 0.32)),
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    #45220d;
  box-shadow:
    var(--controller-rim),
    0 0.36rem 0 rgba(39, 15, 3, 0.58),
    var(--controller-shadow-soft);
}

body.controller-body :is(
  .remote-action-tile,
  .remote-build-card,
  .remote-dev-card,
  .remote-rate-card,
  .remote-receive-token,
  .remote-pick-token,
  .remote-victim-chip,
  .remote-trade-choice-card,
  .remote-stepper-token,
  .remote-seat-card
) :is(strong, span, small, p) {
  color: var(--controller-cream-strong);
  text-shadow: 0 2px 0 rgba(31, 10, 2, 0.72);
}

body.controller-body .remote-action-tile.is-featured,
body.controller-body .stage-card-action_hub .remote-action-tile.is-featured,
body.controller-body .remote-build-card.is-selected,
body.controller-body .remote-dev-card.is-selected,
body.controller-body .remote-rate-card.is-selected,
body.controller-body .remote-receive-token.is-selected,
body.controller-body .remote-pick-token.is-selected,
body.controller-body .remote-victim-chip.is-selected,
body.controller-body .remote-seat-card.is-selected,
body.controller-body .remote-stepper-token.is-active {
  color: var(--controller-ink);
  border-color: #fff1a8;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 255, 230, 0.42), transparent 42%),
    linear-gradient(180deg, #ffe68a 0%, #f4bc48 58%, #cf761f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 238, 0.82),
    inset 0 -2px 0 rgba(106, 43, 5, 0.36),
    0 0.36rem 0 #8c410d,
    0 0 0 3px rgba(255, 214, 78, 0.28),
    0 0.82rem 1.2rem rgba(6, 2, 1, 0.24);
}

body.controller-body :is(
  .remote-action-tile.is-featured,
  .stage-card-action_hub .remote-action-tile.is-featured,
  .remote-build-card.is-selected,
  .remote-dev-card.is-selected,
  .remote-rate-card.is-selected,
  .remote-receive-token.is-selected,
  .remote-pick-token.is-selected,
  .remote-victim-chip.is-selected,
  .remote-seat-card.is-selected,
  .remote-stepper-token.is-active
) :is(strong, span, small, p) {
  color: var(--controller-ink);
  text-shadow: 0 1px 0 rgba(255, 242, 176, 0.76);
}

body.controller-body .remote-action-tile.is-muted,
body.controller-body .remote-build-card.is-unavailable,
body.controller-body .remote-rate-card.is-disabled,
body.controller-body .remote-receive-token:disabled {
  opacity: 1;
  border-color: rgba(184, 147, 96, 0.34);
  background:
    linear-gradient(180deg, rgba(120, 88, 54, 0.18), rgba(30, 13, 5, 0.38)),
    url("/assets/art/universe/table-wood.png") center / 440px 440px repeat,
    #2d190d;
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 178, 0.08),
    0 0.24rem 0 rgba(25, 10, 3, 0.48);
}

body.controller-body :is(
  .remote-action-tile.is-muted,
  .remote-build-card.is-unavailable,
  .remote-rate-card.is-disabled,
  .remote-receive-token:disabled
) :is(strong, span, small, p) {
  color: #d8bc88;
  text-shadow: 0 2px 0 rgba(19, 7, 2, 0.78);
}

body.controller-body .remote-action-tile-badge,
body.controller-body .remote-zone-total,
body.controller-body .remote-score-inline-badge {
  border: 1px solid rgba(255, 250, 218, 0.6);
  color: #2a1404;
  background: linear-gradient(180deg, #fff7c6, #f3ba45 68%, #cf7e22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 244, 0.8),
    0 0.18rem 0 rgba(92, 38, 7, 0.45);
  text-shadow: 0 1px 0 rgba(255, 245, 190, 0.7);
}

body.controller-body .stage-card-action_hub .remote-action-grid-hub {
  gap: 0.66rem;
  grid-template-rows: repeat(2, 6.35rem);
}

body.controller-body .stage-card-action_hub .remote-action-tile {
  height: 6.35rem;
  min-height: 6.35rem;
  padding: 0.82rem;
}

body.controller-body .stage-card-action_hub .remote-action-tile-body strong,
body.controller-body .stage-card-action_hub .remote-action-tile strong {
  font-size: 1.24rem;
}

body.controller-body .stage-card-action_hub .remote-hub-insight,
body.controller-body .remote-note-strip,
body.controller-body .remote-trade-dock-summary,
body.controller-body .remote-choice-selected,
body.controller-body .remote-trade-zone,
body.controller-body .remote-finish-banner,
body.controller-body .remote-incoming-card,
body.controller-body .remote-incoming-summary,
body.controller-body .remote-waiting-card,
body.controller-body .remote-confirm-card,
body.controller-body .remote-roll-progress,
body.controller-body .remote-roll-chip,
body.controller-body .remote-hub-insight {
  border: 2px solid rgba(255, 220, 132, 0.28);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(31, 11, 3, 0.94), rgba(18, 6, 2, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 151, 0.12),
    0 0.28rem 0 rgba(23, 8, 2, 0.5);
}

body.controller-body .stage-card-action_hub .remote-hub-insight strong,
body.controller-body .remote-note-strip strong,
body.controller-body .remote-choice-selected strong,
body.controller-body .remote-trade-dock-summary strong {
  color: var(--controller-cream-strong);
  font-size: 0.86rem;
}

body.controller-body .stage-card-action_hub .remote-hub-insight span,
body.controller-body .remote-note-strip span,
body.controller-body .remote-choice-selected span,
body.controller-body .remote-choice-selected small {
  color: #ffdf9b;
}

body.controller-body .stage-card-build_pick_type .remote-build-grid,
body.controller-body .stage-card-cards_mode .remote-dev-grid,
body.controller-body .stage-card-robber_pick_victim .remote-victim-grid {
  gap: 0.66rem;
  grid-auto-rows: minmax(6.05rem, max-content);
}

body.controller-body .stage-card-build_pick_type .remote-build-card,
body.controller-body .stage-card-cards_mode .remote-dev-card,
body.controller-body .stage-card-robber_pick_victim .remote-victim-chip {
  min-height: 6.05rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-mode-grid {
  gap: 0.66rem;
  grid-auto-rows: 7.1rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-action-tile {
  min-height: 7.1rem;
}

body.controller-body .remote-trade-zone {
  border-color: rgba(255, 218, 132, 0.42);
  background: linear-gradient(180deg, rgba(25, 8, 2, 0.98), rgba(11, 3, 1, 0.98));
}

body.controller-body .stage-card-trade_domestic .remote-stepper-grid,
body.controller-body .stage-card-discard_cards .remote-stepper-grid {
  gap: 0.44rem;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-token,
body.controller-body .stage-card-discard_cards .remote-stepper-token {
  min-height: 5rem;
  border-radius: 0.92rem;
  background:
    linear-gradient(180deg, rgba(255, 240, 190, 0.12), rgba(24, 8, 2, 0.38)),
    #2b1206;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-token img,
body.controller-body .stage-card-discard_cards .remote-stepper-token img,
body.controller-body .stage-card-trade_maritime .remote-rate-card img,
body.controller-body .stage-card-trade_maritime .remote-receive-token img,
body.controller-body .stage-card-cards_mode .remote-pick-token img {
  filter:
    drop-shadow(0 2px 0 rgba(31, 11, 2, 0.48))
    drop-shadow(0 0 5px rgba(255, 236, 168, 0.18));
}

body.controller-body .remote-stepper-meter {
  min-height: 1.44rem;
  border: 1px solid rgba(255, 218, 132, 0.36);
  border-radius: 999px;
  background: rgba(4, 1, 0, 0.58);
}

body.controller-body .remote-stepper-meter strong {
  color: var(--controller-cream-strong);
  font-size: 1.08rem;
}

body.controller-body .remote-stepper-controls button {
  min-height: 2.72rem;
  border: 1px solid rgba(255, 220, 134, 0.34);
  border-radius: 0.86rem;
  color: #ffe5a7;
  background: linear-gradient(180deg, #5a2d11, #2b1105);
  box-shadow:
    inset 0 1px 0 rgba(255, 234, 176, 0.16),
    0 0.22rem 0 rgba(23, 7, 2, 0.58);
}

body.controller-body .remote-stepper-controls button:not(:disabled) {
  color: #2b1504;
  background: linear-gradient(180deg, #ffe28a, #d9882b);
  text-shadow: 0 1px 0 rgba(255, 241, 188, 0.72);
}

body.controller-body .remote-trade-dock-button,
body.controller-body .remote-hero-button,
body.controller-body .remote-command-button {
  min-height: var(--controller-control) !important;
  border: 0;
  border-radius: 1rem;
  font-size: 1rem;
  font-weight: 950;
  color: var(--controller-cream-strong);
  background: linear-gradient(180deg, #6b3916, #351405);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 171, 0.2),
    inset 0 -2px 0 rgba(5, 1, 0, 0.44),
    0 0.36rem 0 #1b0701,
    0 0.82rem 1rem rgba(4, 1, 0, 0.23);
  text-shadow: 0 2px 0 rgba(31, 9, 2, 0.78);
}

body.controller-body :is(
  .remote-trade-dock-button.tone-primary,
  .remote-command-button.tone-primary,
  .remote-hero-button
):not(:disabled) {
  color: var(--controller-ink);
  background: linear-gradient(180deg, #fff2a8, #ffc84f 62%, #d98126);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 235, 0.86),
    inset 0 -2px 0 rgba(101, 43, 7, 0.32),
    0 0.38rem 0 #87400d,
    0 0.86rem 1rem rgba(4, 1, 0, 0.23);
  text-shadow: 0 1px 0 rgba(255, 244, 188, 0.78);
}

body.controller-body .remote-trade-dock-button.tone-danger:not(:disabled) {
  color: #fff8ec;
  background: linear-gradient(180deg, #e76f55, #9e2d20);
  box-shadow:
    inset 0 1px 0 rgba(255, 227, 209, 0.36),
    inset 0 -2px 0 rgba(60, 9, 5, 0.44),
    0 0.38rem 0 #62190f,
    0 0.86rem 1rem rgba(4, 1, 0, 0.23);
}

body.controller-body .remote-trade-dock-button:disabled,
body.controller-body .remote-command-button:disabled {
  color: #bfa781;
  background: linear-gradient(180deg, #4a2d1c, #26140b);
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 174, 0.08),
    0 0.22rem 0 rgba(21, 7, 2, 0.5);
  text-shadow: none;
}

body.controller-body .remote-incoming-summary.is-ready {
  border-color: rgba(149, 237, 149, 0.5);
  background: linear-gradient(180deg, #255d31, #102611);
}

body.controller-body .remote-incoming-summary.is-blocked {
  border-color: rgba(255, 159, 128, 0.5);
  background: linear-gradient(180deg, #7a2b1f, #2f0e08);
}

body.controller-body .remote-board-map-shell {
  border: 2px solid rgba(255, 221, 136, 0.48);
  box-shadow:
    inset 0 0 0 1px rgba(255, 247, 214, 0.12),
    0 0.42rem 0 rgba(34, 13, 3, 0.58),
    0 0.95rem 1.25rem rgba(4, 1, 0, 0.22);
}

body.controller-body .remote-board-map-viewport {
  background:
    radial-gradient(circle at 50% 18%, rgba(129, 221, 234, 0.55), transparent 38%),
    linear-gradient(180deg, #68c4d7 0%, #35a0bb 60%, #1e7fa0 100%);
}

body.controller-body .remote-shell-entry .remote-entry-card {
  border: 2px solid rgba(106, 72, 36, 0.28);
  background: linear-gradient(180deg, #fffaf0, #f0dfbd);
  color: var(--controller-ink);
  gap: 0.76rem;
  padding: 0.82rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0.48rem 0 rgba(66, 31, 8, 0.26),
    0 0.9rem 1.3rem rgba(6, 2, 1, 0.18);
}

body.controller-body .remote-shell-entry .remote-entry-label,
body.controller-body .remote-shell-entry .remote-entry-label input {
  color: var(--controller-ink);
  font-size: 1rem;
}

body.controller-body .remote-shell-entry .remote-entry-label input {
  min-height: 4.25rem;
  border-radius: 1rem;
  font-size: 1.18rem;
  font-weight: 800;
}

body.controller-body .remote-shell-entry .remote-seat-card {
  min-height: 7.25rem;
  padding: 0.82rem;
}

body.controller-body button:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 3px #fff8cb,
    0 0 0 7px rgba(255, 199, 53, 0.72),
    0 0.42rem 0 rgba(33, 12, 3, 0.58),
    0 0 22px rgba(255, 208, 75, 0.42);
}

body.controller-body :is(button, .remote-action-tile, .remote-build-card, .remote-dev-card, .remote-rate-card):active {
  transform: translateY(0.16rem) scale(0.99);
}

@media (max-height: 740px) {
  body.controller-body .remote-stage-card {
    --controller-title-band: 4.05rem;
    --controller-gap: 0.42rem;
    --controller-control: 3.26rem;
  }

  body.controller-body .remote-stage-card::before {
    height: 4.38rem;
  }

  body.controller-body .remote-stage-content > h2 {
    font-size: 1.42rem;
  }

  body.controller-body .stage-card-action_hub .remote-action-grid-hub {
    grid-template-rows: repeat(2, 5.45rem);
  }

  body.controller-body .stage-card-action_hub .remote-action-tile {
    height: 5.45rem;
    min-height: 5.45rem;
  }

  body.controller-body .stage-card-build_pick_type .remote-build-grid,
  body.controller-body .stage-card-cards_mode .remote-dev-grid,
  body.controller-body .stage-card-robber_pick_victim .remote-victim-grid {
    grid-auto-rows: minmax(5.25rem, max-content);
  }

  body.controller-body .stage-card-trade_pick_mode .remote-mode-grid {
    grid-auto-rows: 5.75rem;
  }

  body.controller-body .stage-card-trade_domestic .remote-stepper-token,
  body.controller-body .stage-card-discard_cards .remote-stepper-token {
    min-height: 4.48rem;
  }
}

/* Structural pass: command deck, real icon language, and tighter game-screen hierarchy. */
body.controller-body .stage-card-action_hub .remote-stage-content-hub {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0.54rem;
}

body.controller-body .stage-card-action_hub h2 {
  min-height: 3.7rem;
  font-size: 1.52rem;
}

body.controller-body .remote-hub-spotlight {
  display: grid;
  grid-template-columns: 5.7rem minmax(0, 1fr);
  gap: 0.56rem;
  align-items: stretch;
}

body.controller-body .remote-hub-roll-orb,
body.controller-body .remote-hub-recommendation {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 233, 164, 0.42);
  border-radius: 1.05rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 247, 199, 0.24), transparent 46%),
    linear-gradient(180deg, #6a3d19, #2c1004);
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 206, 0.26),
    inset 0 -2px 0 rgba(4, 1, 0, 0.42),
    0 0.34rem 0 rgba(29, 9, 2, 0.62);
}

body.controller-body .remote-hub-roll-orb {
  min-height: 5.4rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.1rem;
  color: var(--controller-ink);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 232, 0.62), transparent 44%),
    linear-gradient(180deg, #fff1b0 0%, #f8bd45 60%, #bf651e 100%);
}

body.controller-body .remote-hub-roll-orb span,
body.controller-body .remote-hub-recommendation span {
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.controller-body .remote-hub-roll-orb strong {
  color: #2a1404;
  font-family: "Iowan Old Style", "New York", Georgia, serif;
  font-size: 2.6rem;
  line-height: 0.92;
  text-shadow: 0 1px 0 rgba(255, 242, 190, 0.82);
}

body.controller-body .remote-hub-recommendation {
  min-height: 5.4rem;
  display: grid;
  align-content: center;
  gap: 0.14rem;
  padding: 0.76rem 0.9rem;
}

body.controller-body .remote-hub-recommendation::after {
  content: "";
  position: absolute;
  right: -0.65rem;
  bottom: -0.9rem;
  width: 5.2rem;
  height: 5.2rem;
  background: url("/assets/art/universe/live/dice/roll-icon.png") center / contain no-repeat;
  opacity: 0.22;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.4));
}

body.controller-body .remote-hub-recommendation span,
body.controller-body .remote-hub-recommendation small {
  color: #ffdfa0;
  text-shadow: 0 2px 0 rgba(28, 8, 2, 0.72);
}

body.controller-body .remote-hub-recommendation strong {
  color: #fff8df;
  font-size: 1.48rem;
  line-height: 1;
  text-shadow: 0 2px 0 #321104;
}

body.controller-body .stage-card-action_hub .remote-hub-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

body.controller-body .stage-card-action_hub .remote-hub-insight {
  min-height: 2.8rem;
  padding: 0.38rem 0.42rem;
}

body.controller-body .stage-card-action_hub .remote-action-grid-hub {
  align-self: start;
  grid-template-rows: repeat(2, 5.5rem);
  gap: 0.58rem;
}

body.controller-body .stage-card-action_hub .remote-action-tile {
  height: 5.5rem;
  min-height: 5.5rem;
  padding: 0.6rem;
}

body.controller-body .remote-action-tile-head {
  width: 100%;
  min-height: 100%;
  display: grid !important;
  grid-template-columns: 2.8rem minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 0.48rem;
  align-items: center;
  justify-items: start;
}

body.controller-body .remote-action-icon {
  grid-row: 1 / span 2;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.86rem;
  border: 1px solid rgba(255, 250, 220, 0.3);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 231, 0.72), transparent 48%),
    linear-gradient(180deg, #fff0a6, #d9882a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 236, 0.74),
    0 0.24rem 0 rgba(91, 37, 6, 0.48);
}

body.controller-body .remote-action-icon::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 74%;
  filter: drop-shadow(0 2px 1px rgba(36, 13, 3, 0.28));
}

body.controller-body .command-build .remote-action-icon::before {
  background-image: url("/assets/art/universe/settlement-white.png");
  filter:
    sepia(1)
    saturate(1.2)
    brightness(0.62)
    drop-shadow(0 2px 1px rgba(36, 13, 3, 0.28));
}

body.controller-body .command-trade .remote-action-icon::before,
body.controller-body .command-table-trade .remote-action-icon::before {
  background-image: url("/assets/art/universe/live/trade/trade-icon.png");
}

body.controller-body .command-sea-trade .remote-action-icon::before {
  background-image: url("/assets/art/universe/live/trade/ship-badge.png");
}

body.controller-body .command-cards .remote-action-icon::before {
  background-image: url("/assets/art/cards/knight.png");
  background-size: 86%;
}

body.controller-body .command-end-turn .remote-action-icon::before {
  background-image: url("/assets/art/universe/live/dice/roll-icon.png");
}

body.controller-body .stage-card-action_hub .remote-action-tile.command-build,
body.controller-body .stage-card-action_hub .remote-action-tile.command-trade,
body.controller-body .stage-card-action_hub .remote-action-tile.command-end-turn {
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 229, 140, 0.2), transparent 36%),
    linear-gradient(180deg, rgba(255, 241, 194, 0.2), rgba(34, 13, 4, 0.32)),
    url("/assets/art/universe/table-wood.png") center / 420px 420px repeat,
    #45220d;
}

body.controller-body .stage-card-action_hub .remote-action-tile.command-build.is-featured {
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 255, 230, 0.42), transparent 42%),
    linear-gradient(180deg, #ffe68a 0%, #f4bc48 58%, #cf761f 100%);
}

body.controller-body .stage-card-action_hub .remote-action-tile strong {
  justify-self: start;
  align-self: end;
  font-size: 1.1rem;
  line-height: 1;
  text-align: left;
}

body.controller-body .stage-card-action_hub .remote-action-tile-badge {
  justify-self: start;
  align-self: start;
  min-height: 1.35rem;
  padding-inline: 0.48rem;
  font-size: 0.56rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-action-tile {
  min-height: 7.25rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-action-tile-head {
  grid-template-columns: 3.4rem minmax(0, 1fr);
}

body.controller-body .stage-card-trade_pick_mode .remote-action-icon {
  width: 3.35rem;
  height: 3.35rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-action-tile strong {
  font-size: 1.16rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-action-tile .remote-action-tile-body {
  display: block;
  grid-column: 2;
  color: #ffdfa0;
  font-size: 0.76rem;
  text-align: left;
}

body.controller-body .stage-card-build_pick_type .remote-build-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

body.controller-body .remote-build-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0.4rem;
}

body.controller-body .remote-build-card {
  padding-right: 0.74rem;
}

body.controller-body .remote-build-card-head strong,
body.controller-body .remote-dev-card-head strong {
  font-size: 1.08rem;
  line-height: 1;
  max-width: calc(100% - 3.15rem);
}

body.controller-body .remote-build-card-head span,
body.controller-body .remote-dev-card-head span {
  position: absolute;
  top: 0.62rem;
  right: 0.56rem;
  max-width: 3.05rem;
  border-radius: 999px;
  padding: 0.24rem 0.38rem;
  color: #2a1404;
  background: linear-gradient(180deg, #fff5bf, #e2a23a);
  font-size: 0.52rem;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 242, 184, 0.72);
}

body.controller-body .remote-dev-card-head strong {
  max-width: calc(100% - 3.8rem);
}

body.controller-body .remote-dev-card-head span {
  max-width: 3.65rem;
}

body.controller-body .remote-cost-strip {
  align-self: center;
}

body.controller-body .stage-card-confirm_end_turn .remote-finish-banner {
  min-height: 23rem;
  border-color: rgba(255, 222, 142, 0.44);
  background:
    radial-gradient(circle at 50% 33%, rgba(255, 214, 102, 0.2), transparent 36%),
    url("/assets/art/universe/live/dice/roll-icon.png") center 36% / 6.6rem 6.6rem no-repeat,
    linear-gradient(180deg, rgba(36, 12, 3, 0.96), rgba(16, 5, 1, 0.98));
}

body.controller-body .stage-card-confirm_end_turn .remote-finish-banner span {
  margin-top: 6.4rem;
}

body.controller-body .stage-card-confirm_end_turn .remote-finish-banner strong {
  font-size: 1.35rem;
}

body.controller-body .stage-card-discard_cards .remote-trade-zone {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: end;
}

body.controller-body .stage-card-discard_cards .remote-stepper-grid {
  align-self: end;
}

body.controller-body .remote-stage-card {
  animation: controller-screen-pop 180ms cubic-bezier(0.16, 0.9, 0.24, 1) both;
}

body.controller-body .remote-hub-spotlight,
body.controller-body .remote-action-grid-hub,
body.controller-body .remote-build-grid,
body.controller-body .remote-mode-grid,
body.controller-body .remote-dev-grid,
body.controller-body .remote-trade-stack,
body.controller-body .remote-board-map-shell,
body.controller-body .remote-incoming-card,
body.controller-body .remote-finish-banner {
  animation: controller-content-rise 190ms cubic-bezier(0.16, 0.9, 0.24, 1) both;
}

body.controller-body .remote-action-tile,
body.controller-body .remote-build-card,
body.controller-body .remote-dev-card,
body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token,
body.controller-body .remote-victim-chip,
body.controller-body .remote-trade-dock-button,
body.controller-body .remote-hero-button,
body.controller-body .remote-stage-back {
  transform: translateZ(0);
  will-change: transform;
  transition:
    transform 90ms ease-out,
    box-shadow 120ms ease-out,
    border-color 120ms ease-out,
    background-color 120ms ease-out;
}

body.controller-body .remote-action-tile:active,
body.controller-body .remote-build-card:active,
body.controller-body .remote-dev-card:active,
body.controller-body .remote-rate-card:active,
body.controller-body .remote-receive-token:active,
body.controller-body .remote-pick-token:active,
body.controller-body .remote-victim-chip:active,
body.controller-body .remote-trade-dock-button:active,
body.controller-body .remote-hero-button:active,
body.controller-body .remote-stage-back:active {
  transform: translate3d(0, 0.18rem, 0) scale(0.985);
}

body.controller-body .remote-action-tile.is-featured,
body.controller-body .remote-build-card.is-selected,
body.controller-body .remote-dev-card.is-selected,
body.controller-body .remote-rate-card.is-selected,
body.controller-body .remote-receive-token.is-selected,
body.controller-body .remote-pick-token.is-selected,
body.controller-body .remote-victim-chip.is-selected,
body.controller-body .remote-stepper-token.is-active {
  animation: controller-selected-breathe 1.25s ease-in-out infinite;
}

body.controller-body .remote-hub-roll-orb strong,
body.controller-body .remote-roll-result-card.is-final strong {
  animation: controller-number-settle 220ms cubic-bezier(0.2, 1.25, 0.3, 1) both;
}

@keyframes controller-screen-pop {
  from {
    opacity: 0.72;
    transform: translate3d(0, 0.45rem, 0) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes controller-content-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 0.52rem, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes controller-selected-breathe {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 238, 0.82),
      inset 0 -2px 0 rgba(106, 43, 5, 0.36),
      0 0.36rem 0 #8c410d,
      0 0 0 3px rgba(255, 214, 78, 0.24),
      0 0.82rem 1.2rem rgba(6, 2, 1, 0.24);
  }

  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 238, 0.82),
      inset 0 -2px 0 rgba(106, 43, 5, 0.36),
      0 0.36rem 0 #8c410d,
      0 0 0 4px rgba(255, 229, 112, 0.34),
      0 0.92rem 1.26rem rgba(6, 2, 1, 0.24);
  }
}

@keyframes controller-number-settle {
  from {
    transform: scale(0.82);
  }

  to {
    transform: scale(1);
  }
}

@media (max-height: 740px) {
  body.controller-body .remote-hub-spotlight {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  body.controller-body .remote-hub-roll-orb,
  body.controller-body .remote-hub-recommendation {
    min-height: 4.8rem;
  }

  body.controller-body .remote-hub-roll-orb strong {
    font-size: 2.25rem;
  }

  body.controller-body .stage-card-action_hub .remote-action-grid-hub {
    grid-template-rows: repeat(2, 5rem);
  }

  body.controller-body .stage-card-action_hub .remote-action-tile {
    height: 5rem;
    min-height: 5rem;
  }
}

/* Professional coherence pass: one controller grammar, per-screen Catan identity. */
body.controller-body {
  --catan-stage-gap: 0.54rem;
  --catan-title-h: 4.7rem;
  --catan-bottom-button-h: 3.72rem;
  --catan-panel-radius: 1.05rem;
  --catan-gold-panel:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 230, 0.46), transparent 42%),
    linear-gradient(180deg, #ffe88f 0%, #f2b948 58%, #c97020 100%);
  --catan-dark-panel:
    linear-gradient(180deg, rgba(31, 11, 3, 0.96), rgba(16, 5, 1, 0.98));
}

body.controller-body .remote-stage-card {
  padding: 0.72rem;
}

body.controller-body .remote-stage-card.has-back {
  padding-top: 0.72rem;
}

body.controller-body .remote-stage-content,
body.controller-body .remote-stage-content-roll,
body.controller-body .remote-stage-content-roll-resolving,
body.controller-body .remote-stage-content-hub,
body.controller-body .remote-stage-content-trade,
body.controller-body .remote-stage-content-spatial-legal,
body.controller-body .remote-stage-content-confirmed {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--catan-stage-gap);
  overflow: hidden;
}

body.controller-body .remote-stage-content > h2 {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--catan-title-h);
  min-height: var(--catan-title-h) !important;
  width: 100%;
  margin: 0 !important;
  padding: 0.22rem 4.85rem 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff4d0;
  font-family: "Iowan Old Style", "New York", Georgia, serif;
  font-size: 1.48rem !important;
  font-weight: 950;
  line-height: 1.02;
  text-align: center;
  text-wrap: balance;
  text-shadow:
    0 2px 0 #2f1004,
    0 4px 8px rgba(0, 0, 0, 0.32);
}

body.controller-body .remote-stage-back {
  top: 1.06rem !important;
  left: 1.04rem !important;
  z-index: 4;
  min-width: 4.62rem;
  min-height: 3.05rem;
}

body.controller-body .remote-turn-overline {
  position: absolute;
  top: 0.9rem;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  margin: 0;
}

body.controller-body .remote-stage-content-roll > h2 {
  padding-top: 1.22rem !important;
  font-size: 1.38rem !important;
}

body.controller-body .remote-stage-content-roll .remote-roll-body,
body.controller-body .remote-stage-content-roll-resolving .remote-roll-body {
  flex: 0 0 auto;
  min-height: 0;
}

body.controller-body .remote-roll-body-direct {
  flex: 0 0 auto;
  min-height: 12.85rem;
  justify-content: flex-start;
  padding-top: 0;
}

body.controller-body .remote-stage-content-roll .remote-roll-dice-preview {
  width: 100%;
  min-height: 12.85rem;
  border: 2px solid rgba(255, 220, 132, 0.32);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 220, 122, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(36, 12, 3, 0.78), rgba(18, 6, 2, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 170, 0.12),
    0 0.34rem 0 rgba(24, 8, 2, 0.5);
}

body.controller-body .remote-stage-content-roll .remote-die {
  width: 6.85rem;
}

body.controller-body .remote-stage-content-roll .remote-hero-button {
  margin-top: auto;
}

body.controller-body .remote-hero-button,
body.controller-body .remote-trade-dock-button {
  min-height: var(--catan-bottom-button-h) !important;
}

body.controller-body .remote-trade-dock {
  margin-top: auto;
}

body.controller-body .remote-action-tile,
body.controller-body .remote-build-card,
body.controller-body .remote-dev-card,
body.controller-body .remote-rate-card,
body.controller-body .remote-receive-token,
body.controller-body .remote-pick-token,
body.controller-body .remote-victim-chip,
body.controller-body .remote-trade-choice-card,
body.controller-body .remote-stepper-token,
body.controller-body .remote-note-strip,
body.controller-body .remote-trade-zone,
body.controller-body .remote-incoming-card,
body.controller-body .remote-incoming-summary,
body.controller-body .remote-finish-banner,
body.controller-body .remote-choice-selected,
body.controller-body .remote-trade-dock-summary {
  border-radius: var(--catan-panel-radius);
}

body.controller-body .stage-card-action_hub .remote-stage-content-hub {
  grid-template-rows: none;
}

body.controller-body .remote-hub-spotlight {
  flex: 0 0 auto;
}

body.controller-body .stage-card-action_hub .remote-hub-insights {
  flex: 0 0 auto;
}

body.controller-body .stage-card-action_hub .remote-action-grid-hub {
  flex: 0 0 auto;
  grid-template-rows: repeat(2, 5.55rem);
  align-content: start;
}

body.controller-body .stage-card-action_hub .remote-action-tile {
  height: 5.55rem;
  min-height: 5.55rem;
}

body.controller-body .stage-card-build_pick_type .remote-build-grid,
body.controller-body .stage-card-trade_pick_mode .remote-mode-grid,
body.controller-body .stage-card-cards_mode .remote-dev-grid,
body.controller-body .stage-card-robber_pick_victim .remote-victim-grid,
body.controller-body .stage-card-trade_choose_partner .remote-trade-choice-grid {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  align-content: start;
}

body.controller-body .stage-card-build_pick_type .remote-build-grid {
  grid-auto-rows: 7.15rem;
}

body.controller-body .stage-card-build_pick_type .remote-build-card {
  min-height: 7.15rem;
  padding: 0.72rem 0.68rem 0.72rem;
}

body.controller-body .stage-card-build_pick_type .remote-build-card .remote-cost-strip {
  flex-wrap: nowrap;
  gap: 0.22rem;
  width: 100%;
  margin-top: 0.82rem;
  padding-right: 0.05rem;
}

body.controller-body .stage-card-build_pick_type .remote-build-card .remote-cost-chip {
  width: 1.38rem;
  height: 1.38rem;
  flex: 0 0 1.38rem;
}

body.controller-body .stage-card-build_pick_type .remote-build-card .remote-cost-chip img {
  width: 1.08rem;
  height: 1.08rem;
}

body.controller-body .stage-card-build_pick_type .remote-build-card small {
  align-self: end;
  display: block;
  min-height: 0.95rem;
  margin-top: 0.18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.controller-body .stage-card-build_pick_type .remote-build-card-head span {
  top: 0.68rem;
  right: 0.62rem;
  width: 2.72rem;
  min-height: 1.6rem;
  display: grid;
  place-content: center;
  white-space: normal;
}

body.controller-body .stage-card-build_pick_type .remote-build-card-head strong {
  max-width: calc(100% - 3.05rem);
}

body.controller-body .stage-card-trade_pick_mode .remote-mode-grid {
  grid-auto-rows: 6.6rem;
}

body.controller-body .stage-card-trade_pick_mode .remote-action-tile {
  min-height: 6.6rem;
}

body.controller-body .stage-card-cards_mode .remote-dev-grid {
  grid-auto-rows: 5.6rem;
}

body.controller-body .stage-card-cards_mode .remote-dev-card {
  min-height: 5.6rem;
}

body.controller-body .stage-card-build_pick_location .remote-board-map-shell,
body.controller-body .stage-card-robber_pick_tile .remote-board-map-shell {
  flex: 1 1 auto;
  min-height: 0;
}

body.controller-body .stage-card-build_pick_location .remote-choice-selected,
body.controller-body .stage-card-robber_pick_tile .remote-choice-selected {
  min-height: 3.08rem;
}

body.controller-body .stage-card-trade_domestic .remote-trade-stack {
  flex: 1 1 auto;
  min-height: 0;
}

body.controller-body .stage-card-trade_domestic .remote-trade-zone {
  min-height: 0;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-token,
body.controller-body .stage-card-discard_cards .remote-stepper-token {
  min-height: 4.85rem;
}

body.controller-body .stage-card-trade_domestic .remote-stepper-tap,
body.controller-body .stage-card-discard_cards .remote-stepper-tap {
  min-height: 3.15rem;
}

body.controller-body .stage-card-confirm_end_turn .remote-finish-banner {
  flex: 1 1 auto;
  min-height: 0;
}

body.controller-body .stage-card-discard_cards .remote-stage-content-confirmed {
  --catan-title-h: 4.45rem;
}

body.controller-body .stage-card-discard_cards .remote-trade-zone {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.62rem;
  overflow: hidden;
  border-color: rgba(255, 185, 132, 0.5);
  background:
    radial-gradient(circle at 50% 32%, rgba(177, 55, 31, 0.28), transparent 30%),
    linear-gradient(180deg, rgba(36, 7, 2, 0.98), rgba(14, 3, 1, 0.98));
}

body.controller-body .stage-card-discard_cards .remote-trade-zone::before {
  content: "R";
  position: absolute;
  top: 31%;
  left: 50%;
  width: 5.4rem;
  height: 5.4rem;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 210, 146, 0.24);
  border-radius: 50%;
  color: rgba(255, 215, 160, 0.2);
  font-family: "Iowan Old Style", "New York", Georgia, serif;
  font-size: 3rem;
  font-weight: 950;
  transform: translate(-50%, -50%);
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 160, 0.08),
    0 0.4rem 1rem rgba(0, 0, 0, 0.24);
}

body.controller-body .stage-card-discard_cards .remote-zone-head,
body.controller-body .stage-card-discard_cards .remote-stepper-grid {
  position: relative;
  z-index: 1;
}

body.controller-body .stage-card-discard_cards .remote-stepper-grid {
  margin-top: auto;
}

body.controller-body .remote-stepper-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.controller-body .remote-stepper-token span {
  font-size: 0.54rem !important;
  line-height: 1;
}

body.controller-body .remote-stepper-meter small {
  display: none;
}

body.controller-body .remote-shell-entry .remote-entry-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 228, 134, 0.16), transparent 34%),
    linear-gradient(180deg, #fff8e8, #ead5a8);
}

body.controller-body .remote-shell-entry .remote-seat-card {
  min-height: 7rem;
}

@media (max-height: 740px) {
  body.controller-body {
    --catan-title-h: 4.15rem;
    --catan-stage-gap: 0.4rem;
    --catan-bottom-button-h: 3.24rem;
  }

  body.controller-body .remote-stage-content > h2 {
    font-size: 1.34rem !important;
    padding-inline: 4.45rem !important;
  }

  body.controller-body .stage-card-action_hub .remote-action-grid-hub {
    grid-template-rows: repeat(2, 5.05rem);
  }

  body.controller-body .stage-card-action_hub .remote-action-tile {
    height: 5.05rem;
    min-height: 5.05rem;
  }

  body.controller-body .stage-card-build_pick_type .remote-build-grid {
    grid-auto-rows: 6.24rem;
  }

  body.controller-body .stage-card-build_pick_type .remote-build-card {
    min-height: 6.24rem;
  }

  body.controller-body .stage-card-discard_cards .remote-trade-zone::before {
    width: 4.7rem;
    height: 4.7rem;
    font-size: 2.6rem;
  }
}

/* Final deploy polish: cleaner phone rhythm, stronger roll affordance. */
body.controller-body {
  --catan-stage-gap: 0.6rem;
  --catan-title-h: 4.92rem;
  --catan-bottom-button-h: 3.86rem;
}

body.controller-body .remote-shell {
  padding-top: max(0.62rem, env(safe-area-inset-top));
}

body.controller-body .remote-stage-card {
  padding: 0.8rem;
}

body.controller-body .remote-stage-content > h2 {
  padding-inline: 4.25rem !important;
  letter-spacing: 0 !important;
}

body.controller-body .remote-turn-overline {
  top: 1.02rem;
  min-width: 5.45rem;
  padding: 0.22rem 0.68rem 0.18rem;
  border: 1px solid rgba(255, 229, 161, 0.42);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 246, 202, 0.54), transparent 54%),
    linear-gradient(180deg, rgba(255, 218, 117, 0.96), rgba(151, 73, 22, 0.92));
  color: #2a1005;
  font-size: 0.58rem;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0.09em;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 246, 212, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 229, 0.48),
    0 0.22rem 0 rgba(40, 13, 3, 0.46),
    0 0.42rem 1rem rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

body.controller-body .remote-stage-content-roll > h2 {
  padding-top: 1.36rem !important;
  font-size: 1.5rem !important;
}

body.controller-body .remote-turn-callout {
  min-height: 3.72rem;
  border-color: rgba(255, 218, 137, 0.42);
  background:
    linear-gradient(90deg, rgba(27, 9, 3, 0.9), rgba(76, 29, 8, 0.72), rgba(27, 9, 3, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 231, 171, 0.16),
    0 0.22rem 0 rgba(23, 7, 2, 0.42);
}

body.controller-body .remote-turn-callout span {
  color: #ffd989;
  font-size: 0.64rem;
  letter-spacing: 0.17em;
}

body.controller-body .remote-turn-callout strong {
  font-size: 0.98rem;
  line-height: 1.12;
  color: #fff4dc;
}

body.controller-body .remote-roll-body-direct {
  min-height: 13.45rem;
}

body.controller-body .remote-stage-content-roll .remote-roll-dice-preview {
  min-height: 13.45rem;
  align-content: center;
  justify-content: center;
  gap: 0.96rem;
  border-color: rgba(255, 219, 132, 0.5);
  background:
    radial-gradient(ellipse at 50% 43%, rgba(255, 230, 156, 0.26), transparent 43%),
    radial-gradient(ellipse at 50% 100%, rgba(121, 47, 10, 0.26), transparent 58%),
    linear-gradient(180deg, rgba(39, 12, 3, 0.9), rgba(16, 5, 2, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(255, 237, 190, 0.18),
    inset 0 -1.2rem 2.6rem rgba(0, 0, 0, 0.16),
    0 0.36rem 0 rgba(24, 8, 2, 0.56);
}

body.controller-body .remote-stage-content-roll .remote-die {
  width: clamp(6.25rem, 30vw, 7.18rem);
  filter:
    drop-shadow(0 0.46rem 0.1rem rgba(61, 22, 7, 0.18))
    drop-shadow(0 0.9rem 1.2rem rgba(0, 0, 0, 0.24));
}

body.controller-body .remote-stage-content-roll .remote-hero-button {
  min-height: 4.05rem !important;
  border: 1px solid rgba(255, 246, 191, 0.72);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 229, 0.58), transparent 42%),
    linear-gradient(180deg, #ffe683 0%, #ffc343 52%, #d9771e 100%);
  color: #2a1004;
  font-size: 1.04rem;
  font-weight: 1000;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 235, 0.68),
    inset 0 -0.35rem 0 rgba(176, 75, 14, 0.36),
    0 0.36rem 0 rgba(62, 21, 4, 0.58),
    0 0.72rem 1.24rem rgba(0, 0, 0, 0.24);
}

body.controller-body .remote-stage-content-roll .remote-hero-button:active {
  transform: translateY(0.14rem) scale(0.992);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 235, 0.5),
    inset 0 -0.18rem 0 rgba(176, 75, 14, 0.34),
    0 0.16rem 0 rgba(62, 21, 4, 0.55),
    0 0.36rem 0.74rem rgba(0, 0, 0, 0.22);
}

@media (max-height: 740px) {
  body.controller-body {
    --catan-title-h: 4.38rem;
    --catan-stage-gap: 0.48rem;
  }

  body.controller-body .remote-turn-overline {
    top: 0.84rem;
  }

  body.controller-body .remote-stage-content-roll > h2 {
    padding-top: 1.12rem !important;
    font-size: 1.32rem !important;
  }

  body.controller-body .remote-roll-body-direct,
  body.controller-body .remote-stage-content-roll .remote-roll-dice-preview {
    min-height: 11.35rem;
  }

  body.controller-body .remote-stage-content-roll .remote-die {
    width: clamp(5.5rem, 27vw, 6.35rem);
  }
}

/* Improvement pass: let the dice table own the available play area. */
body.controller-body .remote-stage-content-roll .remote-roll-body-direct {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

body.controller-body .remote-stage-content-roll .remote-roll-dice-preview {
  flex: 1 1 auto;
  min-height: 14.75rem;
  height: 100%;
}

body.controller-body .remote-stage-content-roll .remote-die {
  width: clamp(6.75rem, 32vw, 7.72rem);
}

body.controller-body .remote-stage-content-roll .remote-hero-button {
  margin-top: 0.7rem;
}

body.controller-body :is(
  button,
  .remote-action-tile,
  .remote-build-card,
  .remote-dev-card,
  .remote-rate-card,
  .remote-receive-token,
  .remote-pick-token,
  .remote-victim-chip,
  .remote-trade-choice-card
):focus-visible {
  outline: 3px solid #fff1a8 !important;
  outline-offset: 3px;
  box-shadow:
    0 0 0 2px rgba(72, 24, 4, 0.92),
    0 0 0 7px rgba(255, 183, 45, 0.38),
    0 0.44rem 1rem rgba(0, 0, 0, 0.25) !important;
}

body.controller-body .remote-header {
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 166, 0.18),
    0 0.28rem 0 rgba(30, 10, 3, 0.56),
    0 0.72rem 1.28rem rgba(0, 0, 0, 0.2);
}

@media (max-height: 740px) {
  body.controller-body .remote-stage-content-roll .remote-roll-dice-preview {
    min-height: 11.8rem;
  }

  body.controller-body .remote-stage-content-roll .remote-die {
    width: clamp(5.7rem, 28vw, 6.5rem);
  }

  body.controller-body .remote-stage-content-roll .remote-hero-button {
    margin-top: 0.46rem;
  }
}

/* Improvement pass: state changes should feel like polished game screens. */
body.controller-body .remote-stage-card {
  animation: controller-stage-enter 180ms cubic-bezier(0.18, 0.86, 0.28, 1) both;
}

body.controller-body .remote-stage-content-roll .remote-roll-dice-preview {
  position: relative;
  overflow: hidden;
}

body.controller-body .remote-stage-content-roll .remote-roll-dice-preview::before {
  content: "";
  position: absolute;
  inset: 12% 9%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 222, 144, 0.28), transparent 62%);
  opacity: 0.9;
  pointer-events: none;
  transform: translateZ(0);
}

body.controller-body .remote-stage-content-roll .remote-roll-dice-preview .remote-dice-stage,
body.controller-body .remote-stage-content-roll .remote-roll-dice-preview .remote-die {
  position: relative;
  z-index: 1;
}

body.controller-body .remote-stage-content-roll-resolving .remote-roll-result-card {
  border-color: rgba(255, 225, 148, 0.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 229, 149, 0.2), transparent 48%),
    linear-gradient(180deg, rgba(65, 26, 8, 0.92), rgba(26, 8, 3, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 195, 0.18),
    0 0.28rem 0 rgba(32, 10, 2, 0.42);
}

@keyframes controller-stage-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 0.42rem, 0) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.controller-body .remote-stage-card {
    animation: none !important;
  }
}

/* Final legibility pass for dark wood cards: all secondary text must stay couch/phone readable. */
body.controller-body .remote-waiting-card small,
body.controller-body .remote-waiting-hero small,
body.controller-body .remote-waiting-footer small,
body.controller-body .remote-confirm-card p,
body.controller-body .remote-note-strip small {
  color: rgba(255, 232, 186, 0.92) !important;
  text-shadow: 0 1px 2px rgba(14, 5, 2, 0.82);
}

body.controller-body .remote-waiting-card span,
body.controller-body .remote-waiting-hero span,
body.controller-body .remote-waiting-footer span {
  color: #f1c875 !important;
  text-shadow: 0 1px 2px rgba(14, 5, 2, 0.72);
}

body.controller-body .remote-waiting-card strong,
body.controller-body .remote-waiting-hero strong,
body.controller-body .remote-waiting-footer strong {
  color: #fff7e5 !important;
  text-shadow:
    0 2px 0 rgba(62, 26, 8, 0.48),
    0 3px 8px rgba(14, 5, 2, 0.62);
}

body.controller-body .remote-waiting-card.is-compact {
  background:
    linear-gradient(180deg, rgba(92, 52, 24, 0.88), rgba(26, 9, 3, 0.94)),
    url("/assets/art/universe/table-wood.png") center / 500px 500px repeat,
    #241006;
  border-color: rgba(255, 220, 145, 0.38);
}
:root {
  color-scheme: dark;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    linear-gradient(180deg, rgba(36, 20, 12, 0.72), rgba(10, 13, 15, 0.96)),
    url("/assets/art/universe/table-wood.png") center / 900px 900px repeat;
  color: #f7f0dd;
  font-weight: 500;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(36, 20, 12, 0.72), rgba(10, 13, 15, 0.96)),
    url("/assets/art/universe/table-wood.png") center / 900px 900px repeat;
}

body.tv-body {
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, #6d1f08 0%, #8b330f 24%, #0f433d 100%);
}

body.controller-body {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button,
input,
select {
  border-radius: 18px;
}

button {
  border: 1px solid rgba(255, 223, 170, 0.2);
  background: linear-gradient(180deg, rgba(82, 48, 22, 0.94), rgba(52, 28, 12, 0.94));
  color: #fff3d9;
  padding: 0.95rem 1.15rem;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, border-color 140ms ease;
  box-shadow: 0 10px 20px rgba(17, 10, 5, 0.35);
}

button:hover,
button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 231, 176, 0.45);
  box-shadow: 0 0 0 3px rgba(253, 212, 125, 0.28), 0 16px 26px rgba(17, 10, 5, 0.34);
  filter: brightness(1.04);
  outline: none;
}

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

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 226, 181, 0.2);
  background: rgba(35, 22, 14, 0.78);
  color: #fff3d9;
  padding: 0.9rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 237, 205, 0.08);
}

input::placeholder {
  color: rgba(255, 239, 206, 0.56);
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 248, 214, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.24));
}

.app-shell.route-tv {
  display: grid;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(95, 24, 9, 0.72), rgba(10, 49, 42, 0.84));
}

.app-shell.route-controller,
.app-shell.route-join {
  display: grid;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.connection-setup-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.connection-setup-card {
  width: min(100%, 34rem);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: 30px;
}

.connection-setup-card h1 {
  margin-bottom: 0.85rem;
}

.connection-setup-copy {
  margin-bottom: 1.1rem;
  color: rgba(255, 241, 213, 0.88);
  line-height: 1.55;
}

.connection-setup-field {
  display: grid;
  gap: 0.5rem;
}

.connection-setup-field span {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd57b;
}

.connection-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.connection-setup-error {
  margin: 0.85rem 0 0;
  color: #ffb7a4;
}

.connection-setup-hint {
  margin: 1rem 0 0;
  color: rgba(255, 238, 208, 0.68);
  line-height: 1.45;
}

.tv-stage-shell {
  width: 100vw;
  height: 100dvh;
  display: grid;
  place-items: stretch;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(28, 10, 6, 0.66), rgba(7, 18, 15, 0.82));
}

.tv-stage-shell > .app-shell.route-tv {
  width: 100%;
  height: 100%;
}

.tv-stage-wrap {
  width: 100%;
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  overflow: hidden;
}

.tv-stage-frame {
  position: relative;
  width: var(--tv-stage-frame-width, 100%);
  height: var(--tv-stage-frame-height, 100%);
  overflow: hidden;
  /* Promote to GPU compositor layer */
  transform: translateZ(0);
  will-change: transform;
}

.tv-stage-content {
  width: var(--tv-stage-width-px, 1600px);
  height: var(--tv-stage-height-px, 900px);
  transform: scale(var(--tv-stage-scale, 1)) translateZ(0);
  transform-origin: top left;
  will-change: transform;
  backface-visibility: hidden;
}

.tv-stage-content > .app-shell.route-tv {
  width: var(--tv-stage-width-px, 1600px);
  height: var(--tv-stage-height-px, 900px);
}

.toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  background: rgba(47, 26, 12, 0.95);
  border: 1px solid rgba(255, 225, 170, 0.28);
  z-index: 100;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.26);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #ffd57b;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
dl {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

.surface,
.broadcast-hero,
.join-surface {
  border: 1px solid rgba(255, 226, 181, 0.14);
  background:
    linear-gradient(180deg, rgba(79, 46, 22, 0.94), rgba(33, 19, 11, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.primary-button {
  background: linear-gradient(180deg, #f5cb72, #d97d39);
  color: #241409;
  font-weight: 800;
  border-color: rgba(255, 248, 219, 0.25);
}

.primary-button:hover,
.primary-button:focus-visible {
  border-color: rgba(255, 248, 219, 0.4);
}

.tv-layout {
  height: 100%;
  padding: clamp(0.8rem, 1.2vw, 1.4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(23rem, 0.95fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.8rem, 1vw, 1.2rem);
  overflow: hidden;
}

.tv-layout-live {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
}

.tv-lobby-layout {
  position: relative;
  height: 100%;
  padding: clamp(1.4rem, 2.2vh, 2rem) clamp(2rem, 2.7vw, 3rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  gap: clamp(1rem, 1.8vh, 1.55rem);
  overflow: hidden;
}

.tv-lobby-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 233, 173, 0.18), transparent 22%),
    radial-gradient(circle at 50% 60%, rgba(255, 242, 216, 0.07), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(9, 24, 18, 0.42), transparent 34%);
  pointer-events: none;
}

.tv-lobby-header,
.tv-lobby-join-zone,
.tv-lobby-seats-zone {
  position: relative;
  z-index: 1;
}

.tv-lobby-header {
  width: min(100%, 76rem);
  text-align: center;
}

.tv-lobby-header .eyebrow {
  margin-bottom: 0.6rem;
  font-size: 0.98rem;
  letter-spacing: 0.28em;
}

.tv-lobby-header h1 {
  margin: 0;
  font-size: clamp(4.2rem, 6.3vw, 6.1rem);
  line-height: 0.92;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.tv-lobby-subtitle {
  margin: 0.55rem auto 0;
  max-width: 58rem;
  color: rgba(255, 240, 212, 0.84);
  font-size: clamp(1.16rem, 1.54vw, 1.5rem);
  line-height: 1.34;
}

.tv-lobby-join-zone {
  width: min(100%, 56rem);
  padding: 1.45rem 1.95rem 1.65rem;
  border-radius: 40px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1.08rem;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 219, 136, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(72, 41, 22, 0.92), rgba(26, 18, 13, 0.94));
}

.tv-lobby-join-zone.is-counting-down .tv-lobby-qr-frame,
.tv-lobby-join-zone.is-counting-down .tv-lobby-join-copy {
  opacity: 0.22;
  transform: scale(0.97);
}

.tv-lobby-qr-frame {
  display: grid;
  place-items: center;
  padding: 1.1rem;
  border-radius: 32px;
  background: linear-gradient(180deg, #f8ddb0, #d18b46);
  box-shadow:
    inset 0 0 0 2px rgba(255, 246, 218, 0.28),
    0 24px 54px rgba(0, 0, 0, 0.28);
  transition: opacity 220ms ease, transform 220ms ease;
}

.tv-lobby-qr-image,
.tv-lobby-qr-fallback {
  display: block;
  width: min(100%, 13.8rem);
  aspect-ratio: 1;
  border-radius: 24px;
  background: #f9f0db;
}

.tv-lobby-join-copy {
  max-width: 40rem;
  transition: opacity 220ms ease, transform 220ms ease;
}

.tv-menu-radio-row {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.tv-menu-radio-step {
  min-width: 4.6rem;
}

.tv-menu-radio-card {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 247, 230, 0.08);
  border: 1px solid rgba(255, 235, 200, 0.12);
  text-align: center;
}

.tv-menu-radio-card strong {
  font-size: 0.96rem;
  color: #fff4dc;
}

.tv-menu-radio-card span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 225, 175, 0.78);
}

.tv-radio-hint {
  position: absolute;
  right: 2rem;
  bottom: 1.2rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 23, 17, 0.72);
  border: 1px solid rgba(255, 233, 191, 0.18);
  color: #f3e3b8;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.tv-lobby-join-copy h2 {
  margin: 0;
  font-size: clamp(1.68rem, 2.24vw, 2.22rem);
  line-height: 1.08;
}

.tv-lobby-join-copy p {
  margin: 0.34rem 0 0;
  color: rgba(255, 237, 206, 0.8);
  font-size: clamp(1rem, 1.14vw, 1.12rem);
  line-height: 1.38;
}

.tv-lobby-countdown-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  min-width: 24rem;
  padding: 1rem 2.4rem 1.2rem;
  border-radius: 34px;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(17, 12, 10, 0.9), rgba(8, 9, 11, 0.84)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 229, 178, 0.16);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.34);
  animation: tv-lobby-countdown-bloom 280ms ease-out;
}

.tv-lobby-countdown-overlay .eyebrow {
  margin-bottom: 0.05rem;
  font-size: 0.88rem;
  letter-spacing: 0.22em;
}

.tv-lobby-countdown-overlay strong {
  font-size: clamp(2.3rem, 4.7vw, 3.9rem);
  line-height: 1;
}

.tv-lobby-countdown-overlay span {
  font-size: clamp(3.8rem, 7vw, 5.8rem);
  line-height: 0.9;
  font-weight: 900;
  color: #ffd57b;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

.tv-lobby-seats-zone {
  width: min(100%, 78rem);
  display: grid;
  gap: 0.55rem;
  align-self: end;
  justify-items: center;
}

.tv-lobby-ready-summary {
  display: grid;
  justify-items: center;
  gap: 0.34rem;
  text-align: center;
}

.tv-lobby-ready-summary strong {
  font-size: clamp(1.42rem, 1.9vw, 1.9rem);
  line-height: 1.04;
}

.tv-lobby-ready-summary span {
  color: rgba(255, 237, 208, 0.76);
  max-width: 52rem;
  font-size: clamp(0.98rem, 1.08vw, 1.12rem);
  line-height: 1.36;
}

.tv-lobby-seat-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.05vw, 1.14rem);
}

.tv-lobby-seat {
  position: relative;
  min-height: 8.25rem;
  padding: 1rem 1.08rem 1.02rem;
  border-radius: 28px;
  display: grid;
  align-content: space-between;
  gap: 0.84rem;
  overflow: hidden;
  border: 1px solid rgba(255, 230, 181, 0.12);
  background:
    linear-gradient(180deg, rgba(42, 28, 18, 0.92), rgba(20, 17, 14, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
}

.tv-lobby-seat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 227, 166, 0.08), transparent 42%);
  pointer-events: none;
}

.tv-lobby-seat.is-ready {
  border-color: rgba(194, 255, 220, 0.2);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(194, 255, 220, 0.08),
    0 0 26px rgba(194, 255, 220, 0.08);
}

.tv-lobby-seat.is-empty {
  background:
    linear-gradient(180deg, rgba(31, 23, 18, 0.86), rgba(15, 14, 12, 0.84)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.tv-lobby-seat-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.42rem;
  opacity: 0.95;
}

.tv-lobby-seat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.tv-lobby-seat-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 241, 214, 0.78);
  font-size: 0.88rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tv-lobby-seat-color {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 245, 225, 0.26);
}

.tv-lobby-seat-state {
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 231, 182, 0.12);
  background: rgba(255, 239, 204, 0.07);
  color: rgba(255, 238, 205, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tv-lobby-seat-state.is-ready {
  border-color: rgba(194, 255, 220, 0.2);
  background: rgba(160, 255, 194, 0.12);
  color: #d8ffe7;
}

.tv-lobby-seat strong {
  position: relative;
  z-index: 1;
  font-size: clamp(1.08rem, 1.52vw, 1.42rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.tv-lobby-seat.is-empty strong {
  color: rgba(255, 239, 209, 0.72);
}

@keyframes tv-lobby-countdown-bloom {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.broadcast-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) 16rem;
  gap: clamp(0.9rem, 1vw, 1.25rem);
  padding: clamp(0.95rem, 1vw, 1.2rem);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 28%, rgba(255, 215, 118, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(98, 42, 13, 0.95), rgba(46, 24, 12, 0.96));
  align-items: center;
}

.broadcast-hero.is-live {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  padding: 0.6rem 0.85rem;
  gap: 0.75rem;
  border-radius: 24px;
}

.hero-brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.hero-icon {
  width: clamp(4rem, 5vw, 5.2rem);
  border-radius: 1.25rem;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
  flex: 0 0 auto;
}

.hero-copy h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.55rem, 2.15vw, 2.2rem);
}

.hero-copy p:last-child {
  color: rgba(255, 241, 214, 0.84);
  line-height: 1.4;
  margin-bottom: 0;
}

.broadcast-hero.is-live .hero-copy h1 {
  font-size: 1.18rem;
  margin-bottom: 0.15rem;
}

.broadcast-hero.is-live .hero-copy p:last-child {
  font-size: 0.82rem;
}

.hero-logo {
  width: min(100%, 22rem);
  margin-bottom: 0.55rem;
}

.hero-center {
  display: grid;
  align-content: center;
  gap: 0.7rem;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-chip {
  padding: 0.52rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 241, 214, 0.08);
  border: 1px solid rgba(255, 224, 166, 0.16);
}

.join-url {
  padding: 0.7rem 0.9rem;
  border-radius: 18px;
  background: rgba(248, 236, 203, 0.08);
  border: 1px solid rgba(255, 226, 171, 0.12);
  word-break: break-all;
  font-size: 0.9rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
}

.lobby-format-switch button.is-selected {
  box-shadow: 0 0 0 3px rgba(255, 241, 204, 0.24), 0 16px 26px rgba(17, 10, 5, 0.32);
  filter: brightness(1.06);
}

.tv-lobby-player-count {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 0.68rem;
  margin-top: 0.76rem;
  text-align: center;
}

.tv-lobby-player-count-label {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 226, 171, 0.74);
}

.lobby-format-switch {
  display: inline-flex;
  gap: 0.72rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lobby-format-switch button {
  min-width: 10.5rem;
  min-height: 3.2rem;
  padding: 0.96rem 1.22rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 225, 167, 0.16);
  background: rgba(255, 242, 215, 0.08);
  color: #fff4dd;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.lobby-format-switch button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tv-lobby-player-count small {
  color: rgba(255, 238, 209, 0.72);
  font-size: 0.96rem;
  line-height: 1.34;
  max-width: 40rem;
}

.hero-prompt {
  padding: 0.72rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 202, 107, 0.09);
  color: #ffe7b1;
  border: 1px solid rgba(255, 227, 174, 0.14);
  line-height: 1.35;
  font-size: 0.95rem;
}

.broadcast-hero.is-live .hero-prompt {
  min-height: 0;
  padding: 0.48rem 0.72rem;
  font-size: 0.84rem;
}

.qr-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.45rem;
  text-align: center;
  border-radius: 24px;
  padding: 0.85rem;
  background:
    linear-gradient(180deg, rgba(255, 249, 232, 0.12), rgba(255, 239, 206, 0.05)),
    rgba(49, 28, 13, 0.78);
}

.qr-frame {
  padding: 0.8rem;
  border-radius: 24px;
  background: linear-gradient(180deg, #f4d79b, #c08643);
  box-shadow: inset 0 0 0 2px rgba(255, 247, 218, 0.25), 0 14px 26px rgba(0, 0, 0, 0.2);
}

.qr-image,
.qr-fallback {
  width: min(100%, 11rem);
  aspect-ratio: 1;
  border-radius: 16px;
  background: #f9f0db;
}

.qr-card.is-live .qr-image,
.qr-card.is-live .qr-fallback {
  width: min(100%, 8.6rem);
}

.board-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 30px;
  min-height: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 202, 90, 0.1), transparent 22%),
    linear-gradient(180deg, rgba(33, 69, 58, 0.82), rgba(11, 24, 20, 0.94));
  overflow: hidden;
}

.board-stage.is-live {
  position: relative;
  padding: 0;
  grid-template-rows: minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(255, 236, 178, 0.05), transparent 22%),
    url("/assets/art/universe/table-wood.png") center / 840px 840px repeat,
    linear-gradient(180deg, rgba(16, 24, 27, 0.92), rgba(5, 10, 12, 0.98));
  box-shadow: 0 24px 80px rgba(5, 17, 14, 0.48);
}

.lobby-board-shell {
  min-height: 0;
  height: 100%;
}

.board-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.board-status h2 {
  margin-bottom: 0.3rem;
  font-size: clamp(1.35rem, 2vw, 1.95rem);
}

.board-status p:last-child {
  margin-bottom: 0;
  color: rgba(244, 237, 217, 0.76);
}

.dice-display {
  display: grid;
  grid-template-columns: repeat(2, clamp(3rem, 4vw, 4rem));
  gap: 0.4rem;
  align-items: center;
  justify-items: center;
}

.dice-display img,
.dice-shell {
  width: clamp(3rem, 4vw, 4rem);
  height: clamp(3rem, 4vw, 4rem);
  object-fit: cover;
  border-radius: 18px;
  background: rgba(255, 248, 230, 0.12);
  border: 1px solid rgba(255, 235, 186, 0.14);
  padding: 0.45rem;
}

.dice-shell {
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 2rem;
}

.dice-shell.is-blank {
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(242, 232, 213, 0.94));
  border-color: rgba(255, 236, 206, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dice-total {
  grid-column: 1 / -1;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 243, 212, 0.08);
  border: 1px solid rgba(255, 229, 173, 0.14);
}

.board-shell,
.board-placeholder {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
}

.board-shell {
  background: #57aec8;
}

.board-placeholder {
  background:
    radial-gradient(circle at 50% 42%, rgba(253, 222, 143, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(41, 84, 69, 0.65), rgba(9, 22, 18, 0.9));
}

.board-viewport {
  position: absolute;
  inset: 0;
}

.board-zoom-layer {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: stretch;
  isolation: isolate;
  transform: scale(var(--board-zoom, 1));
  transform-origin: center;
  transition: transform 120ms linear;
}

.board-base-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: stretch;
  z-index: 0;
  pointer-events: none;
  contain: strict;
  will-change: transform;
  transform: translateZ(0);
}

.board-base-canvas,
.board-base-image {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  image-rendering: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  filter: saturate(1.3) contrast(1.16) brightness(1.07);
}

.board-state-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: stretch;
  z-index: 2;
  pointer-events: none;
  contain: strict;
  will-change: transform;
  transform: translateZ(0);
}

.board-state-canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  image-rendering: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.board-hover-card {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 3;
  max-width: min(20rem, calc(100% - 1.6rem));
  display: grid;
  gap: 0.1rem;
  padding: 0.56rem 0.72rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(17, 15, 13, 0.84), rgba(9, 11, 13, 0.72)),
    linear-gradient(180deg, rgba(255, 247, 226, 0.12), rgba(255, 247, 226, 0.02));
  border: 1px solid rgba(255, 230, 177, 0.16);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  color: rgba(255, 241, 212, 0.96);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 140ms ease, transform 140ms ease;
  pointer-events: none;
}

.board-hover-card strong {
  font-size: 0.82rem;
  line-height: 1.15;
}

.board-hover-card span {
  color: rgba(255, 235, 196, 0.78);
  font-size: 0.7rem;
  line-height: 1.25;
}

.board-hover-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.board-stage.is-live .board-shell {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: #57aec8;
}

.board-placeholder {
  display: grid;
  place-items: center;
  gap: 0.8rem;
  text-align: center;
  padding: 2rem;
}

.board-placeholder-logo {
  width: min(100%, 24rem);
  opacity: 0.96;
}

.board-svg {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  filter: saturate(1.14) contrast(1.1) brightness(1.03);
}

.board-svg.is-overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

.board-static-source {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.board-static-source svg {
  width: 0;
  height: 0;
}

.board-world {
  transform-box: fill-box;
  transform-origin: center;
}

.hex-texture-image {
  filter: saturate(1.24) contrast(1.14) brightness(1.05);
}

.hex-texture-image.is-blocked {
  filter: brightness(0.68) saturate(0.84) contrast(0.98);
}

.tile-flat-fill {
  opacity: 0.98;
  filter: saturate(1.02) brightness(1.01);
}

.plain-terrain-glyph {
  pointer-events: none;
  opacity: 0.46;
  stroke: rgba(62, 42, 21, 0.78);
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: rgba(255, 249, 234, 0.4);
}

.plain-terrain-glyph-forest {
  fill: rgba(31, 77, 38, 0.44);
  stroke-width: 2.8;
}

.plain-terrain-glyph-pasture {
  fill: rgba(255, 250, 241, 0.52);
  stroke-width: 2.6;
}

.plain-terrain-glyph-field {
  fill: none;
  stroke: rgba(128, 90, 20, 0.82);
  stroke-width: 2.8;
}

.plain-terrain-glyph-hill {
  fill: rgba(132, 76, 42, 0.42);
  stroke-width: 2.4;
}

.plain-terrain-glyph-mountain {
  fill: rgba(92, 96, 110, 0.4);
  stroke-width: 2.7;
}

.plain-terrain-glyph-mountain .plain-terrain-glyph-snow {
  fill: rgba(249, 249, 244, 0.76);
  stroke: none;
}

.plain-terrain-glyph-desert {
  fill: none;
  stroke: rgba(150, 102, 36, 0.82);
  stroke-width: 2.7;
}

.plain-terrain-badge rect {
  fill: rgba(255, 247, 225, 0.94);
  stroke: rgba(120, 85, 43, 0.44);
  stroke-width: 1.8;
}

.plain-terrain-badge-forest rect {
  fill: rgba(42, 100, 58, 0.94);
  stroke: rgba(235, 246, 226, 0.24);
}

.plain-terrain-badge-pasture rect {
  fill: rgba(116, 160, 84, 0.94);
  stroke: rgba(252, 249, 236, 0.28);
}

.plain-terrain-badge-field rect {
  fill: rgba(212, 164, 62, 0.96);
  stroke: rgba(255, 243, 198, 0.26);
}

.plain-terrain-badge-hill rect {
  fill: rgba(173, 97, 57, 0.95);
  stroke: rgba(255, 233, 214, 0.24);
}

.plain-terrain-badge-mountain rect {
  fill: rgba(105, 108, 126, 0.95);
  stroke: rgba(246, 247, 250, 0.2);
}

.plain-terrain-badge-desert rect {
  fill: rgba(214, 193, 137, 0.98);
  stroke: rgba(135, 94, 33, 0.28);
}

.plain-terrain-badge text {
  fill: rgba(255, 252, 246, 0.96);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.plain-terrain-badge-desert text {
  fill: rgba(84, 56, 22, 0.94);
}

.board-frame-water {
  fill: #57aec8;
  filter: none;
}

.board-water-glyph-pattern {
  opacity: 1;
}

.board-frame-rim {
  fill: rgba(122, 200, 222, 0.26);
  stroke: rgba(241, 250, 255, 0.24);
  stroke-width: 6;
}

.board-beach {
  fill: rgba(230, 202, 132, 0.99);
  stroke: rgba(176, 136, 70, 0.2);
  stroke-width: 1.8;
}

.board-shore-shadow {
  display: none;
}

.board-shoreline {
  display: none;
}

.terrain-scene {
  filter: saturate(1.18) contrast(1.12) brightness(1.05);
}

.terrain-watermark {
  mix-blend-mode: screen;
}

.tile-frame {
  fill: none;
  stroke: rgba(249, 239, 207, 0.96);
  stroke-width: 4.8;
  stroke-linejoin: round;
  filter: none;
}

.tile-robber-dim {
  fill: rgba(34, 20, 14, 0.38);
  stroke: rgba(255, 208, 168, 0.2);
  stroke-width: 2.4;
}

.tile-hover-overlay {
  fill: rgba(255, 246, 220, 0.02);
  stroke: transparent;
  stroke-width: 0;
  transition: fill 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
}

.tile-hover-overlay.is-hovered {
  fill: rgba(255, 246, 220, 0.08);
  stroke: rgba(255, 241, 204, 0.44);
  stroke-width: 4;
}

.tile-hover-overlay.is-legal {
  fill: rgba(107, 220, 164, 0.1);
  stroke: rgba(135, 247, 189, 0.72);
  stroke-width: 4.5;
}

.tile-hover-overlay.is-previewed {
  fill: color-mix(in srgb, var(--preview-color, rgba(108, 226, 255, 0.94)) 18%, transparent);
  stroke: var(--preview-color, rgba(108, 226, 255, 0.94));
  stroke-width: 6;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--preview-color, rgba(108, 226, 255, 0.94)) 55%, transparent));
}

.robber-shadow {
  fill: rgba(8, 6, 5, 0.46);
}

.robber-aura {
  fill: rgba(63, 18, 15, 0.24);
  stroke: rgba(255, 224, 178, 0.54);
  stroke-width: 2.8;
  filter: drop-shadow(0 0 12px rgba(147, 34, 24, 0.26));
}

.robber-token {
  fill: rgba(20, 14, 11, 0.96);
  stroke: rgba(255, 239, 201, 0.92);
  stroke-width: 3.9;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.34));
}

.robber-letter {
  fill: #fff1d2;
  font-size: 1.14rem;
  font-weight: 900;
}

.board-number-ring {
  fill: #d69a46;
  stroke: rgba(103, 57, 16, 0.56);
  stroke-width: 2.8;
  filter: none;
}

.board-number-center {
  fill: #fbf1da;
  stroke: rgba(146, 98, 35, 0.34);
  stroke-width: 1.6;
}

.board-number {
  fill: #2a1809;
  font-size: 1.68rem;
  font-weight: 950;
  stroke: rgba(255, 250, 238, 0.96);
  stroke-width: 1.38;
  paint-order: stroke fill;
  letter-spacing: -0.01em;
}

.board-token.is-hot .board-number-ring {
  fill: #d79c42;
  stroke: rgba(124, 39, 23, 0.68);
  stroke-width: 2.9;
}

.board-token.is-hot .board-number {
  fill: #b7392d;
}

.board-number-pip {
  fill: #7d5630;
  filter: none;
}

.board-token.is-hot .board-number-pip {
  fill: #b7392d;
}

.board-port-group {
  filter: drop-shadow(0 10px 16px rgba(38, 23, 10, 0.28));
}

.board-port-group.is-hovered {
  filter: drop-shadow(0 12px 18px rgba(38, 23, 10, 0.32));
}

.board-dock-shadow {
  fill: rgba(50, 31, 18, 0.2);
}

.board-dock-body {
  fill: #6a4327;
  stroke: rgba(196, 165, 126, 0.28);
  stroke-width: 0.82;
}

.board-dock-plank.is-even {
  fill: #5a381f;
}

.board-dock-plank.is-odd {
  fill: #714727;
}

.board-dock-seam {
  stroke: rgba(61, 37, 20, 0.42);
  stroke-width: 0.62;
  stroke-linecap: round;
}

.board-dock-brace {
  fill: rgba(199, 96, 33, 0.55);
}

.board-dock-post-shadow {
  fill: rgba(50, 31, 18, 0.2);
}

.board-dock-post {
  fill: #6b4326;
  stroke: rgba(80, 50, 28, 0.5);
  stroke-width: 0.68;
}

.board-dock-post-cap {
  fill: none;
  stroke: rgba(214, 188, 150, 0.16);
  stroke-width: 0.4;
}

.board-port-edge {
  stroke: rgba(122, 89, 44, 0.98);
  stroke-width: 11.5;
  stroke-linecap: round;
  filter: none;
}

.port-pier-shadow {
  fill: rgba(53, 41, 24, 0.38);
}

.port-pier {
  fill: #c4bcaf;
  stroke: rgba(91, 67, 38, 0.96);
  stroke-width: 2.1;
}

.port-token-rim {
  fill: #cca046;
  stroke: rgba(86, 50, 8, 0.82);
  stroke-width: 1.9;
}

.port-token-face {
  fill: #faf1dc;
  stroke: rgba(109, 73, 22, 0.92);
  stroke-width: 2;
}

.port-token-question,
.port-token-rate {
  fill: #3f260d;
  font-weight: 900;
  letter-spacing: 0.01em;
  paint-order: stroke fill;
  stroke: rgba(255, 247, 224, 0.96);
  stroke-width: 0.62;
}

.port-token-question {
  font-size: 0.88rem;
}

.port-token-rate {
  font-size: 0.82rem;
  dominant-baseline: middle;
}

.port-token-icon-ring {
  fill: rgba(255, 247, 220, 0.92);
  stroke: rgba(111, 72, 19, 0.58);
  stroke-width: 1.9;
}

.port-token-icon {
  filter: saturate(1.14) contrast(1.1) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.26));
}

.port-token-content {
  pointer-events: none;
}

.board-port-highlight-ring {
  fill: rgba(255, 240, 195, 0.12);
  stroke: rgba(255, 228, 153, 0.85);
  stroke-width: 3;
}

.board-edge-highlight {
  stroke: rgba(108, 226, 255, 0.96);
  stroke-width: 20;
  stroke-linecap: round;
  filter: none;
}

.board-legal-edge {
  stroke: rgba(118, 247, 184, 0.94);
  stroke-width: 18;
  stroke-linecap: round;
  filter: none;
}

.board-vertex-highlight {
  fill: rgba(135, 225, 255, 0.22);
  stroke: rgba(108, 226, 255, 0.94);
  stroke-width: 3;
}

.board-legal-vertex {
  fill: rgba(118, 247, 184, 0.24);
  stroke: rgba(190, 255, 221, 0.94);
  stroke-width: 3;
  filter: none;
}

.board-preview-edge {
  stroke: var(--preview-color, rgba(108, 226, 255, 0.94));
  stroke-width: 24;
  stroke-linecap: round;
  filter: none;
}

.board-preview-vertex {
  fill: color-mix(in srgb, var(--preview-color, rgba(108, 226, 255, 0.94)) 22%, transparent);
  stroke: var(--preview-color, rgba(108, 226, 255, 0.94));
  stroke-width: 4;
  filter: none;
}

.board-hit {
  fill: transparent;
  stroke: transparent;
}

.board-edge-hit {
  stroke-width: 24;
  pointer-events: stroke;
}

.board-hex-hit {
  pointer-events: all;
}

.board-vertex-hit,
.board-port-hit {
  pointer-events: all;
}

.port-generic-mark {
  fill: #6b4d24;
  font-size: 1rem;
  font-weight: 900;
}

.hud-surface {
  border-radius: 22px;
  padding: 0.82rem 0.95rem;
  background:
    linear-gradient(180deg, rgba(33, 19, 11, 0.78), rgba(14, 10, 8, 0.82)),
    url("/assets/art/universe/table-wood.png");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 232, 188, 0.16);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
}

.tv-layout-theater {
  padding: 0.28rem;
  grid-template-rows: minmax(0, 1fr);
}

.theater-stage {
  height: 100%;
  min-height: 0;
  padding: 0.3rem;
}

.theater-header-row {
  position: absolute;
  top: 0.78rem;
  left: 0.78rem;
  right: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
  pointer-events: none;
}

.theater-corner-chip {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.34rem 0.48rem;
  max-width: 19.4rem;
}

.theater-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.22rem 0.26rem;
  pointer-events: auto;
}

.zoom-button {
  min-width: 2rem;
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.8rem;
  line-height: 1;
  background: linear-gradient(180deg, rgba(99, 57, 26, 0.96), rgba(45, 26, 13, 0.96));
  border-color: rgba(255, 224, 163, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 243, 212, 0.16);
}

.zoom-button-wide {
  min-width: 2.6rem;
}

.zoom-readout {
  min-width: 2.6rem;
  text-align: center;
  color: rgba(255, 244, 221, 0.95);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.theater-current-turn {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
}

.theater-player-color {
  width: 0.68rem;
  height: 2.5rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 218, 0.16);
}

.theater-current-copy {
  min-width: 0;
}

.theater-current-copy .eyebrow {
  margin-bottom: 0.08rem;
  font-size: 0.7rem;
}

.theater-current-copy strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theater-turn-meta {
  display: block;
  margin-top: 0.08rem;
  color: rgba(255, 238, 204, 0.72);
  font-size: 0.78rem;
}

.theater-board-frame {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  z-index: 0;
}

.theater-overlay-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 233, 191, 0.16);
  background:
    linear-gradient(180deg, rgba(18, 14, 13, 0.56), rgba(9, 12, 14, 0.42)),
    linear-gradient(180deg, rgba(255, 250, 237, 0.08), rgba(255, 250, 237, 0.02));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.theater-dice-wrap {
  min-width: 0;
}

.theater-dice-wrap .dice-display {
  grid-template-columns: repeat(2, 2.44rem);
  gap: 0.18rem;
}

.theater-dice-wrap .dice-display img,
.theater-dice-wrap .dice-shell {
  width: 2.44rem;
  height: 2.44rem;
  padding: 0.18rem;
  border-radius: 12px;
}

.theater-dice-wrap .dice-total {
  padding: 0.08rem 0.48rem;
  font-size: 0.82rem;
}

.theater-board-frame .board-shell {
  position: absolute;
  inset: 0;
  height: auto;
  border-radius: 30px;
}

.theater-board-frame .board-viewport {
  padding: clamp(2.45rem, 4.8vh, 3rem) clamp(0.68rem, 1vw, 1rem) clamp(4.85rem, 11vh, 5.6rem);
}

.theater-footer-row {
  display: grid;
  position: absolute;
  left: 0.62rem;
  right: 0.62rem;
  bottom: 0.62rem;
  grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
  gap: 0.38rem;
  align-items: end;
  z-index: 2;
  pointer-events: none;
}

.theater-feed {
  max-width: none;
  padding: 0.34rem 0.56rem;
  display: grid;
  gap: 0.14rem;
  line-height: 1.25;
  color: #ffecbf;
  font-size: 0.78rem;
}

.theater-feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  color: rgba(255, 238, 204, 0.68);
  font-size: 0.66rem;
}

.theater-feed-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.road-shadow {
  stroke: rgba(16, 10, 7, 0.48);
  stroke-width: 20;
  stroke-linecap: round;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.22));
}

.road-outline {
  stroke: rgba(0, 0, 0, 0.84);
  stroke-width: 14.5;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
}

.road-top {
  stroke-width: 10.5;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.18));
}

.piece-shadow {
  fill: rgba(17, 10, 7, 0.52);
  transform: translate(3px, 6px);
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.2));
}

.piece-shape {
  stroke: rgba(0, 0, 0, 0.82);
  stroke-width: 2.4;
  stroke-linejoin: round;
  paint-order: stroke fill;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.16));
}

.tableau-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.65rem;
  min-height: 0;
  height: 100%;
}

.tv-layout-live .tableau-strip {
  gap: 0.34rem;
}

.tableau-active-slot {
  display: grid;
  align-content: stretch;
  gap: 0.4rem;
  min-height: 0;
  height: 100%;
}

.tableau-inactive-stack {
  display: grid;
  align-content: end;
  gap: 0.46rem;
  align-self: end;
}

.tableau-card {
  display: flex;
  gap: 0;
  align-items: stretch;
  padding: 0.36rem 0.42rem;
  border-radius: 18px;
  background: rgba(34, 23, 15, 0.64);
  border: 1px solid var(--tableau-accent, rgba(255, 227, 173, 0.12));
  min-width: 0;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 218, 0.03),
    0 10px 20px rgba(0, 0, 0, 0.16);
}

.tv-layout-live .tableau-card {
  padding: 0.22rem 0.28rem 0.26rem;
  background:
    linear-gradient(180deg, rgba(16, 12, 9, 0.12), rgba(10, 9, 8, 0.22)),
    url("/assets/art/universe/live/playerframes/entry-bg.png"),
    url("/assets/art/universe/table-wood.png");
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  border-color: rgba(255, 230, 177, 0.16);
  min-height: 3.2rem;
}

.tv-layout-live .tableau-card.tone-blue {
  --tableau-accent: rgba(94, 186, 255, 0.62);
  background-image:
    linear-gradient(180deg, rgba(16, 12, 9, 0.12), rgba(10, 9, 8, 0.22)),
    url("/assets/art/universe/live/playerframes/entry-bg.png"),
    url("/assets/art/universe/table-wood.png");
}

.tv-layout-live .tableau-card.tone-red {
  --tableau-accent: rgba(255, 135, 110, 0.62);
  background-image:
    linear-gradient(180deg, rgba(16, 12, 9, 0.12), rgba(10, 9, 8, 0.22)),
    url("/assets/art/universe/live/playerframes/entry-bg.png"),
    url("/assets/art/universe/table-wood.png");
}

.tv-layout-live .tableau-card.tone-white {
  --tableau-accent: rgba(230, 230, 224, 0.58);
  background-image:
    linear-gradient(180deg, rgba(16, 12, 9, 0.12), rgba(10, 9, 8, 0.22)),
    url("/assets/art/universe/live/playerframes/entry-bg.png"),
    url("/assets/art/universe/table-wood.png");
}

.tv-layout-live .tableau-card.tone-orange {
  --tableau-accent: rgba(224, 164, 88, 0.62);
  background-image:
    linear-gradient(180deg, rgba(16, 12, 9, 0.12), rgba(10, 9, 8, 0.22)),
    url("/assets/art/universe/live/playerframes/entry-bg.png"),
    url("/assets/art/universe/table-wood.png");
}

.tableau-card.is-active {
  box-shadow: 0 0 0 2px rgba(255, 214, 121, 0.3);
  filter: none;
}

.tableau-card p {
  margin: 0.18rem 0 0;
  color: rgba(255, 239, 206, 0.74);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tableau-shell {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.38rem;
}

.tableau-shell-active {
  align-items: center;
}

.tableau-shell-empty {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.tableau-active-name {
  width: 100%;
  text-align: center;
  color: #fff4db;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  padding: 0.42rem 0.44rem 0.58rem;
  background:
    linear-gradient(180deg, rgba(120, 74, 36, 0.52), rgba(72, 43, 23, 0.28));
  border-radius: 14px 0 0 0;
  border-bottom: 1px solid rgba(255, 229, 181, 0.22);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tableau-inactive-name {
  width: 100%;
  text-align: center;
  color: #fff4db;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.01em;
  padding: 0.28rem 0.24rem 0.4rem;
  background:
    linear-gradient(180deg, rgba(120, 74, 36, 0.42), rgba(72, 43, 23, 0.2));
  border-radius: 12px 0 0 0;
  border-bottom: 1px solid rgba(255, 229, 181, 0.16);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tableau-active-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  justify-items: center;
  padding: 0.2rem 0.28rem 0.72rem;
  border-bottom: 1px solid rgba(255, 228, 186, 0.16);
}

.tableau-inactive-cards,
.tableau-inactive-stats {
  width: 100%;
  display: grid;
  border-bottom: 1px solid rgba(255, 228, 186, 0.14);
  align-content: center;
}

.tableau-inactive-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
  justify-items: center;
  padding: 0.08rem 0.02rem;
}

.tableau-inactive-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.26rem;
  justify-items: center;
  padding: 0.16rem 0.04rem;
  border-bottom: none;
}

.tableau-inactive-metric {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  padding: 0.01rem 0.03rem;
  border-radius: 0.7rem;
}

.tableau-inactive-metric strong {
  color: #fff7e1;
  font-size: 0.94rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tableau-inactive-metric.is-highlighted {
  min-width: 100%;
  background:
    linear-gradient(180deg, rgba(255, 214, 122, 0.18), rgba(143, 92, 34, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(255, 229, 153, 0.28),
    0 6px 12px rgba(0, 0, 0, 0.12);
}


.tableau-inactive-metric.is-army-highlighted {
  background:
    linear-gradient(180deg, rgba(177, 133, 255, 0.24), rgba(83, 58, 135, 0.1));
  box-shadow:
    inset 0 0 0 1px rgba(219, 196, 255, 0.28),
    0 6px 12px rgba(0, 0, 0, 0.12);
}

.tableau-inactive-metric.is-highlighted .tableau-active-stat-icon,
.tableau-inactive-metric.is-highlighted strong {
  color: #fffaf2;
}

.tableau-active-card-counter {
  display: grid;
  justify-items: center;
  gap: 0.48rem;
}

.tableau-active-card-counter strong {
  color: #fff6df;
  font-size: 1.16rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tableau-card-icon-stack {
  position: relative;
  width: 2.75rem;
  height: 3.4rem;
}

.tableau-card-icon-back,
.tableau-card-icon-front {
  position: absolute;
  inset: 0;
  border-radius: 0.42rem;
  border: 1px solid rgba(255, 230, 186, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.18);
}

.tableau-card-icon-back {
  transform: translate(-0.22rem, 0.22rem);
  background:
    linear-gradient(180deg, rgba(109, 75, 49, 0.72), rgba(55, 35, 22, 0.88));
}

.tableau-card-icon-front {
  background:
    linear-gradient(180deg, rgba(243, 218, 164, 0.95), rgba(182, 134, 72, 0.95));
}

.tableau-card-icon-front::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border-radius: 0.28rem;
  border: 1px solid rgba(90, 50, 18, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 246, 223, 0.7), rgba(239, 211, 157, 0.36));
}

.tableau-card-icon-stack:not(.is-development) .tableau-card-icon-back {
  transform: translate(-0.36rem, 0.28rem) rotate(-12deg);
}

.tableau-card-icon-stack:not(.is-development) .tableau-card-icon-front {
  transform: rotate(10deg);
}

.tableau-card-icon-stack:not(.is-development)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0.42rem;
  border: 1px solid rgba(255, 230, 186, 0.18);
  background:
    linear-gradient(180deg, rgba(191, 149, 91, 0.9), rgba(122, 83, 43, 0.92));
  transform: translate(0.34rem, 0.18rem) rotate(18deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 16px rgba(0, 0, 0, 0.16);
}

.tableau-card-icon-stack.is-development .tableau-card-icon-front {
  background:
    linear-gradient(180deg, rgba(120, 78, 125, 0.95), rgba(65, 38, 84, 0.96));
}

.tableau-card-icon-stack.is-development .tableau-card-icon-front::after {
  border-color: rgba(244, 220, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(219, 193, 240, 0.34), rgba(111, 84, 139, 0.24));
}

.tableau-active-stats {
  width: 100%;
  display: grid;
  flex: 1 1 auto;
  align-content: center;
  gap: 0.3rem;
  padding: 0.42rem 0.08rem 0;
}

.tableau-active-timer {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 0.14rem;
  margin-top: auto;
  padding: 0.56rem 0.2rem 0.18rem;
  border-top: 1px solid rgba(255, 228, 186, 0.16);
}

.tableau-active-timer-label {
  color: rgba(255, 225, 171, 0.78);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tableau-active-timer strong {
  color: #fff6df;
  font-size: 1.58rem;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.tableau-active-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.46rem 0.1rem;
  border-bottom: 1px solid rgba(255, 228, 186, 0.1);
}

.tableau-active-stat-row:last-child {
  border-bottom: none;
}

.tableau-active-stat-row.is-highlighted {
  margin-inline: -0.1rem;
  padding-inline: 0.42rem;
  border-radius: 0.8rem;
  border-bottom-color: transparent;
  transform: scale(1.02);
}

.tableau-active-stat-row.is-road-highlighted {
  background:
    radial-gradient(circle at 0% 50%, rgba(255, 232, 163, 0.34), transparent 38%),
    linear-gradient(180deg, rgba(255, 215, 117, 0.34), rgba(143, 92, 34, 0.2));
  box-shadow:
    inset 0 0 0 1px rgba(255, 229, 153, 0.5),
    inset 0 1px 0 rgba(255, 247, 219, 0.2),
    0 10px 18px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 214, 118, 0.18);
}

.tableau-active-stat-row.is-army-highlighted {
  background:
    radial-gradient(circle at 0% 50%, rgba(226, 206, 255, 0.28), transparent 38%),
    linear-gradient(180deg, rgba(177, 133, 255, 0.32), rgba(83, 58, 135, 0.2));
  box-shadow:
    inset 0 0 0 1px rgba(219, 196, 255, 0.48),
    inset 0 1px 0 rgba(245, 235, 255, 0.18),
    0 10px 18px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(179, 138, 255, 0.16);
}

.tableau-active-stat-row.is-highlighted .tableau-active-stat-label,
.tableau-active-stat-row.is-highlighted strong {
  color: #fff9ee;
}

.tableau-active-stat-row.is-highlighted .tableau-active-stat-icon {
  background: rgba(255, 250, 236, 0.16);
  border-color: rgba(255, 239, 202, 0.38);
  color: #fff2c9;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 4px 10px rgba(0, 0, 0, 0.16);
}

.tableau-active-stat-label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  color: rgba(255, 235, 204, 0.84);
  font-size: 0.76rem;
  line-height: 1.2;
}

.tableau-active-stat-icon {
  width: 1.3rem;
  height: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 245, 218, 0.08);
  border: 1px solid rgba(255, 226, 176, 0.16);
  color: #ffe8b0;
  font-size: 0.76rem;
  flex: 0 0 auto;
}

.tableau-active-stat-icon-cards {
  position: relative;
  overflow: hidden;
  width: 1.55rem;
  height: 1.55rem;
}

.tableau-compact-card-stack {
  position: relative;
  width: 0.98rem;
  height: 1.22rem;
}

.tableau-compact-card-back,
.tableau-compact-card-front {
  position: absolute;
  inset: 0;
  border-radius: 0.16rem;
  border: 1px solid rgba(255, 236, 204, 0.18);
}

.tableau-compact-card-back {
  transform: translate(-0.12rem, 0.08rem) rotate(-10deg);
  background: linear-gradient(180deg, rgba(109, 75, 49, 0.9), rgba(55, 35, 22, 0.95));
}

.tableau-compact-card-front {
  transform: rotate(9deg);
  background: linear-gradient(180deg, rgba(243, 218, 164, 0.95), rgba(182, 134, 72, 0.95));
}

.tableau-compact-card-stack.is-development .tableau-compact-card-front {
  background: linear-gradient(180deg, rgba(120, 78, 125, 0.95), rgba(65, 38, 84, 0.96));
}

.tableau-active-stat-row strong {
  color: #fff7e1;
  font-size: 1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tableau-content {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.38rem;
}

.tv-layout-live .tableau-card strong {
  font-size: 0.88rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-layout-live .tableau-card p {
  font-size: 0.74rem;
}

.tv-sidebar {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0.85rem;
  min-height: 0;
}

.surface {
  border-radius: 28px;
  padding: 1.15rem;
}

.panel-header,
.log-entry,
.stat-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.panel-header {
  margin-bottom: 0.9rem;
}

.panel-header h2 {
  margin-bottom: 0;
}

.panel-header span {
  color: rgba(255, 237, 203, 0.72);
}

.seat-grid {
  display: grid;
  gap: 0.55rem;
}

.seat-card {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 0.3rem 0.8rem;
  align-items: center;
  text-align: left;
  padding: 0.68rem 0.8rem;
  border-radius: 18px;
  background: rgba(255, 243, 212, 0.06);
  border: 1px solid rgba(255, 229, 173, 0.08);
}

.seat-card.is-ready {
  border-color: rgba(153, 255, 204, 0.3);
  background: linear-gradient(180deg, rgba(77, 130, 92, 0.24), rgba(255, 243, 212, 0.05));
}

.seat-card.is-inactive {
  opacity: 0.55;
  filter: saturate(0.72);
}

button.seat-card {
  width: 100%;
}

.seat-card.is-claimed {
  background: rgba(255, 225, 167, 0.1);
}

.route-tv .seat-card {
  padding: 0.54rem 0.68rem;
  font-size: 0.88rem;
}

.route-tv .tv-sidebar-card .seat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seat-color {
  grid-row: 1 / span 3;
  width: 14px;
  height: 100%;
  min-height: 44px;
  border-radius: 999px;
}

.route-tv .seat-color {
  min-height: 36px;
}

.lobby-countdown-pill {
  display: grid;
  gap: 0.22rem;
  min-width: 12rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: rgba(255, 209, 120, 0.12);
  border: 1px solid rgba(255, 229, 173, 0.18);
  text-align: right;
}

.lobby-countdown-pill strong {
  font-size: 1.45rem;
  line-height: 1;
}

.lobby-countdown-pill span {
  color: rgba(255, 241, 214, 0.78);
  font-size: 0.9rem;
}

.stat-grid {
  flex-wrap: wrap;
}

.stat-grid div {
  min-width: 46%;
  padding: 0.72rem 0.8rem;
  border-radius: 18px;
  background: rgba(255, 243, 212, 0.06);
}

.stat-grid dt {
  color: rgba(255, 236, 200, 0.72);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-grid dd {
  margin: 0.35rem 0 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.tv-sidebar-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
}

.tv-sidebar-card.is-live {
  padding: 1rem;
}

.route-tv .stat-grid div {
  padding: 0.58rem 0.68rem;
}

.route-tv .stat-grid dd {
  font-size: 0.96rem;
}

.log-list {
  display: grid;
  gap: 0.55rem;
  overflow: hidden;
  align-content: start;
}

.log-entry {
  padding: 0.65rem 0.78rem;
  border-radius: 18px;
  background: rgba(255, 243, 212, 0.05);
  align-items: flex-start;
  font-size: 0.92rem;
}

.route-tv .log-entry {
  padding: 0.54rem 0.65rem;
  font-size: 0.84rem;
}

.log-entry.muted {
  color: rgba(255, 239, 211, 0.62);
}

.log-turn {
  color: #ffd57b;
  font-weight: 700;
  flex: 0 0 auto;
}

.hero-chip.is-live {
  background: linear-gradient(180deg, rgba(245, 203, 114, 0.26), rgba(217, 125, 57, 0.22));
  border-color: rgba(255, 221, 151, 0.28);
  color: #ffe1a0;
}

.board-shell.is-robber-mode .board-world {
  opacity: 0.9;
}

.board-robber-backdrop {
  fill: rgba(5, 9, 12, 0.24);
}

.tile-hover-overlay.is-producing {
  fill: rgba(255, 223, 112, 0.18);
  stroke: rgba(255, 242, 188, 0.86);
  stroke-width: 5;
  animation: tile-production-pulse 940ms ease-out;
  will-change: transform, opacity;
}

.tile-hover-overlay.is-robber-target {
  fill: rgba(116, 214, 255, 0.12);
  stroke: rgba(188, 244, 255, 0.84);
  stroke-width: 5;
}

.board-token {
  transform-origin: center;
  filter: drop-shadow(0 10px 14px rgba(62, 38, 11, 0.22));
}

.board-number {
  font-size: 1.74rem;
  stroke-width: 1.24;
}

.board-token.is-roll-hit {
  animation: board-token-hit 920ms cubic-bezier(0.16, 1, 0.3, 1);
}

.board-token.is-producing .board-number-ring {
  stroke: rgba(255, 229, 154, 0.9);
}

.robber-group.is-arriving {
  animation: robber-target-pulse 760ms ease-out;
  will-change: transform, opacity;
}

.road-build-glow {
  stroke-width: 18;
  stroke-linecap: round;
  filter: none;
  opacity: 0.92;
  animation: road-build-reveal 720ms ease-out;
  will-change: transform, opacity;
}

.road-top.is-build-effect {
  animation: road-build-reveal 720ms ease-out;
  will-change: transform, opacity;
}

.piece-build-ring {
  fill: rgba(255, 230, 164, 0.14);
  stroke: rgba(255, 241, 205, 0.92);
  stroke-width: 3;
  animation: build-ring-bloom 760ms ease-out;
  will-change: transform, opacity;
}

.piece-build-ring.is-city {
  stroke: rgba(158, 231, 255, 0.9);
}

.piece-shape.is-build-effect {
  animation: build-piece-pop 620ms cubic-bezier(0.2, 1, 0.3, 1);
  will-change: transform, opacity;
}

.resource-flight-backdrop {
  fill: rgba(255, 247, 221, 0.92);
  stroke: rgba(163, 118, 49, 0.62);
  stroke-width: 1.5;
}

.resource-flight-count-ring {
  fill: rgba(42, 24, 12, 0.9);
  stroke: rgba(255, 229, 173, 0.48);
  stroke-width: 1.2;
}

.resource-flight-count {
  fill: #fff3d9;
  font-size: 0.66rem;
  font-weight: 900;
}

.tv-premium-layout {
  --tv-sea-glyph:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23d7f5ff' stroke-width='2.8' stroke-linecap='round' opacity='0.24'%3E%3Cpath d='M20 46c8-7 20-7 28 0s20 7 28 0'/%3E%3Cpath d='M58 92c8-7 20-7 28 0s20 7 28 0'/%3E%3Cpath d='M14 108c6-5 14-5 20 0s14 5 20 0'/%3E%3C/g%3E%3C/svg%3E");
  --tv-safe-pad-x: 0.82rem;
  --tv-safe-pad-y: 0.68rem;
  --tv-panel-radius: 34px;
  --tv-card-radius: 24px;
  --tv-panel-bg:
    radial-gradient(circle at 50% -18%, rgba(255, 220, 145, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(40, 29, 22, 0.96), rgba(13, 14, 18, 0.97));
  --tv-panel-border: rgba(255, 226, 176, 0.18);
  --tv-panel-section-bg: linear-gradient(180deg, rgba(255, 240, 204, 0.11), rgba(255, 240, 204, 0.07));
  --tv-copy-strong: #fff5de;
  --tv-copy-muted: rgba(255, 237, 206, 0.84);
  --tv-copy-label: rgba(255, 219, 138, 0.96);
  --tv-left-board-seam-overlap: 0.56rem;
  position: relative;
  height: 100%;
  min-height: 100%;
  font-size: calc(1rem * var(--tv-ui-scale, 1));
  padding: var(--tv-safe-pad-y) var(--tv-safe-pad-x);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 230, 176, 0.14), transparent 18%),
    radial-gradient(circle at 50% 70%, rgba(61, 170, 208, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(123, 57, 18, 0.96) 0%, rgba(95, 45, 19, 0.98) 18%, rgba(22, 57, 56, 0.98) 66%, rgba(7, 18, 22, 1) 100%);
  background-size: auto, auto, auto;
  background-position: center, center, center;
}

.tv-premium-layout::before,
.tv-premium-layout::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tv-premium-layout::before {
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 240, 206, 0.08), transparent 19%),
    radial-gradient(circle at 50% 86%, rgba(7, 19, 24, 0.58), transparent 30%);
  opacity: 0.9;
}

.tv-premium-layout::after {
  inset: 0.34rem;
  border-radius: 38px;
  border: 1px solid rgba(255, 241, 208, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.tv-premium-layout.is-ticker-hidden {
  grid-template-rows: minmax(0, 1fr);
}

.tv-premium-layout > * {
  min-height: 0;
  align-self: stretch;
}

.tv-live-columns {
  min-height: 0;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(12.4rem, 13.7rem) minmax(0, 1fr) minmax(21rem, 23rem);
  gap: 0.56rem;
  align-items: stretch;
  contain: layout paint;
  position: relative;
  z-index: 1;
}

.tv-live-columns > * {
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

.tv-side-rail-left {
  margin-right: calc(-1 * var(--tv-left-board-seam-overlap));
  position: relative;
  z-index: 2;
}

.tv-side-rail-right {
  margin-left: calc(-1 * var(--tv-left-board-seam-overlap));
  position: relative;
  z-index: 2;
}

.tv-side-rail {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.tv-side-rail-shell {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: var(--tv-panel-radius);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 224, 156, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(51, 35, 26, 0.9), rgba(13, 15, 20, 0.94));
  border: 1px solid rgba(255, 231, 187, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.tv-side-rail-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%),
    radial-gradient(circle at 0% 0%, rgba(255, 218, 134, 0.08), transparent 28%);
  pointer-events: none;
}

.tv-side-rail-shell-left {
  padding: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.tv-side-rail-shell-right {
  padding: 0.64rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.tv-right-rail-stack {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.58rem;
}

.tv-right-workbench {
  position: relative;
  grid-row: 3;
  z-index: 1;
  width: auto;
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.42rem;
  padding: 0;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
}

.tv-right-workbench-header {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  width: 100%;
  justify-self: stretch;
  justify-items: start;
  padding: 0.74rem 0.82rem 0.66rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 224, 156, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(51, 35, 26, 0.9), rgba(13, 15, 20, 0.94));
  border: 1px solid rgba(255, 231, 187, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.18);
}

.tv-right-workbench-header h3 {
  margin: 0;
  color: #fff6df;
  font-size: 1.12rem;
  line-height: 1.02;
  text-align: left;
}

.tv-turn-gain-overlay {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 6;
  width: 26rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  pointer-events: none;
}

.tv-turn-gain-header {
  display: grid;
  width: fit-content;
  justify-self: end;
  justify-items: end;
  padding: 0.62rem 0.82rem 0 0;
}

.tv-turn-gain-header h3 {
  margin: 0;
  color: #fff6df;
  font-size: 1.12rem;
  line-height: 1.02;
  text-align: right;
}

.tv-turn-gain-list {
  display: grid;
  align-content: start;
  gap: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 224, 156, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(51, 35, 26, 0.9), rgba(13, 15, 20, 0.94));
  border-left: 1px solid rgba(255, 231, 187, 0.14);
  border-right: 1px solid rgba(255, 231, 187, 0.14);
  border-top: 1px solid rgba(255, 231, 187, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.tv-turn-gain-row {
  display: grid;
  gap: 0.28rem;
  padding: 0.56rem 0.78rem 0.62rem;
  border-bottom: 1px solid rgba(255, 231, 187, 0.08);
}

.tv-turn-gain-row:last-child {
  border-bottom: none;
}

.tv-turn-gain-player {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.tv-turn-gain-player strong {
  color: #fff6df;
  font-size: 0.96rem;
  line-height: 1.1;
}

.tv-turn-gain-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(255, 246, 224, 0.22),
    0 0 0 4px rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.tv-turn-gain-items {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.tv-turn-gain-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  min-height: 1.8rem;
  padding: 0.18rem 0.44rem;
  background: rgba(255, 249, 236, 0.07);
  border: 1px solid rgba(173, 238, 255, 0.14);
  color: #fff6df;
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tv-turn-gain-pill img {
  width: 1rem;
  height: 1rem;
}

.tv-turn-gain-empty {
  display: grid;
  place-items: center;
  min-height: 7rem;
  padding: 0.9rem 1rem 1rem;
  color: rgba(255, 238, 209, 0.78);
  font-size: 0.92rem;
  line-height: 1.3;
  text-align: center;
}

.tv-turn-gain-dice {
  display: grid;
  justify-items: center;
  min-height: 10.5rem;
  padding: 0.6rem 0.82rem 0.6rem 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 224, 156, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(51, 35, 26, 0.9), rgba(13, 15, 20, 0.94));
  border-left: 1px solid rgba(255, 231, 187, 0.14);
  border-right: 1px solid rgba(255, 231, 187, 0.14);
  border-bottom: 1px solid rgba(255, 231, 187, 0.14);
  border-top: 1px solid rgba(255, 231, 187, 0.08);
  border-bottom-left-radius: 28px;
}

.tv-turn-gain-dice-display {
  grid-template-columns: repeat(2, 7.1rem);
  gap: 0.86rem;
}

.tv-turn-gain-dice-display img,
.tv-turn-gain-dice-display .dice-shell {
  width: 7.1rem;
  height: 7.1rem;
  border-radius: 20px;
  padding: 0.62rem;
  background: rgba(255, 249, 236, 0.08);
  border: 1px solid rgba(255, 231, 187, 0.12);
}

.tv-turn-gain-dice-display .dice-total {
  display: none;
}

.tv-right-workbench-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0;
  padding: 0 0 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 224, 156, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(51, 35, 26, 0.9), rgba(13, 15, 20, 0.94));
  border-top: 1px solid rgba(255, 231, 187, 0.14);
  border-left: 1px solid rgba(255, 231, 187, 0.14);
  border-right: 1px solid rgba(255, 231, 187, 0.14);
  border-bottom: 1px solid rgba(255, 231, 187, 0.14);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.18);
}

.tv-right-log-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  column-gap: 0;
  padding: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 225, 158, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(62, 41, 29, 0.88), rgba(18, 17, 22, 0.88));
  border: 1px solid rgba(255, 231, 186, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 18px rgba(0, 0, 0, 0.16);
}

.tv-right-log-copy {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
  padding: 0.42rem 0.56rem 0.46rem;
}

.tv-right-log-copy p {
  margin: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 0.34rem;
  padding-top: 0.14rem;
  color: rgba(255, 238, 209, 0.9);
  font-size: 0.98rem;
  line-height: 1.3;
}

.tv-right-log-copy p + p {
  margin-top: 0.14rem;
  padding-top: 0.22rem;
  border-top: 1px solid rgba(255, 228, 176, 0.08);
}

.tv-right-log-letter {
  color: rgba(255, 225, 171, 0.9);
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tv-right-log-card.is-latest {
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 225, 158, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(86, 56, 30, 0.94), rgba(30, 21, 16, 0.92));
  border-color: rgba(255, 220, 144, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 24px rgba(0, 0, 0, 0.2);
}

.tv-right-log-card.is-current-turn {
  background:
    radial-gradient(circle at 0% 50%, rgba(226, 206, 255, 0.28), transparent 38%),
    linear-gradient(180deg, rgba(177, 133, 255, 0.32), rgba(83, 58, 135, 0.2));
  border-color: rgba(219, 196, 255, 0.36);
  box-shadow:
    inset 0 0 0 1px rgba(219, 196, 255, 0.34),
    inset 0 1px 0 rgba(245, 235, 255, 0.16),
    0 10px 18px rgba(0, 0, 0, 0.18);
}

.tv-right-log-card.is-latest .tv-right-log-copy p {
  color: #fff6df;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.32;
}

.tv-right-log-card.is-latest .tv-right-log-letter {
  color: #fff1c9;
  font-size: 1.1rem;
}

.tv-right-log-turn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 3.2rem;
  padding: 0.14rem 0.36rem;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 239, 201, 0.12), rgba(169, 121, 58, 0.14));
  border-right: 1px solid rgba(255, 228, 176, 0.12);
  color: rgba(255, 225, 171, 0.84);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tv-right-log-card.is-latest .tv-right-log-turn {
  background: linear-gradient(180deg, rgba(255, 239, 201, 0.18), rgba(188, 136, 64, 0.22));
  color: #fff1c9;
  border-right-color: rgba(255, 220, 144, 0.2);
}

.tv-right-log-card.is-current-turn .tv-right-log-turn {
  background: linear-gradient(180deg, rgba(226, 206, 255, 0.24), rgba(111, 84, 139, 0.24));
  color: #f5ebff;
  border-right-color: rgba(219, 196, 255, 0.24);
}

.tv-right-log-card.tone-success {
  border-color: rgba(172, 255, 208, 0.18);
}

.tv-right-log-card.tone-warning {
  border-color: rgba(255, 214, 130, 0.18);
}

.tv-right-log-card.tone-danger {
  border-color: rgba(255, 169, 157, 0.2);
}

.tv-right-workbench-empty {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 246, 221, 0.06);
  border: 1px solid rgba(255, 233, 190, 0.1);
  color: rgba(255, 236, 205, 0.76);
  font-size: 0.92rem;
  text-align: center;
}

.tv-ticker-bar {
  position: relative;
  z-index: 5;
  min-height: 0;
  height: 100%;
  padding: 0;
  pointer-events: none;
}

.tv-ticker-bar-inner {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0.66rem 1rem;
  border-radius: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 6.4fr) minmax(0, 2.64fr);
  align-items: center;
  gap: 0.72rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 230, 157, 0.18), transparent 50%),
    linear-gradient(180deg, rgba(60, 39, 24, 0.97), rgba(23, 16, 12, 0.99));
  border: 1px solid rgba(255, 229, 178, 0.2);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  contain: layout paint;
}

.tv-ticker-bar.is-success .tv-ticker-bar-inner {
  border-color: rgba(169, 255, 210, 0.24);
}

.tv-ticker-bar.is-warning .tv-ticker-bar-inner {
  border-color: rgba(255, 217, 133, 0.28);
}

.tv-ticker-bar.is-danger .tv-ticker-bar-inner {
  border-color: rgba(255, 168, 168, 0.28);
}

.tv-ticker-bar.is-idle .tv-ticker-bar-inner {
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 198, 120, 0.12), transparent 48%),
    linear-gradient(180deg, rgba(41, 29, 21, 0.94), rgba(15, 12, 11, 0.98));
}

.tv-render-mode-performance .surface,
.tv-render-mode-performance .tv-ticker-bar-inner,
.tv-profile-android-tv .surface,
.tv-profile-android-tv .tv-ticker-bar-inner {
  box-shadow: none;
}

.tv-render-mode-performance .board-water-lights,
.tv-render-mode-performance .board-water-reflections,
.tv-profile-android-tv .board-water-lights,
.tv-profile-android-tv .board-water-reflections {
  opacity: 0;
}

.tv-render-mode-performance .tv-live-columns,
.tv-render-mode-performance .tv-side-panel,
.tv-render-mode-performance .tv-board-stage,
.tv-render-mode-performance .tv-side-panel-section,
.tv-render-mode-performance .tv-match-log-item,
.tv-render-mode-performance .tv-player-summary,
.tv-render-mode-performance .tv-turn-meta-pill,
.tv-render-mode-performance .tv-resource-payout,
.tv-render-mode-performance .tv-trade-overlay-card,
.tv-render-mode-performance .tv-steal-overlay-card,
.tv-profile-android-tv .tv-live-columns,
.tv-profile-android-tv .tv-side-panel,
.tv-profile-android-tv .tv-board-stage,
.tv-profile-android-tv .tv-side-panel-section,
.tv-profile-android-tv .tv-match-log-item,
.tv-profile-android-tv .tv-player-summary,
.tv-profile-android-tv .tv-turn-meta-pill,
.tv-profile-android-tv .tv-resource-payout,
.tv-profile-android-tv .tv-trade-overlay-card,
.tv-profile-android-tv .tv-steal-overlay-card {
  contain: layout paint;
}

.tv-render-mode-performance .tv-side-panel,
.tv-render-mode-performance .tv-side-panel-section,
.tv-render-mode-performance .tv-match-log-item,
.tv-render-mode-performance .tv-player-summary,
.tv-render-mode-performance .tv-turn-meta-pill,
.tv-render-mode-performance .tv-resource-payout,
.tv-profile-android-tv .tv-side-panel,
.tv-profile-android-tv .tv-side-panel-section,
.tv-profile-android-tv .tv-match-log-item,
.tv-profile-android-tv .tv-player-summary,
.tv-profile-android-tv .tv-turn-meta-pill,
.tv-profile-android-tv .tv-resource-payout {
  background: linear-gradient(180deg, rgba(56, 37, 24, 0.95), rgba(20, 15, 11, 0.97));
  border-color: rgba(255, 228, 176, 0.14);
}

.tv-render-mode-performance .tv-board-stage,
.tv-profile-android-tv .tv-board-stage {
  background: #57aec8;
}

.tv-render-mode-performance .tv-board-stage .board-shell,
.tv-profile-android-tv .tv-board-stage .board-shell {
  background: transparent;
}

.tv-render-mode-performance .road-shadow,
.tv-render-mode-performance .piece-shadow,
.tv-render-mode-performance .board-dock-post-shadow,
.tv-render-mode-performance .board-dock-seam,
.tv-render-mode-performance .board-dock-brace,
.tv-profile-android-tv .road-shadow,
.tv-profile-android-tv .piece-shadow,
.tv-profile-android-tv .board-dock-post-shadow,
.tv-profile-android-tv .board-dock-seam,
.tv-profile-android-tv .board-dock-brace {
  display: none;
}

.tv-render-mode-performance .board-base-canvas,
.tv-render-mode-performance .board-base-image,
.tv-render-mode-performance .board-state-canvas,
.tv-render-mode-performance .board-svg,
.tv-render-mode-performance .hex-texture-image,
.tv-render-mode-performance .board-shoreline,
.tv-render-mode-performance .board-shore-shadow,
.tv-render-mode-performance .tv-turn-color,
.tv-render-mode-performance .tv-match-log-pill,
.tv-render-mode-performance .tv-player-summary-dot,
.tv-profile-android-tv .board-base-canvas,
.tv-profile-android-tv .board-base-image,
.tv-profile-android-tv .board-state-canvas,
.tv-profile-android-tv .board-svg,
.tv-profile-android-tv .hex-texture-image,
.tv-profile-android-tv .board-shoreline,
.tv-profile-android-tv .board-shore-shadow,
.tv-profile-android-tv .tv-turn-color,
.tv-profile-android-tv .tv-match-log-pill,
.tv-profile-android-tv .tv-player-summary-dot {
  filter: none;
}

.tv-render-mode-performance .board-base-canvas,
.tv-render-mode-performance .board-base-image,
.tv-profile-android-tv .board-base-canvas,
.tv-profile-android-tv .board-base-image {
  filter: saturate(1.2) contrast(1.12) brightness(1.03);
}

.tv-render-mode-performance .board-number-ring,
.tv-profile-android-tv .board-number-ring {
  fill: #dea24d;
  stroke: rgba(92, 49, 15, 0.7);
  stroke-width: 3.2;
}

.tv-render-mode-performance .board-number-center,
.tv-profile-android-tv .board-number-center {
  fill: #fff5e4;
  stroke: rgba(155, 104, 40, 0.4);
  stroke-width: 1.8;
}

.tv-render-mode-performance .board-number,
.tv-profile-android-tv .board-number {
  stroke-width: 1.56;
}

.tv-render-mode-performance .board-token.is-hot .board-number-ring,
.tv-profile-android-tv .board-token.is-hot .board-number-ring {
  fill: #de9b3d;
  stroke: rgba(128, 38, 20, 0.78);
  stroke-width: 3.3;
}

.tv-render-mode-performance .road-outline,
.tv-profile-android-tv .road-outline {
  stroke: rgba(18, 10, 6, 0.9);
  stroke-width: 15.3;
}

.tv-render-mode-performance .road-top,
.tv-profile-android-tv .road-top {
  stroke-width: 11.2;
}

.tv-render-mode-performance .piece-shape,
.tv-profile-android-tv .piece-shape {
  stroke: rgba(20, 12, 8, 0.92);
  stroke-width: 2.8;
}

.tv-render-mode-performance .robber-token,
.tv-profile-android-tv .robber-token {
  fill: #2c241d;
  stroke: rgba(252, 244, 218, 0.34);
  stroke-width: 1.8;
}

.tv-render-mode-performance .robber-aura,
.tv-profile-android-tv .robber-aura {
  fill: rgba(255, 230, 184, 0.16);
}

.tv-render-mode-performance .tv-menu-overlay,
.tv-profile-android-tv .tv-menu-overlay {
  background: rgba(4, 3, 5, 0.62);
  backdrop-filter: none;
}

.tv-render-mode-performance .tv-menu-card,
.tv-render-mode-performance .tv-trade-overlay-card,
.tv-render-mode-performance .tv-steal-overlay-card,
.tv-render-mode-performance .tv-dice-moment-card,
.tv-profile-android-tv .tv-menu-card,
.tv-profile-android-tv .tv-trade-overlay-card,
.tv-profile-android-tv .tv-steal-overlay-card,
.tv-profile-android-tv .tv-dice-moment-card {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.tv-animations-disabled *,
.tv-animations-disabled *::before,
.tv-animations-disabled *::after {
  animation: none !important;
  transition: none !important;
}

.tv-menu-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(4, 3, 5, 0.46);
  backdrop-filter: blur(6px);
}

.tv-menu-card {
  width: min(58rem, 100%);
  max-height: 100%;
  overflow: auto;
  border-radius: 28px;
  padding: 1.2rem 1.25rem 1.3rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 212, 124, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(68, 42, 24, 0.98), rgba(24, 18, 15, 0.98));
  border: 1px solid rgba(255, 224, 171, 0.18);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.44);
}

.tv-menu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tv-menu-header h2 {
  margin: 0;
  color: #fff0c9;
  font-size: 1.8rem;
}

.tv-menu-close {
  min-width: 7rem;
}

.tv-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.tv-menu-section {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border-radius: 20px;
  background: rgba(11, 12, 16, 0.28);
  border: 1px solid rgba(255, 228, 176, 0.08);
}

.tv-menu-label {
  color: rgba(255, 225, 170, 0.76);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tv-menu-action-list,
.tv-menu-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tv-menu-action-list > button,
.tv-menu-pill-row > button,
.tv-menu-stepper > button {
  min-height: 3.1rem;
}

.tv-menu-action-list > button.is-selected,
.tv-menu-pill-row > button.is-selected {
  border-color: rgba(255, 230, 186, 0.36);
  background: linear-gradient(180deg, #f5cb72, #d97d39);
  color: #28170c;
}

.tv-menu-stepper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.tv-menu-stepper strong {
  text-align: center;
  font-size: 1.1rem;
  color: #fff2d3;
}

.tv-ticker-label,
.tv-ticker-queue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.08rem;
  padding: 0 0.92rem;
  border-radius: 999px;
  background: rgba(255, 244, 214, 0.12);
  border: 1px solid rgba(255, 229, 173, 0.2);
  color: rgba(255, 243, 219, 0.94);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tv-ticker-label {
  justify-self: start;
}

.tv-ticker-queue {
  justify-self: end;
}

.tv-ticker-track {
  grid-column: 2;
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.tv-ticker-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(19, 14, 12, 0.94), transparent 4%, transparent 96%, rgba(19, 14, 12, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.tv-ticker-message {
  display: block;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff7e7;
  font-size: clamp(1.16rem, 1.54vw, 1.48rem);
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.16;
  animation: tv-ticker-message-enter 220ms ease-out;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  will-change: transform, opacity;
}

.tv-side-panel {
  position: relative;
  z-index: 4;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  align-content: start;
  gap: 0.78rem;
  padding: 0.96rem;
  overflow: hidden;
  background: var(--tv-panel-bg);
  border-radius: var(--tv-panel-radius);
  border: 1px solid var(--tv-panel-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 218, 0.1),
    0 16px 34px rgba(0, 0, 0, 0.18);
  contain: layout paint;
}

.tv-side-panel-left {
  grid-template-rows: auto;
}

.tv-side-panel-right {
  grid-template-rows: 11.75rem minmax(0, 1fr);
}

.tv-side-panel .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.17em;
  color: var(--tv-copy-label);
}

.tv-turn-card {
  display: grid;
  gap: 0.74rem;
  padding: 0.92rem 0.94rem 1rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 211, 126, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(86, 51, 30, 0.98), rgba(29, 19, 13, 0.98));
  border: 1px solid rgba(255, 225, 173, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 220, 0.12),
    0 10px 22px rgba(0, 0, 0, 0.14);
}

.tv-side-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.72rem;
  min-height: 0;
  padding-top: 0;
}

.tv-side-hero-copy {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.24rem;
}

.tv-side-hero-copy .eyebrow {
  margin-bottom: 0;
}

.tv-side-hero-copy h1 {
  margin: 0;
  font-size: clamp(1.5rem, 1.78vw, 1.98rem);
  line-height: 0.98;
  min-height: 0;
  overflow-wrap: anywhere;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.24);
}

.tv-turn-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.58rem 0.95rem;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 218, 131, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(70, 40, 20, 0.94), rgba(30, 18, 11, 0.96));
}

.tv-turn-color {
  width: 1.04rem;
  height: auto;
  min-height: 6rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 225, 0.2);
  align-self: stretch;
}

.tv-turn-copy {
  text-align: left;
  min-width: 0;
}

.tv-turn-copy .eyebrow {
  margin-bottom: 0.1rem;
}

.tv-turn-copy h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.15vw, 2rem);
  line-height: 1.02;
}

.tv-turn-subtitle {
  margin: 0.02rem 0 0;
  color: rgba(255, 242, 218, 0.94);
  font-size: clamp(0.98rem, 1.06vw, 1.14rem);
  line-height: 1.3;
  min-height: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.tv-turn-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.44rem;
}

.tv-turn-card-chip {
  display: grid;
  gap: 0.14rem;
  min-height: 4rem;
  padding: 0.54rem 0.64rem 0.58rem;
  border-radius: 16px;
  align-content: start;
  background: rgba(255, 241, 212, 0.09);
  border: 1px solid rgba(255, 224, 170, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 244, 218, 0.08);
}

.tv-turn-card-chip small {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 227, 171, 0.76);
}

.tv-turn-card-chip strong {
  font-size: 0.98rem;
  line-height: 1.12;
  color: rgba(255, 246, 224, 0.98);
  overflow-wrap: anywhere;
}

.tv-turn-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.3rem;
  max-width: min(34rem, 42vw);
}

.tv-turn-meta-pill {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
  padding: 0.4rem 0.64rem 0.44rem;
  border-radius: 14px;
  text-align: left;
  background: rgba(255, 240, 204, 0.11);
  border: 1px solid rgba(255, 225, 166, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 244, 218, 0.18);
  contain: layout paint;
}

.tv-turn-meta-pill small {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 227, 171, 0.8);
}

.tv-turn-meta-pill strong {
  color: rgba(255, 245, 223, 0.98);
  font-size: 0.8rem;
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tv-turn-meta-rail {
  display: grid;
  grid-template-columns: 1fr;
  max-width: none;
  justify-content: stretch;
  align-items: stretch;
}

.tv-turn-meta-rail .tv-turn-meta-pill {
  min-width: 0;
  min-height: 3.24rem;
  align-content: start;
}

.tv-side-panel-section {
  display: grid;
  gap: 0.34rem;
  padding: 0.72rem 0.78rem;
  border-radius: 20px;
  background: var(--tv-panel-section-bg);
  border: 1px solid rgba(255, 225, 166, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 244, 218, 0.06);
  contain: layout paint;
}

.tv-side-roll-section {
  min-height: 0;
  grid-template-rows: auto auto;
  align-content: start;
  justify-items: center;
  gap: 0.56rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  text-align: center;
}

.tv-side-roll-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.tv-side-roll-turn {
  display: inline-flex;
  align-items: center;
  height: 1.76rem;
  padding: 0 0.66rem;
  border-radius: 999px;
  background: rgba(255, 240, 204, 0.09);
  border: 1px solid rgba(255, 225, 166, 0.16);
  color: rgba(255, 242, 220, 0.86);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tv-side-panel-section strong {
  font-size: 1.08rem;
  line-height: 1.24;
}

.tv-side-panel-section span {
  color: rgba(255, 239, 210, 0.82);
  font-size: 0.9rem;
  line-height: 1.42;
}

.tv-side-event-section strong {
  font-size: 1.18rem;
  line-height: 1.22;
}

.tv-table-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

.tv-edge-stack {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  align-content: center;
  gap: 0.5rem;
  width: 14rem;
  min-height: 0;
  pointer-events: none;
  z-index: 3;
}

.tv-edge-stack-left {
  left: 0.7rem;
}

.tv-edge-stack-right {
  right: 0.7rem;
}

.tv-edge-toast {
  padding: 0.58rem 0.68rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(21, 18, 17, 0.86), rgba(8, 11, 13, 0.78)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 228, 176, 0.14);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.tv-edge-toast strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.28;
}

.tv-edge-toast .eyebrow {
  margin-bottom: 0.18rem;
}

.tv-edge-toast.is-success {
  border-color: rgba(182, 255, 214, 0.34);
}

.tv-edge-toast.is-warning {
  border-color: rgba(255, 227, 148, 0.34);
}

.tv-edge-toast.is-danger {
  border-color: rgba(255, 165, 165, 0.34);
}

.tv-board-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.tv-board-hero-bar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.82rem 1rem 0.88rem;
  border-radius: 26px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 218, 134, 0.2), transparent 36%),
    linear-gradient(180deg, rgba(74, 45, 27, 0.98), rgba(22, 17, 13, 0.98));
  border: 1px solid rgba(255, 227, 177, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 224, 0.08),
    0 18px 34px rgba(0, 0, 0, 0.22);
  contain: layout paint;
}

.tv-board-hero-copy {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.tv-board-hero-copy strong {
  font-size: clamp(1.3rem, 1.62vw, 1.72rem);
  line-height: 1.04;
  color: var(--tv-copy-strong);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.24);
}

.tv-board-hero-copy span {
  color: var(--tv-copy-muted);
  font-size: 0.98rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-board-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.52rem;
}

.tv-board-hero-chip {
  min-width: 5.8rem;
  display: grid;
  gap: 0.14rem;
  padding: 0.46rem 0.6rem 0.52rem;
  border-radius: 16px;
  text-align: center;
  background: rgba(255, 241, 210, 0.09);
  border: 1px solid rgba(255, 225, 168, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 244, 218, 0.08);
}

.tv-board-hero-chip small {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 227, 171, 0.78);
}

.tv-board-hero-chip strong {
  font-size: 0.98rem;
  line-height: 1.08;
  color: rgba(255, 246, 224, 0.98);
}

.tv-board-stage {
  position: relative;
  display: grid;
  inset: 0;
  min-height: 0;
  min-width: 0;
  height: 100%;
  align-self: stretch;
  overflow: hidden;
  padding: 0;
  background: #57aec8;
  border-radius: 36px;
  border: 1px solid rgba(226, 248, 255, 0.16);
  box-shadow:
    0 28px 52px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 246, 224, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  contain: layout paint;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.tv-board-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: none;
  pointer-events: none;
}

.tv-board-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 36px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(241, 250, 255, 0.14), inset 0 0 84px rgba(10, 31, 39, 0.12);
  pointer-events: none;
}

.tv-board-stage .board-shell {
  position: absolute;
  inset: 0;
  min-height: 0;
  height: 100%;
  border-radius: 36px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(250, 252, 255, 0.08);
}

.tv-board-stage .board-viewport {
  inset: 0;
  padding: 0;
}

.tv-board-stage-hero {
  border-radius: 36px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border: 1px solid rgba(245, 231, 196, 0.2);
  background:
    var(--tv-sea-glyph),
    radial-gradient(circle at 50% 46%, rgba(166, 228, 241, 0.52) 0%, rgba(92, 183, 210, 0.94) 24%, rgba(88, 156, 184, 0.76) 42%, rgba(84, 127, 118, 0) 58%),
    linear-gradient(180deg, rgba(102, 190, 217, 0.99), rgba(48, 115, 149, 0.99));
  background-size: 190px 190px, auto, auto;
  background-position: center, center, center;
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 224, 0.14),
    0 32px 64px rgba(0, 0, 0, 0.26);
}

.tv-render-mode-performance .tv-board-stage-hero,
.tv-profile-android-tv .tv-board-stage-hero {
  background:
    var(--tv-sea-glyph),
    radial-gradient(circle at 50% 49%, rgba(116, 214, 239, 0.42) 0%, rgba(82, 177, 207, 0.92) 23%, rgba(92, 167, 196, 0.76) 40%, rgba(84, 127, 118, 0) 54%),
    linear-gradient(180deg, rgba(84, 177, 210, 0.98), rgba(60, 135, 171, 0.98));
  background-size: 180px 180px, auto, auto;
  background-position: center, center, center;
}

.tv-board-stage-hero::before {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 46%, rgba(252, 254, 255, 0.12), transparent 48%),
    radial-gradient(circle at 50% 54%, rgba(8, 23, 31, 0.18), transparent 80%);
}

.tv-board-stage-hero::after {
  z-index: 4;
  border-radius: 36px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 212, 0.15),
    inset 0 0 138px rgba(12, 21, 24, 0.18);
}

.tv-board-stage-hero .board-shell {
  border-radius: 36px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}

.tv-board-stage-hero .board-base-canvas,
.tv-board-stage-hero .board-base-image,
.tv-board-stage-hero .board-svg {
  filter: saturate(1.1) contrast(1.05) brightness(1.03);
}

.tv-top-hud-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.tv-top-hud-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.tv-bottom-meta-card {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 5.8rem;
  min-height: 4.55rem;
  padding: 0.42rem 0.72rem 0.5rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(42, 44, 48, 0.96), rgba(25, 27, 30, 0.98));
  border: 1px solid rgba(255, 241, 218, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.tv-bottom-meta-card small {
  color: rgba(255, 225, 171, 0.72);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tv-bottom-meta-card strong {
  color: #fff6e1;
  font-size: 1rem;
  line-height: 1.04;
  text-align: center;
}

.tv-bottom-ribbon {
  display: flex;
  flex-direction: column;
  gap: 0.56rem;
  min-height: 100%;
  padding: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border: 0;
  box-shadow: none;
  pointer-events: none;
}

.tv-bottom-ribbon.is-warning {
  border-color: rgba(255, 208, 123, 0.28);
}

.tv-bottom-ribbon.is-danger {
  border-color: rgba(255, 158, 150, 0.26);
}

.tv-bottom-ribbon.is-success {
  border-color: rgba(177, 255, 210, 0.24);
}

.tv-bottom-ribbon-turn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.54rem;
  min-width: 0;
  padding: 0.7rem 0.76rem 0.78rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 220, 145, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(65, 42, 29, 0.9), rgba(19, 16, 18, 0.92));
  border: 1px solid rgba(255, 231, 188, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tv-bottom-ribbon-turn-color {
  width: 0.44rem;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 246, 222, 0.18);
}

.tv-bottom-ribbon-turn-copy,
.tv-bottom-ribbon-copy,
.tv-bottom-ribbon-meta {
  min-width: 0;
}

.tv-bottom-ribbon-turn-copy {
  display: grid;
  gap: 0.08rem;
}

.tv-bottom-ribbon-turn-copy small,
.tv-bottom-ribbon-pill small {
  color: rgba(255, 222, 171, 0.72);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tv-bottom-ribbon-turn-copy strong {
  color: #fff7e4;
  font-size: 1.28rem;
  line-height: 1.04;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-bottom-ribbon-copy {
  display: grid;
  gap: 0.16rem;
  padding: 0 0.06rem;
}

.tv-bottom-ribbon-copy strong {
  color: #fff7e5;
  font-size: 1.28rem;
  line-height: 1.06;
}

.tv-bottom-ribbon-copy span {
  color: rgba(255, 235, 205, 0.82);
  font-size: 0.9rem;
  line-height: 1.36;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.tv-bottom-ribbon-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.36rem;
  align-items: stretch;
}

.tv-bottom-ribbon-panel {
  display: grid;
  align-content: start;
  gap: 0.22rem;
  min-height: 5.2rem;
  padding: 0.54rem 0.58rem 0.6rem;
  border-radius: 18px;
  background: rgba(255, 246, 221, 0.08);
  border: 1px solid rgba(255, 233, 190, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tv-bottom-ribbon-panel small {
  color: rgba(255, 225, 171, 0.72);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tv-bottom-ribbon-panel strong {
  color: #fff7e1;
  font-size: 1.02rem;
  line-height: 1.08;
}

.tv-bottom-ribbon-panel span {
  color: rgba(255, 236, 205, 0.78);
  font-size: 0.8rem;
  line-height: 1.32;
}

.tv-bottom-ribbon-panel .tv-trade-resource-row {
  gap: 0.26rem;
}

.tv-bottom-ribbon-panel .tv-trade-resource-pill {
  min-width: 2rem;
  padding: 0.2rem 0.28rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.tv-bottom-ribbon-panel.tone-roll {
  background: linear-gradient(180deg, rgba(255, 214, 130, 0.12), rgba(255, 246, 221, 0.075));
  border-color: rgba(255, 214, 130, 0.18);
}

.tv-bottom-ribbon-panel.tone-success {
  background: linear-gradient(180deg, rgba(172, 255, 208, 0.1), rgba(255, 246, 221, 0.075));
  border-color: rgba(172, 255, 208, 0.14);
}

.tv-bottom-ribbon-panel.tone-danger {
  background: linear-gradient(180deg, rgba(255, 169, 157, 0.12), rgba(255, 246, 221, 0.075));
  border-color: rgba(255, 169, 157, 0.18);
}

.tv-bottom-ribbon-panel.tone-trade {
  background: linear-gradient(180deg, rgba(168, 229, 255, 0.12), rgba(255, 246, 221, 0.075));
  border-color: rgba(168, 229, 255, 0.18);
}

.tv-bottom-ribbon-panel.tone-setup {
  background: linear-gradient(180deg, rgba(255, 228, 166, 0.11), rgba(255, 246, 221, 0.075));
  border-color: rgba(255, 228, 166, 0.16);
}

.tv-bottom-ribbon-panel.tone-default {
  background: rgba(255, 246, 221, 0.075);
}

.tv-bottom-ribbon-log {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-content: start;
  flex: 0 0 auto;
  padding: 0.08rem 0;
}

.tv-bottom-ribbon-log-item {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.3rem 0.44rem;
  border-radius: 999px;
  background: rgba(255, 245, 219, 0.08);
  border: 1px solid rgba(255, 232, 184, 0.08);
  color: rgba(255, 236, 205, 0.76);
  font-size: 0.76rem;
  line-height: 1.22;
}

.tv-bottom-ribbon-log-item.tone-roll {
  border-color: rgba(255, 214, 130, 0.16);
  color: rgba(255, 235, 187, 0.92);
}

.tv-bottom-ribbon-log-item.tone-build,
.tv-bottom-ribbon-log-item.tone-setup {
  border-color: rgba(201, 255, 179, 0.14);
  color: rgba(232, 245, 213, 0.86);
}

.tv-bottom-ribbon-log-item.tone-danger {
  border-color: rgba(255, 169, 157, 0.18);
  color: rgba(255, 220, 214, 0.9);
}

.tv-bottom-ribbon-log-item.tone-trade,
.tv-bottom-ribbon-log-item.tone-achievement {
  border-color: rgba(168, 229, 255, 0.18);
  color: rgba(221, 245, 255, 0.92);
}

.tv-bottom-ribbon-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  margin-top: auto;
  align-items: end;
}

.tv-bottom-ribbon-pill {
  min-width: 5.8rem;
  display: grid;
  justify-items: center;
  gap: 0.08rem;
  padding: 0.48rem 0.62rem 0.54rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 247, 224, 0.08), rgba(255, 247, 224, 0.04));
  border: 1px solid rgba(255, 236, 201, 0.12);
}

.tv-bottom-ribbon-pill strong {
  color: #fff7e1;
  font-size: 1.02rem;
  line-height: 1.08;
  text-align: center;
}

.tv-board-corner {
  position: absolute;
  top: 0.8rem;
  z-index: 3;
  display: grid;
  gap: 0.12rem;
  padding: 0.52rem 0.66rem;
  max-width: min(17rem, calc(100% - 1.6rem));
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(19, 16, 15, 0.7), rgba(7, 11, 14, 0.62)),
    linear-gradient(180deg, rgba(255, 248, 230, 0.08), rgba(255, 248, 230, 0));
  border: 1px solid rgba(255, 230, 177, 0.14);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.tv-board-corner strong {
  font-size: 0.9rem;
  line-height: 1.3;
}

.tv-board-corner span {
  color: rgba(255, 238, 205, 0.8);
  font-size: 0.76rem;
}

.tv-resource-payout {
  display: grid;
  gap: 0.52rem;
  margin: 0;
  padding: 0.82rem 0.88rem 0.9rem;
  min-height: 9.5rem;
  height: 100%;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% -12%, rgba(196, 245, 255, 0.18), transparent 52%),
    linear-gradient(180deg, rgba(31, 81, 90, 0.78), rgba(10, 31, 39, 0.78));
  border: 1px solid rgba(170, 239, 255, 0.36);
  align-content: start;
  box-shadow:
    inset 0 1px 0 rgba(242, 252, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.16);
  contain: layout paint;
}

.tv-right-rail-stack > .tv-resource-payout {
  height: auto;
  min-height: 0;
  padding: 0.74rem 0.78rem 0.82rem;
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(242, 252, 255, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.16);
}

.tv-right-rail-stack > .tv-moment-status-card {
  min-height: 7.2rem;
  align-content: center;
}

.tv-render-mode-performance .tv-resource-payout,
.tv-profile-android-tv .tv-resource-payout {
  background:
    radial-gradient(circle at 50% -12%, rgba(196, 245, 255, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(29, 76, 84, 0.74), rgba(10, 31, 39, 0.72));
  border-color: rgba(170, 239, 255, 0.34);
}

.tv-resource-payout .eyebrow {
  color: rgba(207, 247, 255, 0.94);
}

.tv-resource-payout-rows {
  display: grid;
  gap: 0.48rem;
}

.tv-moment-status-card strong {
  font-size: 1.24rem;
  line-height: 1.12;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.tv-moment-status-card span {
  color: rgba(235, 248, 255, 0.86);
  font-size: 0.94rem;
  line-height: 1.38;
}

.tv-resource-payout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "player cards"
    "icons icons";
  align-items: start;
  gap: 0.34rem 0.54rem;
  padding: 0.48rem 0.52rem;
  border-radius: 16px;
  background: rgba(255, 249, 236, 0.07);
  border: 1px solid rgba(173, 238, 255, 0.14);
}

.tv-resource-payout-player {
  grid-area: player;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.38rem;
  min-width: 0;
}

.tv-resource-payout-player strong {
  font-size: 0.98rem;
  line-height: 1.14;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.tv-resource-payout-dot {
  width: 0.76rem;
  height: 0.76rem;
  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(255, 246, 224, 0.22),
    0 0 0 4px rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.tv-resource-payout-cards {
  grid-area: cards;
  min-width: 4rem;
  display: grid;
  justify-items: center;
  gap: 0.08rem;
  padding: 0.28rem 0.5rem 0.34rem;
  border-radius: 13px;
  background: rgba(8, 19, 23, 0.38);
  border: 1px solid rgba(187, 239, 255, 0.2);
  color: rgba(244, 253, 255, 0.96);
  font-variant-numeric: tabular-nums;
}

.tv-resource-payout-cards small {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(210, 244, 255, 0.72);
}

.tv-resource-payout-cards strong {
  font-size: 1.08rem;
  line-height: 1;
}

.tv-resource-payout-icons {
  grid-area: icons;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.28rem;
  max-width: none;
  padding-left: 1.14rem;
}

.tv-resource-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 2.08rem;
  justify-content: center;
  padding: 0.2rem 0.42rem;
  border-radius: 999px;
  background: rgba(8, 15, 19, 0.58);
  border: 1px solid rgba(189, 239, 255, 0.24);
  color: rgba(246, 250, 255, 0.92);
  font-size: 0.84rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tv-resource-pill img {
  width: 1rem;
  height: 1rem;
}

.tv-resource-pill-count {
  line-height: 1;
}

.tv-board-corner-left {
  left: 0.8rem;
}

.tv-board-corner-right {
  right: 0.8rem;
  top: auto;
  bottom: 0.8rem;
  max-width: min(18rem, calc(100% - 1.6rem));
}

.dice-display-banner {
  grid-template-columns: 1fr;
  gap: 0.34rem;
  transition:
    opacity 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.dice-display-banner.is-rolling {
  opacity: 0.42;
  filter: saturate(0.82) blur(0.45px);
  transform: translateY(2px);
}

.dice-display-banner img {
  width: clamp(5rem, 5.7vw, 6rem);
  height: clamp(5rem, 5.7vw, 6rem);
  padding: 0.64rem;
}

.dice-display-banner .dice-total {
  font-size: 1.22rem;
  font-weight: 900;
}

.tv-dice-moment {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 4;
}

.tv-dice-moment-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.2rem 1.1rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 235, 177, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(30, 19, 14, 0.9), rgba(9, 12, 16, 0.82));
  border: 1px solid rgba(255, 231, 182, 0.18);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.32);
  transform-origin: center;
  contain: layout paint;
  will-change: transform, opacity;
}

.dice-display-cinematic {
  grid-template-columns: repeat(2, 7.8rem);
  gap: 0.55rem;
}

.dice-display-cinematic img {
  width: 7.8rem;
  height: 7.8rem;
  padding: 0.72rem;
  border-radius: 24px;
}

.dice-display-cinematic .dice-total {
  padding: 0.6rem 1rem;
  font-size: 1.4rem;
  font-weight: 900;
}

.tv-dice-moment.is-rolling .tv-dice-moment-card {
  animation: dice-card-roll 520ms ease-out;
}

.tv-dice-moment.is-rolling .dice-display-cinematic img {
  animation: dice-face-roll 680ms linear infinite;
  will-change: transform, filter;
}

.tv-trade-overlay,
.tv-steal-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 4;
}

.tv-trade-overlay-card,
.tv-steal-overlay-card {
  display: grid;
  gap: 0.65rem;
  width: min(34rem, calc(100% - 2rem));
  padding: 1rem 1.15rem 1.1rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top center, rgba(255, 216, 132, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(26, 18, 13, 0.94), rgba(10, 11, 14, 0.88));
  border: 1px solid rgba(255, 229, 178, 0.2);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.32);
  contain: layout paint;
}

.tv-trade-overlay-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
}

.tv-trade-overlay-top strong,
.tv-steal-overlay-card strong {
  display: block;
  font-size: 1.28rem;
  line-height: 1.1;
}

.tv-trade-overlay-top span,
.tv-steal-overlay-card span {
  color: rgba(255, 238, 204, 0.78);
  font-size: 0.86rem;
}

.tv-trade-timer {
  min-width: 4.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 16px;
  text-align: center;
  background: rgba(255, 214, 122, 0.14);
  border: 1px solid rgba(255, 219, 146, 0.22);
}

.tv-trade-timer.is-choice {
  background: rgba(171, 238, 255, 0.12);
  border-color: rgba(171, 238, 255, 0.2);
}

.tv-trade-timer.is-urgent {
  background: rgba(255, 160, 122, 0.18);
  border-color: rgba(255, 181, 142, 0.3);
  box-shadow: 0 0 0 1px rgba(255, 174, 132, 0.08), 0 0 18px rgba(255, 119, 72, 0.18);
}

.tv-trade-timer strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
}

.tv-trade-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tv-trade-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.2rem 0.56rem;
  border-radius: 999px;
  background: rgba(255, 249, 239, 0.08);
  border: 1px solid rgba(255, 228, 176, 0.12);
  color: rgba(255, 242, 215, 0.84);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tv-trade-summary-chip.tone-accepted {
  border-color: rgba(171, 238, 255, 0.28);
  background: rgba(171, 238, 255, 0.11);
}

.tv-trade-summary-chip.tone-pending {
  border-color: rgba(255, 218, 145, 0.2);
}

.tv-trade-summary-chip.tone-declined {
  border-color: rgba(255, 165, 165, 0.22);
  color: rgba(255, 215, 215, 0.74);
}

.tv-trade-offer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.tv-trade-offer-card {
  display: grid;
  gap: 0.42rem;
  padding: 0.7rem 0.8rem;
  border-radius: 18px;
  background: rgba(255, 249, 239, 0.08);
  border: 1px solid rgba(255, 228, 176, 0.12);
}

.tv-trade-offer-card span {
  color: rgba(255, 237, 205, 0.68);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tv-trade-resource-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.tv-trade-resource-panel {
  display: grid;
  gap: 0.22rem;
}

.tv-trade-resource-panel small {
  color: rgba(255, 236, 198, 0.66);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tv-trade-resource-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.16rem 0.38rem;
  border-radius: 999px;
  background: rgba(10, 12, 15, 0.46);
  border: 1px solid rgba(255, 228, 176, 0.12);
}

.tv-trade-resource-pill img {
  width: 0.92rem;
  height: 0.92rem;
}

.tv-trade-resource-pill strong,
.tv-trade-response-player strong {
  font-size: 0.86rem;
}

.tv-trade-empty {
  color: rgba(255, 237, 205, 0.58);
  font-size: 0.86rem;
}

.tv-trade-response-list {
  display: grid;
  gap: 0.36rem;
}

.tv-trade-response {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.64rem;
  border-radius: 16px;
  background: rgba(255, 249, 239, 0.06);
  border: 1px solid rgba(255, 228, 176, 0.1);
}

.tv-trade-response-accepted {
  border-color: rgba(171, 238, 255, 0.22);
  background: rgba(171, 238, 255, 0.09);
}

.tv-trade-response-declined {
  border-color: rgba(255, 165, 165, 0.2);
  background: rgba(255, 165, 165, 0.07);
}

.tv-trade-response-pending {
  border-color: rgba(255, 228, 176, 0.18);
  background: rgba(255, 225, 166, 0.07);
}

.tv-trade-response-player {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.tv-trade-response-dot {
  width: 0.54rem;
  height: 0.54rem;
  border-radius: 999px;
}

.tv-trade-response-status {
  color: rgba(255, 238, 204, 0.76);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tv-player-rail {
  padding: 0.42rem 0.54rem;
  background:
    linear-gradient(180deg, rgba(58, 35, 20, 0.96), rgba(21, 14, 11, 0.97)),
    url("/assets/art/universe/table-wood.png");
  background-size: cover;
  background-position: center;
}

.tv-premium-layout .tableau-strip {
  gap: 0;
  align-items: stretch;
}

.tv-premium-layout .tableau-card {
  min-height: 4.72rem;
  padding: 0.24rem 0.28rem 0.3rem;
  gap: 0.42rem;
  border-radius: 22px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 225, 158, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(62, 41, 29, 0.96), rgba(18, 17, 22, 0.96));
  border-color: rgba(255, 231, 186, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 24px rgba(0, 0, 0, 0.2);
}

.tv-premium-layout .tableau-avatar {
}

.tv-premium-layout .tableau-active-slot .tableau-card {
  min-height: 0;
  height: 100%;
  padding-top: 0.52rem;
  border-top-right-radius: 0;
}

.tv-premium-layout .tableau-active-slot .tableau-shell {
  justify-content: space-between;
}

.tv-premium-layout .tableau-inactive-stack {
  gap: 0;
}

.tv-premium-layout .tableau-inactive-stack .tableau-card {
  min-height: 0;
  height: auto;
  aspect-ratio: 1 / 1;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.tv-premium-layout .tableau-card.is-muted {
  opacity: 0.72;
  filter: saturate(0.82) brightness(0.92);
}

.tv-premium-layout .tableau-card.is-watch {
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 226, 165, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(78, 48, 25, 0.98), rgba(35, 22, 15, 0.99)),
    url("/assets/art/universe/table-wood.png");
  border-color: rgba(255, 226, 165, 0.18);
}

.tv-premium-layout .tableau-card.is-threat {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 154, 136, 0.18), transparent 36%),
    radial-gradient(circle at 0% 0%, rgba(255, 226, 165, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(86, 40, 28, 0.98), rgba(38, 20, 15, 0.99)),
    url("/assets/art/universe/table-wood.png");
  border-color: rgba(255, 164, 148, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.22);
}

.tv-premium-layout .tableau-card.is-next {
  border-color: rgba(173, 233, 255, 0.26);
}

.tableau-shell-empty {
  min-height: 100%;
}

.tv-premium-layout .tableau-active-name {
  min-height: 2.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.34rem;
  padding-bottom: 0.42rem;
}

.tv-side-panel-split {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.48rem;
}

.tv-match-log-section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.4rem;
}

.tv-match-log-subtitle {
  color: rgba(255, 239, 210, 0.82);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.02em;
}

.tv-match-log-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.36rem;
  overflow: hidden;
}

.tv-match-log-item {
  min-height: 3.72rem;
  padding: 0.52rem 0.58rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.44rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(31, 24, 20, 0.86), rgba(10, 11, 14, 0.78)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 228, 176, 0.16);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  contain: layout paint;
}

.tv-match-log-item.is-first {
  background:
    radial-gradient(circle at 0% 50%, rgba(255, 209, 112, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(76, 46, 20, 0.92), rgba(28, 18, 12, 0.86)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  border-color: rgba(255, 216, 128, 0.3);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 214, 122, 0.08);
}

.tv-match-log-item.is-first .tv-match-log-turn {
  background: rgba(255, 223, 156, 0.16);
  border-color: rgba(255, 220, 144, 0.26);
  color: #ffe7b4;
}

.tv-match-log-item.is-first strong {
  color: #fff1c9;
}

.tv-match-log-turn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.52rem;
  height: 1.84rem;
  padding: 0 0.52rem;
  border-radius: 999px;
  background: rgba(255, 241, 205, 0.08);
  border: 1px solid rgba(255, 228, 176, 0.14);
  color: rgba(255, 228, 176, 0.88);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.tv-match-log-item strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.24;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.tv-side-player-section {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.42rem;
}

.tv-side-player-section-subtitle {
  color: rgba(255, 239, 210, 0.82);
  font-size: 0.92rem;
  line-height: 1.34;
}

.tv-player-summary-list {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  overflow: hidden;
}

.tv-player-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(5.7rem, auto);
  align-items: center;
  gap: 0.62rem;
  padding: 0.66rem 0.74rem;
  border-radius: 18px;
  background: rgba(12, 13, 16, 0.38);
  border: 1px solid rgba(255, 229, 173, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 244, 218, 0.04);
  contain: layout paint;
}

.tv-player-summary.is-active {
  background:
    radial-gradient(circle at 0% 50%, rgba(255, 213, 118, 0.16), transparent 40%),
    rgba(24, 19, 15, 0.58);
  border-color: rgba(255, 218, 131, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 218, 131, 0.22);
}

.tv-player-summary.is-next {
  background:
    radial-gradient(circle at 0% 50%, rgba(173, 233, 255, 0.16), transparent 40%),
    rgba(12, 16, 20, 0.5);
  border-color: rgba(173, 233, 255, 0.26);
}

.tv-player-summary-color {
  width: 0.72rem;
  height: 3.36rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 248, 225, 0.14);
}

.tv-player-summary-copy {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.tv-player-summary-copy strong {
  font-size: 1rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.tv-player-summary-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.18rem 0.44rem;
  border-radius: 999px;
  background: rgba(255, 243, 214, 0.08);
  border: 1px solid rgba(255, 229, 173, 0.14);
  color: rgba(255, 239, 210, 0.82);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-player-summary.is-active .tv-player-summary-status {
  background: rgba(255, 219, 131, 0.14);
  border-color: rgba(255, 219, 131, 0.26);
  color: #ffeecb;
}

.tv-player-summary.is-next .tv-player-summary-status {
  background: rgba(173, 233, 255, 0.12);
  border-color: rgba(173, 233, 255, 0.24);
  color: rgba(227, 247, 255, 0.96);
}

.tv-player-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.22rem;
  min-width: 5.7rem;
}

.tv-player-summary-stat {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  padding: 0.28rem 0.28rem 0.3rem;
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(18, 25, 30, 0.5), rgba(8, 14, 18, 0.34));
  border: 1px solid rgba(255, 229, 173, 0.14);
  color: rgba(255, 246, 219, 0.96);
}

.tv-player-summary-stat small {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 232, 190, 0.72);
}

.tv-player-summary-stat strong {
  font-size: 0.98rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1366px) {
  .tv-ticker-bar-inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 6.88fr) minmax(0, 2.04fr);
  }

  .tv-turn-card {
    padding: 0.86rem 0.88rem 0.92rem;
  }

  .tv-turn-card-chip {
    min-height: 3.78rem;
  }

  .tv-board-hero-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .tv-board-hero-metrics {
    width: 100%;
  }
}

.tv-premium-layout .tableau-card.is-active {
  box-shadow:
    0 0 0 2px rgba(255, 218, 131, 0.48),
    0 18px 36px rgba(0, 0, 0, 0.22);
}

.tv-premium-layout .tableau-card.tone-blue {
  box-shadow: inset 0 4px 0 #3b7cd9, inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.tv-premium-layout .tableau-card.tone-red {
  box-shadow: inset 0 4px 0 #da655d, inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.tv-premium-layout .tableau-card.tone-white {
  box-shadow: inset 0 4px 0 #d8d1c5, inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.tv-premium-layout .tableau-card.tone-orange {
  box-shadow: inset 0 4px 0 #d79b4e, inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.tv-premium-layout .tableau-card.is-resource {
  animation: player-spotlight-resource 1s ease-out;
  will-change: opacity, box-shadow;
}

.tv-premium-layout .tableau-card.is-build {
  animation: player-spotlight-build 0.9s ease-out;
  will-change: opacity, box-shadow;
}

.tv-premium-layout .tableau-card.is-achievement {
  animation: player-spotlight-achievement 1.1s ease-out;
  will-change: opacity, box-shadow;
}

.tv-premium-layout .tableau-card.is-robber {
  animation: player-spotlight-robber 1s ease-out;
  will-change: opacity, box-shadow;
}

@keyframes tv-ticker-message-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tile-production-pulse {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }

  30% {
    opacity: 1;
    transform: scale(1.02);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes board-token-hit {
  0% {
    transform: scale(0.92);
  }

  45% {
    transform: scale(1.14);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes robber-target-pulse {
  0% {
    transform: scale(0.86);
    opacity: 0.3;
  }

  55% {
    transform: scale(1.12);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

@keyframes road-build-reveal {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes build-ring-bloom {
  0% {
    opacity: 0;
    transform: scale(0.45);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes build-piece-pop {
  0% {
    transform: scale(0.68);
    opacity: 0.2;
  }

  75% {
    transform: scale(1.08);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

@keyframes dice-card-roll {
  0% {
    transform: translateY(26px) scale(0.84);
    opacity: 0;
  }

  65% {
    transform: translateY(-4px) scale(1.03);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes dice-face-roll {
  0% {
    transform: translateY(-1px) rotate(-14deg) scale(0.9);
    filter: blur(0.35px) saturate(0.92);
  }

  50% {
    transform: translateY(2px) rotate(13deg) scale(1.04);
    filter: blur(0.8px) saturate(1.06);
  }

  100% {
    transform: translateY(-1px) rotate(-14deg) scale(0.9);
    filter: blur(0.35px) saturate(0.92);
  }
}

@keyframes player-spotlight-resource {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 225, 136, 0);
  }

  40% {
    box-shadow: 0 0 0 2px rgba(255, 225, 136, 0.46), 0 0 28px rgba(255, 225, 136, 0.22);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 225, 136, 0);
  }
}

@keyframes player-spotlight-build {
  0% {
    box-shadow: 0 0 0 0 rgba(171, 238, 255, 0);
  }

  40% {
    box-shadow: 0 0 0 2px rgba(171, 238, 255, 0.42), 0 0 28px rgba(171, 238, 255, 0.2);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(171, 238, 255, 0);
  }
}

@keyframes player-spotlight-achievement {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 209, 104, 0);
  }

  45% {
    box-shadow: 0 0 0 2px rgba(255, 209, 104, 0.56), 0 0 36px rgba(255, 209, 104, 0.24);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 209, 104, 0);
  }
}

@keyframes player-spotlight-robber {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 144, 144, 0);
  }

  40% {
    box-shadow: 0 0 0 2px rgba(255, 144, 144, 0.46), 0 0 28px rgba(255, 144, 144, 0.2);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 144, 144, 0);
  }
}

@media (max-width: 900px) {
  body:not(.tv-body) .tv-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  body:not(.tv-body) .broadcast-hero {
    grid-template-columns: 1fr;
  }

  body:not(.tv-body) .broadcast-hero.is-live {
    grid-template-columns: 1fr;
  }

  body:not(.tv-body) {
    overflow: auto;
  }

  body:not(.tv-body) .app-shell.route-tv {
    height: auto;
    overflow: visible;
  }

  body:not(.tv-body) .tv-layout-live {
    grid-template-columns: 1fr;
  }

  body:not(.tv-body) .tv-premium-layout {
    height: auto;
    min-height: 100dvh;
  }

  body:not(.tv-body) .tv-table-stage {
    grid-template-columns: 1fr;
  }

  body:not(.tv-body) .tv-edge-stack {
    grid-auto-flow: column;
    align-content: start;
    overflow: auto hidden;
  }

  body:not(.tv-body) .tv-premium-layout .tableau-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-aspect-ratio: 16/10) and (min-width: 1120px) {
  .broadcast-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) 13rem;
  }

  .hero-copy p:last-child,
  .hero-prompt {
    font-size: 0.88rem;
  }

  .qr-image,
  .qr-fallback {
    width: min(100%, 9.5rem);
  }
}

@media (max-width: 900px) {
}

@media (max-width: 768px) {
  body:not(.tv-body) .tv-layout {
    padding: 0.85rem;
  }

  body:not(.tv-body) .board-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  body:not(.tv-body) .tv-turn-banner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  body:not(.tv-body) .tv-turn-meta {
    justify-items: center;
  }

  body:not(.tv-body) .tv-board-corner {
    max-width: calc(100% - 1.2rem);
  }

  body:not(.tv-body) .tv-premium-layout .tableau-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
}

body.tv-body .app-shell.route-tv {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body.tv-body .tv-stage-shell,
body.tv-body .tv-stage-wrap,
body.tv-body .tv-stage-frame,
body.tv-body .tv-premium-layout,
body.tv-body .tv-live-columns {
  height: 100%;
  min-height: 100%;
}

/* TV board redesign: Apple-style hierarchy, material, and couch-distance legibility. */
body.tv-body {
  background: #050608;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.94);
}

body.tv-body .tv-premium-layout {
  --tv-safe-pad-x: 0.7rem;
  --tv-safe-pad-y: 0.7rem;
  --tv-left-board-seam-overlap: 0;
  --tv-panel-radius: 30px;
  --tv-card-radius: 22px;
  --tv-copy-strong: rgba(255, 255, 255, 0.96);
  --tv-copy-muted: rgba(235, 242, 248, 0.72);
  --tv-copy-label: rgba(255, 214, 128, 0.92);
  background:
    radial-gradient(circle at 49% 42%, rgba(0, 179, 255, 0.16), transparent 35%),
    radial-gradient(circle at 18% 18%, rgba(255, 183, 77, 0.13), transparent 28%),
    radial-gradient(circle at 86% 80%, rgba(72, 209, 204, 0.12), transparent 32%),
    linear-gradient(180deg, #17191e 0%, #0b0d12 54%, #050608 100%);
  letter-spacing: 0;
}

body.tv-body .tv-premium-layout::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 17%),
    radial-gradient(circle at 50% 110%, rgba(0, 0, 0, 0.72), transparent 42%);
  opacity: 1;
}

body.tv-body .tv-premium-layout::after {
  inset: 0.42rem;
  border-radius: 34px;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 42px 120px rgba(255, 255, 255, 0.025);
}

body.tv-body .tv-live-columns {
  grid-template-columns: minmax(13rem, 14.2rem) minmax(0, 1fr) minmax(20.8rem, 22.4rem);
  gap: 0.7rem;
}

body.tv-body .tv-side-rail-left,
body.tv-body .tv-side-rail-right {
  margin: 0;
}

body.tv-body .tv-side-rail-shell {
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.055)),
    rgba(20, 22, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.045),
    0 24px 54px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(28px) saturate(1.35);
}

body.tv-body .tv-side-rail-shell::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 36%);
}

body.tv-body .tv-side-rail-shell-left,
body.tv-body .tv-side-rail-shell-right {
  border-radius: 30px;
}

body.tv-body .tv-side-rail-shell-right {
  padding: 0.72rem;
}

body.tv-body .tv-board-stage {
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

body.tv-body .tv-board-stage-hero {
  background:
    var(--tv-sea-glyph),
    radial-gradient(circle at 50% 49%, rgba(220, 253, 255, 0.48) 0%, rgba(92, 190, 220, 0.72) 27%, rgba(37, 117, 151, 0.84) 57%, rgba(16, 48, 69, 0.98) 100%),
    linear-gradient(180deg, #7fd9ef, #276f97 58%, #14394e);
  background-size: 210px 210px, auto, auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    0 30px 70px rgba(0, 0, 0, 0.36);
}

body.tv-body .tv-board-stage-hero::before {
  background:
    radial-gradient(circle at 50% 49%, rgba(255, 255, 255, 0.16), transparent 37%),
    radial-gradient(circle at 50% 58%, transparent 42%, rgba(3, 18, 27, 0.22) 78%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.18));
}

body.tv-body .tv-board-stage-hero::after {
  border-radius: 34px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 0 120px rgba(6, 22, 32, 0.22);
}

body.tv-body .tv-board-stage .board-shell,
body.tv-body .tv-board-stage-hero .board-shell {
  border-radius: 34px;
}

body.tv-body .tv-board-stage-hero .board-base-canvas,
body.tv-body .tv-board-stage-hero .board-base-image,
body.tv-body .tv-board-stage-hero .board-svg {
  filter: saturate(1.06) contrast(1.06) brightness(1.02);
}

body.tv-body .hex-texture-image {
  filter: saturate(1.08) contrast(1.08) brightness(1.035);
}

body.tv-body .hex-texture-image.is-blocked {
  filter: brightness(0.62) saturate(0.74) contrast(1);
}

body.tv-body .board-frame-water {
  fill: #4db5d2;
}

body.tv-body .board-beach {
  fill: rgba(231, 207, 145, 0.98);
  stroke: rgba(95, 73, 38, 0.28);
  stroke-width: 2.2;
}

body.tv-body .tile-frame {
  stroke: rgba(255, 245, 218, 0.84);
  stroke-width: 3.6;
  filter: drop-shadow(0 4px 6px rgba(59, 38, 14, 0.18));
}

body.tv-body .tile-robber-dim {
  fill: rgba(8, 8, 10, 0.46);
  stroke: rgba(255, 255, 255, 0.16);
}

body.tv-body .board-number-ring {
  fill: rgba(255, 190, 78, 0.96);
  stroke: rgba(82, 49, 17, 0.5);
  stroke-width: 2.6;
  filter: drop-shadow(0 7px 10px rgba(45, 25, 8, 0.22));
}

body.tv-body .board-number-center {
  fill: rgba(255, 249, 234, 0.98);
  stroke: rgba(142, 99, 34, 0.32);
  stroke-width: 1.4;
}

body.tv-body .board-number {
  fill: #1d1308;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  font-size: 1.82rem;
  font-weight: 900;
  stroke: rgba(255, 252, 245, 0.84);
  stroke-width: 1;
  letter-spacing: 0;
}

body.tv-body .board-token.is-hot .board-number-ring {
  fill: rgba(255, 181, 64, 0.98);
  stroke: rgba(124, 33, 20, 0.68);
}

body.tv-body .board-token.is-hot .board-number {
  fill: #bd352b;
}

body.tv-body .board-number-pip,
body.tv-body .board-token.is-hot .board-number-pip {
  fill: currentColor;
}

body.tv-body .board-token {
  color: rgba(106, 70, 30, 0.88);
}

body.tv-body .board-token.is-hot {
  color: #bd352b;
}

body.tv-body .robber-aura {
  fill: rgba(0, 0, 0, 0.28);
  stroke: rgba(255, 255, 255, 0.3);
  filter: drop-shadow(0 0 18px rgba(0, 0, 0, 0.34));
}

body.tv-body .robber-token {
  fill: rgba(16, 17, 20, 0.98);
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 3.4;
}

body.tv-body .road-outline {
  stroke: rgba(53, 31, 18, 0.92);
}

body.tv-body .road-top,
body.tv-body .piece-shape {
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.2));
}

body.tv-body .tv-right-rail-stack {
  grid-template-rows: auto auto minmax(0, auto) minmax(0, 1fr);
  gap: 0.62rem;
}

body.tv-body .tv-resource-payout,
body.tv-body .tv-right-workbench {
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(23, 26, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(24px) saturate(1.24);
}

body.tv-body .tv-right-rail-stack > .tv-resource-payout {
  padding: 0.82rem 0.86rem 0.9rem;
  border-radius: 24px;
}

body.tv-body .tv-right-rail-stack > .tv-moment-status-card {
  min-height: 7.8rem;
  align-content: center;
}

body.tv-body .tv-moment-status-card {
  --moment-accent: rgba(10, 132, 255, 0.96);
  gap: 0.46rem;
}

body.tv-body .tv-moment-status-card.tone-success {
  --moment-accent: rgba(48, 209, 88, 0.96);
}

body.tv-body .tv-moment-status-card.tone-warning {
  --moment-accent: rgba(255, 159, 10, 0.96);
}

body.tv-body .tv-moment-status-card.tone-danger {
  --moment-accent: rgba(255, 69, 58, 0.96);
}

body.tv-body .tv-moment-status-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

body.tv-body .tv-moment-status-orb {
  width: 0.64rem;
  height: 0.64rem;
  border-radius: 999px;
  background: var(--moment-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--moment-accent) 17%, transparent);
  flex: 0 0 auto;
}

body.tv-body .tv-resource-payout .eyebrow {
  color: rgba(235, 242, 248, 0.72);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

body.tv-body .tv-moment-status-card strong {
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.28rem;
  line-height: 1.08;
  text-shadow: none;
}

body.tv-body .tv-moment-status-card span {
  color: rgba(235, 242, 248, 0.72);
  font-size: 0.91rem;
  line-height: 1.34;
}

body.tv-body .tv-resource-payout-row,
body.tv-body .tv-match-log-item {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

body.tv-body .tv-match-log-item.is-first {
  background:
    linear-gradient(180deg, rgba(255, 183, 77, 0.16), rgba(255, 255, 255, 0.07)),
    rgba(26, 29, 35, 0.72);
  border-color: rgba(255, 183, 77, 0.28);
}

body.tv-body .tv-match-log-turn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(235, 242, 248, 0.8);
}

body.tv-body .tv-match-log-item strong,
body.tv-body .tv-resource-payout-player strong {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: none;
}

body.tv-body .tv-match-log-subtitle,
body.tv-body .tv-side-player-section-subtitle {
  color: rgba(235, 242, 248, 0.68);
}

body.tv-body .tv-resource-payout-cards,
body.tv-body .tv-resource-pill {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.12);
}

body.tv-body .tv-premium-layout .tableau-strip {
  gap: 0.54rem;
}

body.tv-body .tv-premium-layout .tableau-card {
  --tableau-player-color: rgba(255, 214, 128, 0.96);
  border-radius: 24px;
  padding: 0.54rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(22, 24, 30, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(20px) saturate(1.25);
}

body.tv-body .tv-premium-layout .tableau-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tableau-player-color) 26%, transparent);
}

body.tv-body .tableau-card {
  position: relative;
}

body.tv-body .tv-premium-layout .tableau-card.is-active {
  border-color: color-mix(in srgb, var(--tableau-player-color) 52%, rgba(255, 255, 255, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 22px 46px rgba(0, 0, 0, 0.28),
    0 0 0 1px color-mix(in srgb, var(--tableau-player-color) 32%, transparent),
    0 0 38px color-mix(in srgb, var(--tableau-player-color) 18%, transparent);
}

body.tv-body .tv-premium-layout .tableau-inactive-stack {
  gap: 0.54rem;
}

body.tv-body .tv-premium-layout .tableau-inactive-stack .tableau-card {
  aspect-ratio: 1 / 0.92;
  padding: 0.42rem;
}

body.tv-body .tv-premium-layout .tableau-active-slot .tableau-card {
  padding-top: 0.62rem;
}

body.tv-body .tableau-active-name,
body.tv-body .tableau-inactive-name {
  color: rgba(255, 255, 255, 0.96);
  background: transparent;
  border-bottom: 0;
  border-radius: 0;
  letter-spacing: 0;
  text-shadow: none;
}

body.tv-body .tableau-active-name {
  min-height: 2rem;
  padding: 0.16rem 0.12rem 0.02rem;
  font-size: 1.18rem;
  font-weight: 800;
}

body.tv-body .tableau-inactive-name {
  padding: 0.02rem 0.08rem 0;
  font-size: 0.9rem;
  font-weight: 760;
}

body.tv-body .tableau-vp-track {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.11rem;
  padding: 0.16rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.11);
  overflow: hidden;
}

body.tv-body .tableau-vp-track-active {
  margin-bottom: 0.1rem;
}

body.tv-body .tableau-vp-track-fill {
  position: absolute;
  inset: 0;
  width: var(--tableau-vp-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tableau-player-color) 72%, transparent), color-mix(in srgb, var(--tableau-player-color) 28%, rgba(255, 255, 255, 0.16)));
  opacity: 0.38;
}

body.tv-body .tableau-vp-track span {
  position: relative;
  z-index: 1;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

body.tv-body .tableau-vp-track span.is-filled {
  background: color-mix(in srgb, var(--tableau-player-color) 82%, white 18%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tableau-player-color) 26%, transparent);
}

body.tv-body .tableau-vp-track-compact span {
  height: 0.34rem;
}

body.tv-body .tableau-active-cards,
body.tv-body .tableau-inactive-cards,
body.tv-body .tableau-inactive-stats,
body.tv-body .tableau-active-timer {
  border-color: rgba(255, 255, 255, 0.1);
}

body.tv-body .tableau-active-cards {
  padding: 0.38rem 0.2rem 0.62rem;
  gap: 0.6rem;
}

body.tv-body .tableau-active-stats {
  gap: 0.22rem;
}

body.tv-body .tableau-active-stat-row {
  padding: 0.4rem 0.16rem;
  border-color: rgba(255, 255, 255, 0.08);
}

body.tv-body .tableau-active-stat-label {
  color: rgba(235, 242, 248, 0.74);
}

body.tv-body .tableau-active-stat-row strong,
body.tv-body .tableau-inactive-metric strong,
body.tv-body .tableau-active-card-counter strong,
body.tv-body .tableau-active-timer strong {
  color: rgba(255, 255, 255, 0.96);
}

body.tv-body .tableau-active-stat-icon {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 214, 128, 0.96);
}

body.tv-body .tableau-active-stat-row.is-highlighted,
body.tv-body .tableau-inactive-metric.is-highlighted {
  background: rgba(255, 183, 77, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 183, 77, 0.26);
}

body.tv-body .tableau-active-stat-row.is-army-highlighted,
body.tv-body .tableau-inactive-metric.is-army-highlighted {
  background: rgba(10, 132, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.26);
}

body.tv-body .tableau-active-timer-label {
  color: rgba(235, 242, 248, 0.58);
}

body.tv-body .tableau-card-icon-back,
body.tv-body .tableau-card-icon-front,
body.tv-body .tableau-card-icon-stack:not(.is-development)::before,
body.tv-body .tableau-compact-card-back,
body.tv-body .tableau-compact-card-front {
  border-color: rgba(255, 255, 255, 0.14);
}

body.tv-body .tv-premium-layout .tableau-strip {
  grid-template-rows: minmax(24rem, 1fr) auto;
}

body.tv-body .tv-premium-layout .tableau-inactive-stack {
  align-content: end;
}

body.tv-body .tv-premium-layout .tableau-inactive-stack .tableau-card {
  min-height: 10.55rem;
  aspect-ratio: auto;
}

body.tv-body .tableau-shell-empty {
  grid-template-rows: auto auto minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.32rem;
}

body.tv-body .tableau-inactive-cards {
  padding: 0.16rem 0.02rem 0.12rem;
}

body.tv-body .tableau-inactive-stats {
  padding: 0.14rem 0.04rem 0;
}

body.tv-body .tableau-active-card-counter {
  gap: 0.34rem;
}

body.tv-body .tableau-card-icon-stack {
  width: 2.5rem;
  height: 3.1rem;
}

body.tv-body .tableau-active-timer {
  padding-bottom: 0.04rem;
}

body.tv-body .tv-right-workbench {
  padding: 0.78rem;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.58rem;
}

body.tv-body .tv-right-workbench-header {
  padding: 0.02rem 0.08rem;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.tv-body .tv-right-workbench-header h3 {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: 0;
}

body.tv-body .tv-right-workbench-list {
  gap: 0.5rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.tv-body .tv-right-log-card,
body.tv-body .tv-right-log-card.is-latest,
body.tv-body .tv-right-log-card.is-current-turn {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045)),
    rgba(20, 22, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
  overflow: hidden;
}

body.tv-body .tv-right-log-card.is-latest {
  border-color: rgba(255, 183, 77, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 183, 77, 0.14), rgba(255, 255, 255, 0.055)),
    rgba(25, 27, 33, 0.74);
}

body.tv-body .tv-right-log-card.is-current-turn {
  border-color: rgba(10, 132, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(10, 132, 255, 0.14), rgba(255, 255, 255, 0.05)),
    rgba(25, 27, 33, 0.74);
}

body.tv-body .tv-right-log-turn,
body.tv-body .tv-right-log-card.is-latest .tv-right-log-turn,
body.tv-body .tv-right-log-card.is-current-turn .tv-right-log-turn {
  min-width: 2.72rem;
  background: rgba(255, 255, 255, 0.07);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(235, 242, 248, 0.72);
  font-size: 0.9rem;
  font-weight: 760;
}

body.tv-body .tv-right-log-card.is-latest .tv-right-log-turn {
  color: rgba(255, 214, 128, 0.96);
}

body.tv-body .tv-right-log-copy {
  padding: 0.54rem 0.62rem 0.6rem;
}

body.tv-body .tv-right-log-copy p,
body.tv-body .tv-right-log-card.is-latest .tv-right-log-copy p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.28;
}

body.tv-body .tv-right-log-letter,
body.tv-body .tv-right-log-card.is-latest .tv-right-log-letter {
  color: rgba(235, 242, 248, 0.58);
  font-size: 0.98rem;
  font-weight: 760;
  letter-spacing: 0;
}

body.tv-body .tv-right-workbench-empty {
  min-height: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(235, 242, 248, 0.62);
}

body.tv-body .tv-live-columns {
  grid-template-columns: minmax(15.2rem, 16.1rem) minmax(0, 1fr) minmax(18.4rem, 19.4rem);
}

body.tv-body .tv-side-rail-shell-left {
  padding: 0.7rem;
}

body.tv-body .tv-race-rail {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.72rem;
}

body.tv-body .tv-race-active,
body.tv-body .tv-race-row {
  --race-player-color: rgba(255, 214, 128, 0.96);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.052)),
    rgba(20, 22, 28, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 30px rgba(0, 0, 0, 0.22);
}

body.tv-body .tv-race-active::before,
body.tv-body .tv-race-row::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--race-player-color) 23%, transparent), transparent 46%),
    linear-gradient(90deg, color-mix(in srgb, var(--race-player-color) 18%, transparent), transparent 28%);
  opacity: 0.88;
}

body.tv-body .tv-race-active {
  display: grid;
  gap: 0.7rem;
  padding: 0.88rem;
  border-radius: 26px;
  border-color: color-mix(in srgb, var(--race-player-color) 42%, rgba(255, 255, 255, 0.16));
}

body.tv-body .tv-race-active > *,
body.tv-body .tv-race-row > * {
  position: relative;
  z-index: 1;
}

body.tv-body .tv-race-active-kicker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.42rem;
  color: rgba(235, 242, 248, 0.64);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.tv-body .tv-race-active-kicker strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

body.tv-body .tv-race-color-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: var(--race-player-color);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 18px color-mix(in srgb, var(--race-player-color) 42%, transparent);
  flex: 0 0 auto;
}

body.tv-body .tv-race-active-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.64rem;
}

body.tv-body .tv-race-active-main strong {
  min-width: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.54rem;
  font-weight: 820;
  line-height: 1.02;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tv-body .tv-race-active-main span {
  color: color-mix(in srgb, var(--race-player-color) 64%, white 36%);
  font-size: 1.16rem;
  font-weight: 860;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

body.tv-body .tv-race-active-track,
body.tv-body .tv-race-row-track {
  height: 0.46rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

body.tv-body .tv-race-active-track span,
body.tv-body .tv-race-row-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--race-player-color), color-mix(in srgb, var(--race-player-color) 52%, white 48%));
  box-shadow: 0 0 20px color-mix(in srgb, var(--race-player-color) 28%, transparent);
}

body.tv-body .tv-race-active-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.38rem;
}

body.tv-body .tv-race-active-metrics div {
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  padding: 0.38rem 0.2rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.072);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

body.tv-body .tv-race-active-metrics small,
body.tv-body .tv-race-row-metrics {
  color: rgba(235, 242, 248, 0.6);
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.tv-body .tv-race-active-metrics strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

body.tv-body .tv-race-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.56rem;
  overflow: hidden;
}

body.tv-body .tv-race-row {
  display: grid;
  gap: 0.42rem;
  padding: 0.66rem 0.72rem;
  border-radius: 22px;
}

body.tv-body .tv-race-row.is-active {
  border-color: color-mix(in srgb, var(--race-player-color) 48%, rgba(255, 255, 255, 0.16));
}

body.tv-body .tv-race-row.is-next {
  border-color: color-mix(in srgb, var(--tv-next-color, #8fd7ff) 38%, rgba(255, 255, 255, 0.16));
}

body.tv-body .tv-race-row-top {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.44rem;
}

body.tv-body .tv-race-row-top strong {
  min-width: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.96rem;
  font-weight: 780;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tv-body .tv-race-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.16rem 0.4rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

body.tv-body .tv-race-row-track {
  height: 0.34rem;
}

body.tv-body .tv-race-row-track span {
  width: var(--race-vp-progress, 0%);
}

body.tv-body .tv-race-row-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
}

body.tv-body .tv-race-row-metrics strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

body.tv-body .tv-board-context-plate {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 0.48rem;
  max-width: min(28rem, calc(100% - 5.5rem));
  min-height: 2.44rem;
  padding: 0.46rem 0.68rem;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.075)),
    rgba(16, 18, 23, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(24px) saturate(1.25);
}

body.tv-body .tv-board-context-plate strong {
  min-width: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tv-body .tv-board-context-plate span:last-child {
  color: rgba(235, 242, 248, 0.68);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

body.tv-body .tv-board-probability-dock {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 0.16rem;
  width: 100%;
  padding: 0.34rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.065)),
    rgba(16, 18, 23, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 16px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px) saturate(1.22);
}

body.tv-body .tv-board-probability-chip {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.04rem;
  min-height: 2rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(235, 242, 248, 0.7);
}

body.tv-body .tv-board-probability-chip strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 860;
  font-variant-numeric: tabular-nums;
}

body.tv-body .tv-board-probability-chip span {
  color: currentColor;
  font-size: 0.46rem;
  line-height: 1;
  letter-spacing: 0;
}

body.tv-body .tv-board-probability-chip.is-hot {
  color: rgba(255, 159, 10, 0.94);
}

body.tv-body .tv-board-probability-chip.is-robber {
  color: rgba(255, 69, 58, 0.94);
}

body.tv-body .tv-board-probability-chip.is-active {
  color: rgba(255, 255, 255, 0.98);
  background: color-mix(in srgb, var(--tv-active-color, #ffd280) 46%, rgba(255, 255, 255, 0.1));
  border-color: color-mix(in srgb, var(--tv-active-color, #ffd280) 46%, rgba(255, 255, 255, 0.18));
  box-shadow: 0 0 24px color-mix(in srgb, var(--tv-active-color, #ffd280) 24%, transparent);
}

/* Catan-inspired art direction: warm tabletop materials with Apple-level hierarchy. */
body.tv-body .tv-premium-layout {
  --catan-gold: #e1aa4f;
  --catan-gold-soft: #ffd98a;
  --catan-ink: #2b190c;
  --catan-cream: #fff1cf;
  --catan-parchment: #f3d9a6;
  --catan-panel: rgba(44, 24, 13, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 236, 178, 0.045), transparent 20%),
    url("/assets/art/universe/table-wood.png") center / 720px 720px repeat,
    linear-gradient(180deg, #20130b 0%, #110b08 58%, #070707 100%);
}

body.tv-body .tv-premium-layout::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.34)),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.26) 100%);
  opacity: 1;
  mix-blend-mode: normal;
}

body.tv-body .tv-premium-layout::after {
  border-color: rgba(255, 222, 148, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(255, 245, 213, 0.05),
    inset 0 0 92px rgba(42, 19, 8, 0.34);
}

body.tv-body .tv-side-rail-shell {
  background:
    linear-gradient(180deg, rgba(255, 236, 186, 0.12), rgba(35, 18, 9, 0.28)),
    url("/assets/art/universe/table-wood.png") center / 560px 560px repeat,
    linear-gradient(180deg, #4b2a15, #1b0f08);
  border-color: rgba(255, 222, 151, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 199, 0.16),
    inset 0 0 0 1px rgba(85, 43, 18, 0.44),
    0 18px 38px rgba(13, 6, 3, 0.34);
  backdrop-filter: none;
}

body.tv-body .tv-side-rail-shell::before {
  background:
    linear-gradient(90deg, rgba(255, 237, 187, 0.08), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.2)),
    radial-gradient(circle at 50% -8%, rgba(255, 221, 133, 0.18), transparent 30%);
}

body.tv-body .tv-board-stage-hero {
  border: 3px solid rgba(92, 50, 20, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 224, 145, 0.11), rgba(44, 22, 9, 0.18)),
    url("/assets/art/universe/table-wood.png") center / 780px 780px repeat,
    linear-gradient(180deg, #3a2010, #140b06);
  box-shadow:
    inset 0 0 0 4px rgba(255, 216, 130, 0.16),
    inset 0 0 0 7px rgba(65, 32, 12, 0.5),
    0 24px 54px rgba(14, 6, 2, 0.42);
}

body.tv-body .tv-board-stage-hero::before {
  display: none;
}

body.tv-body .tv-board-stage-hero::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 245, 213, 0.18),
    inset 0 0 120px rgba(46, 24, 9, 0.22);
}

body.tv-body .tv-race-rail::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  height: 4rem;
  background: url("/assets/art/ui/catan-logo.png") center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
}

body.tv-body .tv-race-active,
body.tv-body .tv-race-row,
body.tv-body .tv-resource-payout,
body.tv-body .tv-right-workbench,
body.tv-body .tv-board-probability-dock {
  background:
    linear-gradient(180deg, rgba(255, 243, 205, 0.13), rgba(77, 42, 20, 0.2)),
    url("/assets/art/universe/table-wood.png") center / 460px 460px repeat,
    linear-gradient(180deg, rgba(82, 45, 22, 0.94), rgba(28, 15, 9, 0.94));
  border-color: rgba(255, 221, 151, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 203, 0.18),
    inset 0 0 0 1px rgba(95, 50, 20, 0.48),
    0 16px 34px rgba(20, 9, 4, 0.34);
  backdrop-filter: none;
}

body.tv-body .tv-race-active,
body.tv-body .tv-race-row {
  border-radius: 18px;
}

body.tv-body .tv-race-active::before,
body.tv-body .tv-race-row::before {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--race-player-color) 22%, transparent), transparent 30%),
    radial-gradient(circle at 0% 0%, rgba(255, 218, 128, 0.16), transparent 42%);
  opacity: 1;
}

body.tv-body .tv-race-active-kicker,
body.tv-body .tv-race-active-metrics small,
body.tv-body .tv-race-row-metrics,
body.tv-body .tv-resource-payout .eyebrow {
  color: rgba(255, 232, 183, 0.72);
}

body.tv-body .tv-race-active-main strong,
body.tv-body .tv-race-row-top strong,
body.tv-body .tv-moment-status-card strong,
body.tv-body .tv-right-workbench-header h3,
body.tv-body .tv-right-log-copy p,
body.tv-body .tv-right-log-card.is-latest .tv-right-log-copy p,
body.tv-body .tv-resource-payout-player strong {
  color: var(--catan-cream);
  text-shadow: 0 2px 8px rgba(22, 8, 2, 0.34);
}

body.tv-body .tv-race-active-main span {
  color: var(--catan-gold-soft);
}

body.tv-body .tv-race-active-track,
body.tv-body .tv-race-row-track {
  background: rgba(30, 15, 7, 0.66);
  border-color: rgba(255, 230, 166, 0.14);
}

body.tv-body .tv-race-active-track span,
body.tv-body .tv-race-row-track span {
  background:
    linear-gradient(180deg, rgba(255, 245, 207, 0.56), transparent 45%),
    linear-gradient(90deg, var(--race-player-color), color-mix(in srgb, var(--race-player-color) 64%, #ffd980 36%));
}

body.tv-body .tv-race-active-metrics div,
body.tv-body .tv-race-status,
body.tv-body .tv-resource-payout-row,
body.tv-body .tv-resource-payout-cards,
body.tv-body .tv-resource-pill,
body.tv-body .tv-board-probability-chip,
body.tv-body .tv-right-log-card,
body.tv-body .tv-right-log-card.is-latest,
body.tv-body .tv-right-log-card.is-current-turn {
  background:
    linear-gradient(180deg, rgba(255, 245, 218, 0.12), rgba(255, 223, 160, 0.035)),
    rgba(30, 16, 9, 0.54);
  border-color: rgba(255, 226, 163, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.08);
}

body.tv-body .tv-moment-status-card {
  background:
    linear-gradient(180deg, rgba(255, 239, 196, 0.2), rgba(255, 216, 139, 0.04)),
    url("/assets/art/universe/table-wood.png") center / 500px 500px repeat,
    linear-gradient(180deg, rgba(91, 51, 23, 0.96), rgba(31, 16, 8, 0.96));
}

body.tv-body .tv-moment-status-card span,
body.tv-body .tv-match-log-subtitle,
body.tv-body .tv-side-player-section-subtitle {
  color: rgba(255, 233, 193, 0.76);
}

body.tv-body .tv-moment-status-orb {
  box-shadow:
    0 0 0 4px rgba(255, 238, 196, 0.12),
    0 0 18px color-mix(in srgb, var(--moment-accent) 38%, transparent);
}

body.tv-body .tv-board-probability-dock {
  border-radius: 18px;
  padding: 0.3rem;
}

body.tv-body .tv-board-probability-chip {
  color: rgba(255, 233, 193, 0.72);
  border-radius: 12px;
}

body.tv-body .tv-board-probability-chip strong {
  color: var(--catan-cream);
}

body.tv-body .tv-board-probability-chip.is-hot {
  color: #ffcf63;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 215, 0.1),
    0 0 14px rgba(255, 166, 38, 0.12);
}

body.tv-body .tv-board-probability-chip.is-robber {
  color: #ff8d77;
}

body.tv-body .tv-board-probability-chip.is-active {
  background:
    linear-gradient(180deg, rgba(255, 232, 163, 0.28), rgba(136, 77, 29, 0.22)),
    rgba(45, 23, 10, 0.7);
  border-color: rgba(255, 213, 124, 0.44);
}

body.tv-body .tv-right-workbench-header {
  padding-bottom: 0.12rem;
}

body.tv-body .tv-right-workbench-header h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.14rem;
  font-weight: 800;
}

body.tv-body .tv-right-log-turn,
body.tv-body .tv-right-log-card.is-latest .tv-right-log-turn,
body.tv-body .tv-right-log-card.is-current-turn .tv-right-log-turn {
  background: rgba(25, 13, 7, 0.56);
  border-right-color: rgba(255, 226, 163, 0.14);
  color: var(--catan-gold-soft);
}

body.tv-body .tv-right-log-letter,
body.tv-body .tv-right-log-card.is-latest .tv-right-log-letter {
  color: rgba(255, 215, 140, 0.78);
}

body.tv-body .tv-board-context-plate {
  background:
    linear-gradient(180deg, rgba(255, 239, 197, 0.18), rgba(74, 40, 18, 0.18)),
    url("/assets/art/universe/table-wood.png") center / 380px 380px repeat,
    rgba(41, 22, 11, 0.86);
  border-color: rgba(255, 225, 157, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 213, 0.16),
    0 14px 28px rgba(22, 8, 2, 0.28);
  backdrop-filter: none;
}

body.tv-body .tv-board-context-plate strong,
body.tv-body .tv-board-context-plate span:last-child {
  color: var(--catan-cream);
}

body.tv-body .tile-frame {
  stroke: rgba(255, 238, 186, 0.9);
  stroke-width: 3.2;
}

body.tv-body .board-number-ring {
  fill: #c6812f;
  stroke: rgba(86, 48, 16, 0.72);
}

body.tv-body .board-number-center {
  fill: #fff1ca;
}

body.tv-body .board-port-group {
  filter: drop-shadow(0 10px 14px rgba(40, 18, 6, 0.34));
}

body.tv-body #catan-tv-settings-launcher {
  width: 42px !important;
  height: 42px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 246, 210, 0.42), transparent 28%),
    linear-gradient(180deg, rgba(255, 211, 103, 0.96), rgba(137, 73, 24, 0.98)),
    url("/assets/art/universe/table-wood.png") center / 220px 220px repeat !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 221, 0.55),
    inset 0 -2px 0 rgba(74, 34, 10, 0.48),
    0 0 0 2px rgba(78, 38, 13, 0.78),
    0 0 0 4px rgba(255, 220, 139, 0.22),
    0 12px 22px rgba(21, 8, 2, 0.42) !important;
  clip-path: polygon(50% 0%, 91% 24%, 91% 76%, 50% 100%, 9% 76%, 9% 24%);
  color: #3a1d0a !important;
  transition: transform 150ms ease, filter 150ms ease, opacity 150ms ease !important;
}

body.tv-body #catan-tv-settings-launcher:hover {
  transform: translateY(-1px) scale(1.05) !important;
  color: #261104 !important;
  filter: brightness(1.08) saturate(1.06);
}

body.tv-body #catan-tv-settings-launcher:focus-visible {
  outline: 3px solid rgba(255, 232, 157, 0.88) !important;
  outline-offset: 5px !important;
}

body.tv-body #catan-tv-settings-launcher svg {
  display: none !important;
}

body.tv-body #catan-tv-settings-launcher::before {
  content: "";
  position: absolute;
  inset: 6px;
  clip-path: inherit;
  background:
    linear-gradient(180deg, rgba(255, 241, 194, 0.38), rgba(111, 58, 19, 0.28)),
    url("/assets/art/universe/live/trade/ship-badge.png") center / 28px 25px no-repeat;
  border: 1px solid rgba(80, 38, 11, 0.55);
  opacity: 0.92;
}

body.tv-body #catan-tv-settings-launcher::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #442006;
  box-shadow:
    -7px 0 0 #442006,
    7px 0 0 #442006,
    0 1px 0 rgba(255, 239, 181, 0.35),
    -7px 1px 0 rgba(255, 239, 181, 0.26),
    7px 1px 0 rgba(255, 239, 181, 0.26);
}

/* Board-only overhaul: tactile Catan island, readable strategy tokens, physical pieces. */
body.tv-body .tv-board-stage-hero .board-base-canvas,
body.tv-body .tv-board-stage-hero .board-base-image,
body.tv-body .tv-board-stage-hero .board-svg {
  filter: saturate(1.14) contrast(1.09) brightness(1.02);
}

body.tv-body .board-frame-water {
  fill: #3f9dbf;
}

body.tv-body .board-water-glyph-pattern {
  opacity: 0.8;
  mix-blend-mode: screen;
}

body.tv-body .board-beach {
  fill: #edc976;
  stroke: rgba(102, 62, 24, 0.38);
  stroke-width: 4.8;
  filter:
    drop-shadow(0 8px 0 rgba(108, 70, 27, 0.22))
    drop-shadow(0 16px 20px rgba(38, 17, 5, 0.17));
}

body.tv-body .board-shore-shadow {
  display: block;
  fill: none;
  stroke: rgba(65, 36, 12, 0.4);
  stroke-width: 16;
  stroke-linejoin: round;
  filter: blur(2.4px);
}

body.tv-body .board-shoreline {
  display: block;
  fill: none;
  stroke: rgba(255, 241, 184, 0.66);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.tv-body .tile-cast-shadow {
  fill: rgba(56, 30, 11, 0.26);
  filter: blur(3px);
}

body.tv-body .hex-texture-image {
  filter: saturate(1.22) contrast(1.13) brightness(1.04);
}

body.tv-body .hex-texture-image.is-blocked {
  filter: brightness(0.58) saturate(0.74) contrast(1.04);
}

body.tv-body .tile-resource-crest {
  opacity: 0.18;
  mix-blend-mode: soft-light;
  filter:
    saturate(1.2)
    contrast(1.08)
    drop-shadow(0 2px 0 rgba(255, 244, 204, 0.18));
  pointer-events: none;
}

body.tv-body .tile-resource-crest-ore {
  opacity: 0.16;
}

body.tv-body .tile-resource-crest-grain,
body.tv-body .tile-resource-crest-lumber {
  opacity: 0.2;
}

body.tv-body .tile-surface-glaze {
  fill: rgba(255, 244, 207, 0.035);
  stroke: rgba(73, 43, 16, 0.12);
  stroke-width: 1.2;
  pointer-events: none;
}

body.tv-body .tile-frame {
  stroke: rgba(255, 234, 172, 0.94);
  stroke-width: 3.4;
  stroke-linejoin: round;
  filter:
    drop-shadow(0 2px 0 rgba(96, 55, 17, 0.34))
    drop-shadow(0 4px 6px rgba(55, 26, 8, 0.18));
}

body.tv-body .tile-robber-dim {
  fill: rgba(22, 13, 7, 0.48);
  stroke: rgba(255, 214, 154, 0.22);
  stroke-width: 2.6;
}

body.tv-body .board-token {
  color: #8f5b27;
  filter: drop-shadow(0 8px 12px rgba(53, 25, 8, 0.24));
}

body.tv-body .board-number-shadow {
  fill: rgba(53, 25, 8, 0.26);
  transform: translateY(5px);
}

body.tv-body .board-number-outer {
  fill: #8f5520;
  stroke: rgba(68, 33, 9, 0.72);
  stroke-width: 2.8;
}

body.tv-body .board-number-ring {
  fill:
    #d08c35;
  stroke: rgba(255, 229, 157, 0.44);
  stroke-width: 2;
}

body.tv-body .board-number-center {
  fill: #fff0c7;
  stroke: rgba(102, 59, 18, 0.26);
  stroke-width: 1.8;
}

body.tv-body .board-number {
  fill: #241407;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.86rem;
  font-weight: 900;
  stroke: rgba(255, 246, 220, 0.8);
  stroke-width: 0.85;
  paint-order: stroke fill;
  letter-spacing: 0;
}

body.tv-body .board-token.is-hot {
  color: #bd352b;
}

body.tv-body .board-token.is-hot .board-number-outer {
  fill: #9d4b21;
  stroke: rgba(114, 25, 13, 0.72);
}

body.tv-body .board-token.is-hot .board-number-ring {
  fill: #d49335;
  stroke: rgba(255, 219, 133, 0.52);
}

body.tv-body .board-token.is-hot .board-number {
  fill: #b22d25;
}

body.tv-body .board-number-pip {
  fill: currentColor;
  filter: drop-shadow(0 1px 0 rgba(255, 239, 200, 0.4));
}

body.tv-body .robber-shadow {
  fill: rgba(20, 9, 3, 0.54);
}

body.tv-body .robber-aura {
  fill: rgba(48, 24, 14, 0.34);
  stroke: rgba(255, 212, 145, 0.5);
  stroke-width: 3;
  filter:
    drop-shadow(0 0 14px rgba(85, 29, 14, 0.34))
    drop-shadow(0 7px 9px rgba(20, 9, 3, 0.32));
}

body.tv-body .robber-token {
  fill: #20140d;
  stroke: rgba(255, 230, 178, 0.86);
  stroke-width: 3.5;
}

body.tv-body .robber-letter {
  fill: #ffe7ae;
  font-family: Georgia, "Times New Roman", serif;
}

body.tv-body .board-port-group {
  filter:
    drop-shadow(0 9px 0 rgba(59, 31, 10, 0.16))
    drop-shadow(0 13px 18px rgba(32, 13, 4, 0.28));
}

body.tv-body .board-dock-body,
body.tv-body .board-dock-post {
  fill: #6f3d1c;
  stroke: rgba(54, 26, 8, 0.62);
}

body.tv-body .board-dock-plank.is-even {
  fill: #5b3116;
}

body.tv-body .board-dock-plank.is-odd {
  fill: #7d4721;
}

body.tv-body .board-port-edge {
  stroke: rgba(91, 56, 24, 0.98);
  stroke-width: 12.5;
  filter: drop-shadow(0 4px 4px rgba(32, 13, 4, 0.2));
}

body.tv-body .port-token-rim {
  fill: #b9782e;
  stroke: rgba(58, 30, 9, 0.86);
  stroke-width: 2.4;
}

body.tv-body .port-token-face,
body.tv-body .port-token-icon-ring {
  fill: #fff0c8;
  stroke: rgba(99, 57, 17, 0.72);
}

body.tv-body .port-token-question,
body.tv-body .port-token-rate,
body.tv-body .port-generic-mark {
  fill: #2b1908;
  font-family: Georgia, "Times New Roman", serif;
}

body.tv-body .road-shadow {
  stroke: rgba(18, 8, 3, 0.48);
  stroke-width: 23;
}

body.tv-body .road-outline {
  stroke: rgba(72, 38, 16, 0.96);
  stroke-width: 16.5;
}

body.tv-body .road-top {
  stroke-width: 10.8;
  filter:
    drop-shadow(0 1px 0 rgba(255, 246, 218, 0.24))
    drop-shadow(0 4px 5px rgba(28, 12, 4, 0.2));
}

body.tv-body .piece-shadow {
  fill: rgba(18, 8, 3, 0.48);
  filter: blur(0.5px) drop-shadow(0 7px 10px rgba(18, 8, 3, 0.22));
}

body.tv-body .piece-shape {
  stroke: rgba(62, 32, 12, 0.96);
  stroke-width: 3;
  filter:
    drop-shadow(0 1px 0 rgba(255, 246, 218, 0.22))
    drop-shadow(0 4px 6px rgba(28, 12, 4, 0.24));
}

/* TV performance polish: keep the fantasy table, remove duplicate scenic/water layers. */
body.tv-body .tv-premium-layout {
  background:
    linear-gradient(180deg, rgba(255, 236, 178, 0.045), transparent 20%),
    url("/assets/art/universe/table-wood.png") center / 720px 720px repeat,
    linear-gradient(180deg, #20130b 0%, #110b08 58%, #070707 100%);
}

body.tv-body .tv-premium-layout::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.34)),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.26) 100%);
  opacity: 1;
  mix-blend-mode: normal;
}

body.tv-body .tv-premium-layout::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 226, 158, 0.08),
    inset 0 0 54px rgba(0, 0, 0, 0.24);
}

body.tv-body .tv-side-rail-shell {
  background:
    linear-gradient(180deg, rgba(255, 236, 186, 0.12), rgba(35, 18, 9, 0.28)),
    url("/assets/art/universe/table-wood.png") center / 560px 560px repeat,
    linear-gradient(180deg, #4b2a15, #1b0f08);
  border-color: rgba(255, 222, 151, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 199, 0.16),
    inset 0 0 0 1px rgba(85, 43, 18, 0.44),
    0 18px 38px rgba(13, 6, 3, 0.34);
  backdrop-filter: none;
}

body.tv-body .tv-side-rail-shell::before {
  background:
    linear-gradient(90deg, rgba(255, 237, 187, 0.08), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.2)),
    radial-gradient(circle at 50% -8%, rgba(255, 221, 133, 0.18), transparent 30%);
}

body.tv-body .tv-board-stage,
body.tv-body .tv-board-stage-hero {
  background:
    linear-gradient(180deg, rgba(255, 224, 145, 0.11), rgba(44, 22, 9, 0.18)),
    url("/assets/art/universe/table-wood.png") center / 780px 780px repeat,
    linear-gradient(180deg, #3a2010, #140b06);
  border-color: rgba(108, 58, 20, 0.9);
  box-shadow:
    inset 0 0 0 4px rgba(255, 216, 130, 0.16),
    inset 0 0 0 7px rgba(65, 32, 12, 0.5),
    0 24px 54px rgba(14, 6, 2, 0.42);
}

body.tv-body .tv-board-stage::before,
body.tv-body .tv-board-stage-hero::before {
  display: none;
}

body.tv-body .tv-board-stage::after,
body.tv-body .tv-board-stage-hero::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 191, 0.18),
    inset 0 0 68px rgba(29, 13, 5, 0.22);
}

body.tv-body .tv-board-stage .board-shell,
body.tv-body .tv-board-stage-hero .board-shell,
body.tv-body .board-shell {
  background: transparent;
}

body.tv-body .tv-board-stage-hero .board-base-canvas,
body.tv-body .tv-board-stage-hero .board-base-image,
body.tv-body .tv-board-stage-hero .board-svg,
body.tv-body .board-base-canvas,
body.tv-body .board-base-image,
body.tv-body .board-state-canvas {
  filter: none;
}

body.tv-body .board-base-layer,
body.tv-body .board-state-layer,
body.tv-body .board-base-canvas,
body.tv-body .board-base-image,
body.tv-body .board-state-canvas {
  will-change: auto;
}

body.tv-body .tv-right-workbench,
body.tv-body .tv-resource-payout,
body.tv-body .tv-board-probability-dock,
body.tv-body .tv-race-active,
body.tv-body .tv-race-row {
  contain: layout paint;
}

body.tv-body .tv-board-stage-hero .board-viewport {
  inset: 0;
  overflow: hidden;
  background:
    var(--tv-sea-glyph),
    linear-gradient(180deg, #58bdd4 0%, #44a9c5 54%, #2f8eae 100%);
  background-size: 210px 210px, auto, auto;
}

body.tv-body .tv-board-stage-hero .board-shell {
  background:
    var(--tv-sea-glyph),
    linear-gradient(180deg, #58bdd4 0%, #44a9c5 54%, #2f8eae 100%);
  background-size: 210px 210px, auto, auto;
}

body.tv-body .board-shoreline,
body.tv-body .board-shore-shadow {
  display: none;
}

/* TV smoothness pass: stable compositor layers for prompts, dice, robber, and trades. */
body.tv-body .tv-premium-layout,
body.tv-body .tv-board-stage-hero,
body.tv-body .board-shell,
body.tv-body .tv-right-rail-stack,
body.tv-body .tv-left-rail-stack {
  transform: none;
}

body.tv-body .tv-dice-moment,
body.tv-body .tv-trade-overlay,
body.tv-body .tv-steal-overlay {
  z-index: 12;
  contain: none;
  isolation: isolate;
  opacity: 1;
  transform: none;
  animation: tv-overlay-layer-in 180ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

body.tv-body .tv-dice-moment-card,
body.tv-body .tv-trade-overlay-card,
body.tv-body .tv-steal-overlay-card,
body.tv-body .tv-moment-status-card {
  backface-visibility: hidden;
  transform: none;
  will-change: auto;
  contain: none;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}

body.tv-body .tv-dice-moment-card {
  animation: tv-prompt-card-enter 220ms cubic-bezier(0.16, 0.9, 0.24, 1) both;
}

body.tv-body .tv-dice-moment.is-rolling .tv-dice-moment-card {
  animation: tv-prompt-card-enter 220ms cubic-bezier(0.16, 0.9, 0.24, 1) both;
}

body.tv-body .tv-dice-moment.is-settled .tv-dice-moment-card {
  animation: tv-prompt-card-settle 220ms cubic-bezier(0.18, 1, 0.28, 1) both;
}

body.tv-body .tv-dice-moment.is-rolling .dice-display-cinematic img {
  animation: none;
  filter: none;
  will-change: auto;
}

/* TV fixed-stage pass: treat the cast view like a 1920x1080 console surface. */
body.tv-body,
body.tv-body #root {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  font-size: 16px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body.tv-body .tv-stage-shell,
body.tv-body .tv-stage-wrap,
body.tv-body .tv-stage-frame {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

body.tv-body .tv-stage-content {
  width: 1920px;
  height: 1080px;
  min-width: 1920px;
  min-height: 1080px;
  max-width: 1920px;
  max-height: 1080px;
  overflow: hidden;
  transform-origin: top left;
  contain: strict;
}

body.tv-body .tv-stage-content > .app-shell.route-tv {
  width: 1920px;
  height: 1080px;
  min-width: 1920px;
  min-height: 1080px;
  max-width: 1920px;
  max-height: 1080px;
  overflow: hidden;
}

body.tv-body .tv-premium-layout {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  padding: 12px;
  font-size: 16px;
  overflow: hidden;
  contain: layout paint style;
}

body.tv-body .tv-live-columns {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: 268px minmax(0, 1fr) 330px;
  gap: 12px;
  overflow: hidden;
}

body.tv-body .tv-side-rail,
body.tv-body .tv-side-rail-shell,
body.tv-body .tv-left-rail-stack,
body.tv-body .tv-right-rail-stack,
body.tv-body .tv-board-stage-hero {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

body.tv-body .tv-side-rail-shell-left,
body.tv-body .tv-side-rail-shell-right {
  padding: 12px;
}

body.tv-body .tv-right-rail-stack {
  gap: 10px;
  grid-template-rows: auto auto minmax(0, auto) minmax(0, 1fr);
}

body.tv-body .tv-board-stage-hero {
  width: 100%;
  height: 100%;
}

body.tv-body .tv-board-stage-hero .board-viewport,
body.tv-body .tv-board-stage-hero .board-shell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

body.tv-body .tv-moment-status-card,
body.tv-body .tv-board-probability-dock,
body.tv-body .tv-resource-payout,
body.tv-body .tv-right-workbench,
body.tv-body .tv-right-workbench-list,
body.tv-body .tv-right-log-card {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
}

body.tv-body .tv-right-workbench,
body.tv-body .tv-right-workbench-list,
body.tv-body .tv-right-log-card {
  overflow: hidden;
}

body.tv-body .tv-moment-status-card strong,
body.tv-body .tv-moment-status-card span,
body.tv-body .tv-right-log-copy p,
body.tv-body .tv-right-log-copy strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.tv-body .tv-moment-status-card strong,
body.tv-body .tv-right-log-copy strong {
  -webkit-line-clamp: 2;
}

body.tv-body .tv-moment-status-card span,
body.tv-body .tv-right-log-copy p {
  -webkit-line-clamp: 3;
}

/* Zoom-lock the TV status and dice-probability rail typography. */
body.tv-body .tv-board-probability-dock {
  gap: 3px;
  padding: 6px;
  border-radius: 22px;
}

body.tv-body .tv-board-probability-chip {
  min-height: 34px;
  border-radius: 14px;
  gap: 1px;
}

body.tv-body .tv-board-probability-chip strong {
  font-size: 14px;
  line-height: 1;
}

body.tv-body .tv-board-probability-chip span {
  font-size: 8px;
  line-height: 1;
}

body.tv-body .tv-trade-overlay-top strong {
  font-size: 20px;
  line-height: 1.08;
}

body.tv-body .tv-trade-overlay-top span,
body.tv-body .tv-trade-summary-chip,
body.tv-body .tv-trade-response-name,
body.tv-body .tv-trade-response-state {
  font-size: 13px;
  line-height: 1.15;
}

body.tv-body .tv-trade-overlay-card,
body.tv-body .tv-steal-overlay-card {
  animation: tv-prompt-card-enter 220ms cubic-bezier(0.16, 0.9, 0.24, 1) both;
}

body.tv-body .tv-moment-status-card {
  transition:
    transform 180ms cubic-bezier(0.2, 0.75, 0.2, 1),
    opacity 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

body.tv-body .board-shell.is-robber-mode .board-world {
  opacity: 1;
  transition: opacity 160ms ease;
}

body.tv-body .board-robber-backdrop {
  fill: rgba(12, 7, 4, 0.18);
  opacity: 1;
  animation: tv-board-prompt-fade 180ms ease-out both;
}

body.tv-body .tile-hover-overlay.is-legal,
body.tv-body .tile-hover-overlay.is-robber-target,
body.tv-body .tile-hover-overlay.is-producing,
body.tv-body .robber-group.is-arriving,
body.tv-body .robber-travel-group,
body.tv-body .board-token.is-roll-hit,
body.tv-body .piece-build-ring,
body.tv-body .piece-shape.is-build-effect,
body.tv-body .road-top.is-build-effect {
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform, opacity;
}

body.tv-body .tile-hover-overlay.is-legal {
  transition:
    opacity 150ms ease,
    fill 150ms ease,
    stroke 150ms ease;
}

body.tv-body .tile-hover-overlay.is-robber-target {
  animation: tv-robber-target-glow 980ms ease-in-out infinite;
}

body.tv-body .tv-notification,
body.tv-body .tv-bottom-ribbon-panel,
body.tv-body .tv-resource-payout {
  backface-visibility: hidden;
  transform: translateZ(0);
  contain: layout paint;
}

body.tv-body .dice-display-banner {
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
}

body.tv-body .dice-display-banner.is-rolling {
  opacity: 0.72;
  filter: none;
  transform: translate3d(0, 1px, 0) scale(0.99);
}

@keyframes tv-overlay-layer-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes tv-prompt-card-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes tv-prompt-card-settle {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes tv-dice-face-smooth {
  0% {
    transform: translate3d(0, -2px, 0) rotate(-8deg) scale(0.98);
  }

  50% {
    transform: translate3d(0, 2px, 0) rotate(7deg) scale(1.02);
  }

  100% {
    transform: translate3d(0, -2px, 0) rotate(-8deg) scale(0.98);
  }
}

@keyframes tv-board-prompt-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes tv-robber-target-glow {
  0%, 100% {
    opacity: 0.86;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.tv-body .tv-dice-moment,
  body.tv-body .tv-trade-overlay,
  body.tv-body .tv-steal-overlay,
  body.tv-body .tv-dice-moment-card,
  body.tv-body .tv-trade-overlay-card,
  body.tv-body .tv-steal-overlay-card,
  body.tv-body .tile-hover-overlay.is-robber-target {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}

/* Final deploy polish: transient TV states should feel solid, not webby. */
body.tv-body .tv-trade-overlay-card,
body.tv-body .tv-steal-overlay-card,
body.tv-body .tv-dice-moment-card {
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 226, 151, 0.2), transparent 42%),
    linear-gradient(180deg, rgba(29, 18, 10, 0.985), rgba(9, 9, 11, 0.955));
  border-color: rgba(255, 226, 169, 0.34);
  box-shadow:
    0 0 0 1px rgba(86, 44, 16, 0.55),
    0 22px 44px rgba(0, 0, 0, 0.36);
}

body.tv-body .tv-trade-overlay-card {
  width: min(36rem, calc(100% - 2rem));
}

body.tv-body .tv-trade-overlay-top strong,
body.tv-body .tv-steal-overlay-card strong {
  color: #fff5d7;
  text-shadow:
    0 2px 0 rgba(37, 14, 4, 0.78),
    0 4px 10px rgba(0, 0, 0, 0.34);
}

body.tv-body .tv-trade-overlay-top span,
body.tv-body .tv-steal-overlay-card span {
  color: rgba(255, 239, 208, 0.88);
}

body.tv-body .tv-trade-timer {
  min-width: 4.9rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 238, 172, 0.24), transparent 58%),
    linear-gradient(180deg, rgba(90, 56, 25, 0.88), rgba(37, 21, 12, 0.92));
  border-color: rgba(255, 224, 151, 0.4);
}

body.tv-body .tv-trade-timer strong {
  color: #fff6d9;
  font-size: 1.62rem;
}

body.tv-body .tv-trade-response-row,
body.tv-body .tv-trade-resource-box {
  background-color: rgba(255, 239, 205, 0.1);
  border-color: rgba(255, 228, 170, 0.2);
}

body.tv-body .tv-dice-moment-card .dice-total {
  min-width: 4.4rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 246, 200, 0.26), transparent 58%),
    linear-gradient(180deg, rgba(91, 58, 25, 0.88), rgba(35, 20, 11, 0.94));
  border-color: rgba(255, 226, 161, 0.34);
}

/* Improvement pass: couch-readable focus and active-state hierarchy. */
body.tv-body button:focus-visible,
body.tv-body [role="button"]:focus-visible,
body.tv-body input:focus-visible,
body.tv-body select:focus-visible {
  outline: 4px solid #fff0a6 !important;
  outline-offset: 4px;
  box-shadow:
    0 0 0 2px rgba(41, 14, 4, 0.9),
    0 0 0 9px rgba(255, 174, 30, 0.32),
    0 0.5rem 1.1rem rgba(0, 0, 0, 0.28) !important;
}

body.tv-body .tv-moment-status-card {
  border-color: rgba(255, 225, 156, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 206, 0.14),
    0 0 0 1px rgba(91, 49, 19, 0.58),
    0 18px 38px rgba(0, 0, 0, 0.28);
}

body.tv-body .tv-moment-status-kicker {
  color: rgba(255, 225, 155, 0.88);
}

body.tv-body .tv-moment-status-card strong {
  font-size: 24px;
  letter-spacing: 0;
}

body.tv-body .tv-moment-status-card span {
  color: rgba(255, 235, 199, 0.86);
  font-size: 16px;
}

body.tv-body .tv-right-log-card.is-latest,
body.tv-body .tv-right-log-card.is-current-turn {
  border-color: rgba(255, 222, 148, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 218, 0.12),
    0 0.24rem 0 rgba(32, 12, 4, 0.28);
}

/* Improvement pass: prompt cards need a board-game edge at 10-foot distance. */
body.tv-body .tv-trade-overlay-card,
body.tv-body .tv-steal-overlay-card,
body.tv-body .tv-dice-moment-card {
  position: relative;
  overflow: hidden;
}

body.tv-body .tv-trade-overlay-card::before,
body.tv-body .tv-steal-overlay-card::before,
body.tv-body .tv-dice-moment-card::before {
  content: "";
  position: absolute;
  inset: 0.42rem;
  border: 1px solid rgba(255, 228, 160, 0.16);
  border-radius: inherit;
  pointer-events: none;
  transform: translateZ(0);
}

body.tv-body .tv-trade-overlay-card > *,
body.tv-body .tv-steal-overlay-card > *,
body.tv-body .tv-dice-moment-card > * {
  position: relative;
  z-index: 1;
}

body.tv-body .tv-trade-response-row {
  min-height: 2.62rem;
  padding-inline: 0.78rem;
}

body.tv-body .tv-trade-response-row strong,
body.tv-body .tv-trade-response-row span {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

body.tv-body .tv-moment-status-card {
  animation: tv-status-card-enter 200ms cubic-bezier(0.18, 0.86, 0.28, 1) both;
}

@keyframes tv-status-card-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 0.42rem, 0) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.tv-body .tv-moment-status-card {
    animation: none !important;
  }
}

/* Final TV scene constants: the board screen is one fixed 1920x1080 scene. */
body.tv-body .tv-stage-content,
body.tv-body .tv-stage-content * {
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
}

body.tv-body .tv-stage-content {
  line-height: 1.2;
}

body.tv-body .tv-premium-layout {
  padding: 12px !important;
  font-size: 16px !important;
}

body.tv-body .tv-live-columns {
  grid-template-columns: 268px minmax(0, 1fr) 330px !important;
  gap: 12px !important;
}

body.tv-body .tv-side-rail-shell-left,
body.tv-body .tv-side-rail-shell-right {
  padding: 12px !important;
}

body.tv-body .tv-race-active,
body.tv-body .tv-race-row {
  border-radius: 18px !important;
}

body.tv-body .tv-race-active-main strong,
body.tv-body .tv-race-row-top strong {
  font-size: 18px !important;
  line-height: 1.08 !important;
}

body.tv-body .tv-race-active-main span,
body.tv-body .tv-race-row-rank,
body.tv-body .tv-race-row-metrics,
body.tv-body .tv-race-active-metrics,
body.tv-body .tv-race-active-kicker {
  font-size: 11px !important;
  line-height: 1.08 !important;
}

body.tv-body .tv-moment-status-card {
  gap: 7px !important;
  padding: 14px 16px !important;
  border-radius: 20px !important;
}

body.tv-body .tv-moment-status-kicker,
body.tv-body .tv-resource-payout .eyebrow {
  font-size: 11px !important;
  line-height: 1 !important;
  letter-spacing: 1.4px !important;
}

body.tv-body .tv-moment-status-orb {
  width: 10px !important;
  height: 10px !important;
}

body.tv-body .tv-moment-status-card strong {
  font-size: 24px !important;
  line-height: 1.08 !important;
}

body.tv-body .tv-moment-status-card span {
  font-size: 16px !important;
  line-height: 1.28 !important;
}

body.tv-body .tv-board-probability-dock {
  gap: 3px !important;
  padding: 6px !important;
  border-radius: 22px !important;
}

body.tv-body .tv-board-probability-chip {
  min-height: 34px !important;
  border-radius: 14px !important;
  gap: 1px !important;
}

body.tv-body .tv-board-probability-chip strong {
  font-size: 14px !important;
  line-height: 1 !important;
}

body.tv-body .tv-board-probability-chip span {
  font-size: 8px !important;
  line-height: 1 !important;
}

body.tv-body .tv-right-workbench-header h3 {
  font-size: 20px !important;
  line-height: 1.08 !important;
}

body.tv-body .tv-right-log-turn {
  width: 48px !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

body.tv-body .tv-right-log-copy strong,
body.tv-body .tv-right-log-copy p {
  font-size: 16px !important;
  line-height: 1.18 !important;
}

body.tv-body .tv-right-log-letter {
  font-size: 14px !important;
  line-height: 1 !important;
}

body.tv-body .tv-trade-overlay-card,
body.tv-body .tv-steal-overlay-card {
  width: 690px !important;
  max-width: calc(100% - 32px) !important;
  border-radius: 24px !important;
}

body.tv-body .tv-dice-moment-card {
  width: 360px !important;
  max-width: calc(100% - 32px) !important;
  gap: 12px !important;
  justify-items: center;
  padding: 18px 20px 20px !important;
  border-radius: 24px !important;
}

body.tv-body .tv-dice-moment-card .eyebrow {
  width: 100%;
  margin: 0 !important;
  text-align: center;
}

body.tv-body .tv-dice-moment-card .dice-display-cinematic {
  grid-template-columns: repeat(2, 112px) !important;
  gap: 12px !important;
}

body.tv-body .tv-dice-moment-card .dice-display-cinematic img {
  width: 112px !important;
  height: 112px !important;
  padding: 10px !important;
  border-radius: 22px !important;
}

body.tv-body .tv-dice-moment-card .dice-total {
  min-width: 150px;
  padding: 10px 20px !important;
  text-align: center;
}

body.tv-body .tv-trade-overlay-top strong,
body.tv-body .tv-steal-overlay-card strong {
  font-size: 20px !important;
  line-height: 1.08 !important;
}

body.tv-body .tv-trade-overlay-top span,
body.tv-body .tv-steal-overlay-card span,
body.tv-body .tv-trade-summary-chip,
body.tv-body .tv-trade-response-name,
body.tv-body .tv-trade-response-state {
  font-size: 13px !important;
  line-height: 1.15 !important;
}

body.tv-body .tv-trade-timer strong,
body.tv-body .tv-dice-moment-card .dice-total {
  font-size: 26px !important;
  line-height: 1 !important;
}
