/* SPECTRAL BLOOM
   A print studio's proofing room. The artwork is the only lit object; every
   control recedes to the edge until you reach for it.

   The theme is locked dark by design, not by omission. The render is additive
   glow on an unlit ground - on a light background it inverts into mud. This is
   the print-emulating exception, and it applies to the whole page. */

/* Self-hosted, so the page makes no third-party request at all. Two files,
   31,992 bytes, latin subsets, licences in fonts/OFL.txt.

   Only these two faces are ever used. The old Google Fonts link asked for six
   and loaded four that no rule references; worse, naming a second Playfair
   weight makes Google serve the variable face, 38,460 B against 21,880 for the
   static 400, to render exactly one weight. */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/playfair-display-400-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-300-latin.woff2') format('woff2');
}

/* Real bolds, not synthesised ones. A browser asked for a weight it does not
   have will smear the regular, which is unmissable at poster size. */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/playfair-display-700-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-600-latin.woff2') format('woff2');
}

@property --reveal {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

:root {
  /* Warm near-black. Ink on unlit paper, never #000. */
  --ground:      #0a0908;
  --ground-lift: #121010;
  --rule:        rgba(232, 224, 210, 0.13);
  --rule-strong: rgba(232, 224, 210, 0.28);
  /* Contrast against --ground, measured: 9.31:1 / 8.11:1 / 4.59:1. Every
     consumer of --ink-faint is 10-11px, far below the 18.66px that would earn
     the 3:1 large-text allowance, so it has to clear 4.5:1 on its own. It was
     0.34, which is 2.56:1 and fails outright. The whole ladder moves rather
     than only its bottom rung, otherwise faint lands on top of soft and the
     three-tier hierarchy the UI is built on collapses into two. */
  --ink:         #e8e0d2;
  --ink-soft:    rgba(232, 224, 210, 0.72);
  --ink-faint:   rgba(232, 224, 210, 0.52);
  --accent:      #f8c25c;          /* replaced at runtime by the active ink */
  --fault:       #e07a5f;

  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --print: 'Playfair Display', 'Iowan Old Style', Georgia, serif;

  --rail-w: 310px;
  --gap: clamp(1.5rem, 4vw, 4rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

/* The hidden attribute must win over any display rule that follows it.
   Without this, .drape and .sheet paint over the whole room while "hidden". */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Grain. Fixed and pointer-transparent so it never repaints on interaction. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.34'/%3E%3C/svg%3E");
}

button, input { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- room ---- */

.room {
  display: grid;
  grid-template-columns: 1fr var(--rail-w);
  height: 100dvh;
}

/* ---------------------------------------------------------------- plate --- */

.plate {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
  min-height: 0;
  background: var(--plate-ground, var(--ground));
  transition: background 0.3s var(--ease);
}

/* The artwork and everything that sits on top of it. */
.stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--gap);
  min-height: 0;
  /* Measured, so the disc can size itself from the room it actually has
     rather than from the viewport. Closing the drawer then gives the print
     the space back instead of leaving a gap where the controls were. */
  container-type: size;
}

/* The bench: what changes the picture, kept next to the picture. Its own
   ground, so the controls read as apparatus rather than as part of the print,
   whatever paper is loaded. */
.bench {
  border-top: 1px solid var(--rule);
  background: var(--ground);
  color: var(--ink);
}

/* A drawer, so the stage can have the room back. */
.bench__handle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.6rem var(--gap);
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.2s var(--ease);
}

.bench__handle:hover { color: var(--ink); }
.bench__handle:focus-visible { outline: 1px solid var(--accent); outline-offset: -2px; }
.bench__handle-hint { color: var(--accent); letter-spacing: 0.12em; }

.bench__chev {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.3s var(--ease);
}

.bench[data-open='false'] .bench__chev {
  transform: rotate(225deg) translate(-2px, -2px);
}

/* 0fr to 1fr animates cleanly where max-height guesswork does not. */
.bench__body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.32s var(--ease);
}

.bench[data-open='false'] .bench__body { grid-template-rows: 0fr; }

.bench__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(0.9rem, 2vw, 2.2rem);
  overflow: hidden;
  padding: 0 var(--gap) clamp(0.8rem, 1.8vh, 1.4rem);
}

.bench .field { gap: 0.45rem; }
.bench__view { flex: 3 1 330px; }   /* wide enough that five views stay on one row */
.bench .field--dial { flex: 0 0 auto; }
.bench__ink { flex: 2 1 190px; }
.bench__ground { flex: 2 1 170px; }
.bench__knobs { flex: 2 1 180px; }
.bench .dial__hint { display: none; }

