@font-face {
  font-family: "Oswald";
  src: url("./oswald-latin-wght-CuJ2OKNG.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

:root {
  font:
    16px / 1.5 system-ui,
    sans-serif;
  color-scheme: dark;
  color: var(--ivory);
  background: #10120e;
  --display: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --ivory: #efe5d2;
  --amber: #f5b94f;
  --light-action: #d9ccb0;
  --ink: #191b14;
  --muted: #b6b4a8;
  --surface: #13160f;
  --boundary: #7f8778;
  --focus: #b9d9f4;
  --rule: #4b4e40;
  --probability: #939d89;
  --track: #353d31;
  scrollbar-color: var(--boundary) #1d211b;
}
* {
  box-sizing: border-box;
}
html:has(dialog:modal) {
  overflow: hidden;
}
body {
  margin: 0;
  min-height: 100vh;
}
main {
  width: 100%;
  max-width: none;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-family: var(--display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
h2 {
  font-family: var(--display);
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem 0.75rem;
  padding-block: 0.625rem;
  border-bottom: 1px solid var(--boundary);
}
.identity {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 1.25rem;
  row-gap: 0.125rem;
  min-width: 0;
}
.github-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  margin-left: auto;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--boundary);
  border-radius: 2px;
  color: var(--muted);
  align-self: center;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}
.github-link:hover {
  border-color: var(--muted);
  background: #1c2117;
}
.github-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.broadcast-label {
  grid-column: 2;
  justify-self: start;
  max-width: 65ch;
  padding-left: 0;
  border-left: 0;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  text-wrap: pretty;
  text-align: left;
}
.console {
  display: grid;
  align-items: start;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.console > *,
.setup-content > div {
  min-width: 0;
}
.session-rail {
  padding: 1.25rem 1rem;
}
.setup {
  padding-inline: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: #1a1e16;
}
:where(.setup > summary, .control-bar) > h2 {
  color: var(--amber);
  font-weight: 500;
}
:where(.setup > summary) > h2 {
  display: inline;
}
.setup-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0.375rem;
  padding-bottom: 0.75rem;
}
.setup-group > h3,
#openrouter-model legend {
  margin: 0 0 0.375rem;
  padding: 0;
  color: var(--ivory);
  font:
    500 0.8125rem / 1.5 system-ui,
    sans-serif;
}
.setup-inference > #manual-key {
  margin-top: 0.375rem;
}
.setup-model,
.setup-file {
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}
/* Model choices share the existing OpenRouter-only visibility state. */
.setup-content:has(#openrouter-connect[hidden]) > .setup-model {
  display: none;
}
#setup-asset {
  display: block;
  margin-top: 0.375rem;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}
