:root {
  color-scheme: light;
  --bg: #f6f6f6;
  --panel: #fff;
  --line: #e6e6e6;
  --text: #0f0f0f;
  --muted: #606060;
  --brand: #00c853;
  --blue: #065fd4;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
aside { background: #fff; border-right: 1px solid var(--line); padding: 22px 16px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 6px; }
.mark { width: 36px; height: 26px; flex: none; display: block; color: var(--brand); }
.mark svg { width: 100%; height: 100%; display: block; }
.mark svg path:first-child { fill: currentColor; }
.brand b { display: block; font-size: 16px; }
.brand small, .crumb, .meta, .desc, .stat span, .step small { color: var(--muted); }
.menu { display: grid; gap: 6px; margin-top: 22px; }
.menu button, .switch, .text-btn {
  border: 0; background: transparent; text-align: left; border-radius: 10px; padding: 10px 12px;
}
.menu button.on { background: #f2f2f2; font-weight: 650; }
.switch, .text-btn { border: 1px solid var(--line); background: #fff; }
.switch.on { background: var(--text); color: #fff; border-color: var(--text); }
main { padding: 28px 32px 48px; }
header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
h1 { margin-top: 4px; font-size: 28px; }
.switches { display: flex; gap: 8px; }
.banner {
  margin-top: 14px; padding: 10px 12px; background: #fff8e8; border: 1px solid #f0e0b8; border-radius: 10px;
}
.stage-tabs, .creator-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stage-tabs button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px;
  font-weight: 650; display: inline-flex; gap: 8px; align-items: center;
}
.stage-tabs button em { font-style: normal; color: var(--muted); }
.stage-tabs button.on { background: var(--text); color: #fff; border-color: var(--text); }
.stage-tabs button.on em { color: #ddd; }
.creator-tabs:empty { display: none; }
.creator-tabs button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 650;
}
.creator-tabs button.on { background: var(--text); color: #fff; border-color: var(--text); }
.view { display: none; }
.view.on { display: block; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.step, .stat, .card, .account {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.step, .stat { padding: 14px 16px; }
.step b, .stat b { display: block; margin-top: 4px; font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.group { margin-top: 18px; }
.group h2 { margin-bottom: 10px; font-size: 16px; }
.card, .account { padding: 14px 16px; margin-bottom: 10px; }
.job { margin-top: 18px; }
.meter { height: 8px; margin-top: 12px; background: #eee; border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--brand); }
.job .meta { margin-top: 8px; }
.card-top, .account-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.title { font-weight: 650; line-height: 1.45; }
.field { margin-top: 8px; line-height: 1.5; }
.field b { font-weight: 650; margin-right: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: flex; gap: 8px; align-items: center; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; background: #fafafa;
}
.chip em { font-style: normal; color: var(--muted); }
.chip.wait em { color: var(--blue); }
.chip.bad { background: #fde8e8; }
.chip.bad em { color: #c00; }
.chip.ok { background: #e7f6ec; }
.chip.ok em { color: #0a7a32; }
.pill { flex: none; border-radius: 999px; padding: 2px 8px; font-size: 12px; background: #e8f0fe; color: var(--blue); }
.pill.bad { background: #fde8e8; color: #c00; }
.pill.ok { background: #e7f6ec; color: #0a7a32; }
.accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.config-title { margin: 22px 0 0; font-size: 16px; }
.youtube { margin-top: 18px; }
#yt-auth { margin-top: 16px; }
.creator-list { display: flex; flex-wrap: wrap; gap: 8px; }
.creator {
  display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.creator:hover { border-color: var(--blue); color: var(--blue); }
.group-note { color: var(--muted); margin: -4px 0 10px; }
.note-row { display: grid; gap: 6px; margin: 0 0 12px; max-width: 520px; }
.note-row label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.note-row textarea {
  width: 100%; box-sizing: border-box; min-height: 64px; resize: vertical; font: inherit; color: inherit;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff;
}
.add-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.add-row select, .add-row input, .add-row button { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.add-row select { flex: 1; }
.meta a, .board a { color: var(--blue); text-decoration: none; }
.handle a.seen { color: #9a9a9a; }
.board-wrap { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.board { width: 100%; border-collapse: collapse; }
.board th, .board td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.board tr:last-child td { border-bottom: 0; }
.board th { color: var(--muted); font-weight: 650; font-size: 12px; }
.board td.rank { font-weight: 700; width: 52px; }
.board td.score { font-weight: 700; color: var(--blue); }
.board-title { margin: 18px 0 8px; font-size: 16px; }
.board td.actions, .board th.end { white-space: nowrap; }
.board td.actions.end, .board th.end { text-align: right; }
.board td.pick { width: 72px; padding-right: 0; }
.board .text-btn { padding: 4px 8px; }
.handle { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.handle-cell { width: 1%; }
.mark-btn { border-radius: 8px; padding: 4px 10px; font-weight: 650; }
.mark-btn.yes { color: #0a7a32; background: #e7f6ec; border: 1px solid #8fd4a8; }
.mark-btn.no { color: #c00; background: #fde8e8; border: 1px solid #f0a8a8; }
.tag { color: var(--muted); font-size: 12px; padding: 4px 8px; }
.add-row button:disabled, .add-row select:disabled { opacity: 0.65; }
.account p { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.account .actions, .review-form .actions { display: flex; gap: 8px; margin-top: 12px; }
.player-wrap { position: relative; margin-top: 12px; }
.player { width: 100%; max-height: 480px; background: #000; border-radius: 10px; display: block; }
.clarity-badge {
  position: absolute; left: 10px; top: 10px; z-index: 1; pointer-events: none;
  background: rgba(0, 0, 0, .72); color: #fff; border-radius: 999px;
  padding: 4px 10px; font-size: 13px; font-weight: 650;
}
.trim-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 10px; }
.batch-trim { margin-bottom: 4px; }
.trim-row label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.trim-row input { width: 88px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
.review-form { display: grid; gap: 8px; margin-top: 10px; }
.review-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.review-form input, .review-form textarea {
  width: 100%; box-sizing: border-box; font: inherit; color: inherit;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff;
}
.review-form textarea { min-height: 72px; resize: vertical; }
.ready { color: #0a7a32; font-weight: 650; }
.bad { color: #c00; font-weight: 650; }
.missing { color: var(--muted); }
.auth-pill {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 12px;
  border: 1px solid var(--line); background: #fff; font-weight: 650;
}
.auth-pill.ok { color: #0a7a32; background: #e7f6ec; border-color: #b7e4c7; }
.auth-pill.bad { color: #c00; background: #fde8e8; border-color: #f5c2c2; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; }
.login-card .brand { margin-bottom: 18px; }
.login-card h1 { font-size: 22px; margin: 0 0 6px; }
.login-card p { color: var(--muted); margin: 0 0 18px; }
.login-card form { display: grid; gap: 10px; }
.login-card input { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.login-card button { border: 0; border-radius: 10px; padding: 12px; background: var(--text); color: #fff; font-weight: 650; }
.login-card .bad { min-height: 1.2em; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); }
  .flow, .stats, .accounts { grid-template-columns: 1fr; }
  main { padding: 20px 16px 40px; }
  header { align-items: flex-start; flex-direction: column; }
}
