:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a1d23;
  --muted: #5d6573;
  --line: #dfe3e8;
  --accent: #0b4f9c;
  --accent-soft: #e5eefa;
  --open: #8a5a00;
  --open-soft: #fff3d6;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121418;
    --surface: #1b1e24;
    --text: #e8eaee;
    --muted: #9aa3b1;
    --line: #2d323b;
    --accent: #7fb2ff;
    --accent-soft: #1d2b40;
    --open: #ffcb66;
    --open-soft: #3a2f16;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { background: var(--accent); color: #fff; padding: 20px 0 16px; }
@media (prefers-color-scheme: dark) { .top { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); } }
.top h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.01em; }
.meta { margin: 4px 0 0; opacity: 0.85; font-size: 0.9rem; }

.filters {
  position: sticky; top: 0; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end;
  padding-top: 12px; padding-bottom: 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.filters label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--muted); gap: 2px; }
.filters .search { flex: 1 1 100%; }
.filters .check { flex-direction: row; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text); padding-bottom: 6px; }
input[type="search"], select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0;
}
input[type="search"] { width: 100%; }
select { max-width: 100%; }
@media (min-width: 700px) { .filters .search { flex: 1 1 220px; } }

button.link, a.btn {
  font: inherit; font-size: 0.9rem; background: none; border: 0; color: var(--accent);
  cursor: pointer; padding: 6px 4px; text-decoration: underline;
}
a.btn {
  display: inline-block; text-decoration: none; border: 1px solid var(--accent);
  border-radius: 8px; padding: 6px 12px; margin: 4px 8px 0 0;
}
a.btn.primary { background: var(--accent); color: var(--surface); }

main { padding-top: 12px; padding-bottom: 24px; }
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 12px; }

.subscribe {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 16px;
}
.subscribe h2 { font-size: 1rem; margin: 0 0 2px; }
.subscribe p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.day { margin: 0 0 18px; }
.day h2 {
  font-size: 0.95rem; margin: 0 0 6px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.day.today h2 { color: var(--accent); }
.day ol { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.slot { display: grid; grid-template-columns: 12.5rem 1fr; gap: 2px 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.slot:first-child { border-top: 0; }
.time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.dur { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.what { min-width: 0; }
.group { display: inline-block; font-weight: 600; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 0 8px; margin-right: 6px; }
.slot.open .group { background: var(--open-soft); color: var(--open); }
.amp { color: var(--muted); margin: 0 6px 0 -2px; font-size: 0.85rem; }
.arena { color: var(--muted); font-size: 0.9rem; }
.notes { display: block; margin-top: 2px; }
button.chip { font: inherit; border: 0; cursor: pointer; }
button.chip.arena { background: none; padding: 0; text-decoration: underline dotted; }
@media (max-width: 480px) { .slot { grid-template-columns: 1fr; } .dur { display: inline; margin-left: 6px; } }

.empty { color: var(--muted); text-align: center; padding: 32px 0; }

footer { padding-bottom: 40px; font-size: 0.9rem; }
footer details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; }
footer summary { cursor: pointer; font-weight: 600; }
footer ul { padding-left: 18px; margin: 8px 0 0; }
footer li { margin: 4px 0; }
footer .kind { color: var(--muted); font-size: 0.8rem; }
code { font-size: 0.85em; word-break: break-all; }

/* Upload page */
a.on-top { color: inherit; }
.admin { padding-top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.panel h2 { font-size: 1.05rem; margin: 0 0 6px; }
.panel p { margin: 0 0 10px; }
.panel label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 0.9rem; }
.panel input[type="password"] { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-width: 320px; }
.panel button.btn { font: inherit; cursor: pointer; }
.hint { color: var(--muted); font-size: 0.85rem; display: block; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 16px !important; text-align: center; cursor: pointer; align-items: center; }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.error { color: #b3261e; }
@media (prefers-color-scheme: dark) { .error { color: #ff8a80; } }
.ok { border-left: 4px solid #2e7d32; padding-left: 12px; }
.ok ul, .panel ul { margin: 4px 0 10px; padding-left: 18px; }
.files { list-style: none; padding: 0 !important; }
.files li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.files li > div { min-width: 0; overflow-wrap: anywhere; }
button.danger { color: #b3261e; }
@media (prefers-color-scheme: dark) { button.danger { color: #ff8a80; } }
.replaced { color: var(--open); }
.files li.is-replaced strong { color: var(--muted); text-decoration: line-through; }
.ok details { margin: 0 0 10px; }
.panel button.btn:disabled { opacity: 0.6; cursor: default; }