#setup-asset:empty {
  display: none;
}
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
}
label[for="key"] {
  font:
    500 0.875rem / 1.5 system-ui,
    sans-serif;
}
input,
button {
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  border: 1px solid var(--boundary);
  border-radius: 2px;
  font: inherit;
}
input {
  width: 100%;
  margin-top: 0.375rem;
  padding: 0.5rem 0.625rem;
  color: inherit;
  background: #10120e;
  caret-color: var(--focus);
}
.prompt-telemetry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.prompt-telemetry > label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}
.prompt-telemetry input {
  width: 1.125rem;
  min-height: 1.125rem;
  height: 1.125rem;
  margin: 0;
  padding: 0;
  accent-color: var(--amber);
}
input[type="file"] {
  padding: 0.25rem;
  font-size: 0.8125rem;
}
input::file-selector-button {
  min-height: 36px;
  margin-right: 0.5rem;
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: 1px;
  font: inherit;
  color: inherit;
  background: #343a2e;
  cursor: pointer;
}
input:disabled {
  color: var(--muted);
  background: #242923;
}
input:disabled::file-selector-button {
  cursor: default;
}
input:enabled:hover {
  border-color: #b2b4aa;
}
input:enabled:hover::file-selector-button {
  background: #484f42;
}
.help,
footer,
.advanced,
.setup-details {
  font-size: 0.875rem;
  color: var(--muted);
}
.session-rail .help,
.setup-details,
.control-guidance {
  font-size: 0.8125rem;
  line-height: 1.45;
}
.setup .help {
  margin-top: 0.25rem;
  line-height: 1.5;
}
#openrouter-model-help:empty,
#openrouter-auth-status:empty {
  margin-top: 0;
}
#openrouter-signin-button {
  width: 100%;
  --doom-button-padding: 0.625rem 0.75rem;
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}
#openrouter-manual,
#openrouter-back {
  margin-top: 0;
  font-size: 0.8125rem;
}
#openrouter-model {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
#openrouter-model label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-size: 0.8125rem;
  line-height: 1.4;
}
#openrouter-model input {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--amber);
}
#openrouter-model:disabled label {
  color: var(--muted);
}
summary {
  min-height: 44px;
  padding: 0.625rem 0.25rem;
  cursor: pointer;
  overflow-wrap: anywhere;
}
summary:hover {
  background: #23271d;
}
.setup > summary,
.setup-details summary,
.control-guidance > summary {
  padding-inline: 0;
  color: var(--ivory);
}
.setup > summary {
  padding-block: 0.5rem;
}
.setup-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  column-gap: 0.75rem;
  row-gap: 0.375rem;
  align-items: center;
}
.setup-file > h3,
.setup-file > doom-button,
.setup-file > #prepared-asset,
.setup-file > #setup-asset {
  grid-column: 1 / -1;
}
.setup-file > doom-button {
  width: 100%;
  text-align: center;
  font:
    500 0.875rem / 1.4 system-ui,
    sans-serif;
}
.setup-file > #setup-asset {
  margin-top: 0;
}
.setup-file > #prepared-asset {
  padding-block: 0.375rem;
  overflow-wrap: anywhere;
}
#prepared-asset-name {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}
#prepared-asset-detail {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}
#openrouter-auth-note.auth-charge-note {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
}
.iwad-picker {
  font:
    500 0.875rem / 1.25 system-ui,
    sans-serif;
}
#iwad-picker-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#iwad-picker-state {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.iwad-picker .iwad-folder-icon {
  width: 1.25rem;
  height: 1.125rem;
  flex: 0 0 auto;
  color: var(--amber);
}
.iwad-folder-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.setup-details > summary {
  padding-block: 0.5rem;
  color: var(--muted);
}
.setup-details > summary:hover {
  color: var(--ivory);
}
.advanced > summary {
  color: var(--ivory);
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 500;
}
.control-bar {
  margin-top: 1.25rem;
}
.manual-controls,
.continuous-group,
.mode-actions {
  display: grid;
  gap: 0.625rem;
  min-width: 0;
}
.manual-controls {
  margin-top: 0.75rem;
}
.duration {
  display: grid;
  gap: 0.375rem;
  align-items: center;
}
#tics,
#budget {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 1.125rem;
}
#tic-rate {
  margin-top: 0.375rem;
}
.continuous-group {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--rule);
}
#next,
#start,
#stop {
  width: 100%;
  --doom-button-min-height: 50px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
}
#next {
  --doom-button-min-height: 56px;
  font-size: 1.5rem;
}
.control-bar--amber-gate > .control-prerequisite {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0.75rem;
  color: var(--ivory);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.control-bar--amber-gate > .control-prerequisite:not([hidden]) {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.control-prerequisite::before {
  content: "";
  flex: 0 0 16px;
  height: 16px;
  margin-top: 0.125rem;
  background: var(--amber);
  mask:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%227.5%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M10%209v5%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%226%22%20r%3D%22.875%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E")
    center / contain no-repeat;
}
.control-bar--amber-gate .continuous-group {
  border-top-color: var(--boundary);
}
.control-guidance {
  margin-top: 0.5rem;
  color: var(--muted);
}
.control-guidance-text {
  margin-top: 0.5rem;
}
.prompt-group {
  min-width: 0;
  margin-top: 1rem;
}
.prompt-group > hr {
  margin: 0 0 0.875rem;
  border: 0;
  border-top: 1px solid var(--rule);
}
#view-prompt {
  width: 100%;
}
.decision-prompt {
  width: min(44rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: clamp(1rem, 4vw, 2rem);
  overflow: hidden;
  color: var(--ivory);
  background: var(--surface);
  border: 1px solid var(--boundary);
  border-radius: 2px;
}
.decision-prompt[open] {
  display: flex;
  flex-direction: column;
}
.decision-prompt::backdrop {
  background: rgb(0 0 0 / 60%);
}
#inspector-image {
  width: 100%;
  max-width: 640px;
  height: auto;
  image-rendering: pixelated;
}
.decision-prompt-content {
  display: grid;
  min-width: 0;
  min-height: 0;
  /* Keep the 3px focus outline and its offset inside the scroller. */
  padding: 6px;
  overflow-y: auto;
  gap: 1rem;
}
.decision-prompt-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.decision-prompt-heading > h2 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}
.prompt-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-inline: 6px;
  gap: 0.75rem;
}
.prompt-actions > doom-button {
  --doom-button-padding: 0.5rem 1rem;
}
.prompt-field {
  display: grid;
  gap: 0.375rem;
}
.prompt-field > h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}
#prompt-state-preview {
  min-width: 0;
  border-top: 1px solid var(--rule);
}
#prompt-instructions {
  width: 100%;
  min-width: 0;
  min-height: 10rem;
  padding: 0.5rem 0.625rem;
  resize: vertical;
  border: 1px solid var(--boundary);
  border-radius: 2px;
  color: var(--ivory);
  background: #10120e;
  caret-color: var(--focus);
  font: inherit;
  overflow-wrap: anywhere;
  font-size: 0.875rem;
  line-height: 1.6;
}
#prompt-instructions:hover {
  border-color: var(--ivory);
}
#prompt-instructions[aria-invalid="true"] {
  border-color: var(--amber);
}
#prompt-error {
  color: var(--ivory);
}
.game {
  width: 100%;
  padding: 1.25rem 0.625rem;
  border-top: 1px solid var(--rule);
}
.game-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  max-width: 640px;
  margin: 0 auto 0.75rem;
}
.game-heading > h2 {
  flex-shrink: 0;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-transform: none;
}
#game-model {
  min-width: 0;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
  text-align: right;
}
.stage {
  display: flex;
  justify-content: center;
  max-width: 640px;
  margin-inline: auto;
  background: #000;
  outline: 1px solid var(--rule);
}
canvas {
  display: block;
  width: 640px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  background: #000;
  image-rendering: pixelated;
}
.latest-outcome {
  container-type: inline-size;
  max-width: 640px;
  margin: 1.25rem auto 0;
  padding: 1rem;
  border: 1px solid var(--rule);
  background: #171b12;
  overflow-wrap: anywhere;
}
.latest-outcome > h3 {
  margin: 0 0 0.875rem;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.outcome-content {
  display: grid;
  gap: 0.5rem;
}
.outcome-content > * {
  min-width: 0;
}
.outcome-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  font-family: var(--display);
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.outcome-heading > span {
  min-width: 0;
  max-width: 100%;
}
#outcome-number {
  color: var(--amber);
  font-size: 1.2em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#outcome-number[hidden] + #outcome-action {
  font-size: 0.75em;
  color: var(--muted);
}
#outcome-evidence {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.game-status {
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
}
#status {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}
#status[data-phase="busy"],
#status[data-phase="error"] {
  color: var(--ivory);
  font-weight: 600;
}
.outcome-session-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem 0.875rem;
  margin: 0.5rem 0 0;
  padding: 0;
  color: var(--muted);
}
.outcome-session-metrics > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 0.625rem;
}
.outcome-session-metrics dt,
.outcome-session-metrics dd {
  font-size: 0.8125rem;
  line-height: 1.5;
}
.outcome-session-metrics dt {
  color: var(--muted);
}
.outcome-session-metrics dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.outcome-session-metrics small {
  margin-left: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}
