/* КОПТЬ · one continuous verde-antico table, physical objects and engraved light. */
:root {
  --table-verde: #1e3a34;
  --table-velvet: #3a0f22;
  --table-shadow: #120a14;
  --brass: #e3b23c;
  --coin-gold: #f5c542;
  --ivory: #f5f1e6;
  --arc: #22d3ee;
  --coral: #ff5a3c;
  --absinthe: #a3e635;
  --spirit: #f0409c;
}

body.is-in-game {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--ivory);
  background: #15201e;
  font-family: Arial, Helvetica, sans-serif;
}

body.is-in-game::before {
  content: '';
  position: fixed;
  inset: -7px;
  z-index: -1;
  pointer-events: none;
  background:
    url('/assets/variete-table.svg') center / 100% 100% no-repeat;
  transform: translate(var(--table-offset-x, 0px), var(--table-offset-y, 0px));
}

body.is-in-game .masthead,
body.is-in-game .page-footer,
body.is-in-game .grain {
  display: none;
}

body.is-in-game #app {
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.game-v2 {
  --far-track: clamp(162px, 22dvh, 208px);
  --near-track: clamp(236px, 28dvh, 280px);
  --engraved: #ead9b0;
  --display-face: Georgia, 'Times New Roman', serif;
  --card-width: 148px;
  --card-height: 208px;
  --fan-maximum: calc(var(--card-width) * .88);
  --game-muted: #c9d1c9;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 24px 66px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 1920px;
  height: 100%;
  min-height: 0;
  margin: auto;
  padding: 14px clamp(20px, 2.5vw, 50px) 14px;
  overflow: hidden;
  font: 14px/1.4 Arial, Helvetica, sans-serif;
}

/* Reset the landing-page furniture before positioning the in-game objects. */
.game-v2 :is(.table-layout, .board-main, .opponents, .seat-card, .own-panel,
.battlefield, .hand-zone, .authority-aside, .authority-panel, .district-track,
.right-sidebar, .shop-panel, .shop-items, .shop-entry, .log-panel, .turn-footer,
.relic-dock, .near-side, .player-instruments, .kiosk-glass) {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: none;
  box-shadow: none;
}

.game-v2 :is(button, input, select) {
  font-family: inherit;
}

.game-v2 :is(.section-label, .arena-label, .player-name, .room-code,
.district-relics-button, .shop-heading h2, .relic-dock h2, .turn-kicker) {
  color: #f0dca4;
  text-shadow: 0 1px 0 #120a14, 0 -1px 0 #f5f1e61c;
}

.game-v2 :is(.section-label, .arena-label) {
  margin: 0;
  font: 700 10px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.game-v2 :is(.btn, .icon-button) {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  color: #f5e3b4;
  font-size: 12px;
  letter-spacing: 0;
  text-shadow: 0 1px 0 #120a14;
  transition: color 240ms ease, transform 360ms cubic-bezier(.16,.84,.24,1);
}

.game-v2 .icon-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  font-size: 19px;
}

.game-v2 :is(.btn, .icon-button):hover:not(:disabled) {
  color: #fff0c3;
  transform: none;
  background: transparent;
}

.game-v2 :is(.btn, .icon-button):disabled {
  opacity: .5;
}

.game-v2 :is(button, a):focus-visible,
.table-choice :is(button, input, select):focus-visible {
  outline: 2px solid var(--arc);
  outline-offset: 3px;
}

.game-toolbar,
.game-options,
.game-v2 .room-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.game-toolbar {
  justify-content: space-between;
}

.game-v2 .room-meta {
  font-size: 11px;
  color: #d0ddd0;
}

.room-code {
  padding: 0;
  border: 0;
  background: none;
  font: 700 12px/1 Consolas, monospace;
  letter-spacing: 2px;
}

.game-options .btn {
  min-height: 24px;
  padding: 2px 5px;
  font-size: 11px;
}

.game-options .btn[aria-pressed='true'] {
  color: var(--coin-gold);
}

.game-dock {
  display: none;
}

.connection-engraving {
  position: absolute;
  z-index: 60;
  left: 50%;
  top: 43%;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #fff0bf;
  font: 700 14px/1.35 Arial, Helvetica, sans-serif;
  text-align: center;
  text-shadow: 0 2px 2px #120a14;
  transform: translateX(-50%);
  pointer-events: none;
}

.game-v2 .observer-engraving {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: center;
  justify-self: center;
  color: #eadcb5;
  font: 13px/1.35 Arial, Helvetica, sans-serif;
  text-align: center;
  text-shadow: 0 1px 1px #120a14;
}

