:root {
  color-scheme: dark;
  --bg: #080a10;
  --panel: rgb(17 26 40 / 74%);
  --line: rgb(116 148 192 / 28%);
  --text: #d7e0ee;
  --muted: #a2b1c6;
  --blue: #8bbfff;
  --button: rgb(26 48 75 / 82%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column;
  isolation: isolate;
  background: var(--bg); color: var(--text);
  font: 12px/1.5 Consolas, "Liberation Mono", monospace;
}
#cosmos { position: fixed; z-index: -1; inset: 0; pointer-events: none; background: #080a10 url('/static/img/parallax/space-bg.webp') 0 0 / 960px 960px repeat; }
#cosmos::before, #cosmos::after { content: ""; position: absolute; inset: 0; }
#cosmos::before {
  background: url('/static/img/parallax/stars-bg.webp') 0 0 / 960px 960px repeat,
    url('/static/img/parallax/specs-bg.webp') 0 0 / 960px 960px repeat;
  opacity: .7; animation: cosmic-drift 120s linear infinite;
}
#cosmos::after { background: url('/static/img/parallax/planet.webp') 85% 65% / min(90vw, 800px) auto no-repeat; image-rendering: pixelated; }
@keyframes cosmic-drift { to { background-position: -960px 0, -1920px 0; } }
@media (prefers-reduced-motion: reduce) { #cosmos::before { animation: none; } }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button, input[type=search], #back { border: 1px solid #385675; border-radius: 3px; padding: 5px 8px; }
button, #back { color: var(--blue); background: var(--button); cursor: pointer; }
button:hover, #back:hover { background: #254469; border-color: var(--blue); text-decoration: none; }
button:disabled { color: var(--muted); background: transparent; border-color: var(--line); opacity: .55; cursor: default; }
input[type=search] { min-width: 0; color: var(--text); background: rgb(10 19 32 / 74%); }
input::placeholder { color: var(--muted); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
body > header { display: flex; gap: 16px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
#back { white-space: nowrap; }
body > header > span { color: var(--muted); }
#round-search { margin-left: auto; display: flex; gap: 5px; }
#round-query { width: 190px; }
main { flex: 1; min-height: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 8px; padding: 8px; }
#sidebar { overflow: auto; padding: 12px; border: 1px solid var(--line); background: var(--panel); }
#filter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
#filter-count { color: var(--blue); }
#filter-form > label, legend { color: var(--muted); font-size: 11px; }
#text-query { width: 100%; margin-top: 5px; }
fieldset { min-width: 0; border: 0; border-top: 1px solid var(--line); padding: 10px 0 0; margin: 18px 0 0; }
legend { padding: 0 6px 0 0; }
fieldset label { display: flex; gap: 7px; align-items: center; padding: 3px 4px; cursor: pointer; overflow-wrap: anywhere; }
fieldset label:has(input):hover { background: #223248; }
fieldset label:has(input:checked) { color: var(--blue); background: var(--button); }
fieldset small, output { margin-left: auto; color: var(--muted); font-size: 11px; }
input[type=checkbox] { margin: 0; accent-color: #579aee; }
input[type=range] { width: 100%; margin: 4px 0 8px; accent-color: #579aee; }
#timeline { min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgb(9 16 28 / 60%); }
#bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
#shown { color: var(--muted); margin-left: auto; }
#active { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
#active button { padding: 2px 7px; font-size: 11px; }
#columns, .event { display: grid; grid-template-columns: 70px 126px minmax(0, 1fr); gap: 12px; padding: 4px 12px; }
#columns { color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; }
#scroll, #sidebar { scrollbar-width: thin; scrollbar-color: #42546b transparent; }
#scroll { flex: 1; min-height: 0; overflow: auto; }
.event { border-bottom: 1px solid rgb(87 111 148 / 20%); align-items: baseline; }
.event:hover { background: rgb(27 45 70 / 70%); }
.event time { color: var(--muted); font-variant-numeric: tabular-nums; }
.event > button { justify-self: start; max-width: 100%; padding: 0 5px; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
.event p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.player, .channel { padding: 0 4px; line-height: inherit; }
.player small { color: #a4b9d2; font-size: inherit; }
mark { color: #ffe3a2; background: #554325; }
.round-card { display: grid; grid-template-columns: 110px 1fr 220px 170px; gap: 16px; padding: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.round-card:hover { background: var(--panel); text-decoration: none; }
.round-card time, .round-card > span:last-child { color: var(--muted); }
.round-card[data-state=ready] > span:last-child { color: var(--blue); }
.empty { padding: 20px 12px; color: var(--muted); max-width: 650px; }
#load, #more { margin: 16px 12px; }
#sentinel { height: 1px; }
#toggle { display: none; margin-left: auto; }
noscript { padding: 12px; }
body[data-view=catalog] main { grid-template-columns: minmax(0, 1fr); }
body[data-view=catalog] #sidebar { display: none; }
@media (max-width: 760px) {
  body > header { gap: 8px; flex-wrap: wrap; padding: 8px; }
  #round-ref { order: 4; font-size: 11px; }
  #round-search { order: 3; flex-basis: 100%; }
  #round-query { width: auto; flex: 1; }
  body > header > a:last-child { margin-left: auto; }
  main { grid-template-columns: minmax(0, 1fr); position: relative; }
  #sidebar { display: none; }
  body[data-view=round] #toggle { display: block; }
  body[data-filters=open] #sidebar { display: block; position: absolute; z-index: 2; top: 0; bottom: 0; width: min(280px, 85%); box-shadow: 8px 0 20px #0008; }
  #toggle { padding: 4px 6px; margin-left: 0; }
  body[data-filters=open] #sidebar { width: auto; left: 8px; right: 8px; top: 55px; bottom: 8px; background: rgb(13 21 34 / 97%); }
  #columns { display: none; }
  .event { grid-template-columns: 70px minmax(0, 1fr); gap: 4px 10px; padding: 7px 8px; }
  .event p { grid-column: 1 / -1; }
  .round-card { grid-template-columns: 1fr 1fr; gap: 5px; padding: 10px 8px; }
  .round-card > span { text-align: right; }
}