@container (min-width: 34rem) {
  .outcome-content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .game-status {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 0 0 0.5rem;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
}
.history-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(42rem, 75dvh);
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--rule);
}
.history-scroll-cue {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.375rem 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  /* Reserve footer space even when hidden so the scroll area stays stable. */
  visibility: hidden;
  pointer-events: none;
}
.history-scroll-cue svg {
  flex-shrink: 0;
}
.history-panel[data-history-view="list"][data-history-more="true"]
  .history-scroll-cue {
  visibility: visible;
}
.history-panel > h2,
#back-to-history,
.history-order,
#history-empty {
  flex-shrink: 0;
}
.history-order {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
}
#history-empty {
  margin-top: 1.25rem;
  padding-block: 1.5rem;
  border-block: 1px solid var(--rule);
  color: var(--ivory);
  font-size: 0.875rem;
  line-height: 1.7;
}
#history:empty {
  margin-top: 0;
  border-top: 0;
}
#history {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scroll-padding-bottom: 3rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  border-top: 1px solid var(--rule);
}
.history-view {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.history-panel [hidden] {
  display: none;
}
.decision-row::after {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  grid-column: 3;
  grid-row: 1 / 4;
  align-self: center;
  justify-self: end;
  color: var(--muted);
}
:where(#history) > li {
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}
.decision-row {
  display: grid;
  grid-template-columns: minmax(0, 3.25rem) minmax(0, 1fr) 0.625rem;
  gap: 0.25rem 0.875rem;
  align-items: start;
  width: 100%;
  padding: 0.75rem 0.375rem;
  border: 0;
  border-radius: 0;
  color: var(--ivory);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
:where(#history > li[data-selected="true"]) {
  background: #1c2117;
}
.decision-row:hover {
  background: #1c2117;
}
.decision-row:focus-visible,
#history:focus-visible,
#detail-scroll:focus-visible {
  outline-offset: -3px;
}
.decision-heading {
  display: contents;
}
.decision-number {
  grid-column: 1;
  grid-row: 1 / 4;
  min-width: 0;
  color: var(--ivory);
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
#history > li:first-child .decision-number {
  color: var(--amber);
}
.decision-action {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.decision-metrics {
  min-width: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  grid-column: 2;
  grid-row: 3;
}
.decision-status {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}
#detail-header {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.75rem;
  min-width: 0;
  margin-top: 0.375rem;
  padding: 0.375rem;
  overflow-wrap: anywhere;
}
#detail-header .history-order {
  margin-top: 0;
}
#back-to-history {
  margin-top: 0;
  --doom-button-padding: 0.5rem 0.75rem;
  --doom-button-focus-offset: -3px;
}
#detail-scroll {
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin-top: 0.75rem;
  padding: 0.375rem 0.375rem 1rem;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  overflow-wrap: anywhere;
  font-size: 0.875rem;
}
#inspector-title {
  min-width: 0;
  margin: 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
}
#inspector-state {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.decision-execution {
  margin-top: 0.375rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
