:root {
  --bg: #f6f7f9; --panel: #fff; --text: #1d2330; --muted: #6b7280; --line: #e5e7eb;
  --accent: #4f46e5; --accent-weak: #eef2ff; --danger: #dc2626; --ok: #059669; --warn: #d97706;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318; --panel: #1a1d24; --text: #e6e8ee; --muted: #9aa1ad; --line: #2a2f39;
    --accent: #8b87ff; --accent-weak: #25244a; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif; }
a { color: var(--accent); text-decoration: none; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.brand { font-weight: 700; font-size: 16px; color: var(--text); }
.me { color: var(--muted); font-size: 13px; }
main { max-width: 1080px; margin: 0 auto; padding: 20px 16px 60px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.new { display: flex; gap: 8px; flex-wrap: wrap; }
.new input { flex: 1 1 260px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 14px; }
.new input.title { flex: 0 1 220px; }
button { padding: 9px 16px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px;
  cursor: pointer; white-space: nowrap; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button.danger { background: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
.msg { margin-top: 8px; font-size: 13px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input { flex: 1 1 200px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); }
.list { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 16px;
  border-top: 1px solid var(--line); color: var(--text); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--accent-weak); }
.row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { color: var(--muted); font-size: 12px; }
.row .dur { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--line); color: var(--muted); }
.badge.live { background: #fee2e2; color: var(--danger); }
.badge.wait { background: #fef3c7; color: var(--warn); }
.badge.ready { background: #d1fae5; color: var(--ok); }
.badge.bad { background: #fee2e2; color: var(--danger); }

.detail { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; } }
.detail h1 { font-size: 20px; margin: 0 0 4px; }
.video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; display: block; }
.placeholder { aspect-ratio: 16 / 9; border-radius: 10px; background: var(--panel); border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 16px; text-align: center; }
.side h2 { font-size: 13px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { padding: 4px 0; display: flex; justify-content: space-between; gap: 8px; }
.people .role { color: var(--muted); font-size: 12px; }
.share { display: flex; gap: 6px; margin-top: 8px; }
.share input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); }
.note { color: var(--muted); font-size: 12px; margin-top: 6px; }
