.game-screen {
  min-height: 100vh;
  min-height: 100dvh;
}

.preview-strip {
  display: flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  padding: 3px var(--page-gutter);
  border-bottom: 1px solid var(--soft-line);
}

.game-header {
  display: grid;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px var(--page-gutter);
  border-bottom: 1px solid var(--line);
  background: var(--field);
}

.game-header__brand {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.brand-wordmark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.game-name {
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.year-mark,
.mode-mark {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.045em;
  white-space: nowrap;
}

.mode-mark {
  display: none;
}

.screen-content {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 0 var(--page-gutter) 40px;
}

.button {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.button:hover {
  border-color: var(--ink);
  background: var(--raised);
}

.button-primary {
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: inset 0 -5px var(--lime);
  color: var(--field);
}

.button-primary:hover {
  background: var(--ink);
}

.button-secondary {
  background: var(--raised);
}

.button-wide {
  width: 100%;
}

.button:disabled {
  cursor: default;
  opacity: 0.45;
}

.action-error {
  position: fixed;
  z-index: 4500;
  right: 10px;
  bottom: 10px;
  left: 10px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--ink);
  background: var(--field);
  font-family: var(--mono);
  font-size: 11px;
}

/* Title */

.title-screen {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-rows: 25px 1fr;
}

.title-ghost {
  position: absolute;
  z-index: 0;
  top: 10%;
  right: -28%;
  display: grid;
  width: min(115vw, 680px);
  aspect-ratio: 1;
  border-top: 1px solid var(--soft-line);
  border-left: 1px solid var(--soft-line);
  opacity: 0.22;
  grid-template: repeat(6, 1fr) / repeat(6, 1fr);
  pointer-events: none;
}

.title-ghost span {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  color: var(--muted);
  font-size: clamp(20px, 8vw, 54px);
}

.title-main {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 900px);
  align-content: center;
  gap: 22px;
  margin: 0 auto;
  padding: 34px var(--page-gutter) max(30px, env(safe-area-inset-bottom));
}

.title-brand {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.title-main h1 {
  margin: 0;
  font-size: clamp(72px, 24vw, 184px);
  font-weight: 950;
  letter-spacing: -0.09em;
  line-height: 0.78;
}

.title-thesis {
  max-width: 640px;
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: clamp(14px, 4.2vw, 20px);
  font-weight: 850;
  letter-spacing: 0.025em;
  line-height: 1.25;
}

.title-copy {
  max-width: 610px;
  margin: 9px 0 0;
  color: var(--muted);
}

.mode-select,
.decision-dock fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.mode-select legend,
.decision-dock legend {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.mode-options {
  display: grid;
  gap: 7px;
}

.mode-option {
  position: relative;
}

.mode-option input,
.segment-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mode-card {
  display: grid;
  min-height: 82px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--board);
  cursor: pointer;
}

.mode-card::after {
  width: 16px;
  height: 16px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  content: "";
}

.mode-option input:checked + .mode-card {
  border-color: var(--ink);
  background: var(--raised);
}

.mode-option input:checked + .mode-card::after {
  border: 4px solid var(--ink);
}

.mode-card strong,
.mode-card small {
  display: block;
}

.mode-card strong {
  font-family: var(--mono);
  font-size: 13px;
}

.mode-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.title-actions {
  display: grid;
  gap: 8px;
}

.title-actions p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

/* Board */

.board-section {
  padding-top: 14px;
}

.reveal-screen [data-reveal-root] {
  scroll-margin-block-start: 55px;
}

.reveal-screen [data-reveal-root]:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.board-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.board-heading h1 {
  margin: 0;
  font-size: clamp(25px, 7vw, 40px);
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.board-heading p {
  max-width: 48%;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.25;
  text-align: right;
}

.opening-ledger {
  display: grid;
  gap: 1px;
  margin: 0 auto 9px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--soft-line);
  background: var(--board);
}

.metric small,
.metric strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.035em;
}

.metric strong {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.market-board {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 8px 0 6px;
  border: 1px solid var(--line);
  background: var(--board);
}

.board-legend {
  min-height: 29px;
  padding: 0 6px 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.25;
}

.rate-caption {
  width: fit-content;
  margin: -2px 6px 5px auto;
  padding: 3px 5px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 850;
}

.board-plot {
  display: grid;
  grid-template-columns: var(--plot-rail) minmax(0, 1fr);
}

.price-rail {
  position: relative;
  display: grid;
  min-height: 0;
  align-self: stretch;
  grid-template-rows: repeat(6, minmax(0, 1fr));
}

.price-rail > span:not(.price-axis-title) {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: flex-end;
  padding-right: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.price-axis-title {
  position: absolute;
  top: 50%;
  left: -8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  transform: translate(-50%, -50%) rotate(-90deg);
  white-space: nowrap;
}

.market-grid {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  overflow: hidden;
  box-shadow: inset 1px 1px var(--line);
  isolation: isolate;
  grid-template-rows: repeat(6, 1fr);
}

.market-row {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.board-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-right: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  background: transparent;
}

button.task-cell {
  width: 100%;
  height: 100%;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
}

button.task-cell:hover {
  background: rgba(232, 230, 225, 0.05);
}

button.task-cell:focus-visible {
  z-index: 20;
  outline: 2px solid var(--lime);
  outline-offset: -3px;
}

.task-cell.is-locked {
  display: block;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(138, 143, 152, 0.045) 0 4px,
      transparent 4px 8px
    ),
    rgba(8, 11, 16, 0.58);
}

.task-label,
.task-state {
  position: absolute;
  right: 2px;
  left: 2px;
  z-index: 4;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.task-label {
  top: 3px;
  text-align: left;
}

.task-state {
  bottom: 3px;
  text-align: center;
}

.work-token {
  position: absolute;
  top: 52%;
  left: 50%;
  display: grid;
  width: 17px;
  aspect-ratio: 1;
  place-items: center;
  transform: translate(-50%, -50%);
}

.work-token--question,
.work-token--open {
  border-radius: 50%;
}

.work-token--question {
  border: 1.5px dashed var(--muted);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.work-token--locked {
  border: 1px solid var(--muted);
  border-radius: 2px;
  color: var(--muted);
  opacity: 0.58;
}

.work-token--open {
  border: 1.5px solid var(--ink);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(232, 230, 225, 0.12) 0 2px,
      transparent 2px 5px
    );
}

.work-token--xs {
  width: 14px;
}

.work-token--sm {
  width: 19px;
}

.work-token--md {
  width: 25px;
}

.work-token--lg {
  width: 32px;
}

.work-token--xl {
  width: 40px;
}

.work-token--xxl {
  width: 47px;
}

.work-token svg {
  display: block;
  width: 100%;
  height: 100%;
}

.allocation-token pattern[id$="-player"] rect {
  fill: var(--volt);
}

.allocation-token pattern[id$="-rivalA"] rect:first-child {
  fill: var(--raised);
}

.allocation-token pattern[id$="-rivalA"] rect:last-child {
  fill: var(--kiln);
}

.allocation-token pattern[id$="-rivalB"] rect {
  fill: var(--para);
}

.allocation-token pattern[id$="-rivalB"] circle {
  fill: var(--field);
}

.allocation-token pattern[id$="-unmet"] rect {
  fill: var(--board);
}

.allocation-token pattern[id$="-unmet"] path {
  stroke: var(--muted-deep);
}

.token-outline {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
}

.task-cell.is-newly-revealed::after {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--field);
  color: var(--muted);
  content: "REVEAL";
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 850;
  animation:
    reveal-cover 900ms 100ms cubic-bezier(0.4, 0, 0.2, 1) both;
  pointer-events: none;
}

.reveal-work .work-token--open {
  animation:
    work-arrival 420ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes reveal-cover {
  0%,
  34% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-25%);
  }
}

@keyframes work-arrival {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.12);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.iq-axis {
  position: relative;
  display: grid;
  min-height: 58px;
  margin-left: var(--plot-rail);
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.iq-axis > span:not(.iq-axis__label):not(.iq-marker) {
  display: grid;
  align-items: end;
  padding-bottom: 1px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
}

.iq-axis__label {
  position: absolute;
  top: 8px;
  left: calc(-1 * var(--plot-rail));
  width: var(--plot-rail);
  padding-right: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 850;
  text-align: right;
}

.iq-track {
  position: absolute;
  top: 3px;
  right: 0;
  left: 0;
  height: 31px;
}

.iq-track::after {
  position: absolute;
  top: 15px;
  right: 8.333%;
  left: 8.333%;
  border-top: 1px solid var(--line);
  content: "";
}

.iq-marker {
  --iq-collision-offset: 0;

  position: absolute;
  z-index: 2;
  top: 2px;
  display: grid;
  width: 20px;
  height: 25px;
  place-items: center;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%);
}

.iq-marker--player {
  --iq-collision-offset: -11px;

  color: var(--volt);
}

.iq-marker--rivalA {
  color: var(--kiln);
}

.iq-marker--rivalB {
  --iq-collision-offset: 11px;

  color: var(--para);
}

.iq-track:has(.iq-col-0 ~ .iq-col-0) .iq-col-0,
.iq-track:has(.iq-col-1 ~ .iq-col-1) .iq-col-1,
.iq-track:has(.iq-col-2 ~ .iq-col-2) .iq-col-2,
.iq-track:has(.iq-col-3 ~ .iq-col-3) .iq-col-3,
.iq-track:has(.iq-col-4 ~ .iq-col-4) .iq-col-4,
.iq-track:has(.iq-col-5 ~ .iq-col-5) .iq-col-5 {
  margin-left: var(--iq-collision-offset);
}

.iq-col-0 {
  left: 8.333%;
}

.iq-col-1 {
  left: 25%;
}

.iq-col-2 {
  left: 41.667%;
}

.iq-col-3 {
  left: 58.333%;
}

.iq-col-4 {
  left: 75%;
}

.iq-col-5 {
  left: 91.667%;
}

.board-footnote {
  margin: 2px 0 0;
  padding: 7px 6px 2px;
  border-top: 1px solid var(--soft-line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.35;
}

/* Fleets and decisions */

.fleet-section {
  width: 100%;
  max-width: 900px;
  margin: 12px auto 0;
}

.fleet-section > h2 {
  margin: 0 0 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.fleet-grid {
  display: grid;
  gap: 7px;
}

.fleet-card {
  position: relative;
  min-height: 126px;
  padding: 9px 56px 9px 9px;
  border: 1px solid var(--line);
  background: var(--raised);
}

.fleet-card.is-player {
  border-color: rgba(232, 230, 225, 0.68);
}

.fleet-card.is-offline {
  border-style: dashed;
  opacity: 0.66;
}

.fleet-card__head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.fleet-card__head h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
}

.fleet-marker {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--board);
  font-family: var(--mono);
}

.fleet-marker--player {
  border-color: var(--volt);
  color: var(--volt);
}

.fleet-marker--rivalA {
  border-color: var(--kiln);
  color: var(--kiln);
}

.fleet-marker--rivalB {
  border-color: var(--para);
  color: var(--para);
}

.offline-chip {
  padding: 2px 4px;
  border: 1px solid var(--muted);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 850;
}

.fleet-finance {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin-top: 7px;
  font-family: var(--mono);
}

.fleet-finance strong {
  font-size: 16px;
}

.fleet-finance span {
  color: var(--muted);
  font-size: 11px;
}

.fleet-metrics {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fleet-metrics .metric {
  padding: 4px 5px;
}

.fleet-metrics [data-fleet-value="plan"] {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.fleet-inspect {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.opening-actions {
  display: grid;
  max-width: 900px;
  gap: 8px;
  margin: 12px auto 0;
}

.opening-actions p,
.decision-note {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid var(--ink);
  background: var(--raised);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
}

.decision-screen .screen-content {
  padding-bottom: 0;
}

.decision-dock {
  position: sticky;
  z-index: 40;
  bottom: 0;
  display: grid;
  gap: 9px;
  margin: 14px calc(-1 * var(--page-gutter)) 0;
  padding: 11px var(--page-gutter) max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--field);
}

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

.segment-option {
  position: relative;
  min-width: 0;
}

.segment-option label {
  display: grid;
  min-height: 50px;
  place-content: center;
  padding: 4px 2px;
  border: 1px solid var(--line);
  background: var(--board);
  cursor: pointer;
  font-family: var(--mono);
  text-align: center;
}

.segment-option label strong,
.segment-option label small {
  display: block;
}

.segment-option label strong {
  font-size: 11px;
}

.segment-option label small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.segment-option input:checked + label {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--field);
}

.segment-option input:checked + label small {
  color: var(--field);
}

.decision-preview {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.announcement-tray {
  display: grid;
  min-height: 58px;
  align-content: center;
  margin: 10px auto 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--raised);
}

.announcement-tray span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
}

.announcement-tray p {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 850;
}

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

.reveal-controls .button {
  min-width: 0;
  padding: 4px 2px;
  font-size: 9px;
}

.clear-explainer {
  max-width: 620px;
  margin: 8px auto 0;
  padding: 8px 9px;
  border-left: 2px solid var(--lime);
  background: var(--raised);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
}

.roll-tray {
  display: grid;
  max-width: 620px;
  min-height: 70px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px auto 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: var(--raised);
}

.roll-tray > span {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-family: var(--mono);
  font-weight: 900;
}

.roll-tray p {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 850;
}

.roll-tray small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.reveal-next {
  max-width: 620px;
  margin: 10px auto 0;
}

.is-paused *,
.is-paused *::before,
.is-paused *::after {
  animation-play-state: paused !important;
}

/* Receipts */

.report-layout {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.receipt,
.verdict {
  padding: 13px;
  border: 1px solid var(--line);
  background: var(--raised);
}

.receipt-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.receipt-head h1 {
  margin: 0;
  font-size: clamp(26px, 8vw, 42px);
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.receipt-head > span {
  padding: 4px;
  border: 1px solid var(--muted);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 850;
  text-align: center;
}

.receipt-grid {
  display: grid;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto;
}

.receipt-grid > span,
.receipt-grid > strong {
  min-height: 32px;
  padding: 7px 0;
  border-top: 1px solid var(--soft-line);
}

.receipt-grid > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.receipt-grid > strong {
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receipt-grid > strong.is-total {
  font-size: 18px;
}

.receipt h2,
.causal-notes h2 {
  margin: 13px 0 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.standings > div {
  display: grid;
  min-height: 38px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--soft-line);
  font-family: var(--mono);
  font-size: 11px;
}

.standings > div.is-player {
  font-weight: 900;
}

.causal-notes ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.causal-notes li {
  padding: 7px 8px;
  border-left: 2px solid var(--ink);
  background: var(--board);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
}

.report-actions,
.verdict-actions {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.verdict-screen .screen-content {
  display: grid;
  min-height: calc(100dvh - 77px);
  align-content: center;
  padding-top: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.verdict {
  width: min(100%, 760px);
  margin: 0 auto;
}

.verdict > p:first-child,
.verdict > p:nth-of-type(2) {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 850;
}

.verdict h1 {
  margin: 17px 0 6px;
  font-size: clamp(58px, 19vw, 128px);
  font-weight: 950;
  letter-spacing: -0.085em;
  line-height: 0.78;
}

.verdict-line {
  margin: 16px 0 0;
  padding: 11px;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
}

.rank-history {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rank-history span {
  display: grid;
  min-height: 50px;
  place-content: center;
  border: 1px solid var(--line);
  background: var(--board);
  font-family: var(--mono);
  text-align: center;
}

.rank-history strong,
.rank-history small {
  display: block;
}

.rank-history small {
  color: var(--muted);
  font-size: 8px;
}

/* Dialog */

.game-dialog {
  width: min(calc(100% - 20px), 560px);
  max-height: min(82vh, 720px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--raised);
  color: var(--ink);
}

.game-dialog::backdrop {
  background: rgba(3, 5, 8, 0.78);
}

.dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--raised);
}

.dialog-head h2 {
  margin: 0;
  font-size: 22px;
}

.dialog-head button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--board);
  color: var(--ink);
  cursor: pointer;
}

.dialog-body {
  padding: 13px;
}

.dialog-body dl {
  display: grid;
  margin: 0;
  grid-template-columns: minmax(0, 1fr) auto;
}

.dialog-body dt,
.dialog-body dd {
  min-height: 36px;
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid var(--soft-line);
  font-family: var(--mono);
  font-size: 11px;
}

.dialog-body dt {
  color: var(--muted);
}

.dialog-body dd {
  font-weight: 850;
  text-align: right;
}

.dialog-body h3 {
  margin: 18px 0 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.task-inspector__remainder {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
}

.task-inspector__shares {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-share {
  display: grid;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid var(--soft-line);
  font-family: var(--mono);
  font-size: 10px;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
}

.task-share strong,
.task-share > span:last-child {
  white-space: nowrap;
}

.task-share__glyph {
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

.task-share--player .task-share__glyph {
  color: var(--volt);
}

.task-share--rivalA .task-share__glyph {
  color: var(--kiln);
}

.task-share--rivalB .task-share__glyph {
  color: var(--para);
}

.task-share--unserved {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(138, 143, 152, 0.12) 0 4px,
      transparent 4px 8px
    ),
    var(--board);
  color: var(--muted);
}

@media (min-width: 360px) {
  .mode-mark {
    display: inline;
  }

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

  .mode-options,
  .title-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .title-actions p {
    align-self: center;
  }

  .task-label,
  .task-state {
    font-size: 10px;
  }

  .report-actions,
  .verdict-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 680px) {
  .preview-strip {
    justify-content: flex-end;
  }

  .game-header {
    min-height: 56px;
    padding-right: max(
      var(--page-gutter),
      calc((100vw - var(--content-max)) / 2 + var(--page-gutter))
    );
    padding-left: max(
      var(--page-gutter),
      calc((100vw - var(--content-max)) / 2 + var(--page-gutter))
    );
  }

  .title-ghost {
    top: -10%;
    right: -5%;
  }

  .title-main {
    gap: 28px;
  }

  .opening-ledger {
    max-width: 900px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .price-rail > span:not(.price-axis-title),
  .price-axis-title,
  .iq-axis > span:not(.iq-axis__label):not(.iq-marker),
  .iq-axis__label,
  .board-legend,
  .board-footnote {
    font-size: 11px;
  }

  .task-label,
  .task-state {
    right: 4px;
    left: 4px;
    font-size: 11px;
  }

  .work-token--xs {
    width: 20px;
  }

  .work-token--sm {
    width: 29px;
  }

  .work-token--md {
    width: 40px;
  }

  .work-token--lg {
    width: 52px;
  }

  .work-token--xl {
    width: 63px;
  }

  .work-token--xxl {
    width: 73px;
  }

  .fleet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fleet-card {
    min-height: 190px;
  }

  .opening-actions {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .announcement-tray,
  .reveal-controls {
    max-width: 620px;
  }
}

@media (min-width: 860px) {
  .report-layout {
    grid-template-columns: minmax(360px, 0.88fr) minmax(360px, 1.12fr);
    align-items: start;
  }

  .compact-board {
    position: sticky;
    top: 12px;
  }

  .decision-dock {
    position: relative;
    grid-template-columns: 1fr 0.8fr 1fr 220px;
    align-items: end;
    margin-right: 0;
    margin-left: 0;
    padding: 12px;
    border: 1px solid var(--line);
  }

  .decision-note {
    grid-column: 1 / -1;
  }

  .rank-history {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (forced-colors: active) {
  .button-primary {
    border: 1px solid ButtonText;
  }
}
