:root {
  --bg: #fbfbfa;
  --fg: #1d1d1f;
  --muted: #6b6b70;
  --line: #e4e4e7;
  --accent: #c2410c;
  --chip: #f1f1f2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151517;
    --fg: #ececee;
    --muted: #a1a1a8;
    --line: #2c2c31;
    --accent: #fb923c;
    --chip: #232327;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans JP", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--fg); }
nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
nav a { color: var(--muted); }
.scope { padding: 6px 16px; font-size: 13px; color: var(--muted); background: var(--chip); }
main { max-width: 1080px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 8px 0 12px; }
h2 { font-size: 17px; margin: 24px 0 8px; }
.controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.controls span { color: var(--muted); font-size: 13px; margin-left: 6px; }
.controls a { padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--fg); font-size: 13px; }
.controls a.on { background: var(--fg); color: var(--bg); }
.meta, .muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; word-break: break-all; }
.empty { padding: 24px 0; color: var(--muted); }
html, body { overflow-x: hidden; }
.tablewrap { width: 100%; overflow-x: auto; margin: 8px 0 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.thumb { width: 72px; }
td.thumb img { width: 64px; height: 36px; object-fit: cover; border-radius: 4px; display: block; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
footer { max-width: 1080px; margin: 24px auto; padding: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  table.videos th:nth-child(4), table.videos td:nth-child(4),
  table.videos th:nth-child(5), table.videos td:nth-child(5) { display: none; }
  table.rank th:nth-child(4), table.rank td:nth-child(4),
  table.rank th:nth-child(6), table.rank td:nth-child(6) { display: none; }
  th, td { padding: 8px 4px; }
  th.thumb, td.thumb { display: none; }
  table.videos th:nth-child(7), table.videos td:nth-child(7) { display: none; }
  main { padding: 12px 16px; }
}
.notice { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 16px 0; background: var(--chip); }
.notice p { margin: 8px 0; }
a.button { display: inline-block; padding: 8px 16px; border-radius: 6px; background: var(--fg); color: var(--bg); text-decoration: none; font-weight: 600; }
.warn { padding: 8px 12px; border-left: 3px solid #c77700; background: var(--chip); font-size: 14px; }
.late { color: #c0392b; font-size: 12px; }
