:root{
  --bg:#F6F7F9; --card:#FFFFFF; --ink:#111827; --muted:#6B7280; --line:#E5E7EB;
  --green:#2E7D32; --green-soft:#E8F5E9; --red:#B91C1C; --red-soft:#FEE2E2; --amber:#B45309; --amber-soft:#FEF3C7;
  --accent:#1D4ED8;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0E0F11; --card:#17191C; --ink:#F3F4F6; --muted:#9CA3AF; --line:#2A2D31;
    --green:#6CC070; --green-soft:#16301A; --red:#F87171; --red-soft:#3A1717; --amber:#FBBF24; --amber-soft:#3A2C0F;
    --accent:#93B4FF;
  }
}
*{ box-sizing:border-box; }
body{ margin:0; background:var(--bg); color:var(--ink); font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; }
.muted{ color:var(--muted); }
.top{ display:flex; align-items:center; gap:16px; padding:14px 24px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:2; }
.title{ font-weight:800; font-size:17px; flex:1; }
.title span{ font-weight:500; color:var(--muted); margin-left:6px; }
.project{ display:flex; align-items:center; gap:8px; color:var(--muted); }
select, input, button{ font:inherit; color:inherit; }
select, input[type=number]{ background:var(--card); border:1px solid var(--line); border-radius:8px; padding:6px 10px; }
.cards{ display:grid; grid-template-columns:repeat(auto-fill,minmax(440px,1fr)); gap:18px; padding:22px 24px 40px; max-width:1500px; margin:0 auto; }
@media (max-width:520px){ .cards{ grid-template-columns:1fr; padding:16px; } }
.card{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px 18px; display:flex; flex-direction:column; gap:12px; }
.card.off{ opacity:.72; }
.head{ display:flex; align-items:center; gap:10px; }
.head h3{ margin:0; font-size:16px; flex:1; }
.chip{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:3px 8px; border-radius:999px; background:var(--line); color:var(--muted); }
.dot{ width:9px; height:9px; border-radius:50%; background:var(--line); flex:none; }
.dot.ok{ background:var(--green); } .dot.bad{ background:var(--red); } .dot.warn{ background:var(--amber); }
.switch{ position:relative; width:42px; height:24px; flex:none; }
.switch input{ opacity:0; width:0; height:0; }
.switch span{ position:absolute; inset:0; border-radius:999px; background:var(--line); cursor:pointer; transition:.15s; }
.switch span::after{ content:""; position:absolute; width:18px; height:18px; left:3px; top:3px; border-radius:50%; background:#fff; transition:.15s; }
.switch input:checked + span{ background:var(--green); }
.switch input:checked + span::after{ transform:translateX(18px); }
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); }
.tabs button{ background:none; border:none; padding:6px 10px; cursor:pointer; color:var(--muted); border-bottom:2px solid transparent; }
.tabs button.on{ color:var(--ink); border-bottom-color:var(--ink); font-weight:600; }
.notice{ padding:10px 12px; border-radius:10px; font-size:13px; }
.notice.bad{ background:var(--red-soft); color:var(--red); }
.notice.warn{ background:var(--amber-soft); color:var(--amber); }
.stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.stat{ background:var(--bg); border-radius:10px; padding:8px 10px; }
.stat b{ display:block; font-size:18px; }
.stat small{ color:var(--muted); }
table{ width:100%; border-collapse:collapse; font-size:13px; }
th, td{ text-align:left; padding:6px 4px; border-bottom:1px solid var(--line); vertical-align:top; }
th{ color:var(--muted); font-weight:600; }
.row{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.row.end{ justify-content:flex-end; }
.days{ display:flex; gap:4px; }
.days label{ display:flex; align-items:center; justify-content:center; width:38px; height:32px; border:1px solid var(--line); border-radius:8px; cursor:pointer; user-select:none; }
.days input{ display:none; }
.days label:has(input:checked){ background:var(--ink); color:var(--card); border-color:var(--ink); }
button.primary, button.ghost, button.small{ border-radius:8px; padding:7px 14px; cursor:pointer; border:1px solid var(--line); background:var(--card); }
button.primary{ background:var(--ink); color:var(--card); border-color:var(--ink); font-weight:600; }
button.small{ padding:4px 9px; font-size:12px; }
button:disabled{ opacity:.5; cursor:default; }
.section-title{ font-weight:700; font-size:13px; margin:4px 0 -4px; }
.draft{ border:1px solid var(--line); border-radius:10px; padding:10px 12px; display:grid; gap:6px; }
.draft.posted{ opacity:.55; }
.draft .text{ white-space:pre-wrap; font-size:13px; max-height:4.4em; overflow:hidden; }
.draft .text.open{ max-height:none; }
dialog{ border:1px solid var(--line); border-radius:14px; background:var(--card); color:var(--ink); max-width:520px; width:calc(100% - 32px); padding:18px 20px; }
dialog::backdrop{ background:rgba(0,0,0,.4); }
dialog h2{ font-size:17px; margin:0 0 10px; }
dialog ul{ padding-left:18px; margin:0 0 10px; }
code{ font-size:12px; background:var(--bg); padding:1px 5px; border-radius:5px; }
pre{ background:var(--bg); padding:10px; border-radius:8px; overflow:auto; font-size:12px; margin:0; }
.videos{ max-width:1500px; margin:22px auto 0; padding:16px 18px; background:var(--card); border:1px solid var(--line); border-radius:14px; width:calc(100% - 48px); }
.videos .head{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.videos h3{ margin:0; font-size:16px; }
.videos .head .muted{ flex:1; }
label.upload{ border-radius:8px; padding:7px 14px; cursor:pointer; background:var(--ink); color:var(--card); font-weight:600; }
.video-list{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; margin-top:14px; }
.video{ border:1px solid var(--line); border-radius:12px; padding:10px; display:grid; gap:8px; }
.video video{ width:100%; aspect-ratio:9/16; max-height:340px; background:#000; border-radius:8px; object-fit:contain; }
.video .name{ font-size:13px; font-weight:600; word-break:break-all; }
label.field{ display:grid; gap:4px; margin:0 0 10px; font-size:13px; color:var(--muted); }
label.field input, label.field textarea{ font:inherit; color:var(--ink); background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:8px 10px; width:100%; }
a.small{ border-radius:8px; padding:4px 9px; font-size:12px; border:1px solid var(--line); text-decoration:none; color:var(--ink); }
@media (max-width:520px){ .videos{ width:calc(100% - 32px); } }
