:root {
  --bg: #f6f4fb; --card: #ffffff; --text: #1d1a2b; --muted: #6b6680; --line: #e4e0ef;
  --brand: #4b2f8f; --brand-ink: #ffffff; --accent: #b8872f; --ok: #1f8a4c; --warn: #b26a00; --bad: #b3261e;
  --chip: #efeaf8; --shadow: 0 1px 2px rgba(20, 10, 40, .06), 0 4px 16px rgba(20, 10, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12101a; --card: #1c1928; --text: #ece9f5; --muted: #a39dba; --line: #2e2a40;
    --brand: #8e6be8; --brand-ink: #ffffff; --accent: #e8c27a; --ok: #49c27f; --warn: #f0a640; --bad: #ff7b72;
    --chip: #2a2540; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
header { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); }
.bar { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.bar h1 { font-size: 17px; margin: 0; flex: 1; display: flex; align-items: center; gap: 8px; }
.bar h1 img { width: 26px; height: 26px; }
nav { max-width: 760px; margin: 0 auto; padding: 0 8px; display: flex; gap: 4px; overflow-x: auto; }
nav button { border: 0; background: none; padding: 10px 12px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
nav button.on { color: var(--brand); border-color: var(--brand); }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); min-height: 40px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.bad { color: var(--bad); }
.btn.small { padding: 6px 10px; min-height: 34px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: wait; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.card-h { padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); }
.card-h .when { font-weight: 700; flex: 1; min-width: 150px; }
.chip { background: var(--chip); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.chip.pending { color: var(--warn); } .chip.approved { color: var(--ok); } .chip.rejected { color: var(--bad); }
.sec { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.media { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 14px; }
@media (max-width: 560px) { .media { grid-template-columns: 1fr; } video.preview { max-height: 70vh; margin: 0 auto; } }
video.preview { width: 100%; aspect-ratio: 9/16; background: #000; border-radius: 12px; display: block; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.thumbs a img { height: 78px; border-radius: 8px; display: block; border: 1px solid var(--line); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 8px; }
.tabs button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 5px 12px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
pre.caption { white-space: pre-wrap; word-break: break-word; background: var(--chip); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; font: 14px/1.45 system-ui, sans-serif; max-height: 280px; overflow: auto; }
.muted { color: var(--muted); font-size: 14px; }
.songs { margin: 0; padding: 0; list-style: none; }
.songs li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.songs li:last-child { border-bottom: 0; }
.pub { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pub label { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.pub input { width: 20px; height: 20px; accent-color: var(--ok); }
.pub small { display: block; color: var(--muted); font-size: 12px; }
.alert { padding: 10px 14px; border-radius: 10px; margin: 0 0 10px; font-size: 14px; }
.alert.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); }
.alert.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); }
form.stack { display: grid; gap: 12px; }
form.stack label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=password], input[type=time], input[type=number], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 11px; }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px; font-weight: 500 !important; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.p { white-space: nowrap; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100% - 32px); z-index: 20; }
#toast.show { opacity: 1; }
.login { max-width: 360px; margin: 12vh auto; padding: 0 16px; }
.login .card { padding: 22px; }
.login h1 { font-size: 20px; margin: 0 0 4px; display: flex; gap: 8px; align-items: center; }
img.preview { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 12px; display: block; }
