:root {
  --bg: #f6f7f9; --panel: #ffffff; --text: #1d2330; --muted: #667085; --line: #e3e6eb;
  --accent: #2f6fde; --accent-text: #fff; --ok: #1f8a4c; --warn: #b7791f; --err: #c53030;
  --warn-bg: #fff7e6; --err-bg: #fdecec; --ok-bg: #e8f6ee;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --panel: #1b1f27; --text: #e6e9ef; --muted: #9aa3b2; --line: #2c323d;
    --accent: #5b8def; --accent-text: #fff; --ok: #4cc38a; --warn: #e0a84a; --err: #f07070;
    --warn-bg: #3a2f1a; --err-bg: #3a1e1e; --ok-bg: #1a3326;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: var(--panel);
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header .brand { font-weight: 700; color: var(--text); }
header nav { display: flex; gap: 14px; flex: 1; white-space: nowrap; }
header .who { color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: center; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.btn, button { display: inline-block; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  padding: 7px 14px; border-radius: 7px; cursor: pointer; font: inherit; }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button:disabled { opacity: .5; cursor: default; }
input, select { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--text); max-width: 100%; }
label { display: block; margin-bottom: 10px; }
label > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.notice { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.err { background: var(--err-bg); color: var(--err); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); }
.badge.running, .badge.recording { color: var(--accent); border-color: var(--accent); }
.badge.done { color: var(--ok); border-color: var(--ok); }
.badge.error { color: var(--err); border-color: var(--err); }
.badge.partial, .badge.stopped { color: var(--warn); border-color: var(--warn); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.chtile { display: block; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.chtile b { font-size: 16px; }
.canvas-wrap { position: relative; width: 100%; background: #000; border-radius: 8px; overflow: hidden; }
.canvas-wrap canvas { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: manipulation; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.thumbs figure { margin: 0; }
.thumbs img { width: 100%; border-radius: 6px; display: block; }
.thumbs figcaption { font-size: 12px; color: var(--muted); }
.timeline { width: 100%; height: auto; display: block; }
ul.tips { margin: 0; padding-left: 20px; }
ul.tips li { margin-bottom: 6px; }
.login-box { max-width: 380px; margin: 12vh auto; text-align: center; }
@media (max-width: 600px) { header nav { order: 3; width: 100%; } main { padding: 12px 16px; } }
.chcard { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); }
.chcard.alert { border-color: var(--err); box-shadow: 0 0 0 2px var(--err-bg); }
.livethumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; border-radius: 6px; display: block; }
.liveimg { display: block; width: 100%; height: auto; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; vertical-align: middle; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--err); }
.err-text { color: var(--err); }
.switch { display: flex; gap: 6px; align-items: center; margin: 0; cursor: pointer; }
.switch input { width: 18px; height: 18px; }
figure.event video, figure.event img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #000; border-radius: 6px; display: block; }
.noimg { aspect-ratio: 16/9; background: var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 10px; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg); }
.tile .tlabel { font-size: 13px; color: var(--muted); }
.tile .tnum { font-size: 30px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.rcard { padding: 10px; margin-bottom: 0; }
.rcard.reviewed { opacity: .75; }
.rimg { position: relative; background: #000; border-radius: 6px; overflow: hidden; }
.rimg img, .rimg video { display: block; width: 100%; height: auto; }
.rbox { position: absolute; border: 2px solid #ff3b3b; box-shadow: 0 0 0 1px rgba(0,0,0,.6); pointer-events: none; }
.rbody { padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ractions { gap: 6px; }
.rwrong { border-top: 1px solid var(--line); padding-top: 8px; }
.rwrong select, .rwrong input:not([type=checkbox]) { width: 100%; }
.navbadge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 9px; background: var(--err);
  color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
.navbadge[hidden] { display: none; }