.ticker-new {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #f5c542;
  font: 700 10px/1.2 Arial, Helvetica, sans-serif;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* A split-flap instrument rests on the far edge; its keys are physical levers. */
.turn-console {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(220px, 1fr) minmax(260px, auto);
  align-items: center;
  gap: 20px;
  width: min(1060px, 100%);
  min-width: 0;
  min-height: 0;
  justify-self: center;
  padding: 5px 16px;
  color: var(--ivory);
  background: none;
}

.turn-banner {
  min-width: 0;
}

.turn-kicker {
  margin: 0 0 4px;
  font: 700 9px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 1.1px;
}

.turn-heading {
  margin: 0;
  overflow: hidden;
  color: var(--ivory);
  font: 500 clamp(22px, 2.2vw, 34px)/1.1 var(--display-face);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 1px #120a14;
}

.phase-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phase-step {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  color: #c4d2ca;
}

.phase-index {
  color: #b6c5be;
  font-size: 23px;
  line-height: 1;
}

.phase-label {
  font-size: 10px;
  white-space: nowrap;
}

.phase-step.is-current {
  color: #fff0bc;
}

.phase-step.is-current .phase-index {
  color: var(--coin-gold);
  filter: drop-shadow(0 0 6px #e3b23c66);
}

.phase-step.is-complete .phase-index {
  color: #b0dbb0;
}

.turn-context {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.plays-meter,
.action-pips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.plays-number {
  color: var(--ivory);
  font: 700 24px/1 Arial, Helvetica, sans-serif;
}

.plays-number small {
  color: #c9d1d9;
  font-size: 12px;
}

.action-pips i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 5px #f5c54244;
}

.action-pips i.used {
  background: #667f74;
  box-shadow: none;
}

.turn-timer {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, #243f38 48%, #f5e3a7 51%, #8c631a 57%, #e3b23c 65%, #5b3c17 69%, transparent 72%);
  filter: drop-shadow(0 5px 3px #120a1477);
}

.turn-timer svg {
  position: absolute;
  inset: 4px;
  width: 42px;
  height: 42px;
  transform: rotate(-90deg);
}

.timer-track,
.timer-progress {
  fill: none;
  stroke-width: 1.5;
}

.timer-track {
  stroke: #e3b23c22;
}

.timer-progress {
  stroke: var(--coin-gold);
  stroke-linecap: round;
  transition: stroke-dashoffset 480ms linear;
}

.timer-digits {
  z-index: 1;
  color: #fff0c3;
  font: 700 12px/1 Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
}

.timer-status {
  display: none;
}

.turn-timer.is-low .timer-progress {
  stroke: var(--coral);
}

.turn-timer.is-low .timer-digits {
  color: #ffd0bb;
}

.game-v2 .end-turn-button {
  position: relative;
  min-height: 36px;
  padding: 7px 13px;
  border: 0;
  border-radius: 4px 4px 10px 10px;
  background: linear-gradient(100deg, #553725, #b68a43 15%, #e3b96b 47%, #926321 85%, #493027);
  box-shadow: inset 0 1px 0 #fff1c69c, 0 4px 0 #33221c, 0 7px 7px #120a1477;
  color: #231b14;
  font: 700 12px/1.2 Arial, Helvetica, sans-serif;
  text-shadow: 0 1px 0 #f5f1e644;
}

.game-v2 .end-turn-button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 #fff1c677, 0 1px 0 #33221c, 0 3px 4px #120a1455;
}

/* Geography: gauges left, a light circle in the middle, kiosk right, velvet below. */
.game-v2 .table-layout {
  display: grid;
  grid-template-columns: clamp(164px, 13vw, 220px) minmax(0, 1fr) clamp(216px, 18vw, 300px);
  grid-template-rows: var(--far-track) minmax(0, 1fr) var(--near-track);
  gap: 12px clamp(22px, 4vw, 76px);
  height: 100%;
  overflow: visible;
}

.game-v2 .board-main {
  display: contents;
}

.game-v2 .opponents {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(12px, 1.6vw, 25px);
  height: 100%;
}

.game-v2 .opponents.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-v2 .authority-aside {
  position: relative;
  top: auto;
  grid-column: 1;
  grid-row: 1 / 3;
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr);
  align-self: stretch;
  width: 100%;
  height: 100%;
  max-height: none;
}

.game-v2 .right-sidebar {
  grid-column: 3;
  grid-row: 1 / 3;
  display: grid;
  grid-template-rows: minmax(0, 1fr) clamp(94px, 15dvh, 190px);
  gap: 18px;
  height: 100%;
}

.game-v2 .near-side {
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 218px;
  align-items: end;
  gap: 20px;
  height: 100%;
}

/* Light falls on the felt; the brass frame marks the chosen opponent. */
.game-v2 .opponent.is-active::before,
.game-v2 .near-side:has(.my-seat.is-active) .hand-zone::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -6px -4px -12px;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at center, #593663 0%, #482e54e8 42%, #34283e88 75%, transparent 100%);
}
.game-v2 .near-side:has(.my-seat.is-active) .hand-zone::before {
  inset: -30% -8% -20%;
}
.game-v2 .opponent.is-current-target::after {
  content: '';
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border: 1px solid #cb9c5f;
  border-radius: 7px;
  box-shadow: inset 0 0 0 3px #d7af6e0c;
}

.seat-target-button {
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
}

.game-v2 .player-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.game-v2 .player-name {
  display: block;
  overflow: hidden;
  font: 600 14px/1.2 var(--display-face);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-v2 :is(.player-sub, .avatar, .health-bar) {
  display: none;
}

.player-instruments {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hand-count-engraving {
  display: none;
}

.instrument {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 40px;
  min-height: 46px;
  color: var(--ivory);
  text-align: center;
}

.instrument-symbol {
  display: grid;
  place-items: center;
  height: 18px;
  color: var(--brass);
  font-size: 17px;
  line-height: 1;
  filter: drop-shadow(0 2px 1px #120a1466);
}

.instrument-symbol svg {
  width: 24px;
  height: 24px;
  overflow: visible;
}

.instrument-hp .instrument-symbol {
  color: var(--coral);
}

.instrument-value {
  position: relative;
  z-index: 1;
  color: var(--ivory);
  font: 600 24px/1 Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 1px #120a14, 0 0 6px #120a14aa;
}

.instrument-limit {
  position: absolute;
  bottom: -5px;
  right: -6px;
  color: #cfdbcd;
  font-size: 10px;
}

.instrument-stack {
  position: absolute;
  left: 50%;
  top: 3px;
  width: 18px;
  height: 13px;
  transform: translateX(-50%);
  pointer-events: none;
}

.instrument-stack i {
  position: absolute;
  inset: 3px 0;
  border-radius: 50%;
  background: linear-gradient(110deg, #fff0b6, #e3b23c 35%, #7b521d 90%);
  box-shadow: 0 2px 0 #765023;
  transform: translateY(calc(var(--stack-index, 0) * .65px));
}

.instrument-armor .instrument-stack i {
  border-radius: 3px;
}

.game-v2 .opponent.is-valid-target {
  cursor: crosshair;
}

.game-v2 .opponent.is-valid-target:hover .instrument-value {
  color: #fff5d5;
  text-shadow: 0 0 10px #f5c54288, 0 2px 1px #120a14;
}


.game-v2 .opponent.dead {
  opacity: .55;
  filter: saturate(.35);
}
.game-v2 .opponent.dead.is-active { opacity: 1; filter: none; }
.game-v2 .opponent.dead.is-active > * { opacity: .8; }


.card-back,
.event-card-back {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 90px;
  border: 1px solid #e3b23c;
  border-radius: 5px;
  background: #163d34 url('/assets/card-back.svg') center / cover;
  box-shadow: 0 4px 6px #120a1477, inset 0 0 0 2px #e3b23c44;
}

.card-back[data-district] {
  border-top: 3px solid var(--district);
}

.back-sigil {
  display: none;
}



/* A relic is a small card resting in a velvet socket, never a text chip. */
.game-v2 :is(.relic-slots, .opponent-relics) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.game-v2 .relic-socket,
.game-v2 .relic-slot {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 78px;
  padding: 4px;
  border: 0;
  border-radius: 7% / 5%;
  color: #bca278;
  background: linear-gradient(145deg, #281926, #381e2b 58%, #472936);
  box-shadow: inset 0 0 0 1px #b69a6666, inset 2px 4px 5px #150e1bca, 0 1px 1px #f9d99d3d;
}

.relic-socket > svg,
.relic-socket .relic-art,
.relic-slot .relic-art {
  width: 30px;
  height: 38px;
  color: var(--district, var(--brass));
  filter: drop-shadow(0 2px 2px #120a14aa);
}

.relic-socket:not(.empty)::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid #d6b868;
  border-top: 4px solid var(--district, #e3b23c);
  border-radius: 4px;
  background: #f5f1e6;
  box-shadow: 0 2px 2px #120a1455;
}

.socket-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 34px;
  color: #26483b;
}

.socket-art svg {
  width: 100%;
  height: 100%;
}

.socket-name {
  position: absolute;
  z-index: 1;
  left: 5px;
  right: 5px;
  bottom: 7px;
  display: -webkit-box;
  overflow: hidden;
  color: #000;
  font: 700 7px/1.1 Arial, Helvetica, sans-serif;
  text-align: center;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.socket-star {
  position: absolute;
  z-index: 2;
  right: 3px;
  top: 0;
  color: #f5c542;
  font-size: 12px;
  text-shadow: 0 1px 1px #3a0f22;
}

.relic-socket.is-legend {
  filter: drop-shadow(0 0 5px #e3b23c55);
}

.relic-socket .playing-card {
  width: 46px;
  min-width: 0;
  height: 64px;
  min-height: 0;
  transform: none;
}

.relic-socket .playing-card :is(.card-body, .card-price) {
  display: none;
}

.relic-socket .playing-card .card-top {
  height: 5px;
  min-height: 5px;
  padding: 0;
  font-size: 0;
}

.relic-socket .playing-card .card-top span {
  font-size: 0;
}

.relic-socket .playing-card .card-art {
  height: 100%;
  min-height: 0;
}

.relic-socket .playing-card .card-art svg {
  width: 30px;
  height: 30px;
}

.relic-socket:hover:not(:disabled) {
  filter: drop-shadow(0 0 8px #e3b23c44);
}

.game-v2 .relic-slot .relic-name,
.relic-socket .relic-name {
  position: absolute;
  inset: 5px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: #26483b;
  font-size: 0;
}

.relic-name .socket-name {
  left: 2px;
  right: 2px;
  bottom: 3px;
}

.game-v2 .relic-slot .drop-slot {
  position: absolute;
  right: -5px;
  top: -7px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  background: none;
  color: #f0c0c9;
  font-size: 17px;
}

.relic-socket.empty > button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #dfbf70;
  font-size: 22px;
}

.game-v2 :is(.slot-index, .opponent-relic-summary) {
  display: none;
}

/* A circle of light is the only definition of the play area. */
.game-v2 .battlefield {
  position: relative;
  isolation: isolate;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  grid-template-rows: 20px minmax(0, 1fr);
  gap: 7px 16px;
  height: 100%;
  overflow: visible;
}

.latest-play::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 50% auto auto 50%;
  width: auto;
  height: min(108%, 360px);
  max-width: 100%;
  aspect-ratio: 1;
  background: url('/assets/variete-sigil.svg') center / contain no-repeat;
  transform: translate(calc(-50% + var(--light-offset-x, 0px)), calc(-50% + var(--light-offset-y, 0px)));
  pointer-events: none;
  opacity: .58;
}

.game-v2 .battlefield.is-rift .latest-play::before {
  background-image: url('/assets/variete-sigil.svg'), radial-gradient(ellipse, #8b5cf64d, #f0409c16 50%, transparent 68%);
}

.battlefield-topline {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  color: #ecd99f;
  font-size: 11px;
}

.current-target {
  min-width: 0;
  overflow: hidden;
  color: #ffcf9a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-v2 :is(.damage-cap-gauge, .duel-pressure-gauge, .play-bonus-badge,
.target-prompt, .hunger-note, .preview-badge, .event-actor, .event-target) {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #e9dec2;
  font-size: 11px;
  text-shadow: 0 1px 1px #120a14;
}

.duel-pressure-gauge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.duel-pressure-gauge b {
  color: #ffbba1;
  font-size: 20px;
  line-height: 1;
}

.play-bonus-badge {
  margin-left: 6px;
  color: var(--coin-gold);
}

.game-v2 .latest-play {
  position: relative;
  isolation: isolate;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(130px, 170px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: min(100%, 570px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
}

body:is(.stage-playing, .is-dragging) .arena-card-wrap {
  visibility: hidden;
}

.last-play-engraving {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #dac98e;
  font: 11px/1.3 Arial, Helvetica, sans-serif;
  text-align: center;
  text-shadow: 0 1px 1px #120a14;
}

.latest-play.is-empty .latest-result {
  display: none;
}

.game-v2 .latest-play.is-empty {
  grid-template-columns: minmax(0, 1fr);
}

.latest-play.is-empty .arena-card-wrap {
  display: none;
}

.latest-play.is-empty .arena-action-area {
  position: absolute;
  top: 54%;
  left: 50%;
  width: min(100%, 250px);
  transform: translateX(-50%);
  align-items: center;
  gap: 3px;
  text-align: center;
}

.arena-description-empty {
  margin: 0;
  color: #f2e3bf;
  font: 500 clamp(16px, 1.5vw, 23px)/1.25 var(--display-face);
}

.public-choice-offer {
  position: absolute;
  z-index: 20;
  left: 58%;
  top: 53%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 0 24px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.public-choice-offer .card-back {
  width: 84px;
  height: 118px;
}

.choice-engraving {
  position: absolute;
  left: 50%;
  bottom: 0;
  color: #f1dfad;
  font: 700 11px/1.2 Arial, Helvetica, sans-serif;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 1px #120a14;
  transform: translateX(-50%);
}

.arena-card-wrap {
  position: relative;
  justify-self: center;
  width: 100%;
  height: 100%;
  max-height: 240px;
  min-height: 0;
  transform: none;
}

.arena-card-wrap::before {
  content: none;
}

.game-v2 .arena-card-wrap .playing-card {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  max-height: none;
  transform: none;
  pointer-events: none;
}

.game-v2 .arena-card-wrap .card-art {
  flex: 0 0 40px;
  min-height: 40px;
  height: 40px;
}

.game-v2 .arena-card-wrap .card-art svg {
  width: 31px;
  height: 31px;
}

.game-v2 .arena-card-wrap .card-body {
  min-height: 0;
  padding: 8px 9px;
  gap: 5px;
}

.game-v2 .arena-card-wrap .card-body h3 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.game-v2 .arena-card-wrap .card-rules {
  min-height: 0;
  overflow: auto;
  font-size: 12px;
  line-height: 1.35;
}

.game-v2 .arena-card-wrap :is(.card-summary, .card-bottom, .card-number, .card-price) {
  display: none;
}

.arena-action-area {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  gap: 8px;
}

.event-route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  font-size: 11px;
}

.event-arrow {
  color: var(--brass);
  font-size: 18px;
}

.play-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin: 0;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.preview-badge-icon {
  color: var(--brass);
  font-size: 15px;
}

.preview-badge-label {
  font-size: 10px;
}

.preview-badge b {
  color: var(--ivory);
  font-size: 20px;
  line-height: 1;
}

.selection-buttons {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

.game-v2 .arena-play {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  padding: 8px 11px;
  background: linear-gradient(100deg, #a17024, #f2d58b 45%, #bd8d36);
  box-shadow: inset 0 1px 0 #fff5d8aa, 0 3px 0 #5b3a1d, 0 7px 10px #120a1466;
  color: #201b13;
  font-weight: 700;
  text-shadow: none;
}

.game-v2 .arena-play:hover:not(:disabled) {
  background: linear-gradient(100deg, #b78633, #ffe7a8 45%, #d7aa4b);
  color: #120a14;
}

.action-disabled-reason {
  margin: 0;
  color: #ffc7b8;
  font: 11px/1.3 Arial, Helvetica, sans-serif;
}

.latest-result {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  color: #eadcb6;
}

.latest-result strong {
  color: var(--ivory);
  font-size: 22px;
  line-height: 1;
}

.result-icon {
  color: var(--brass);
  font-size: 25px;
}

.latest-event-label {
  color: #d5dfd1;
  font-size: 11px;
}

.arena-description-title {
  margin: 0 0 5px;
  color: #f2e5c4;
  font: 700 18px/1.2 Arial, Helvetica, sans-serif;
}

.arena-description-text {
  margin: 0;
  color: #d4e4d5;
  font: 12px/1.45 Arial, Helvetica, sans-serif;
}

.arena-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  height: 100%;
  min-height: 0;
  color: var(--brass);
  background: none;
  border: 0;
}

.arena-empty .ether-sigil {
  font-size: 48px;
  opacity: .5;
}

.arena-empty strong {
  font-size: 10px;
  letter-spacing: 3px;
}

.arena-empty small {
  display: none;
}

/* Ether is a stack, a rack of sticks, a brass tray and a clean blue brazier. */
.ether-apparatus {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.ether-deck {
  position: relative;
  width: 70px;
  height: 98px;
  padding: 0;
  border: 1px solid #e3b23c;
  border-radius: 5px;
  color: #f5c542;
  background: #173b33 url('/assets/card-back.svg') center / cover;
  margin-bottom: calc(var(--deck-thickness, 8px) * .64);
  box-shadow: 1px calc(var(--deck-thickness, 8px) * .18) #ceb67c,
    2px calc(var(--deck-thickness, 8px) * .36) #25453a,
    3px calc(var(--deck-thickness, 8px) * .49) #b6975f,
    4px calc(var(--deck-thickness, 8px) * .64) #28473c,
    5px calc(var(--deck-thickness, 8px) * .8) 8px #120a1480;
  transform: rotate(-5deg);
}

.ether-deck > .card-back {
  width: 100%;
  height: 100%;
  border: 0;
  box-shadow: none;
}

.ether-deck::before,
.ether-deck::after {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid #e3b23c77;
  border-radius: 50%;
  transform: rotate(-24deg) scale(1.1, .84);
  pointer-events: none;
}

.ether-deck::after {
  inset: -18px;
  border-color: #22d3ee44;
  transform: rotate(25deg) scale(1.08, .87);
}

.deck-count {
  color: var(--ivory);
  font: 700 20px/1 Arial, Helvetica, sans-serif;
  text-shadow: 0 2px 2px #120a14;
}

.dynamite-rack {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 17px;
  max-width: 100px;
  color: #ffb48a;
  font-size: 12px;
  padding: 0;
  border: 0;
  background: none;
}

.dynamite-sticks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  padding-top: 4px;
}

.dynamite-rack b {
  color: #f5d68e;
  font-size: 20px;
  line-height: 1;
}

.dynamite-stick {
  display: block;
  position: relative;
  width: 5px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ffd3a2, #ff5a3c 40%, #9d3030 92%);
  box-shadow: 1px 2px 2px #120a1466;
}

.dynamite-stick::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 4px;
  top: -4px;
  left: 2px;
  border-radius: 50%;
  background: #f5c542;
  box-shadow: 0 0 4px #f5c542;
}

.discard-tray,
.ash-brazier {
  position: relative;
  min-width: 36px;
  min-height: 25px;
  padding: 2px 5px;
  border: 0;
  border-radius: 50%;
  color: var(--ivory);
  background: radial-gradient(ellipse, #f5e0ab22, #e3b23c44 60%, transparent 70%);
  font: 700 20px/1 Arial, Helvetica, sans-serif;
  text-shadow: 0 2px 2px #120a14;
}

.discard-tray > span,
.ash-brazier > span {
  display: block;
  font: 8px/1.1 Arial, Helvetica, sans-serif;
}

.discard-tray > .tray-cards {
  display: none;
}

.discard-tray b,
.ash-brazier b {
  color: inherit;
  font: 700 20px/1 Arial, Helvetica, sans-serif;
}

.brazier-flame {
  position: absolute;
  left: 50%;
  top: -9px;
  width: 13px;
  height: 17px;
  border-radius: 80% 10% 60% 50%;
  background: linear-gradient(135deg, #f5f1e6, #22d3ee 50%, #8b5cf6);
  opacity: .7;
  transform: translateX(-50%) rotate(-15deg);
  filter: drop-shadow(0 0 4px #22d3ee88);
}

.ash-brazier {
  color: #bdf4ff;
  background: radial-gradient(ellipse, #f5f1e633, #22d3ee22 55%, transparent 72%);
}

/* The near edge: large instruments, a velvet fan and three sockets. */
.game-v2 .my-seat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 12px;
  height: 100%;
}

.game-v2 .my-seat .player-header {
  justify-content: flex-start;
  max-width: 100%;
}
.game-v2 .my-seat .seat-potatoes {
  position: static;
  flex: none;
}

.game-v2 .my-seat .player-instruments {
  justify-content: flex-start;
  gap: 9px;
}

.game-v2 .my-seat .instrument {
  min-width: 42px;
  min-height: 68px;
}

.game-v2 .my-seat .instrument-value {
  font-size: 34px;
}

.game-v2 .my-seat .instrument-symbol {
  height: 28px;
  font-size: 24px;
}

.game-v2 .my-seat .instrument-symbol svg {
  width: 32px;
  height: 32px;
}

.game-v2 .my-seat .instrument-stack {
  top: 6px;
  width: 31px;
}

.game-v2 .relic-dock {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  height: 100%;
}

.relic-dock h2 {
  margin: 0;
  font: 700 10px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 1.3px;
}

.game-v2 .relic-dock .relic-socket,
.game-v2 .relic-dock .relic-slot {
  width: 64px;
  height: 90px;
}

.game-v2 .hand-zone {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 19px minmax(0, 1fr);
  align-items: end;
  gap: 2px;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hand-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 12px;
  margin: 0;
}

.hand-heading .icon-button,
.shortcut-note {
  display: none;
}

.game-v2 .hand {
  --fan-edge: clamp(14px, calc(var(--card-height) * .105), 22px);
  container-type: size;
  display: flex;
  align-items: end;
  justify-content: safe center;
  gap: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 var(--fan-edge) 24px;
  overflow: visible;
}

.game-v2 .hand[data-hand-count='0'] { align-items: center; padding: 0; }
.game-v2 .hand .card-prompt {
  display: grid;
  grid-template-columns: auto max-content;
  justify-content: center;
  justify-items: start;
  align-content: center;
  gap: 8px 17px;
  flex: 0 1 360px;
  min-height: 108px;
  padding: 14px 18px;
  border: 1px solid #7b7055;
  border-radius: 6px;
  background: #202c28;
  color: #f1e7cc;
  font: 500 clamp(18px, 1.5vw, 23px)/1.2 var(--display-face);
  text-align: left;
}
.game-v2 .card-prompt > .table-mark {
  grid-row: 1 / 3;
  align-self: center;
  width: 40px;
  height: 40px;
  color: #c8b487;
}
.game-v2 .card-prompt .btn {
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid #978665;
  border-radius: 4px;
  background: #34443c;
  color: #f0dbac;
  font: 600 13px/1.2 system-ui,sans-serif;
}
.game-v2 .card-prompt .btn:hover { background: #46574a; }

.hand-card-wrap {
  --face-width: min(var(--card-width), 100cqw, calc(100cqh / 1.4));
  --fan-step: clamp(0px, calc((100cqw - var(--face-width)) / max(1, var(--hand-count) - 1)), var(--fan-maximum));
  position: relative;
  z-index: var(--fan-order, var(--card-index, 1));
  flex: 0 0 var(--face-width);
  width: var(--face-width);
  height: calc(var(--face-width) * 1.4);
  min-height: 0;
  margin-left: calc(var(--fan-step) - var(--face-width));
  transform: translateY(var(--fan-rise, 0px)) rotate(var(--fan-angle, 0deg));
  transform-origin: 50% 100%;
  transition: transform 360ms cubic-bezier(.16,.84,.24,1), translate 360ms cubic-bezier(.16,.84,.24,1);
}

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

.hand-card-wrap.is-reading {
  z-index: 50;
  transform: none;
}

body.is-dragging .hand-card-wrap.is-selected {
  visibility: hidden;
}

.game-v2 .hand-card-wrap .playing-card {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  transform: none;
  opacity: 1;
  filter: none;
  box-shadow: 0 5px 6px #120a1488;
}

.game-v2 .hand-card-wrap.is-reading .playing-card {
  box-shadow: 0 19px 16px #120a1477, 0 0 12px #e3b23c22;
}

.game-v2 .hand-card-wrap .playing-card.selected {
  outline: 2px solid #e5c88b;
  outline-offset: -2px;
}

.hand-card-key {
  position: absolute;
  z-index: 2;
  left: 6px;
  top: 27px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: #201b13;
  background: #f5e9c6;
  border-radius: 50%;
  font: 700 9px/1 Arial, Helvetica, sans-serif;
  pointer-events: none;
}

.game-v2 .turn-footer {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  transform: translateX(-50%);
}

.game-v2 .hunger-note {
  white-space: nowrap;
}

.game-v2 .hunger-note.safe {
  color: #c1ec9b;
}

/* Dense ivory stock, enamel artwork and fine brass foil belong to the cards. */
.playing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 148px;
  min-width: 148px;
  min-height: 208px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d4b56a;
  border-radius: 7px;
  background: var(--ivory);
  color: #000;
  box-shadow: 0 4px 6px #120a1466;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  transition: transform 360ms cubic-bezier(.16,.84,.24,1);
}

.playing-card:hover {
  filter: none;
  box-shadow: 0 5px 9px #120a1477;
}

.playing-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 20px;
  min-height: 20px;
  height: 20px;
  gap: 4px;
  padding: 3px 6px;
  background: var(--district, #e3b23c);
  color: #000;
  font: 700 9px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: .1px;
}

.playing-card .card-top span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-markers {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
}

.card-keywords {
  color: #000;
  font: 700 9px/1.2 Arial, Helvetica, sans-serif;
}

.playing-card .card-art {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  min-height: 44px;
  height: 44px;
  border: 0;
  background: radial-gradient(ellipse at 50% 20%, color-mix(in srgb, var(--district, #e3b23c) 70%, #f5f1e6), #1e3a34 100%);
}

.playing-card .card-art::before {
  content: '';
  position: absolute;
  inset: 5px 10px;
  border: 1px solid #f5e3a777;
  border-radius: 50%;
  width: auto;
  height: auto;
  transform: none;
}

.playing-card .card-art::after {
  content: none;
}

.playing-card .card-art svg {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  color: #fff4ce;
  filter: drop-shadow(0 2px 1px #120a1466);
}

.playing-card .card-art > svg[data-scene],
.game-v2 .hand-card-wrap .card-art > svg[data-scene] {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%);
  filter: none;
}

.playing-card .card-number {
  position: absolute;
  right: 5px;
  bottom: 3px;
  color: #f5f1e6;
  font-size: 8px;
}

.playing-card .card-price {
  top: 25px;
  right: 5px;
  width: 20px;
  height: 20px;
  border: 1px solid #866020;
  background: radial-gradient(circle at 35% 25%, #fff0b0, #e3b23c 70%, #9c6b24);
  color: #201b13;
  box-shadow: 0 2px 2px #120a1455;
  font: 700 10px/1 Arial, Helvetica, sans-serif;
}

.playing-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 4px;
  padding: 8px;
  background: var(--ivory);
  color: #000;
}

.playing-card .card-body h3 {
  margin: 0 0 3px;
  color: #000;
  font: 700 14px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.playing-card .card-body .card-rules {
  margin: 0;
  color: #000;
  font: 400 12px/1.35 Arial, Helvetica, sans-serif;
  text-wrap: pretty;
}

.playing-card .rule-emphasis {
  color: #000;
  font-weight: 700;
}

.playing-card .card-bottom {
  margin-top: auto;
  padding-top: 8px;
  color: #231d17;
  font: 9px/1.3 Arial, Helvetica, sans-serif;
}

.game-v2 .hand-card-wrap .card-rules {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.game-v2 .hand-card-wrap :is(.card-number, .card-summary, .card-bottom, .card-keywords) {
  display: none;
}

.card-summary,
.summary-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #000;
}

.summary-stat {
  font-weight: 700;
}

/* The shelf shows the complete print, with the title and price outside it. */
.game-v2 .kiosk {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(max-content, 1fr);
  gap: 4px;
  filter: drop-shadow(0 8px 5px #120a1444);
}
.game-v2 .shop-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.game-v2 .shop-heading h2 {
  margin: 0 auto 0 0;
  color: #f4e2ae;
  font: 500 23px/1 var(--display-face);
}
.game-v2 .shop-heading > span {
  color: #f0ddb3;
  font: 600 15px/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.game-v2 .shop-heading .shop-lever {
  position: static;
  width: auto;
  min-height: 27px;
  margin: 0;
  padding: 3px 7px;
  gap: 2px;
  border: 1px solid #827755;
  border-radius: 4px;
  background: #2b3730;
  color: #efdab0;
  box-shadow: none;
  font: 600 12px/1 system-ui, sans-serif;
}
.shop-lever > .table-mark { margin-right: 3px; }
.shop-lever > span { display: inline-flex; align-items: center; gap: 2px; }

.game-v2 .kiosk-glass {
  container-type: inline-size;
}
.game-v2 .shop-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: auto;
  gap: 3px;
  height: 100%;
}
.game-v2 .shop-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  border: 1px solid #a3926d;
  border-radius: 4px;
  background: #eee3cc;
  box-shadow: 0 1px 2px #13191175;
}
.game-v2 .shop-preview {
  display: grid;
  grid-template-columns: clamp(50px, 27cqi, 84px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(5px, 2.5cqi, 9px);
  align-self: stretch;
  min-width: 0;
  padding: 3px 5px;
  border-top: 4px solid var(--district);
  border-radius: 3px 0 0 3px;
  background: linear-gradient(110deg, #e6d6b6, #f5ecd8 53%, #eee2c9);
  color: #26312b;
  text-align: left;
}
.shop-art {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 9 / 4;
  overflow: hidden;
  border-radius: 2px;
  background: color-mix(in srgb, var(--district) 7%, #202923);
  box-shadow: 0 0 0 1px #806f4b;
}
.shop-art > :is(svg,.kiosk-print) {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-caption { display: grid; align-content: center; gap: 2px; min-width: 0; }
.shop-district {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #464839;
  font: 700 clamp(9px, 3.4cqi, 10px)/1.15 system-ui, sans-serif;
  letter-spacing: .045em;
}
.shop-title {
  min-width: 0;
  font: 700 clamp(14px, 5.4cqi, 16px)/1.08 var(--display-face);
  overflow-wrap: anywhere;
}
.game-v2 .shop-preview:hover { background: #fff4dc; }
.game-v2 .kiosk :is(.shop-preview,.shop-buy,.shop-lever):focus-visible {
  outline: 2px solid #eed29a;
  outline-offset: -2px;
}
.game-v2 .kiosk .shop-preview:focus-visible { outline-color: #735123; background: #fff4dc; }
.game-v2 .kiosk .shop-buy {
  display: grid;
  align-self: stretch;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-width: 44px;
  min-height: 38px;
  padding: 3px 5px;
  border: 0;
  border-left: 1px dashed #aa946d;
  border-radius: 0 3px 3px 0;
  color: #f3e5bf;
  background: #344239;
  font: 600 10px/1.1 system-ui, sans-serif;
}
.game-v2 .kiosk .shop-buy:hover:not(:disabled),
.game-v2 .shop-heading .shop-lever:hover:not(:disabled) { background: #465142; border-color: #d7bf88; }
.game-v2 .kiosk .shop-buy:disabled { color: #c3c3b9; background: #464941; opacity: 1; }
.game-v2 .shop-price {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f4d593;
  font: 700 14px/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.game-v2 .shop-price .table-mark { width: 12px; height: 12px; }
.game-v2 .shop-price::after { content: none; }
.game-v2 .shop-buy:disabled .shop-price { color: #cecdc2; }
.shop-price s { font-size: 10px; font-weight: 400; color: #cac8b6; }
.game-v2 .shop-entry.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 4px 6px;
  border: 1px dashed #a3926d64;
  background: transparent;
  box-shadow: none;
  color: #b6b7a8;
  font: italic 13px/1.2 var(--display-face);
}
@container (max-width: 240px) {
  .game-v2 .shop-preview {
    grid-template-columns: clamp(42px, 22cqi, 53px) minmax(0,1fr);
    gap: 5px;
    padding-inline: 4px;
  }
  .shop-title { font-size: 13px; }
  .game-v2 .kiosk .shop-buy { min-width: 40px; padding-inline: 3px; }
}
@container (min-width: 520px) {
  .game-v2 .shop-items { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
}

/* Printed ticker paper feeds through the journal housing. */
.game-v2 .log-panel {
  position: relative;
  display: grid;
  grid-template-rows: 15px minmax(0, 1fr);
  gap: 5px;
  height: 100%;
}

.ticker-machine {
  position: relative;
  min-height: 0;
  height: 100%;
}

.ticker-machine::before {
  content: '';
  position: absolute;
  left: 3%;
  right: 3%;
  top: -2px;
  height: 5px;
  border-radius: 50%;
  background: #120a14;
  box-shadow: 0 1px 0 #e3b23c77;
}

.game-v2 .event-log {
  position: relative;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 9px 13px 16px;
  color: #292011;
  background: linear-gradient(90deg, #e1ca8d, #f5f1e6 6%, #f5f1e6 94%, #dec68c);
  box-shadow: 0 7px 9px #120a1455;
  scrollbar-width: thin;
  scrollbar-color: #b28c33 #e8dec2;
  clip-path: polygon(0 0, 100% 0, 100% 97%, 97% 100%, 94% 97%, 91% 100%, 88% 97%, 85% 100%, 82% 97%, 79% 100%, 76% 97%, 73% 100%, 70% 97%, 67% 100%, 64% 97%, 61% 100%, 58% 97%, 55% 100%, 52% 97%, 49% 100%, 46% 97%, 43% 100%, 40% 97%, 37% 100%, 34% 97%, 31% 100%, 28% 97%, 25% 100%, 22% 97%, 19% 100%, 16% 97%, 13% 100%, 10% 97%, 7% 100%, 4% 97%, 0 100%);
}

.game-v2 .log-entry {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px;
  width: 100%;
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #2b2111;
  font: 12px/1.4 Arial, Helvetica, sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
}

.game-v2 .log-entry .log-number {
  min-width: 0;
  padding: 0;
  color: #7a4a16;
  font: 700 14px/1 Arial, Helvetica, sans-serif;
}

.log-card-button:hover .log-card-text {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.log-card-open {
  color: #6f481c;
  font-size: 13px;
}

/* Physical card previews and ceremonies stay on the same lit surface. */
#interaction-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: visible;
  pointer-events: none;
}

.raised-card-preview,
.drag-card-object {
  position: fixed;
  z-index: 90;
  width: 240px;
  pointer-events: none;
  filter: drop-shadow(0 24px 16px #120a1488);
  transform-origin: 50% 90%;
}

.drag-card-object {
  width: 148px;
  transform: rotate(var(--drag-tilt, 0deg));
}

.drag-card-object .playing-card {
  width: 148px;
  min-width: 148px;
  height: 208px;
  min-height: 208px;
}

.drag-card-object.is-returning {
  transition: left 360ms cubic-bezier(.16,.84,.24,1), top 360ms cubic-bezier(.16,.84,.24,1);
}

.interaction-engraving {
  position: fixed;
  left: 50%;
  top: 42%;
  max-width: calc(100vw - 36px);
  color: #ffe9b6;
  font: 700 16px/1.35 Arial, Helvetica, sans-serif;
  text-align: center;
  text-shadow: 0 2px 2px #120a14;
  transform: translateX(-50%);
}

.raised-card-preview .playing-card {
  width: 240px;
  min-width: 0;
  min-height: 336px;
  transform: none;
  box-shadow: none;
}

.raised-card-preview .card-art {
  height: 78px;
  flex-basis: 78px;
}

.raised-card-preview .card-body {
  padding: 14px;
  gap: 8px;
}

.raised-card-preview .card-body h3 {
  font-size: 18px;
}

.raised-card-preview .card-body .card-rules {
  font-size: 14px;
  line-height: 1.45;
}

body.is-in-game .modal-backdrop,
.table-ceremony {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
  background: none;
  backdrop-filter: none;
  pointer-events: auto;
}

body.is-in-game .modal,
.table-choice {
  width: min(920px, 100%);
  max-width: 920px;
  max-height: calc(100dvh - 56px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ivory);
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brass) var(--table-verde);
}

body.is-in-game:has(.table-choice) .game-v2 {
  filter: brightness(.88);
}

body.is-in-game .modal-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 8px 18px;
  border: 0;
  background: none;
}

body.is-in-game .modal-head h2 {
  margin: 0;
  color: var(--ivory);
  font: 700 20px/1.2 Arial, Helvetica, sans-serif;
  text-shadow: 0 2px 2px #120a14;
}

body.is-in-game .modal-close {
  position: relative;
  flex: 0 0 30px;
  color: #f5dc9d;
  background: none;
  font-size: 28px;
}

body.is-in-game .modal-content {
  padding: 0 10px 14px;
}

body.is-in-game .modal .authority-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  gap: 16px 28px;
  width: min(360px, 100%);
  height: auto;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body.is-in-game .modal .district-gauge {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: none;
  box-shadow: none;
}

body.is-in-game .modal p {
  color: #e5e9d7;
  font: 13px/1.5 Arial, Helvetica, sans-serif;
}

body.is-in-game .modal :is(.rule-step, .rules-stats, .district-info, .detail-tags span, .zone-entry) {
  border: 0;
  background: none;
}

body.is-in-game .choice-options {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
}

body.is-in-game .choice-option,
body.is-in-game .choice-card {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ivory);
}

body.is-in-game .choice-card .playing-card {
  width: 184px;
  min-width: 0;
  min-height: 258px;
}

.card-inspector {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.inspector-card,
.inspector-actions {
  width: min(100%, 280px);
}

.card-inspector .playing-card {
  width: 100%;
  min-width: 0;
  min-height: 360px;
  transform: none;
}

.card-inspector .card-art {
  height: 88px;
  flex-basis: 88px;
}

.card-inspector .card-body {
  padding: 16px;
  gap: 8px;
}

.card-inspector .card-body h3 {
  font-size: 19px;
}

.card-inspector .card-body .card-rules {
  font-size: 14px;
  line-height: 1.5;
}

.inspector-actions .btn {
  width: 100%;
}

.relic-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  justify-items: center;
  gap: 24px;
}

.relic-gallery-entry {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  max-width: 260px;
}

.relic-gallery-entry .playing-card {
  width: 100%;
  min-width: 0;
  min-height: 310px;
  transform: none;
}

.relic-gallery-status {
  color: #e9dcb0;
  font: 12px/1.35 Arial, Helvetica, sans-serif;
  text-align: center;
}

.relic-gallery-entry.is-owned .relic-gallery-status {
  color: #c3f2a2;
}

body.is-in-game .catalog-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

body.is-in-game .catalog-grid .playing-card {
  width: 100%;
  min-width: 0;
  min-height: 290px;
}

body.is-in-game :is(.catalog-toolbar input, .catalog-toolbar select) {
  border: 0;
  border-bottom: 1px solid #e3b23c88;
  background: transparent;
  color: var(--ivory);
}

.potato-countdown,
.potato-seat-badge {
  display: inline;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #e35b37;
  font: 700 10px/1.1 Arial, Helvetica, sans-serif;
}

.seat-potatoes {
  position: absolute;
  top: -4px;
  right: 2px;
}

/* Compatibility event objects: scene-specific theatre lives in scenes.css. */
.feedback-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  pointer-events: none;
  contain: layout style;
}

.feedback-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.event-beam {
  fill: none;
  stroke: var(--brass);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-dasharray: 14 8;
  filter: drop-shadow(0 0 4px currentColor);
  animation: event-beam-travel var(--event-duration, 480ms) ease both;
}

.beam-damage,
.beam-bomb,
.beam-hunger { stroke: var(--coral); }
.beam-heal { stroke: var(--absinthe); }
.beam-armor,
.beam-coins { stroke: var(--brass); }
.beam-draw,
.beam-discard { stroke: var(--arc); }
.beam-relic { stroke: var(--spirit); }

.resource-float {
  position: absolute;
  z-index: 5;
  max-width: min(280px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ivory);
  font: 700 28px/1 Arial, Helvetica, sans-serif;
  text-shadow: -1px -1px 0 #120a14, 1px -1px 0 #120a14, -1px 1px 0 #120a14, 1px 2px 0 #120a14;
  transform: translate(-50%, -50%);
  animation: resource-rises var(--event-duration, 700ms) cubic-bezier(.16,.84,.24,1) both;
}

.float-damage,
.float-bomb,
.float-hunger,
.float-duelPressure { color: var(--coral); }
.float-heal { color: var(--absinthe); }
.float-armor { color: var(--brass); }
.float-coins,
.float-buy { color: var(--coin-gold); }
.float-hpLoss { color: var(--spirit); }

.seat-flash {
  position: absolute;
  z-index: 1;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, #e3b23c22, transparent 70%);
  box-shadow: none;
  animation: seat-effect var(--event-duration, 480ms) ease both;
}

.flash-damage,
.flash-bomb { background: radial-gradient(ellipse, #ff5a3c33, transparent 70%); }
.flash-heal { background: radial-gradient(ellipse, #a3e63522, transparent 70%); }
.flash-armor { background: radial-gradient(ellipse, #e3b23c33, transparent 70%); }

.event-card-ghost {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  animation: card-through-table var(--event-duration, 800ms) cubic-bezier(.16,.84,.24,1) both;
}

.event-card-ghost .playing-card {
  width: 148px;
  min-width: 148px;
  min-height: 208px;
}

.event-caption {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 30px;
  width: max-content;
  max-width: min(620px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ivory);
  text-align: center;
  text-shadow: 0 2px 2px #120a14;
  transform: translateX(-50%);
  animation: caption-appears var(--event-duration, 900ms) ease both;
}

.event-caption-title,
.event-caption-detail {
  display: block;
  color: inherit;
}

.event-caption-title { font: 700 13px/1.3 Arial, Helvetica, sans-serif; }
.event-caption-detail { margin-top: 4px; font: 12px/1.4 Arial, Helvetica, sans-serif; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body.is-in-game :is(.event-log, .card-rules, .modal)::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}

body.is-in-game :is(.event-log, .card-rules, .modal)::-webkit-scrollbar-track {
  border-radius: 8px;
  background: #1e3a34;
}

body.is-in-game :is(.event-log, .card-rules, .modal)::-webkit-scrollbar-thumb {
  border: 2px solid #1e3a34;
  border-radius: 8px;
  background: #e3b23c;
}

body.is-in-game :is(.event-log, .card-rules, .modal)::-webkit-scrollbar-thumb:hover {
  background: #f5c542;
}

@keyframes event-beam-travel {
  0% { stroke-dashoffset: 55; opacity: 0; }
  18%, 72% { opacity: .95; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes resource-rises {
  0% { transform: translate(-50%, 0); opacity: 0; }
  18%, 70% { opacity: 1; }
  100% { transform: translate(-50%, -100%); opacity: 0; }
}

@keyframes seat-effect {
  0%, 100% { opacity: 0; }
  25%, 65% { opacity: 1; }
}

@keyframes card-through-table {
  0% { transform: translate(calc(-50% + var(--from-x, 0px)), calc(-50% + var(--from-y, 30px))) rotate(-8deg) scale(.6); opacity: 0; }
  20% { opacity: 1; }
  55%, 80% { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -52%); opacity: 0; }
}

@keyframes caption-appears {
  0% { opacity: 0; }
  16%, 84% { opacity: 1; }
  100% { opacity: 0; }
}

/* At a lower camera height, objects shrink together instead of adding panels. */
@media (min-width: 1001px) and (max-height: 860px) {
  .game-v2 {
    --far-track: 138px;
    --near-track: 236px;
    grid-template-rows: 22px 56px minmax(0, 1fr);
    gap: 7px;
    padding: 6px 18px 8px;
  }

  .game-v2 .table-layout {
    grid-template-columns: 148px minmax(0, 1fr) 218px;
    gap: 8px 20px;
  }

  .turn-console {
    padding-block: 2px;
  }

  .phase-index { font-size: 21px; }
  .turn-heading { font-size: 23px; }
  .instrument-value { font-size: 22px; }
  .instrument { min-height: 40px; }
  .instrument-symbol { height: 16px; }
  .card-back { width: 40px; height: 56px; }
  .game-v2 .authority-aside { max-height: none; }
  .game-v2 .near-side { grid-template-columns: 140px minmax(0, 1fr) 204px; gap: 16px; }
  .game-v2 .my-seat .instrument-value { font-size: 30px; }
  .game-v2 .my-seat .instrument { min-width: 38px; }
  .game-v2 .relic-dock .relic-socket { width: 60px; height: 84px; }
  .game-v2 .hand { padding-bottom: 20px; }
  .arena-card-wrap { max-height: 200px; }
  .game-v2 .arena-card-wrap .card-art { flex-basis: 28px; min-height: 28px; height: 28px; }
  .game-v2 .arena-card-wrap .card-body { padding: 6px 8px; }
  .game-v2 .arena-action-area .play-preview { display: none; }
  .game-v2 .battlefield { grid-template-columns: 80px minmax(0, 1fr); gap: 5px 14px; }
  .ether-deck { width: 54px; height: 76px; }
  .ether-apparatus { gap: 5px; }
  .ether-deck::before { inset: -8px; }
  .ether-deck::after { inset: -12px; }
}

@media (min-width: 1001px) and (max-height: 650px) {
  .game-v2 { --far-track: 112px; --near-track: 210px; --card-width: 132px; --card-height: 186px; }
  .card-back { width: 28px; height: 39px; }
  .hand-heading { font-size: 9px; }
  .game-v2 .hand-card-wrap .card-body h3 { font-size: 13px; }
  .game-v2 .hand-card-wrap .card-rules { font-size: 11px; }
  .game-v2 .hand-card-wrap .card-art { flex-basis: 32px; min-height: 32px; height: 32px; }
  .game-v2 .arena-card-wrap .card-art { display: none; }
}

/* Narrow tables: instruments and kiosk remain objects on the same marble. */
@media (max-width: 1000px) {
  .game-v2 {
    --far-track: 128px;
    --near-track: 242px;
    --card-width: 124px;
    --card-height: 174px;
    grid-template-rows: 20px 54px minmax(0, 1fr) 38px;
    gap: 6px;
    padding: 6px 12px 8px;
  }

  .game-options { gap: 4px; }
  .game-options .btn { padding-inline: 3px; }
  .game-options .btn span { display: none; }
  .game-toolbar .room-meta { font-size: 10px; gap: 8px; }
  .turn-console { grid-template-columns: minmax(70px, 1fr) minmax(150px, 1.2fr) auto; gap: 8px; padding: 0; }
  .turn-heading { font-size: clamp(16px, 3.8vw, 22px); }
  .turn-kicker { font-size: 8px; letter-spacing: .5px; }
  .phase-stepper { gap: 8px; }
  .phase-index { font-size: 20px; }
  .phase-label { font-size: 8px; }
  .turn-context { gap: 5px; }
  .turn-context :is(.plays-meter, .context-help) { display: none; }
  .turn-timer { width: 42px; height: 42px; flex-basis: 42px; }
  .turn-timer svg { inset: 3px; width: 36px; height: 36px; }
  .timer-digits { font-size: 10px; }
  .game-v2 .end-turn-button { min-height: 30px; padding: 5px 8px; font-size: 10px; }
  .game-v2 .table-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--far-track) minmax(0, 1fr) var(--near-track); gap: 6px; }
  .game-v2 .opponents { grid-column: 1; grid-row: 1; gap: 10px; }
  .game-v2 .player-name { font-size: 11px; }
  .player-instruments { gap: 4px; }
  .instrument { min-width: 26px; min-height: 34px; }
  .instrument-symbol { height: 12px; font-size: 12px; }
  .instrument-symbol svg { width: 16px; height: 16px; }
  .instrument-value { font-size: 20px; }
  .instrument-limit { display: none; }
  .instrument-stack { top: 1px; width: 18px; height: 14px; }
  .card-back { width: 30px; height: 42px; }
  .game-v2 .battlefield { grid-column: 1; grid-row: 2; grid-template-columns: 66px minmax(0, 1fr); grid-template-rows: 17px minmax(0, 1fr); gap: 4px 10px; }
  .battlefield::before { width: 290px; left: 55%; }
  .battlefield-topline { justify-content: space-between; gap: 6px; }
  .arena-label { display: none; }
  .current-target { font-size: 10px; }
  .game-v2 :is(.damage-cap-gauge, .duel-pressure-gauge) { font-size: 9px; }
  .game-v2 .latest-play { grid-template-columns: minmax(90px, 130px) minmax(0, 1fr); gap: 12px; }
  .arena-card-wrap { max-height: 205px; }
  .game-v2 .arena-card-wrap .card-art { flex-basis: 24px; min-height: 24px; height: 24px; }
  .game-v2 .arena-card-wrap .card-body { padding: 6px; gap: 4px; }
  .game-v2 .arena-card-wrap .card-body h3 { font-size: 13px; }
  .game-v2 .arena-card-wrap .card-rules { font-size: 11px; line-height: 1.3; }
  .arena-action-area { gap: 6px; }
  .event-route { font-size: 9px; gap: 4px; }
  .game-v2 .arena-action-area .play-preview { display: none; }
  .game-v2 .arena-play { min-height: 34px; padding: 6px 8px; font-size: 11px; }
  .game-v2 .selection-buttons .icon-button { width: 22px; min-width: 22px; height: 26px; font-size: 17px; }
  .selection-buttons { gap: 3px; }
  .action-disabled-reason { font-size: 9px; line-height: 1.2; }
  .latest-result strong { font-size: 20px; }
  .latest-event-label { display: none; }
  .ether-deck { width: 42px; height: 60px; }
  .ether-deck::before { inset: -7px; }
  .ether-deck::after { inset: -10px; }
  .ether-apparatus { gap: 6px; }
  .deck-count { font-size: 20px; }
  .dynamite-rack { max-width: 60px; gap: 2px; }
  .dynamite-stick { width: 4px; height: 13px; }
  .discard-tray, .ash-brazier { min-width: 28px; min-height: 21px; font-size: 20px; }
  .game-v2 .near-side { grid-column: 1; grid-row: 3; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 44px minmax(0, 1fr); gap: 4px 8px; }
  .game-v2 .my-seat { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 10px; }
  .game-v2 .my-seat .player-header { display: none; }
  .game-v2 .my-seat .player-instruments { gap: 9px; }
  .game-v2 .my-seat .instrument { min-width: 36px; min-height: 39px; }
  .game-v2 .my-seat .instrument-symbol { height: 13px; font-size: 12px; }
  .game-v2 .my-seat .instrument-symbol svg { width: 18px; height: 18px; }
  .game-v2 .my-seat .instrument-value { font-size: 24px; }
  .game-v2 .my-seat .instrument-stack { width: 20px; top: 0; }
  .game-v2 .relic-dock { grid-column: 2; grid-row: 1; display: flex; align-items: center; }
  .relic-dock h2 { display: none; }
  .game-v2 .relic-dock .relic-slots { gap: 6px; }
  .game-v2 .relic-dock .relic-socket { width: 28px; height: 39px; padding: 3px; }
  .relic-dock .relic-socket .playing-card { width: 22px; height: 31px; }
  .game-v2 .hand-zone { grid-column: 1 / -1; grid-row: 2; grid-template-rows: 15px minmax(0, 1fr); }
  .hand-heading { justify-content: center; }
  .game-v2 .hand { padding-bottom: 7px; }
  .hand-card-wrap.is-reading { transform: none; }
  .game-v2 .hand-card-wrap .card-top { flex-basis: 16px; min-height: 16px; height: 16px; font-size: 8px; padding: 2px 4px; }
  .game-v2 .hand-card-wrap .card-art { flex-basis: 32px; min-height: 32px; height: 32px; }
  .game-v2 .hand-card-wrap .card-art svg { width: 25px; height: 25px; }
  .game-v2 .hand-card-wrap .card-body { padding: 6px; gap: 3px; }
  .game-v2 .hand-card-wrap .card-body h3 { font-size: 12px; }
  .game-v2 .hand-card-wrap .card-rules { font-size: 11px; -webkit-line-clamp: 4; }
  .hand-card-key { top: 20px; left: 4px; width: 12px; height: 12px; font-size: 8px; }
  .game-v2 .authority-aside, .game-v2 .right-sidebar { grid-column: 1; grid-row: 3; height: 100%; width: 100%; }
  .game-v2 .right-sidebar { display: contents; }
  .game-v2 .authority-aside, .game-v2 .shop-panel, .game-v2 .log-panel { display: none; }
  .game-v2[data-dock='authority'] .authority-aside { display: grid; grid-template-rows: 18px minmax(0, 1fr); }
  .game-v2[data-dock='shop'] .shop-panel { display: grid; grid-column: 1; grid-row: 3; }
  .game-v2[data-dock='log'] .log-panel { display: grid; grid-column: 1; grid-row: 3; }
  .game-v2:not([data-dock='hand']) .near-side { display: none; }
  .game-v2:not([data-dock='hand']) .observer-engraving { display: none; }
  .game-v2 .authority-panel { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .game-dock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 6px; padding-bottom: env(safe-area-inset-bottom); }
  .dock-button { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 30px; padding: 0; border: 0; border-radius: 0; background: none; color: #d6dfd0; }
  .dock-button > span { color: #d6cfab; font-size: 20px; line-height: 1; }
  .dock-button small { font-size: 9px; }
  .dock-button.active { color: #fff0b3; text-shadow: 0 0 6px #e3b23c66; }
  .dock-button.active > span { color: var(--coin-gold); }
  .event-caption { bottom: 52px; }
  body.is-in-game .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .turn-console { grid-template-columns: minmax(50px, 1fr) 90px auto; gap: 4px; }
  .phase-stepper { gap: 3px; }
  .phase-label { display: none; }
  .phase-index { font-size: 20px; }
  .turn-timer { display: grid; }
  .timer-digits { font-size: 12px; }
  .game-v2 .end-turn-button { max-width: 89px; font-size: 9px; padding: 6px; }
  .game-v2 .latest-play { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 5px; }
  .game-v2 .arena-card-wrap { max-width: 220px; }
  .game-v2 .arena-card-wrap .card-top { height: 5px; min-height: 5px; flex-basis: 5px; padding: 0; font-size: 0; }
  .game-v2 .arena-card-wrap .card-top span { font-size: 0; }
  .game-v2 .arena-card-wrap .card-art { display: none; }
  .game-v2 .arena-card-wrap .card-body h3 { font-size: 13px; }
  .game-v2 .arena-card-wrap .card-rules { font-size: 11px; }
  .arena-action-area { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px 7px; }
  .arena-action-area .event-route { width: 100%; justify-content: center; }
  .arena-action-area .selection-buttons { flex: 1 1 auto; }
  .arena-action-area .action-disabled-reason { display: none; }
  .arena-action-area .latest-result { flex-wrap: nowrap; }
  .arena-action-area > [data-command='card-detail'] { display: none; }
  .game-v2 .arena-play { min-height: 29px; font-size: 11px; }
  .game-v2 .selection-buttons .icon-button { height: 25px; }
  .game-v2 .opponents { gap: 8px; }
  .game-v2 .player-name { font-size: 12px; }
  .game-v2 .relic-dock .relic-slots { gap: 4px; }
  .game-v2 .my-seat .player-instruments { gap: 6px; }
  body.is-in-game .modal-backdrop { padding: 14px; }
  body.is-in-game .modal { max-height: calc(100dvh - 28px); }
  body.is-in-game .modal-head h2 { font-size: 17px; }
  body.is-in-game .modal-content { padding-inline: 4px; }
  body.is-in-game .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body.is-in-game .choice-card .playing-card { width: 140px; min-height: 220px; }
  .relic-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .relic-gallery-entry .playing-card { min-height: 260px; }
  .relic-gallery-entry .card-body .card-rules { font-size: 11px; }
  .public-choice-offer { left: 57%; gap: 10px; }
  .public-choice-offer .card-back { width: 58px; height: 81px; }
}

@media (max-width: 1000px) and (max-height: 720px) {
  .game-v2 { --far-track: 108px; --near-track: 196px; --card-width: 104px; --card-height: 146px; grid-template-rows: 24px 43px minmax(0, 1fr) 32px; gap: 4px; padding: 4px 10px 5px; }
  .card-back { width: 24px; height: 34px; }
  .game-v2 .near-side { grid-template-rows: 36px minmax(0, 1fr); gap: 2px; }
  .game-v2 .my-seat .instrument { min-height: 33px; }
  .game-v2 .my-seat .instrument-symbol { height: 10px; }
  .game-v2 .my-seat .instrument-value { font-size: 22px; }
  .game-v2 .relic-dock .relic-socket { width: 24px; height: 33px; }
  .relic-dock .relic-socket .playing-card { width: 19px; height: 27px; }
  .game-v2 .hand-zone { grid-template-rows: 12px minmax(0, 1fr); }
  .game-v2 .hand-card-wrap .card-art { flex-basis: 23px; min-height: 23px; height: 23px; }
  .game-v2 .hand-card-wrap .card-art svg { width: 20px; height: 20px; }
  .game-v2 .hand-card-wrap .card-body { padding: 5px; }
  .game-v2 .hand-card-wrap .card-body h3 { font-size: 11px; }
  .game-v2 .hand-card-wrap .card-rules { font-size: 10px; -webkit-line-clamp: 3; }
  .game-v2 .hand { padding-bottom: 2px; }
  .hand-heading .section-label { font-size: 9px; }
  .game-v2 .battlefield { grid-template-rows: 15px minmax(0, 1fr); gap: 3px 8px; }
  .game-v2 .arena-card-wrap .card-body { padding: 5px; }
  .game-v2 .arena-card-wrap .card-body h3 { font-size: 12px; }
  .game-v2 .arena-card-wrap .card-rules { font-size: 10.5px; line-height: 1.3; }
  .game-v2 .arena-play { min-height: 27px; }
  .game-v2 .authority-panel { gap: 4px; }
  .game-v2 .claim-button { font-size: 9px; }
  .dock-button { min-height: 27px; }
}


.instrument-symbol {
  position: relative;
  z-index: 1;
}

.game-v2 .instrument-stack {
  width: 18px;
  height: 12px;
}

.game-v2 .instrument-stack i {
  background: linear-gradient(155deg, #f5d897, #ba8744 45%, #936535 74%, #e0ab5d);
  box-shadow: 0 1px 0 #66411f;
}

.game-v2 .instrument-armor:has(.instrument-symbol):not(:has(.instrument-stack)) .instrument-symbol {
  opacity: .72;
}

.game-v2 .instrument-value {
  font-weight: 600;
  letter-spacing: -.045em;
  text-shadow: 0 1px 2px #142128;
}

.game-v2 .turn-timer {
  background: radial-gradient(circle, #193a36 57%, #9e8e68 59%, #d9c59a 62%, #746545 65%, #99774d 67%, transparent 69%);
  filter: drop-shadow(0 2px 2px #15252599);
}

.game-v2 :is(.end-turn-button, .arena-play),
.game-v2 :is(.end-turn-button, .arena-play):hover:not(:disabled) {
  border-radius: 3px;
  background: linear-gradient(108deg, #a1885b, #d4bd8f 25%, #e6cca0 55%, #b29972);
  box-shadow: inset 0 1px #fff2ccaa, inset 0 -1px #8f764b, 0 2px 0 #694d33, 2px 5px 5px #1b162d65;
  color: #2c241d;
  text-shadow: none;
}

.game-v2 :is(.end-turn-button, .arena-play):hover:not(:disabled) {
  background: linear-gradient(108deg, #b29b73, #e4d1ac 28%, #f3dcb2 57%, #c9af85);
}

.game-v2 :is(.end-turn-button, .arena-play):active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: inset 0 1px 2px #49371f65, 0 1px #5c4d36;
}

.game-v2 .event-log {
  align-self: start;
  height: auto;
  max-height: 100%;
  background: linear-gradient(100deg, #c5b48f, #eee7d5 4%, #e3d7bc 64%, #eee4c9 93%, #d2bf99);
  padding-bottom: 12px;
}
.game-v2 .log-entry { color: #352f22; }
.game-v2 .ticker-machine::before {
  inset: 16px 2% auto;
  height: 4px;
  background: linear-gradient(#c5ab77, #594934 35%, #192c29 70%);
}
.game-v2 .section-label strong { color: #d7c8a3; }
.game-v2 .room-meta { flex-wrap: nowrap; white-space: nowrap; }
.game-v2 .room-code { white-space: nowrap; }
.game-v2 .game-options { flex-shrink: 0; }
.game-v2 .game-options button { white-space: nowrap; }
.game-v2 .ticker-machine .section-label { align-self: start; }
.game-v2 .hand-heading { justify-content: center; }
.game-v2 .hand-heading .section-label strong { margin-inline-start: .3em; }
.game-v2 .player-name { letter-spacing: .01em; }

.game-v2 .ether-apparatus {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-self: center;
  width: min(100%, 110px);
  column-gap: 4px;
}
.ether-apparatus > :is(.ether-deck, .deck-count, .dynamite-rack, .rift-widget) { grid-column: 1 / -1; }
.ether-arcs { position: absolute; pointer-events: none; }
.game-v2 .deck-count { color: #d7c292; font-size: 14px; }
.deck-count b { color: var(--ivory); font-size: 20px; }
.game-v2 .discard-tray,
.game-v2 .ash-brazier {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 1px;
  width: 100%;
  max-width: 47px;
  min-width: 0;
  min-height: 35px;
  padding: 0;
  background: transparent;
  color: #eedfc1;
}
.game-v2 .ash-brazier { color: #c0eced; }
.game-v2 .discard-tray > .tray-cards {
  display: block;
  height: 14px;
  color: #cfb88e;
  font-size: 20px;
  line-height: .7;
  text-shadow: 1px 2px #535844;
}
.game-v2 .brazier-flame {
  position: static;
  width: 8px;
  height: 11px;
  opacity: .94;
  transform: rotate(-12deg);
}
.rift-widget {
  display: grid;
  place-content: center;
  justify-items: center;
  width: 65px;
  aspect-ratio: .78;
  color: #fff2da;
  font: 12px/1.25 var(--display-face);
  background: radial-gradient(ellipse at 50% 43%, #1c153c 0 29%, #705395 39%, #c49ad3 41%, #664a81 44%, #243c4e33 57%, transparent 68%);
}
.rift-widget b { font-size: 23px; }
.game-v2 .latest-play:has(~ .public-choice-offer) > * { visibility: hidden; }
.game-v2 .authority-aside,
.game-v2 .right-sidebar,
.game-v2 .relic-dock { align-content: stretch; }

@media (min-width: 1001px) {
  .game-v2 .opponents:has(.opponent:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .game-v2 .opponent .socket-art { width: 70%; height: 66%; }
  .game-v2 .opponent .socket-name { display: none; }
  .game-v2 .my-seat .instrument-stack { width: 24px; height: 17px; }
  .game-v2 .opponent-relics .relic-socket.empty { color: #b9ae8980; }
}

@media (min-width: 1001px) and (max-height: 720px) {
  .game-v2 .ether-deck { width: 40px; height: 57px; }
  .game-v2 .ether-apparatus { gap: 4px; }
}

@media (max-width: 1000px) {
  .game-v2 .opponents:has(.opponent:nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }
  .game-v2 .opponent .socket-name { display: none; }
  .game-v2 .opponent .socket-art { width: 75%; height: 72%; }
  .game-v2 .relic-dock .socket-name { display: none; }
  .game-v2 .relic-dock .socket-art { width: 81%; height: 81%; }
  .game-v2 .relic-slot .drop-slot { top: -7px; right: -5px; }
  .game-v2 .instrument-stack { width: 12px; height: 9px; }
  .game-v2 .game-dock { padding-block: 0; }
  .game-v2 .dock-button { min-height: 34px; gap: 4px; }
  .game-v2 .dock-button small { font-size: 10px; }
  .game-v2 .table-layout:has(.observer-engraving) { --near-track: 165px; }
  .game-v2[data-dock='hand'] .table-layout:has(.observer-engraving) { --near-track: 50px; }
}

@media (max-width: 1000px) and (max-height: 720px) {
  .game-v2 .ether-apparatus { grid-template-rows: 44px 21px 33px; gap: 4px; }
  .game-v2 .ether-deck { grid-column: 1; grid-row: 1; width: 23px; height: 33px; margin: 0; }
  .game-v2 .dynamite-rack {
    grid-column: 2; grid-row: 1;
    flex-direction: column;
    align-self: center;
    width: 100%;
    gap: 2px;
  }
  .game-v2 .dynamite-sticks { gap: 1px; padding-top: 2px; }
  .game-v2 .dynamite-stick { width: 3px; height: 8px; }
  .game-v2 .deck-count { grid-row: 2; }
  .game-v2 .rift-widget { grid-row: 1 / 3; width: 46px; }
  .game-v2 .discard-tray, .game-v2 .ash-brazier { grid-row: 3; align-content: center; min-height: 33px; }
  .game-v2 .discard-tray > span:nth-child(2), .game-v2 .ash-brazier > span:nth-child(2) { display: none; }
  .game-v2 .hand-card-wrap.is-reading { transform: none; }
  .game-v2 .hand-heading { z-index: 52; }
}

@media (max-width: 380px) {
  .game-v2 .game-toolbar { gap: 4px; }
  .game-v2 .game-toolbar .room-meta { gap: 4px; }
  .game-v2 .game-options { gap: 2px; }
  .game-v2 .game-options .icon-button { min-width: 24px; width: 24px; }
  .game-v2 .room-code { font-size: 10px; letter-spacing: 1px; }
  .game-v2 .game-options .btn { font-size: 10px; }
}

@media (max-height: 550px) {
  body.is-in-game #app { overflow-y: auto; }
  .game-v2 { min-height: 565px; }
}

@media (prefers-reduced-motion: no-preference) {
  body:not(.motion-quiet):not(.table-sleeping) .latest-play.is-empty::before {
    animation: city-foil 12s ease-in-out infinite;
  }
  @keyframes city-foil {
    0%, 100% { opacity: .54; scale: 1; }
    50% { opacity: .68; scale: 1.02; }
  }
}

/* Keep the drawn light on the marble, leaving printed and engraved type crisp. */
.game-v2 :is(.turn-heading, .player-name, .instrument-value, .gauge-value, .room-code,
.arena-label, .section-label, .shop-heading h2, .turn-kicker, .shop-price, .deck-count,
.btn, .last-play-engraving, .seat-target-label, .hunger-note, .event-target, .event-actor,
.damage-cap-gauge, .target-prompt, .discard-tray, .ash-brazier) { text-shadow: none; }
.game-v2 .player-name { font: 600 clamp(13px, 1.2vw, 18px)/1.2 var(--display-face); }
.game-v2 .last-play-engraving { color: #d1c9ae; font-size: 12px; }
.game-v2 .arena-label { color: #f2dec1; }
.game-v2 .opponent-relics .relic-socket.empty {
  background: linear-gradient(145deg, #17262763, #21212a33);
  box-shadow: inset 0 1px 4px #17242680, 0 1px #a39c772e;
  color: #bfb59485;
}

body.is-in-game .table-choice { --display-face: Georgia, 'Times New Roman', serif; }
body.is-in-game .table-choice .modal-head h2 {
  font: 500 clamp(22px, 2vw, 30px)/1.18 var(--display-face);
  text-align: center;
  text-shadow: none;
}
body.is-in-game .table-choice .modal-close {
  flex: 0 0 34px;
  height: 34px;
  font-weight: 400;
  line-height: 1;
}
body.is-in-game .table-choice .modal-content > p:first-child {
  max-width: 65ch;
  margin: 0 auto 17px;
  text-align: center;
}
body.is-in-game .table-choice .choice-card-label { font: 600 12px/1.5 system-ui, sans-serif; color: #f1deb3; }
body.is-in-game .table-choice .choice-option {
  min-height: 35px;
  padding: 7px 15px;
  color: #332e25;
  background: linear-gradient(112deg, #c6ac80, #ecdbb2 61%, #c6ad83);
  box-shadow: 0 2px 0 #7f6a4c, 0 4px 8px #14292755;
}
body.is-in-game .table-choice .gift-tray {
  padding-block: 14px 9px;
  background: radial-gradient(ellipse at 50% 92%, #e0bf7c28 1%, #765b4b1f 50%, transparent 70%);
}
body.is-in-game .table-choice:is([data-ceremony='rules'], [data-ceremony='generic'], [data-ceremony='end-confirm']) {
  width: min(470px, 100%);
  padding: clamp(17px, 3vw, 34px);
  color: #29322c;
  background: linear-gradient(116deg, #f5edd9, #ede2cc 65%, #e3d5b9);
  border-radius: 1px;
  box-shadow: 1px 2px #8c7a5e, 3px 12px 23px #131b2280;
}
body.is-in-game .table-choice[data-ceremony='rules'] { width: min(715px, 100%); }
body.is-in-game .table-choice:is([data-ceremony='rules'], [data-ceremony='generic'], [data-ceremony='end-confirm'])
:is(h2, h3, p, b, summary, .modal-close, .hunger-warning, .end-confirm-icons, .field > span) { color: #29342e; }
body.is-in-game .table-choice:is([data-ceremony='rules'], [data-ceremony='generic'], [data-ceremony='end-confirm'])
:is(.rules-stats span, .data-note, .rule-step span, .hint-icons) { color: #6a5a3c; }
body.is-in-game .table-choice:is([data-ceremony='rules'], [data-ceremony='generic'], [data-ceremony='end-confirm']) .btn {
  border: 1px solid #9d947c;
  background: #f8f0dd;
  color: #28372f;
}
body.is-in-game .table-choice:is([data-ceremony='rules'], [data-ceremony='generic'], [data-ceremony='end-confirm']) .btn:is(.primary, .danger) {
  background: #25433a;
  border-color: #25433a;
  color: #fff6dd;
}
body.is-in-game .table-choice .modal-content h3 { font-family: var(--display-face); }
body.is-in-game .table-choice .modal-actions { justify-content: center; }
body.is-in-game .table-choice[data-ceremony='end-confirm'] .end-confirm-icons { text-align: center; }
body.is-in-game .table-choice[data-ceremony='card'] { width: min(380px, 100%); }
body.is-in-game .table-choice[data-ceremony='pending'] { width: min(845px, 100%); }
body.is-in-game .table-choice[data-ceremony='authority'] { width: min(440px, 100%); }
body.is-in-game .table-choice[data-ceremony='authority'] .authority-panel { grid-template-columns: repeat(4, minmax(0,1fr)); grid-template-rows: auto auto; gap: 12px; }

@media (max-width: 1000px) {
  .game-v2 .hand {
    padding-bottom: 13px;
  }
  .hand-card-wrap {
    transform: translateY(calc(var(--fan-rise, 0px) * .65)) rotate(calc(var(--fan-angle, 0deg) * .6));
  }
}
@media (max-width: 600px) {
  body.is-in-game .modal .choice-options { gap: 14px; }
  body.is-in-game .table-choice[data-ceremony='authority'] .authority-panel { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.is-in-game .table-choice[data-ceremony='pending'] .choice-card { flex: 0 1 calc(50% - 8px); }
  body.is-in-game .table-choice[data-ceremony='pending'] .choice-card .playing-card { width: 100%; min-width: 0; }
  .game-v2 .room-word { display: none; }
  .game-v2 .hand-zone { grid-template-rows: minmax(0, 1fr); }
  .game-v2 .hand-heading {
    position: absolute;
    top: -38px;
    left: 42%;
    right: 26%;
    display: grid;
    justify-items: center;
    gap: 2px;
    pointer-events: none;
  }
  .game-v2 .hand-card-wrap.is-reading {
    transform: none;
  }
  .game-v2 .latest-play:not(.is-empty) {
    grid-template-rows: minmax(0, 1fr) auto;
    row-gap: 7px;
  }
  .game-v2 .latest-play:not(.is-empty)::before { opacity: .18; }
  .game-v2 .arena-card-wrap {
    display: flex;
    width: min(100%, 162px);
    height: auto;
    max-height: 100%;
    align-self: center;
  }
  .game-v2 .arena-card-wrap .playing-card {
    height: auto;
    min-height: 140px;
    max-height: 100%;
  }
  .game-v2 .arena-card-wrap .card-top {
    height: 16px;
    min-height: 16px;
    flex-basis: 16px;
    padding: 2px 7px;
    font-size: 8px;
  }
  .game-v2 .arena-card-wrap .card-top span { font-size: inherit; }
  .game-v2 .arena-card-wrap .card-art {
    display: grid;
    height: 63px;
    min-height: 36px;
    flex: 0 1 63px;
  }
  .game-v2 .arena-card-wrap .card-body { flex: 0 1 auto; padding: 7px 8px 9px; }
  .game-v2 .arena-card-wrap .card-body h3 { font-size: 14px; }
  .game-v2 .arena-card-wrap .card-rules {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
  }
  .game-v2 .selection-buttons .icon-button { width: 30px; min-width: 30px; height: 32px; }
  .game-v2 .last-play-engraving { max-width: 20ch; font-size: 11px; }
}

/* A short viewport still has room for a printed face and its reading control. */
@media (max-width: 600px) and (max-height: 630px) {
  .game-v2 .latest-play:not(.is-empty) { row-gap: 3px; }
  .game-v2 .arena-card-wrap { width: min(100%, 260px); }
  .game-v2 .arena-card-wrap .playing-card {
    display: grid;
    grid-template-columns: minmax(42px, .42fr) minmax(0, 1fr);
    grid-template-rows: 14px minmax(0, 1fr);
    min-height: 60px;
    max-height: 86px;
  }
  .game-v2 .arena-card-wrap .card-top {
    grid-column: 1 / -1;
    height: 14px;
    min-height: 0;
  }
  .game-v2 .arena-card-wrap .card-art { height: 100%; min-height: 0; }
  .game-v2 .arena-card-wrap .card-body { padding: 4px 5px; gap: 2px; overflow: hidden; }
  .game-v2 .arena-card-wrap .card-body h3 { font-size: 12px; }
  .game-v2 .arena-card-wrap .card-rules { font-size: 11px; -webkit-line-clamp: 2; }
  .game-v2 .arena-action-area .event-route { font-size: 9px; }
}

/* Motion never carries the only copy of information. Quiet mode keeps paths and numbers. */
body.motion-quiet .hand-card-wrap,
body.motion-quiet .gauge-needle {
  transition: none;
}

body.motion-quiet .seat-flash,
body.animations-off .seat-flash {
  display: none;
}

body.motion-quiet .resource-float,
body.animations-off .resource-float {
  animation: none;
  opacity: 1;
  transform: translate(-50%, -50%);
}

body.motion-quiet .event-beam,
body.animations-off .event-beam {
  animation: none;
  opacity: .9;
}

body.motion-quiet .event-card-ghost,
body.animations-off .event-card-ghost {
  display: none;
}

body.motion-quiet .event-caption,
body.animations-off .event-caption {
  animation: none;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hand-card-wrap,
  .gauge-needle {
    transition: none;
  }
  .seat-flash,
  .event-card-ghost { display: none; }
  .event-beam { opacity: .9; }
  .resource-float { opacity: 1; transform: translate(-50%, -50%); }
}

/* Table controls use one set of engraved marks. */
.table-mark {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  flex: none;
  vertical-align: -.14em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.game-toolbar .table-mark { width: 17px; height: 17px; }
.room-code .table-mark { width: 12px; height: 12px; }
.deck-count .object-name {
  display: block;
  font: 600 10px/1.2 system-ui,sans-serif;
  color: #e6d8b9;
  letter-spacing: .05em;
}
.game-v2 .deck-count { display: flex; align-items: center; justify-content: center; gap: 5px; }
@media (max-width:1000px) {
  .game-v2 :is(.battlefield,.authority-aside,.shop-panel,.game-dock) { touch-action: pan-y pinch-zoom; }
  .game-v2 .hand { touch-action: pan-y pinch-zoom; }
}

/* Districts, the clock and the kiosk are fittings on the matte table. */
.game-v2 {
  --frame-edge: #71684d;
  --frame-fill: linear-gradient(150deg, #29312b, #1d2825 63%, #1c2524);
  --frame-shadow: inset 0 1px #bba78022, 0 3px 8px #050c0b55;
}
.game-v2 .turn-console,
.game-v2 .authority-aside,
.game-v2 .kiosk,
.game-v2 .log-panel {
  box-sizing: border-box;
  border: 1px solid var(--frame-edge);
  border-radius: 6px;
  background: var(--frame-fill);
  box-shadow: var(--frame-shadow);
}
.game-v2 .turn-console {
  width: min(1090px, 100%);
  padding: 6px clamp(12px, 2vw, 26px);
}
.game-v2 .authority-aside {
  grid-template-rows: auto auto;
  align-self: center;
  align-content: start;
  height: auto;
  max-height: 100%;
  padding: 9px;
  gap: 7px;
  overflow: auto;
}
.game-v2 .authority-aside > .section-label { padding: 0 2px; }
.game-v2 .authority-panel,
body.is-in-game .table-choice[data-ceremony='authority'] .authority-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  grid-template-rows: none;
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: 7px 6px;
}
:is(.game-v2, .table-choice) .district-gauge {
  display: grid;
  justify-items: stretch;
  grid-template-columns: minmax(0,1fr);
  width: 100%;
  gap: 2px;
}
:is(.game-v2, .table-choice) .district-relics-button {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  height: auto;
  padding: 1px;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--district);
  text-shadow: none;
  text-align: left;
}
.district-meter {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(29px, 2.7vw, 44px);
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 28%, #344139, #1c2522 72%);
  box-shadow: inset 0 0 0 1px #a6976b, 0 1px 1px #101814;
}
.district-meter .gauge-dial {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  fill: none;
  stroke-width: 4.5;
  transform: rotate(-90deg);
}
.gauge-dial .meter-track { stroke: color-mix(in srgb, var(--district) 33%, #26332c); }
.gauge-dial .meter-fill { stroke: var(--district); stroke-linecap: butt; transition: stroke-dasharray 640ms ease-out; }
.district-meter .gauge-icon { display: block; width: 51%; height: 51%; color: var(--district); }
.district-meter .gauge-icon svg { display: block; width: 100%; height: 100%; }
.district-caption { display: grid; min-width: 0; justify-items: start; gap: 2px; }
.district-caption .gauge-name { color: #e5e3cf; font: 600 10px/1.07 system-ui,sans-serif; }
.gauge-reading { white-space: nowrap; font: 600 14px/1 system-ui,sans-serif; font-variant-numeric: tabular-nums; }
.gauge-reading b { color: #fcf7e7; }
.gauge-reading small { color: #c4c7b4; font-size: 10px; }
:is(.game-v2, .table-choice) .district-gauge .track-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 5px;
  margin: 0;
  padding: 0;
  font: 10px/1.25 system-ui,sans-serif;
}
.district-gauge .track-note:not(:has(.debt-stamp)) { display: none; }
.district-gauge .debt-stamp { color: #f0c978; }
.district-gauge .claim-button {
  padding: 2px 3px;
  border: 0;
  background: none;
  color: #f8daa0;
  text-decoration: underline;
  text-underline-offset: 2px;
  font: 600 10px/1.1 system-ui,sans-serif;
}
.district-gauge .claim-button:disabled { color: #b9b6a4; }
.district-gauge.is-claimable .district-meter { box-shadow: inset 0 0 0 1px #ebce83, 0 0 6px #d9b85d57; }
:is(.game-v2,.table-choice) .district-relics-button:hover .gauge-name { color: #fff0c1; }
body.is-in-game .table-choice[data-ceremony='authority'] .authority-panel {
  width: min(390px, 100%);
  padding: 13px;
  gap: 13px;
  border: 1px solid #746c50;
  border-radius: 5px;
  background: #1f2b27;
}
body.is-in-game .table-choice[data-ceremony='authority'] .district-meter { width: 43px; }
body.is-in-game .table-choice[data-ceremony='authority'] .gauge-name { font-size: 12px; }

.game-v2 .right-sidebar { grid-template-rows: minmax(0,1fr) minmax(56px, 9.4dvh); gap: 9px; }
.game-v2 .kiosk { padding: 9px 9px 10px; }
.game-v2 .log-panel { padding: 6px 8px 7px; grid-template-rows: 13px minmax(0,1fr); gap: 4px; }
.game-v2 .ticker-machine::before { inset: 22px 7px auto; height: 2px; }
.game-v2 .event-log { height: 100%; padding: 4px 7px 7px; }
.game-v2 .log-entry { padding: 4px 0; }
.game-v2 .authority-aside, .game-v2 .event-log, .opponents {
  scrollbar-width: thin;
  scrollbar-color: #ac986a #1c2a26;
}
.game-v2 .battlefield:has(> .last-play-rest) { grid-template-columns: 78px minmax(0,1fr) clamp(144px,12.5vw,185px); }
.game-v2 .battlefield > .last-play-rest { grid-column: 3; grid-row: 2; min-width: 0; min-height: 0; align-self: center; justify-self: center; width: 100%; }
.game-v2 .battlefield:has(.last-play-rest) .latest-play:not(.is-empty) {
  grid-template-columns: minmax(0,.95fr) minmax(98px,1fr);
  gap: clamp(5px,1vw,16px);
}
.game-v2 .battlefield:has(.last-play-rest) .battlefield-topline { grid-column: 1 / 3; }
.game-v2 .near-side .relic-dock .relic-socket {
  width: var(--near-relic);
  height: calc(var(--near-relic) * 1.4);
  min-height: 0;
  padding: 0;
}
.game-v2 .relic-socket:not(.empty)::before { content: none; }
.game-v2 .relic-socket .relic-name {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
}
.game-v2 .near-side .relic-slots { gap: var(--socket-gap); }
.game-v2 .near-side .player-header { display: flex; }
.game-v2 .my-seat .player-name { font-size: clamp(18px,1.9vw,29px); }

@media (min-width:1001px) {
  .game-v2 {
    --far-track: clamp(175px, 20.8dvh, 211px);
    --near-track: clamp(213px, 27dvh, 257px);
    --near-relic: min(9.2vw, calc(var(--card-width) * .9));
    --socket-gap: clamp(4px, .6vw, 10px);
    padding-inline: clamp(14px,1.8vw,35px);
  }
  .game-v2 .table-layout {
    grid-template-columns: clamp(165px,14vw,212px) minmax(0,1fr) clamp(210px,17.1vw,274px);
    gap: 10px clamp(14px,1.7vw,30px);
  }
  .game-v2 .opponents { grid-column: 1 / 3; gap: clamp(12px,1.6vw,25px); }
  .game-v2 .authority-aside { grid-row: 2; }
  .game-v2 .right-sidebar { align-self: start; height: min(100%,clamp(275px,48dvh,460px)); }
  .game-v2 .near-side {
    grid-template-columns: clamp(148px, 14vw, 208px) minmax(0,1fr) max-content;
    gap: clamp(8px,1.1vw,20px);
    width: min(100%, 1540px);
    justify-self: center;
  }
  .game-v2 .my-seat .player-instruments { gap: 7px; }
  .game-v2 .my-seat .instrument { min-width: 39px; }
  .game-v2 .relic-dock { align-content: end; padding-bottom: 18px; }
  .game-v2 .near-side .my-seat { align-content: center; justify-items: start; }
  .game-v2 .hand-heading { align-self: start; translate: 0 -14px; }
}

@media (min-width:1001px) and (max-height:760px) {
  .game-v2 { --far-track: 158px; --near-track: calc(var(--card-height) + 26px); }
}
@media (min-width:1001px) and (min-height:721px) and (max-height:760px) {
  .game-v2 { --far-track: 178px; }
}
@media (min-width:1001px) and (max-width:1170px) {
  .game-v2 .battlefield:has(.last-play-rest) .latest-play:not(.is-empty) {
    grid-template: minmax(0,1fr) auto / minmax(0,1fr);
  }
  .game-v2 .battlefield:has(.last-play-rest) .arena-card-wrap { max-width: 155px; }
  .game-v2 .battlefield:has(.last-play-rest) .arena-action-area { gap: 2px; }
}
@media (max-width:1000px) {
  .game-v2 {
    --far-track: 196px;
    --near-track: calc(var(--near-relic) * 1.4 + var(--card-height) + 55px);
    --near-relic: clamp(68px,10.7vw,112px);
    --socket-gap: 5px;
  }
  .game-v2 .opponents {
    display: flex;
    align-items: stretch;
    gap: 13px;
    min-width: 0;
    overflow: auto hidden;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 4px;
    overscroll-behavior-x: contain;
    padding: 9px 4px 4px;
  }
  .game-v2 .near-side { grid-template-rows: calc(var(--near-relic) * 1.4 + 10px) minmax(0,1fr); gap: 3px 8px; }
  .game-v2 .near-side .my-seat { display: grid; align-content: center; justify-items: start; gap: 4px; }
  .game-v2 .my-seat .player-header { display: flex; }
  .game-v2 .my-seat .player-name { font-size: 16px; }
  .game-v2 .my-seat .player-instruments { gap: 4px; }
  .game-v2 .my-seat .instrument { min-width: 27px; }
  .game-v2 .relic-dock { justify-content: end; }
  .game-v2 .hand-zone { grid-template-rows: 17px minmax(0,1fr); }
  .game-v2 .hand-heading {
    position: static;
    display: flex;
    gap: 9px;
    justify-content: center;
  }
  .game-v2 .battlefield:has(> .last-play-rest) { grid-template-columns: 61px minmax(0,1fr) clamp(94px,15vw,145px); gap: 5px 8px; }
  .game-v2 .log-panel { max-height: 200px; align-self: center; }
  .game-v2[data-dock='authority'] .authority-aside { align-self: center; grid-template-rows: auto auto; }
  .game-v2 .authority-panel { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width:600px) {
  body.is-in-game #app { overflow-y: auto; }
  .game-v2 {
    --far-track: 196px;
    --near-track: calc(var(--near-relic) * 1.4 + var(--card-height) + 50px);
    --near-relic: clamp(65px, calc((100vw - 115px) / 3), 110px);
    min-height: calc(536px + var(--near-track));
    grid-template-rows: 25px 54px minmax(0,1fr) 37px;
  }
  .game-v2 .turn-console { padding: 3px 7px; }
  .game-v2 .kiosk { padding: 7px; }
  .game-v2 .battlefield:has(> .last-play-rest) { grid-template-columns: 50px minmax(0,1fr) clamp(65px,20vw,110px); gap: 4px 5px; }
  .game-v2 .battlefield:has(.last-play-rest) .latest-play:not(.is-empty) { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .game-v2 .battlefield:has(> .last-play-rest):has(.latest-play.is-empty) {
    grid-template-columns: 50px minmax(0,1fr) clamp(105px,32vw,145px);
  }
  .game-v2 .battlefield:has(.last-play-rest) .selection-buttons { flex-wrap: wrap; justify-content: center; }
  .game-v2 .battlefield:has(.last-play-rest) .arena-play { flex: 1 1 72px; }
  .game-v2 .game-dock {
    position: sticky;
    bottom: 0;
    z-index: 52;
    padding-bottom: env(safe-area-inset-bottom);
    background: #18221ff5;
  }
}
@media (min-width:601px) and (max-width:1000px) and (max-height:650px) {
  body.is-in-game #app { overflow-y: auto; }
  .game-v2 { min-height: 745px; }
}
@media (prefers-reduced-motion:reduce) {
  .gauge-dial .meter-fill { transition: none; }
}

/* The installation is the card itself. Its printing follows the dimensions of its socket. */
.game-v2 .relic-face {
  position: absolute;
  inset: 0;
  container: installed-card / inline-size;
  display: flex;
  pointer-events: none;
}
.game-v2 .relic-socket .relic-face .playing-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px #10161370;
  text-align: left;
}
.game-v2 .relic-face .playing-card .card-top {
  display: flex;
  flex: 0 0 12%;
  height: auto;
  min-height: 0;
  padding: 2px 4px;
  font: 650 clamp(6px,7.5cqw,10px)/1 system-ui,sans-serif;
}
.game-v2 .relic-face .playing-card .card-top span { font: inherit; }
.game-v2 .relic-face .playing-card .card-art { display: grid; flex: 0 0 36%; width: 100%; height: auto; min-height: 0; }
.game-v2 .relic-face .playing-card .card-art svg { width: 100%; height: 100%; }
.game-v2 .relic-face .playing-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: start;
  padding: clamp(3px,5cqw,7px);
  gap: 3px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.game-v2 .relic-face .playing-card .card-body h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  color: #22332a;
  font: bold clamp(8px,10.8cqw,15px)/1.1 Georgia,serif;
}
.game-v2 .relic-face .playing-card .card-rules {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  font: clamp(10px,8.7cqw,12px)/1.27 system-ui,sans-serif;
}
.game-v2 .relic-face .playing-card :is(.card-price,.card-number,.card-markers,.card-bottom,.card-keywords,.card-summary) { display: none; }
@container installed-card (max-width:89px) {
  .game-v2 .relic-face .playing-card .card-top {
    flex-basis: 5%;
    padding: 0;
    color: transparent;
    background: var(--district);
  }
  .game-v2 .relic-face .playing-card .card-art { flex-basis: 51%; }
  .game-v2 .relic-face .playing-card .card-rules { display: none; }
}
.game-v2 .opponent .opponent-relics .relic-socket.empty {
  color: #b4ad928f;
  background: #202b27;
  box-shadow: inset 0 0 0 1px #837e61a3, inset 0 2px 3px #101b17a1;
}


@media (min-width:1001px) and (max-height:680px) {
  body.is-in-game #app { overflow-y: auto; }
  .game-v2 { min-height: 712px; }
}
@media (max-width:600px) {
  .game-v2 { min-height: calc(568px + var(--near-track)); grid-template-rows: 44px 54px minmax(0,1fr) 37px; }
  .game-v2 .game-toolbar {
    display: grid;
    grid-template: 18px 23px / max-content minmax(0,1fr) max-content max-content;
    align-items: center;
    gap: 2px 9px;
  }
  .game-v2 .game-toolbar .room-meta { grid-column: 1 / 3; grid-row: 1; }
  .game-v2 .game-toolbar .game-options { display: contents; }
  .game-options [data-command='rules'] { grid-area: 1 / 3; justify-self: end; }
  .game-options [data-command='leave'] { grid-area: 1 / 4; justify-self: end; }
  .game-options .table-catalog { grid-area: 2 / 1; }
  .game-options .districts-trigger { grid-area: 2 / 2; justify-self: start; }
  .game-options .animation-lever { grid-area: 2 / 3; }
  .game-options .sound-lever { grid-area: 2 / 4; }
  .game-v2 .game-toolbar .icon-button { height: 21px; min-height: 21px; }
  .game-v2 .game-toolbar .btn { min-height: 23px; font-size: 11px; }
}
@media (min-width:375px) and (max-width:600px) {
  .game-v2 .opponents:not(:has(.opponent:nth-child(4))) { gap: 3px; padding-inline: 0; }
}

@media (max-width:600px) {
  .game-v2 .game-dock {
    position: fixed;
    left: 0;
    right: 0;
    min-height: 36px;
    padding-inline: 8px;
  }
}


@media (min-width:601px) and (max-width:1000px) {
  .game-v2 .near-side { grid-template-columns: minmax(0,1fr) minmax(0,1.45fr); gap: 4px 19px; }
  .game-v2 .near-side .my-seat { justify-self: end; width: min(100%, 190px); }
  .game-v2 .near-side .relic-dock { justify-self: start; justify-content: start; }
}
@media (max-width:600px) {
  .game-v2 .near-side .my-seat { align-content: center; gap: 5px; }
  .game-v2 .near-side .my-seat .player-header { max-width: 100%; }
  .game-v2 .my-seat .own-seat-label { display: none; }
  .game-v2 .near-side .my-seat .player-name { font-size: 14px; }
  .game-v2 .near-side .my-seat .player-instruments { display: grid; justify-items: start; gap: 2px; }
  .game-v2 .my-seat .player-instruments .instrument {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 4px;
    min-height: 20px;
    min-width: 0;
  }
  .game-v2 .my-seat .instrument-symbol,
  .game-v2 .my-seat .instrument-symbol svg { width: 20px; height: 20px; }
  .game-v2 .my-seat .instrument-value { font-size: 21px; }
}

/* Authority is read as a register: the coloured gauge, the district and its next threshold. */
.game-v2 .authority-aside {
  grid-template-rows:auto minmax(0,1fr);
  padding:14px 16px; gap:9px; overflow:hidden;
}
.game-v2 :is(.district-heading,.journal-heading) {
  display:flex; align-items:baseline; justify-content:space-between; gap:7px; min-width:0;
}
.game-v2 :is(.district-heading,.journal-heading) h2 {
  margin:0; color:#f0e1b9; font:600 clamp(19px,1.65vw,25px)/1.1 var(--display-face);
  letter-spacing:0; text-transform:none; text-shadow:none;
}
.game-v2 .district-heading small,.game-v2 .journal-expand,.game-v2 .ticker-new {
  font:500 12px/1.3 system-ui,sans-serif; letter-spacing:0; text-transform:none;
}
.game-v2 .district-heading small { color:#d0c39d; }
.game-v2 .authority-aside .authority-panel {
  min-height:0; min-width:0; overflow:auto; scrollbar-width:thin; scrollbar-color:#988966 transparent;
  grid-template-columns:minmax(0,1fr); grid-template-rows:none; gap:0; align-content:start;
}
.game-v2 .authority-aside .district-gauge {
  --gauge-size:clamp(32px,min(2.85vw,4.45dvh),42px);
  grid-template-columns:var(--gauge-size) minmax(0,1fr) max-content;
  align-items:center; gap:0 11px; padding:7px 0;
  border:0; border-top:1px solid #757d652f; border-radius:0; background:none; box-shadow:none;
}
.game-v2 .authority-aside .district-relics-button {
  display:grid; grid-column:1/-1;
  grid-template-columns:var(--gauge-size) minmax(0,1fr) max-content;
  align-items:center; gap:2px 11px; min-height:var(--gauge-size); padding:0;
}
.game-v2 .authority-aside .district-caption { display:contents; }
.game-v2 .authority-aside .district-meter { width:var(--gauge-size); }
.game-v2 .authority-aside .gauge-name {
  justify-self:start; min-width:0; color:#f2ecda;
  font:550 clamp(12px,.95vw,15px)/1.2 system-ui,sans-serif; text-transform:none; letter-spacing:0; text-align:left;
}
.game-v2 .authority-aside .gauge-reading {
  font:600 clamp(15px,1.18vw,19px)/1.15 system-ui,sans-serif; font-variant-numeric:tabular-nums;
}
.game-v2 .authority-aside .gauge-reading small { font-size:.73em; font-weight:450; color:#c0c3b2; }
.game-v2 .authority-aside .track-note { display:none; }
.game-v2 .authority-aside .track-note:has(.debt-stamp) {
  display:flex; grid-column:2/-1; justify-content:flex-start; gap:5px; margin-top:-1px;
  font:500 11px/1.2 system-ui,sans-serif;
}
.game-v2 .authority-aside .claim-button {
  min-height:19px; padding:0 2px; font:600 11px/1.15 system-ui,sans-serif;
  text-underline-offset:2px; opacity:1;
}
.game-v2 .authority-aside .claim-button:disabled { color:#b7b8a7; text-decoration:none; }
.game-v2 .authority-aside .district-relics-button:focus-visible,.game-v2 .authority-aside .claim-button:focus-visible {
  outline:2px solid #e2c58f; outline-offset:-2px; border-radius:3px;
}

/* Keep the paper itself scrollable, with ink and interline spacing for long events. */
.game-v2 .log-panel {
  display:grid; min-height:0; grid-template-rows:auto minmax(0,1fr);
  align-content:stretch; padding:9px 10px 10px; gap:7px;
}
.game-v2 .ticker-machine::before { content:none; }
.game-v2 .journal-expand,.game-v2 .ticker-new {
  padding:2px 0; margin:0; border:0; border-radius:0;
  color:#dfcca5; background:transparent; text-decoration:underline; text-underline-offset:3px; box-shadow:none;
}
.game-v2 .journal-expand { min-height:23px; }
.game-v2 .ticker-new { justify-self:start; }
.game-v2 .ticker-new[hidden] { display:none; }
.game-v2 .log-panel:has(.ticker-new:not([hidden])) { grid-template-rows:auto auto minmax(0,1fr); }
.game-v2 .event-log {
  align-self:stretch; width:100%; height:100%; max-height:none; min-height:0; padding:0 9px 5px;
  overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#998865 #e2d9c3;
  background:linear-gradient(110deg,#ece5d2,#e5ddc7); clip-path:none; border:1px solid #c3b696;
  border-radius:2px; box-shadow:inset 0 2px 4px #362b1520;
}
.game-v2 .journal-turn {
  display:flex; align-items:center; gap:7px; margin:0; padding:8px 0 3px; color:#62583f;
  font:650 10px/1.3 system-ui,sans-serif; text-transform:uppercase; letter-spacing:.07em;
}
.game-v2 .journal-turn::after { content:''; height:1px; flex:1; background:#87795166; }
.game-v2 .log-entry {
  grid-template-columns:14px minmax(0,1fr) auto; align-items:baseline; gap:6px; padding:6px 0;
  border:0; border-bottom:1px solid #91846342; border-radius:0; background:transparent;
  color:#292a23; font:400 13px/1.41 system-ui,sans-serif; text-align:left; text-transform:none; letter-spacing:0;
  text-shadow:none; box-shadow:none;
}
.game-v2 .log-entry .log-number { display:grid; place-items:center; color:#77613c; font:650 13px/1.1 system-ui,sans-serif; }
.game-v2 .log-entry.tone-damage .log-number { color:#963e32; }
.game-v2 .log-entry.tone-heal .log-number { color:#376342; }
.game-v2 .log-entry.tone-draw .log-number { color:#3c6271; }
.game-v2 .log-entry.tone-play .log-card-text { font-weight:600; }
.game-v2 .log-card-open { font:500 13px/1 system-ui,sans-serif; color:#665a43; }
.game-v2 .log-entry:hover { background:#d4c9ac69; }
.game-v2 .log-entry:focus-visible { outline:2px solid #695531; outline-offset:-2px; }
.game-v2 .journal-empty { margin:12px 0; color:#534d3c; font:13px/1.4 system-ui,sans-serif; }
@media(min-width:1001px) {
  .game-v2 .table-layout {
    grid-template-columns:clamp(182px,17.6vw,285px) minmax(0,1fr) clamp(213px,19.5vw,315px);
    column-gap:clamp(11px,1.3vw,24px);
  }
  .game-v2 .right-sidebar {
    align-self:stretch; height:100%; min-height:0;
    grid-template-rows:minmax(max-content,1.58fr) minmax(0,1fr); gap:9px;
  }
  .game-v2 .right-sidebar[data-journal-expanded='true'] { grid-template-rows:minmax(0,1fr); }
  .game-v2 .right-sidebar[data-journal-expanded='true'] .kiosk { display:none; }
  .game-v2 .log-panel { height:100%; }
}
@media(min-width:1001px) {
  .game-v2 .opponents { grid-column:2; gap:clamp(5px,1vw,15px); container-type:inline-size; }
  .game-v2 .authority-aside {
    grid-row:1/3; align-self:start; height:auto; max-height:100%;
  }
  .game-v2 .authority-aside .district-gauge:has(.debt-stamp) { grid-template-columns:minmax(0,1fr) auto; gap:4px; }
  .game-v2 .authority-aside .district-gauge:has(.debt-stamp) .district-relics-button {
    grid-column:1; grid-row:1; grid-template:auto auto / var(--gauge-size) minmax(0,1fr);
  }
  .game-v2 .authority-aside .district-gauge:has(.debt-stamp) .district-meter { grid-row:1/3; }
  .game-v2 .authority-aside .district-gauge:has(.debt-stamp) .gauge-name { grid-area:1/2; align-self:end; }
  .game-v2 .authority-aside .district-gauge:has(.debt-stamp) .gauge-reading { grid-area:2/2; align-self:start; justify-self:start; }
  .game-v2 .authority-aside .track-note:has(.debt-stamp) {
    grid-area:1/2; display:grid; gap:0; justify-items:end; justify-self:end; margin:0;
  }
}
@media(min-width:1001px) and (max-height:800px) {
  .game-v2 .right-sidebar { height:calc(100% + 12px); }
  .game-v2 .right-sidebar[data-journal-expanded='false'] .log-panel { padding:5px 8px 7px; gap:3px; }
  .game-v2 .right-sidebar[data-journal-expanded='false'] .journal-turn:first-child { padding-top:3px; }
}
@media(min-width:1001px) and (max-height:700px) {
  .game-v2 .right-sidebar { grid-row:1 / -1; height:100%; }
  .game-v2 .near-side {
    grid-column:1 / 3;
    grid-template-columns:clamp(116px,10.5vw,160px) minmax(0,1fr) max-content;
    --near-relic:clamp(48px,5.2vw,80px);
    gap:clamp(6px,.75vw,12px);
  }
}
@media(min-width:1001px) and (max-height:800px) {
  .game-v2 .authority-aside { padding:9px 13px; gap:6px; }
  .game-v2 .authority-aside .district-gauge { --gauge-size:clamp(28px,4.2dvh,33px); padding:4px 0; }
}
@media(min-width:1001px) and (max-width:1179px) {
  .game-v2 .authority-aside { padding-inline:11px; }
  .game-v2 .authority-aside .district-gauge { padding-block:6px; }
  .game-v2 .authority-aside .district-relics-button { column-gap:7px; }
}
@media(max-width:1000px) {
  .game-v2[data-dock='shop'] {
    height:100dvh; min-height:0; padding-bottom:max(8px,env(safe-area-inset-bottom));
  }
  .game-v2[data-dock='shop'] .table-layout { grid-template-rows:var(--far-track) minmax(0,1fr) max-content; }
  .game-v2[data-dock='shop'] .game-dock { position:static; }
  .game-v2[data-dock='shop'] .kiosk { justify-self:center; width:min(100%,840px); }
  .game-v2[data-dock='log'] {
    height:100dvh; min-height:0; padding-bottom:max(8px,env(safe-area-inset-bottom));
  }
  .game-v2[data-dock='log'] .table-layout { grid-template-rows:minmax(0,1fr); }
  .game-v2[data-dock='log'] .board-main { display:none; }
  .game-v2[data-dock='log'] .game-dock { position:static; }
  .game-v2[data-dock='log'] .log-panel {
    grid-column:1; grid-row:1; justify-self:center; align-self:stretch; width:min(100%,840px); max-height:100%; height:100%;
    grid-template-rows:auto minmax(0,1fr); gap:10px; padding:clamp(11px,2vw,22px);
  }
  .game-v2[data-dock='authority'] .authority-aside {
    grid-row:3; width:min(100%,760px); height:auto; max-height:100%; justify-self:center; align-self:center;
    grid-template-rows:auto minmax(0,1fr); padding:14px clamp(12px,3vw,24px); gap:10px; scroll-margin-bottom:42px;
  }
  .game-v2:not([data-dock='log']) .log-panel { display:none; }
  .game-v2 .journal-expand { display:none; }
  .game-v2 .authority-aside .authority-panel { grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:clamp(14px,3vw,28px); }
  .game-v2 .authority-aside .district-gauge { --gauge-size:clamp(36px,6vw,52px); padding:7px 0; }
  .game-v2 .authority-aside .gauge-name { font-size:clamp(13px,2vw,17px); }
  .game-v2 .log-entry { padding:9px 0; font-size:15px; line-height:1.45; }
  .game-v2 .event-log { padding:0 clamp(10px,1.8vw,18px) 8px; }
  .game-v2 .journal-turn { font-size:11px; padding:10px 0 4px; }
  .game-v2[data-dock='log'] .log-panel:has(.ticker-new:not([hidden])) { grid-template-rows:auto auto minmax(0,1fr); }
}
@media(max-width:1000px) and (max-height:740px) {
  .game-v2[data-dock='shop'] .table-layout { grid-template-rows:minmax(0,1fr); }
  .game-v2[data-dock='shop'] .board-main { display:none; }
  .game-v2[data-dock='shop'] .kiosk { grid-row:1; align-self:center; }
}
/* On short tables the district is the caption of its thumbnail, leaving the full row height for the title. */
@media(min-width:1001px) and (max-height:800px), (max-width:1000px) and (max-height:550px) {
  .game-v2 .shop-preview {
    grid-template: auto auto / clamp(44px,20cqi,58px) minmax(0,1fr);
    align-content:center; gap:1px 6px; padding:2px 4px;
  }
  .game-v2 .shop-art { grid-area:1/1; }
  .game-v2 .shop-caption { display:contents; }
  .game-v2 .shop-district { grid-area:2/1; display:block; text-align:center; font-size:9px; line-height:1.05; letter-spacing:0; }
  .game-v2 .shop-title { grid-area:1/2/3; font-size:13px; }
}
@media(max-width:550px) {
  .game-v2 .authority-aside .district-gauge { --gauge-size:clamp(32px,9.8vw,43px); grid-template-columns:minmax(0,1fr); padding:7px 0; }
  .game-v2 .authority-aside .district-relics-button {
    grid-template: auto auto / var(--gauge-size) minmax(0,1fr); gap:2px 8px;
  }
  .game-v2 .authority-aside .district-meter { grid-row:1/3; }
  .game-v2 .authority-aside .gauge-name { grid-area:1/2; align-self:end; font-size:13px; }
  .game-v2 .authority-aside .gauge-reading { grid-area:2/2; align-self:start; justify-self:start; font-size:16px; }
  .game-v2 .authority-aside .track-note:has(.debt-stamp) { grid-column:1; justify-content:flex-end; margin:0; }
}
@media(max-width:360px) {
  .game-v2 .authority-aside .district-gauge { padding-block:5px; }
}

/* Each far seat owns its name, status, resources and two groups of cards. */
.game-v2 .opponent {
  position: relative;
  container-type: inline-size;
  isolation: isolate;
  container-name: opponent;
  display: grid;
  grid-template: max-content max-content / minmax(0, 1fr);
  align-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 3px clamp(3px, .5vw, 9px);
  row-gap: 10px;
  text-align: center;
}
.game-v2 .opponent + .opponent { border-inline-start: 1px solid #b4ab8733; }
.game-v2 .opponent .seat-target-button {
  display: grid;
  grid-template: max-content max-content / minmax(0, 1fr);
  gap: 7px;
  height: auto;
  padding: 0;
}
.game-v2 .opponent .player-header {
  display: grid;
  grid-template: auto auto / minmax(0, 1fr);
  justify-content: stretch;
  row-gap: 3px;
}
.game-v2 .opponent .player-name {
  min-width: 0;
  font-size: clamp(17px, 10cqi, 28px);
  line-height: 1.1;
}
.seat-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 7px;
  min-height: 16px;
  line-height: 1;
}
.seat-status > * { white-space: nowrap; }
.seat-status :is(.seat-target-label,.seat-turn-label) {
  color: #ffda98;
  font: 700 9px/1 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .065em;
}
.seat-turn-label::before { content: '●'; margin-right: 3px; font-size: 8px; }
.seat-status .seat-turn-label { color: #e5c3f3; }
.seat-status .seat-potatoes { position: static; }
.game-v2 .opponent .player-instruments { gap: clamp(6px, 4cqi, 16px); }
.game-v2 .opponent .instrument {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}
.game-v2 .opponent .instrument-symbol {
  width: clamp(19px, 10cqi, 28px);
  height: auto;
  aspect-ratio: 1;
  align-self: center;
  margin-right: 2px;
}
.game-v2 .opponent .instrument-symbol svg { width: 100%; height: 100%; }
.game-v2 .opponent .instrument-value { font-size: clamp(23px, 11cqi, 32px); line-height: 1; }
.game-v2 .opponent .instrument-limit { position: static; padding-left: 1px; font-size: 10px; }
.game-v2 .opponent .instrument-stack { display: none; }
.game-v2 .opponent .opponent-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.64fr);
  gap: 8px;
  align-items: center;
  justify-self: center;
  width: min(100%, 260px);
}
.game-v2 .opponent :is(.opponent-hand-rack, .opponent-relics) {
  container-type: inline-size;
  height: auto;
  width: 100%;
  min-width: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.game-v2 .opponent .opponent-hand-rack { display: flex; pointer-events: none; }
.game-v2 .opponent .opponent-relics { gap: 3px; }
.game-v2 .opponent .card-back {
  --back-width: clamp(24px, 57cqi, 51px);
  width: var(--back-width);
  height: auto;
  aspect-ratio: 5 / 7;
  margin: 0;
  transform-origin: 50% 100%;
  transform: rotate(clamp(-6deg, calc((var(--back-index) - (var(--hand-count) - 1) / 2) * 2deg), 6deg));
}
.game-v2 .opponent .card-back + .card-back {
  margin-left: calc(-1 * var(--back-width) + clamp(0px, (100cqi - var(--back-width) - 12px) / max(1, var(--hand-count) - 1), 9px));
}
.game-v2 .opponent .opponent-relics .relic-socket {
  width: min(calc((100cqi - 6px) / 3), 50px);
  height: auto;
  min-height: 0;
  aspect-ratio: 5 / 7;
  padding: 0;
}

@container opponent (max-width: 192px) {
  .game-v2 .opponent .instrument {
    display: grid;
    grid-template: auto auto / auto auto;
    align-items: baseline;
    gap: 2px 0;
  }
  .game-v2 .opponent .instrument-symbol { grid-column: 1 / -1; justify-self: center; margin: 0; }
  .game-v2 .opponent .instrument:not(:has(.instrument-limit)) .instrument-value { grid-column: 1 / -1; }
  .game-v2 .opponent .seat-status { min-height: 12px; column-gap: 4px; }
  .game-v2 .opponent .turn-thought svg { width: 10px; height: 12px; }
  .game-v2 .opponent .thought-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
@media (max-width: 1000px) {
  .game-v2 .opponents { padding: 2px; gap: 6px; }
  .game-v2 .opponent { flex: 1 0 128px; scroll-snap-align: center; }
  .game-v2 .opponents:not(:has(.opponent:nth-child(4))) .opponent { flex: 1 0 105px; }
  @container opponent (max-width: 155px) {
    .game-v2 .opponent .seat-target-button { gap: 4px; }
    .game-v2 .opponent .opponent-cards { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .game-v2 .opponent .card-back { --back-width: 29px; }
    .game-v2 .opponent .opponent-relics .relic-socket { width: min(calc((100cqi - 6px) / 3), 33px); }
    .game-v2 .opponent .player-instruments { gap: 5px; }
    .game-v2 .opponent .instrument-value { font-size: 22px; }
    .game-v2 .opponent .instrument-limit { font-size: 8px; }
  }
}
@media (orientation: landscape) and (max-height: 460px) {
  .game-v2 .opponent { row-gap: 6px; }
  .game-v2 .opponent .card-back { --back-width: min(38px, 40cqi); }
  .game-v2 .opponent .opponent-relics .relic-socket { max-width: 35px; }
  @container opponent (max-width: 155px) {
    .game-v2 .opponent .card-back { --back-width: 24px; }
    .game-v2 .opponent .opponent-relics .relic-socket { max-width: 27px; }
  }
}

/* Keep the player's fan inside the viewport, including while choosing a card. */
.game-v2[data-dock='hand'][data-viewer='player'] { min-height: 0; }

@media (min-width: 1001px) {
  .game-v2[data-viewer='player'] { min-height: 0; }
}

@media (max-width: 1000px) {
  .game-v2[data-dock='hand'][data-viewer='player'] {
    --near-relic: clamp(48px, min(13vw, 9dvh), 100px);
    --near-track: calc(var(--near-relic) * 1.4 + var(--card-height) + 45px);
    --far-track: clamp(132px, 22dvh, 196px);
  }
  .game-v2[data-dock='hand'] .game-dock {
    position: static;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-width: 600px) and (max-height: 740px) {
  .game-v2[data-dock='hand'][data-viewer='player'] {
    --card-height: clamp(112px, 20dvh, 146px);
    --card-width: calc(var(--card-height) * 5 / 7);
    --far-track: clamp(88px, 16dvh, 116px);
    grid-template-rows: 42px 43px minmax(0,1fr) 34px;
  }
}

@media (max-width: 600px) {
  .game-v2[data-dock='hand'] .my-seat .player-instruments {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 7px;
  }
}

@media (max-width: 600px) and (max-height: 740px),
       (max-width: 1000px) and (orientation: landscape) and (max-height: 550px) {
  .game-v2[data-dock='hand'] .opponent { padding-block: 1px; row-gap: 3px; }
  .game-v2[data-dock='hand'] .opponent .player-header { row-gap: 1px; }
  .game-v2[data-dock='hand'] .opponent .seat-target-button { gap: 2px; }
  .game-v2[data-dock='hand'] .opponent .player-name { font-size: 16px; }
  .game-v2[data-dock='hand'] .opponent .instrument { display: flex; }
  .game-v2[data-dock='hand'] .opponent .instrument-symbol { width: 13px; }
  .game-v2[data-dock='hand'] .opponent .instrument-value { font-size: 15px; }
  .game-v2[data-dock='hand'] .opponent .opponent-cards {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.64fr);
    gap: 4px;
  }
  .game-v2[data-dock='hand'] .opponent .card-back { --back-width: 20px; }
  .game-v2[data-dock='hand'] .opponent .relic-socket { max-width: 21px; }
}

/* On a low landscape table the fan sits alongside the arena. */
@media (max-width: 1000px) and (orientation: landscape) and (max-height: 550px) {
  .game-v2[data-dock='hand'][data-viewer='player'] {
    --card-height: clamp(96px, 31dvh, 146px);
    --card-width: calc(var(--card-height) * 5 / 7);
    --near-relic: clamp(40px, 12dvh, 58px);
  }
  .game-v2[data-dock='hand'][data-viewer='player'] .table-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    grid-template-rows: clamp(85px, 26dvh, 130px) minmax(0, 1fr);
    column-gap: 12px;
  }
  .game-v2[data-dock='hand'][data-viewer='player'] .near-side {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: end;
    height: min(100%, var(--near-track));
  }
}
