:root {
  color-scheme: dark;
  --ink: #f3f1e8;
  --ink-dim: #b4bccb;
  --glass: rgb(13 19 34 / 0.88);
  --line: rgb(255 255 255 / 0.14);
  --blue: #2b55c9;
  --yellow: #f6c90e;
  --green: #35e07a;
  --amber: #ffa51f;
  --red: #ff5147;
  --gap: clamp(10px, 1.6vw, 22px);
  --display: "DIN Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Avenir Next", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #848b8e; color: var(--ink); font: 14px/1.4 var(--body); }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#stage:active { cursor: grabbing; }
#stage:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
h1, h2, p, dl, dd, ol { margin: 0; }

.brand, .panel, .transport, #views button {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand { position: fixed; top: var(--gap); left: var(--gap); width: min(330px, 46vw); padding: 14px 18px 16px; border-left: 6px solid var(--yellow); }
.kicker { color: var(--yellow); font: 700 11px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
h1 { font: 700 clamp(30px, 3.6vw, 52px)/1 var(--display); text-transform: uppercase; padding-top: 6px; }
.switch { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; }
.note { color: var(--ink-dim); font-size: 12px; margin-top: 8px; }
.present { width: 100%; margin-top: 10px; border-color: var(--yellow); color: var(--yellow); }

button, select {
  font: 600 13px/1 var(--body);
  color: var(--ink);
  background: rgb(255 255 255 / 0.07);
  border: 1px solid var(--line);
  padding: 8px 11px;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}
button:hover:not(:disabled), select:hover { border-color: var(--yellow); transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, select:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
button:disabled { cursor: default; opacity: 0.65; }
button[aria-pressed="true"], button.primary { background: var(--yellow); border-color: var(--yellow); color: #161200; }
button.warn { border-color: var(--red); color: #ffc2bd; }
select option { color: #111; }

.panel { position: fixed; top: var(--gap); right: var(--gap); width: min(290px, 44vw); max-height: calc(100% - 255px); overflow: auto; padding: 14px 16px; }
.status { display: flex; gap: 9px; align-items: center; font: 700 17px/1.15 var(--display); text-transform: uppercase; padding-bottom: 10px; }
.status::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px currentColor; }
.status[data-light="green"]::before { background: var(--green); }
.status[data-light="red"]::before { background: var(--red); }
dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border-top: 1px solid var(--line); }
dt { color: var(--ink-dim); font-size: 12px; }
dd { font: 700 18px/1.2 var(--mono); white-space: nowrap; }
.alert dd { color: var(--amber); }
ol { list-style: none; padding: 8px 0 0; border-top: 1px solid var(--line); color: var(--ink-dim); font-size: 11px; display: grid; gap: 5px; }
ol:empty { display: none; }
ol time { color: var(--yellow); font-family: var(--mono); margin-right: 6px; }

.dock { position: fixed; left: var(--gap); right: var(--gap); bottom: 10px; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.dock > * { pointer-events: auto; }
#views { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
#views button[aria-pressed="true"] { background: var(--blue); border-color: #8aa6ff; color: #fff; }
.transport { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding: 5px 8px; }
.transport label { display: flex; align-items: center; gap: 6px; color: var(--ink-dim); font-size: 12px; }
.divider { width: 1px; align-self: stretch; background: var(--line); }
.check { cursor: pointer; }
.check input { accent-color: var(--yellow); }
.disclaimer { background: var(--glass); color: var(--ink-dim); font-size: 11px; padding: 4px 12px; text-align: center; }

.fallback { position: fixed; inset: 0; display: grid; place-content: center; gap: 10px; padding: 32px; background: #0d1322; text-align: center; }

@media (max-width: 760px) {
  .brand { right: var(--gap); width: auto; padding: 10px 14px; }
  .brand .note, .kicker, #events { display: none; }
  .dock { max-height: 46vh; overflow-y: auto; bottom: 6px; }
  .divider { display: none; }
  h1 { font-size: 28px; }
  .panel { top: 134px; left: var(--gap); right: auto; width: min(240px, 68vw); max-height: 22vh; }
  button, select { padding: 8px 9px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  button, select { transition: none; }
}
