:root {
  color-scheme: dark;
  font: 16px/1.4 'Bahnschrift', 'Aptos', 'Trebuchet MS', sans-serif;
  background: #1e1e1b;
  color: #f4efdf;
  --edge: #4d4b42;
  --muted: #c2bdab;
  --signal: #e6c46a;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.masthead {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--edge);
}
.wordmark { font: 900 italic 28px/1 'Bahnschrift', 'Aptos Black', sans-serif; color: var(--signal); text-decoration: none; }
#connection, #phase, #occupancy, #room-status { color: var(--muted); font-size: 14px; }
main { max-width: 1370px; padding: 28px 24px; margin: 0 auto; }
.paddock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 355px); gap: 24px; align-items: start; }
.venue { position: relative; isolation: isolate; min-height: min(660px, 75vh); overflow: hidden; background: #2e2c24; border: 1px solid var(--edge); }
.billboard { position: relative; z-index: 1; padding: clamp(22px, 5vw, 80px); width: fit-content; text-shadow: 0 2px #29241c; }
.billboard h1 {
  margin: 0;
  font: 900 italic clamp(62px, 9vw, 158px)/0.83 'Bahnschrift', 'Aptos Black', 'Franklin Gothic Heavy', sans-serif;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}
.billboard p { font-weight: 650; margin: 24px 0 0; color: var(--signal); }
#poster { display: block; position: absolute; width: min(107%, 1100px); right: -14%; bottom: -47%; transform: rotate(-13deg); opacity: 0.95; }
.intake { padding: 22px 0 16px 23px; border-left: 1px solid var(--edge); }
h2, h3 { font-weight: 750; margin: 0 0 14px; }
h2 { font-size: 27px; }
h3 { font-size: 18px; border-bottom: 1px solid var(--edge); padding-bottom: 9px; margin-top: 30px; }
p { margin: 0 0 12px; }
form { display: grid; gap: 8px; }
label { display: block; font-size: 14px; color: var(--muted); }
label[for='code'] { margin-top: 13px; }
input, button { font: inherit; min-height: 43px; padding: 8px 12px; border: 1px solid var(--edge); border-radius: 2px; }
input { width: 100%; min-width: 0; background: #151513; color: #f4efdf; }
button { background: #30302a; color: #f4efdf; font-weight: 700; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--signal); }
button:disabled { cursor: default; opacity: 0.5; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.signal { color: #201d15; background: var(--signal); border-color: var(--signal); }
.signal:hover:not(:disabled) { background: #f0d68d; }
.inline { display: flex; gap: 8px; align-items: center; }
#directory p { color: var(--muted); }
.listing { display: flex; width: 100%; justify-content: space-between; gap: 8px; margin-bottom: 6px; text-align: left; }
.listing span:last-child { color: var(--muted); white-space: nowrap; font-weight: 400; }
.field { min-width: 0; border: 1px solid var(--edge); }
.track-header, .telemetry, .controls { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; gap: 12px; }
.track-header { border-bottom: 1px solid var(--edge); }
#clock { font: bold 20px 'Consolas', monospace; }
.picture { position: relative; display: grid; place-items: center; background: #26251f; }
#arena { display: block; width: min(100%, max(330px, calc(100dvh - 226px))); height: auto; }
#countdown { pointer-events: none; position: absolute; font: 900 italic clamp(70px, 14vw, 170px)/1 'Bahnschrift', sans-serif; text-shadow: 4px 5px #24231b; color: var(--signal); }
.telemetry, .controls { border-top: 1px solid var(--edge); font-size: 14px; }
.integrity { display: flex; align-items: center; gap: 8px; }
progress { accent-color: #a7b88b; max-width: 28vw; }
kbd { font: 12px 'Consolas', monospace; border: 1px solid var(--edge); padding: 2px 5px; margin-right: 3px; }
.room-title { justify-content: space-between; }
.room-title h2 { margin: 0; }
#occupancy { margin-top: 6px; }
.actions { flex-wrap: wrap; margin: 15px 0; }
ol { margin: 12px 0 0; padding: 0; list-style: none; max-height: 46vh; overflow-y: auto; }
li { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--edge); padding: 8px 2px; }
li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
li.self { color: var(--signal); }
.notice { border: 1px solid var(--edge); background: #24231f; position: fixed; bottom: 12px; left: 24px; z-index: 2; max-width: calc(100% - 48px); padding: 10px 14px; }
.touch { display: none; padding: 8px; gap: 4px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.touch button { touch-action: none; user-select: none; padding-inline: 2px; font-size: 13px; }
@media (pointer: coarse) {
  .touch { display: grid; }
  .controls { display: none; }
  #arena { width: min(100%, max(240px, calc(100dvh - 205px))); }
}
@media (max-width: 800px) {
  main { padding: 14px; }
  .masthead { height: 52px; padding: 0 14px; }
  .paddock { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .venue { min-height: 265px; }
  #poster { width: min(95%, 560px); right: -4%; bottom: -60%; }
  .intake { border-left: 0; padding: 10px 0; }
}