/* Compact apparatus: the drawer is for reaching into, not for living in. */
.bench .dial__knob { width: 54px; height: 54px; }
.bench .dial__pointer { top: 6px; height: 13px; transform-origin: 50% 21px; }
.bench .dial__value { font-size: 1.5rem; }
.bench .field__note { max-width: 30ch; font-size: 10px; }
.bench .found { padding: 0.4rem 0.5rem; font-size: 9.5px; }
.bench .ink-chip, .bench .ground-chip { height: 24px; }
.bench .swatch { height: 24px; }
.bench .field__note { max-width: 34ch; }

.disc {
  position: relative;
  width: min(100cqw, 100cqh);
  aspect-ratio: 1;
  /* The reveal draws outward from the centre, so loading is the artwork
     arriving rather than a spinner pretending to be busy. */
  mask-image: radial-gradient(circle at 50% 50%,
    #000 var(--reveal), transparent calc(var(--reveal) + 7%));
  -webkit-mask-image: radial-gradient(circle at 50% 50%,
    #000 var(--reveal), transparent calc(var(--reveal) + 7%));
}

.disc canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.plate[data-state='ready'] .disc,
.plate[data-state='working'] .disc { --reveal: 110%; }

.plate[data-state='ready'] .disc {
  transition: --reveal 1.2s var(--ease);
}

.plate[data-state='empty'] .disc {
  --reveal: 110%;
  opacity: 0.3;
  filter: blur(1px);
  animation: drift 90s linear infinite;
}

@keyframes drift { to { transform: rotate(360deg); } }

#overlay { pointer-events: none; }
.plate[data-state='ready'] #poster { cursor: crosshair; }

/* Poster caption. The one place print voice is allowed. */
.plate__caption {
  position: absolute;
  left: calc(var(--gap) - 1.1rem);
  bottom: calc(var(--gap) - 0.9rem);
  max-width: 42ch;
  padding: 0.9rem 1.1rem;
  /* Its own ground, so tiled words cannot run underneath the title. */
  background: var(--plate-ground, var(--ground));
  pointer-events: none;
}

.caption__title {
  color: var(--plate-ink, var(--ink));
  margin: 0;
  font-family: var(--print);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2.35rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.caption__meta {
  margin: 0.5rem 0 0;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ------------------------------------------------------- plate states ----- */

.invite, .working {
  position: absolute;
  inset: auto;
  text-align: center;
}

/* Wide enough for three actions in one row; the prose inside stays at a
   readable measure rather than stretching to match. */
.invite { max-width: 470px; }
.working { max-width: 34ch; }
.invite__lead, .invite__sub, .invite__aside { max-width: 34ch; }
.invite__lead, .invite__sub { margin-inline: auto; }

/* The ambient bloom sits behind this copy, so the copy needs its own ground. */
.invite::before {
  content: '';
  position: absolute;
  inset: -18% -30%;
  z-index: -1;
  background: radial-gradient(ellipse at center,
    rgba(10, 9, 8, 0.94) 38%, rgba(10, 9, 8, 0) 72%);
}

.invite__lead {
  margin: 0;
  font-family: var(--print);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 400;
}

.invite__sub {
  margin: 0.9rem auto 0;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.invite__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.8rem;
}

.invite__aside {
  margin: 1.1rem auto 0;
  max-width: 32ch;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-faint);
}

/* Capture in progress. The only moment the app asks you to wait on purpose,
   so it states the elapsed time plainly and keeps the stop control obvious. */
.recording {
  position: absolute;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  text-align: center;
}

.recording__label {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.recording__time {
  margin: 0;
  font-family: var(--print);
  font-size: 3.2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.recording__note {
  margin: 0;
  max-width: 28ch;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-faint);
}

/* The live spectrum is the progress indicator, so the plate stays lit while
   a capture runs rather than being masked away like the analysis reveal. */
.plate[data-state='capturing'] .disc {
  --reveal: 110%;
  opacity: 0.55;
}

.working__label {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.working__pct {
  margin: 0.4rem 0 0;
  font-family: var(--print);
  font-size: 3rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  transition: color 0.4s var(--ease);
}

.working__pct::after { content: '%'; font-size: 0.4em; vertical-align: 0.9em; opacity: 0.5; }

.fault {
  /* Top of the plate, clear of the caption block in the bottom corner. */
  position: absolute;
  top: var(--gap);
  left: 50%;
  transform: translateX(-50%);
  max-width: 46ch;
  margin: 0;
  padding: 0.75rem 1rem;
  border-left: 1px solid var(--fault);
  background: var(--ground-lift);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}

/* ----------------------------------------------------------------- rail --- */

.rail {
  display: flex;
  flex-direction: column;
  gap: clamp(0.9rem, 1.9vh, 1.6rem);
  padding: clamp(1.1rem, 3vh, 2.6rem) 1.75rem;
  border-left: 1px solid var(--rule);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* The rail used to dim to 0.78 at rest, which multiplied every text token and
   dragged --ink-faint down to 1.99:1. Recede through the hairline rules and
   the muted ink ladder instead: an accessible control panel cannot be
   illegible until you point at it. */

.rail__head { display: grid; gap: 0.3rem; }

.mark {
  margin: 0;
  font-family: var(--print);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.mark__sub {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Controls stay inert until there is something to control. */
[data-locked] {
  opacity: 0.45;
  transition: opacity 0.4s var(--ease);
}

/* Locked sections carry the inert attribute too, set in main.js. pointer-events
   alone left them reachable by keyboard, so a sighted mouse user saw a disabled
   control that a keyboard user could still focus and operate. */
[data-locked][inert] { pointer-events: none; }

body[data-armed='true'] [data-locked] {
  opacity: 1;
  pointer-events: auto;
}

.field { display: grid; gap: clamp(0.35rem, 0.9vh, 0.55rem); }

.field__label {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field__num { color: var(--ink-soft); letter-spacing: 0.06em; }

.field__input {
  width: 100%;
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  font-size: 13px;
  transition: border-color 0.25s var(--ease);
}

.field__input::placeholder,
.field__area::placeholder { color: var(--ink-faint); }

.field__area {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--rule);
  background: none;
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.25s var(--ease);
}

.field__area:focus { outline: 0; border-color: var(--accent); }

.field__select {
  width: 100%;
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.field__select:focus { outline: 0; border-bottom-color: var(--accent); }
.field__select option { background: var(--ground-lift); color: var(--ink); }
.field__input:focus { outline: 0; border-bottom-color: var(--accent); }

/* --------------------------------------------------------------- pieces --- */

.btn {
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.08s var(--ease);
}

.btn:hover { border-color: var(--ink-soft); background: var(--ground-lift); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* Filled with the ink itself, so contrast is against a light chip. */
.btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0908;
}
.btn--primary:hover { background: var(--accent); filter: brightness(1.1); }

.btn--wide { width: 100%; }
.btn--quiet { border-color: transparent; color: var(--ink-faint); padding-left: 0; text-align: left; }
.btn--quiet:hover { color: var(--ink); background: none; }

.exports { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }

/* Five views, wrapping three then two. Flex rather than a grid so the rows
   fill themselves and there is never an empty cell to explain. */
.segmented { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.segmented .seg { flex: 1 1 auto; }

.field__note {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* The detected repeat, offered rather than applied. The app does not move the
   dial on its own; finding the alignment yourself is the point of it. */
.found {
  display: block;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--accent);
  background: none;
  color: var(--accent);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.found:hover { background: rgba(232, 224, 210, 0.06); }
.found:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.seg {
  padding: 0.5rem;
  border: 1px solid var(--rule);
  background: none;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.seg:disabled { opacity: 0.35; cursor: default; }
.field__select:disabled { opacity: 0.35; cursor: default; }

.seg[aria-checked='true'] {
  border-color: var(--accent);
  color: var(--accent);
}
.seg:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.inks { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.inks .ink-chip { flex: 1 1 17%; min-width: 26px; }

.customink { display: flex; gap: 0.4rem; margin-top: 0.15rem; }

.customink__slot {
  flex: 1;
  display: grid;
  gap: 0.25rem;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  cursor: pointer;
}

.swatch--wide { flex: 1; width: 100%; height: 26px; }

.swatchrow { display: flex; gap: 0.4rem; align-items: stretch; }

.grounds { display: flex; flex: 1; gap: 0.3rem; }

.ground-chip {
  flex: 1;
  height: 30px;
  padding: 0;
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.ground-chip:hover { transform: translateY(-2px); }
.ground-chip[aria-pressed='true'] { border-color: var(--ink); }
.ground-chip:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* The native control, stripped back to a plain chip so it sits with the
   hairline vocabulary rather than importing the operating system's. */
.swatch {
  flex: 0 0 46px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.swatch::-webkit-color-swatch-wrapper { padding: 2px; }
.swatch::-webkit-color-swatch { border: 0; }
.swatch::-moz-color-swatch { border: 0; }
.swatch:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.btn--tiny { flex: 1; padding: 0.4rem 0.5rem; font-size: 9.5px; }

.ink-chip {
  flex: 1;
  height: 30px;
  padding: 0;
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.ink-chip:hover { transform: translateY(-2px); }
.ink-chip[aria-checked='true'] { border-color: var(--ink); }
.ink-chip:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1px;
  background: var(--rule-strong);
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink);
  transition: background 0.2s var(--ease);
}
.slider::-moz-range-thumb {
  width: 11px; height: 11px; border: 0; border-radius: 50%;
  background: var(--ink);
}
.slider:hover::-webkit-slider-thumb { background: var(--accent); }
.slider:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; }

/* ------------------------------------------------------------- the dial --- */
/* The one control allowed real presence. Everything else is a hairline; this
   is a machined object, because turning it is the whole point of the app. */

.field--dial { gap: 0.85rem; }

.dial { display: flex; align-items: center; gap: 1rem; }

.dial__knob {
  position: relative;
  flex: none;
  width: clamp(58px, 7vh, 74px);
  height: clamp(58px, 7vh, 74px);
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(232,224,210,0.14), transparent 62%),
    conic-gradient(from 180deg, #171513, #26221e 25%, #14120f 52%, #262220 75%, #171513);
  background-color: #1a1815;
  box-shadow:
    inset 0 1px 0 rgba(232,224,210,0.16),
    inset 0 -2px 6px rgba(0,0,0,0.7),
    0 6px 18px rgba(0,0,0,0.5);
  transition: box-shadow 0.2s var(--ease);
}

.dial__knob::before {
  /* Knurling. Fine radial teeth, the way a real control is gripped. */
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(232,224,210,0.10) 0deg 1.4deg,
    transparent 1.4deg 4.5deg);
  mask-image: radial-gradient(circle, transparent 58%, #000 62%, #000 100%);
  -webkit-mask-image: radial-gradient(circle, transparent 58%, #000 62%, #000 100%);
}

.dial__knob::after {
  content: '';
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #2a2622, #131110);
  box-shadow: inset 0 1px 0 rgba(232,224,210,0.10);
}

.dial__knob:active { cursor: grabbing; }
.dial__knob:hover, .dial__knob:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(232,224,210,0.2),
    inset 0 -2px 6px rgba(0,0,0,0.7),
    0 6px 22px rgba(0,0,0,0.6),
    0 0 0 1px var(--accent);
}
.dial__knob:focus-visible { outline: none; }

.dial__pointer {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 1px;
  height: 17px;
  margin-left: -0.5px;
  background: var(--accent);
  transform-origin: 50% 29px;
  z-index: 2;
  transition: background 0.3s var(--ease);
}

.dial__read { min-width: 0; }

.dial__value {
  margin: 0;
  font-family: var(--print);
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dial__unit, .dial__hint {
  margin: 0.3rem 0 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.dial__hint { letter-spacing: 0.08em; text-transform: none; font-size: 11px; line-height: 1.5; }

/* ------------------------------------------------------------ transport --- */

.transport { display: grid; gap: 0.6rem; }

.transport__time {
  margin: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}

.rail__foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--rule); }

/* --------------------------------------------------------------- sheets --- */

.drape, .sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.drape {
  background: rgba(10, 9, 8, 0.9);
  border: 1px dashed var(--accent);
}

.drape p {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.sheet { background: rgba(10, 9, 8, 0.96); padding: var(--gap); }

.sheet__inner {
  display: grid;
  gap: 1.1rem;
  justify-items: center;
  max-height: 100%;
}

.sheet__label { margin: 0; font-size: 11px; color: var(--ink-soft); letter-spacing: 0.06em; }

.sheet__img {
  max-width: min(560px, 100%);
  max-height: 62vh;
  object-fit: contain;
  border: 1px solid var(--rule);
}

.sheet__actions { display: flex; gap: 0.6rem; }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 900px) {
  body { overflow: auto; }
  .room { grid-template-columns: 1fr; height: auto; min-height: 100dvh; }
  /* Size to the disc rather than to the viewport: centring a 315px plate in
     72dvh leaves a fifth of the screen empty above and below it. */
  .plate { min-height: auto; }
  .stage { padding-block: clamp(2rem, 8vw, 3.5rem); container-type: normal; }
  .disc { width: min(84vw, 520px); }
  .bench__inner { gap: 1.1rem; }
  .bench__view, .bench__ink, .bench__ground, .bench__knobs { flex: 1 1 100%; }
  .disc { width: min(84vw, 520px); }
  .rail {
    border-left: 0;
    border-top: 1px solid var(--rule);
    opacity: 1;
    overflow: visible;
  }
  .plate__caption { position: static; margin-top: 1.5rem; text-align: center; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .plate[data-state='ready'] .disc { transition: none; }
  .plate[data-state='empty'] .disc { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
