@font-face {
  font-family: "IBM Plex Mono";
  src: url("/versions/007c46252069b3d9fd50/assets/ui/IBMPlexMono-Regular.woff2") format("woff2");
  font-display: block;
  font-style: normal;
  font-weight: 400;
}

:root {
  color-scheme: dark;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  background: #242424;
  color: #f0f0f0;
  --link-blue: #8bb8ff;
  --border: #858585;
  --alert-red: #ff6e76;
  --local-text-scale: 1;
}

html[data-application-text-scale="125"] { --local-text-scale: 1.25; }
html[data-application-text-scale="150"] { --local-text-scale: 1.5; }
html[data-application-text-scale="175"] { --local-text-scale: 1.75; }

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: #242424;
}

body {
  overflow: hidden;
}

#workstation {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  background: #242424;
}

.visually-visible-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.link-status {
  min-height: 2rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  color: var(--link-blue);
  background: #1f1f1f;
  font-size: calc(0.8125rem * var(--local-text-scale));
  letter-spacing: 0.02em;
}

.pacing-status {
  display: block;
  margin-top: 0.5rem;
  color: var(--border);
}

.pacing-status[hidden] {
  display: none;
}

.presentation-settings {
  position: absolute;
  z-index: 10;
  top: 0.2rem;
  right: 0.6rem;
  max-width: min(24rem, calc(100vw - 1.2rem));
  border: 1px solid var(--border);
  background: #1f1f1f;
  color: #f0f0f0;
  font-size: calc(0.75rem * var(--local-text-scale));
  max-height: calc(100vh - 1.2rem);
  overflow-y: auto;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

/* Closed local settings must leave every canvas control reachable. */
.presentation-settings:not(:has(> details[open])) {
  display: none;
}

.presentation-settings > details > summary {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #1f1f1f;
}

.presentation-settings summary {
  cursor: pointer;
  padding: 0.4rem 0.55rem;
}

/* The stacking rule is for the groups only. A label is a row of its own control and
   caption, so it takes the inset without the column layout that would put the two on
   separate lines. */
.presentation-settings details > *:not(summary, label) {
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
}

.presentation-settings details > label {
  padding: 0.45rem 0.55rem;
}

/* Which surfaces a preset governs. The two palettes are the situation display's own token set,
   so a player choosing one is told where to look for the change rather than left to find out.
   (#228) */
.presentation-note {
  margin: 0;
  color: #c8c8c8;
  font-size: 0.92em;
  line-height: 1.35;
}

.presentation-settings fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.presentation-settings label {
  display: flex;
  align-items: center;
  gap: 0.4em;
  min-width: 0;
  flex-wrap: wrap;
  cursor: pointer;
}

.presentation-settings input,
.presentation-settings select,
.presentation-refusal button,
.unsupported button {
  font: inherit;
}

.presentation-settings select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.presentation-settings input[type="checkbox"],
.presentation-settings input[type="radio"] {
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}

.public-information {
  display: grid;
  gap: 0.35rem;
}

.public-information a { color: var(--link-blue); }

.public-information :focus-visible,
.presentation-settings :focus-visible,
.presentation-refusal :focus-visible,
.unsupported :focus-visible {
  outline: 2px solid var(--link-blue);
  outline-offset: 2px;
}

.canvas-host {
  position: relative;
  min-height: 0;
  width: 100%;
  height: 100%;
  background: #858585;
}

.atc-canvas {
  /* Bevy draws control focus; the browser outline's raster layer can cover the GPU picture. */
  outline: none;
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #858585;
}

.atc-canvas.canvas-candidate {
  z-index: 1;
  visibility: hidden;
  pointer-events: none;
}

.atc-canvas.canvas-ready {
  z-index: 1;
  visibility: visible;
}

.atc-canvas.canvas-frozen {
  z-index: 0;
  pointer-events: none;
}

.unsupported {
  position: absolute;
  inset: 4rem 1rem 1rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.75rem;
  padding: 2rem;
  border: 1px solid var(--border);
  background: #1f1f1f;
  text-align: center;
  font-size: calc(1rem * var(--local-text-scale));
  overflow-y: auto;
  overflow-wrap: anywhere;
}

.unsupported[hidden] {
  display: none;
}

.unsupported h2,
.unsupported p {
  max-width: 42rem;
  margin: 0;
}

.unsupported h2 {
  color: var(--alert-red);
  font-size: calc(1.25rem * var(--local-text-scale));
}

.unsupported-reload {
  margin-top: 0.5rem;
  padding: 0.5rem 1.25rem;
  font: inherit;
  color: inherit;
  background: #2e2e2e;
  border: 1px solid var(--border);
  cursor: pointer;
}

.unsupported-reload:hover,
.unsupported-reload:focus-visible {
  border-color: var(--link-blue);
}

.non-operational {
  color: #c8c8c8;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Local presentation failures name only the attempted and retained preferences. */
.presentation-refusal {
  position: absolute;
  z-index: 11;
  bottom: 0.6rem;
  right: 0.6rem;
  max-width: min(28rem, calc(100vw - 1.2rem));
  padding: 0.6rem;
  border: 1px solid var(--border);
  background: #1f1f1f;
  font-size: calc(0.8125rem * var(--local-text-scale));
  max-height: calc(100vh - 1.2rem);
  overflow-y: auto;
  overflow-wrap: anywhere;
}

.presentation-refusal[hidden] {
  display: none;
}

.presentation-refusal p {
  margin: 0 0 0.5rem;
}

#watch-welcome {
  max-width: min(28rem, calc(100vw - 4rem));
  padding: 1.5rem;
  border: 1px solid #687c90;
  border-radius: 0.5rem;
  background: #111923;
  color: #e6eef5;
  font: 1rem/1.5 system-ui, sans-serif;
}

#watch-welcome::backdrop { background: rgb(0 0 0 / 65%); }
#watch-welcome h2 { margin-top: 0; }
#watch-welcome a { color: #83cfff; }
#watch-welcome button { font: inherit; padding: 0.6rem 1rem; cursor: pointer; }
#watch-welcome-status:empty { display: none; }
