:root {
  --bg: #f6f7f9; --card: #fff; --fg: #1d2433; --muted: #6b7385; --line: #e3e6ec;
  --accent: #f38020; --ok: #1a7f37; --ok-bg: #e6f4ea; --err: #c62828; --err-bg: #fdecea; --chip: #eceef2;
  --log-bg: #11151c; --log-fg: #cfd6e4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --card: #1b2029; --fg: #e6e9ef; --muted: #98a1b3; --line: #2c3340;
    --ok: #57c27a; --ok-bg: #18301f; --err: #ff7b72; --err-bg: #3a1d1d; --chip: #262c37;
    --log-bg: #0b0e13;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 system-ui, "Segoe UI", "Malgun Gothic", sans-serif; background: var(--bg); color: var(--fg); }
main { max-width: 860px; margin: 0 auto; padding: 24px 16px 40px; }
a { color: inherit; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
header h1 { font-size: 20px; margin: 0; }
header a { font-size: 14px; color: var(--muted); text-decoration: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.card h2 { font-size: 16px; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.role { display: block; text-decoration: none; transition: border-color .15s; }
.role:hover { border-color: var(--accent); }
.role h2 { font-size: 18px; }
.role p { margin: 0; color: var(--muted); }
video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; display: block; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
button, select, input { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); }
input { min-width: 0; flex: 1 1 160px; }
button { cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button:disabled { opacity: .45; cursor: default; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.badge.live { background: var(--ok-bg); color: var(--ok); }
.badge.err { background: var(--err-bg); color: var(--err); }
.timer { font: 600 28px/1 ui-monospace, Consolas, monospace; text-align: center; margin-top: 12px; font-variant-numeric: tabular-nums; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.stats { font: 12px/1.6 ui-monospace, Consolas, monospace; color: var(--muted); margin-top: 8px; min-height: 20px; }
.log { font: 12px/1.6 ui-monospace, Consolas, monospace; background: var(--log-bg); color: var(--log-fg); border-radius: 8px; padding: 12px; height: 180px; overflow: auto; margin-top: 16px; white-space: pre-wrap; word-break: break-all; }
.seek { margin-top: 12px; }
.seek input[type=range] { width: 100%; padding: 0; accent-color: var(--accent); }
.seek-times { display: flex; justify-content: space-between; font: 12px/1.6 ui-monospace, Consolas, monospace; color: var(--muted); font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 12px; margin: 16px 0 0; align-items: center; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; display: flex; gap: 8px; align-items: center; min-width: 0; }
.kv code { font: 12px ui-monospace, Consolas, monospace; background: var(--chip); padding: 4px 8px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.kv code.secret:not(:hover) { filter: blur(4px); }
.kv button { padding: 4px 10px; font-size: 13px; }
.recs { list-style: none; margin: 0; padding: 0; }
.recs li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.recs li:first-child { border-top: 0; }
.recs li span:first-child { flex: 1; }
.card h2 button { font-size: 13px; padding: 4px 10px; font-weight: 400; }