#detail-scroll h4 {
  margin: 1rem 0 0.5rem;
  color: var(--ivory);
  font-size: 0.875rem;
  font-weight: 600;
}
#detail-scroll .help {
  font-size: 0.8125rem;
}
.probability-note {
  margin-top: 0.5rem;
}
.decision-metadata {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 0.8125rem;
}
.decision-metadata dt {
  color: var(--muted);
}
.decision-metadata dd {
  min-width: 0;
  margin: 0;
}
.decision-usage {
  margin-top: 0.375rem;
  font-variant-numeric: tabular-nums;
}
.probabilities {
  list-style: none;
  margin: 0;
  padding: 0;
}
.probabilities li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.1875rem 0.75rem;
  padding: 0.375rem 0.5rem;
  color: var(--muted);
}
.probabilities li[data-selected="true"] {
  --probability: var(--ivory);
  color: var(--ivory);
  background: #3b4533;
  border-radius: 2px;
  font-weight: 600;
}
.probability-label {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
}
.probability-selected {
  padding: 0 0.25rem;
  border: 1px solid #87947c;
  border-radius: 3px;
  font-size: 0.6875rem;
}
.probability-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.probability-bar {
  grid-column: 1 / -1;
  display: block;
  appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 3px;
  background: var(--track);
}
.probability-bar::-webkit-meter-bar {
  height: 6px;
  border: 0;
  border-radius: 3px;
  background: var(--track);
}
.probability-bar::-webkit-meter-optimum-value,
.probability-bar::-webkit-meter-suboptimum-value,
.probability-bar::-webkit-meter-even-less-good-value {
  background: var(--probability);
  border-radius: 3px;
}
.probability-bar::-moz-meter-bar {
  background: var(--probability);
  border-radius: 3px;
}
.receipt {
  margin-top: 0.75rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8125rem;
}
pre {
  margin: 0.5rem 0 0.75rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    0.8125rem / 1.6 ui-monospace,
    monospace;
}
.advanced {
  margin-top: 1.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
}
#frame,
#sdk {
  margin: 0.5rem 0;
  overflow-wrap: anywhere;
}
footer {
  margin-top: 1.5rem;
  width: 100%;
  max-width: none;
}
footer > p {
  width: 100%;
  max-width: none;
}
footer p + p {
  margin-top: 0.75rem;
}
a {
  color: var(--focus);
  text-underline-offset: 0.2em;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
::selection {
  color: #191919;
  background: var(--focus);
}
@media (min-width: 1280px) {
  main {
    padding-inline: 16px;
  }
  .console {
    /* Split the recovered game padding equally between the outer rails. */
    grid-template-columns:
      minmax(calc(17rem + 10px), calc(50vw - 390px))
      minmax(0, 1fr)
      minmax(calc(20rem + 10px), calc(50vw - 342px));
    grid-template-rows: auto minmax(0, 1fr);
  }
  .session-rail {
    grid-column: 1;
    grid-row: 1 / 3;
    border-right: 1px solid var(--rule);
  }
  .game {
    grid-column: 2;
    grid-row: 1;
    border-top: 0;
  }
  .history-panel {
    grid-column: 3;
    grid-row: 1;
    align-self: stretch;
    /* Let the game determine this row's height; history scrolls within it. */
    contain: size;
    height: auto;
    max-height: none;
    margin-bottom: 1.25rem;
    padding-bottom: 0;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
}
@media (min-width: 760px) and (max-width: 1279px) {
  .control-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
  }
  .control-bar > h2,
  .control-guidance,
  .prompt-group {
    grid-column: 1 / -1;
  }
  .manual-controls,
  .continuous-group,
  .control-guidance,
  .prompt-group {
    margin-top: 0;
  }
  .continuous-group {
    padding: 0 0 0 1.5rem;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
}
@media (max-width: 760px) {
  .identity {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.125rem;
  }
  .broadcast-label {
    grid-column: 1;
    justify-self: start;
    text-align: left;
  }
}
@media (max-width: 639px) {
  main {
    padding-inline: 1rem;
  }
  .github-link {
    align-self: flex-end;
  }
  .game {
    padding: 1rem 0.5rem;
  }
}
