@property --log-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
:root {
  --bg: #0f0f0f;
  --card: #212121;
  --elev: #272727;
  --line: #3f3f3f;
  --text: #f1f1f1;
  --muted: #aaaaaa;
  --gold: #ff0000;
  --yt: #ff0000;
  --yt-dark: #cc0000;
  --link: #3ea6ff;
  --danger: #ff4e45;
  --ok: #2ba640;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Roboto, Arial, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: #0f0f0f;
  border-bottom: 1px solid #272727;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.yt-play {
  width: 36px;
  height: 26px;
  border-radius: 8px;
  background: var(--yt);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.35);
}
.yt-play::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 6px;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
}
h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.muted { color: var(--muted); font-size: 14px; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.who { font-size: 13px; color: var(--muted); }
.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 24px 0;
  flex-wrap: wrap;
  background: var(--bg);
}
.user-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tab, button, .ghost {
  border: none;
  background: var(--elev);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}
.tab:hover, .ghost:hover { background: #3f3f3f; }
.tab.on {
  background: #f1f1f1;
  color: #0f0f0f;
  font-weight: 650;
}
button[type="submit"] {
  background: var(--yt);
  color: #fff;
  border-radius: 18px;
  font-weight: 650;
}
button[type="submit"]:hover { background: var(--yt-dark); }
.ghost {
  text-decoration: none;
  display: inline-block;
  background: transparent;
  border: 1px solid #3f3f3f;
}
.panel { padding: 20px 24px 40px; }
.hidden { display: none; }
.grid { display: grid; grid-template-columns: 380px 1fr; gap: 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--card);
  border: 1px solid #303030;
  border-radius: 12px;
  padding: 20px;
}
label { display: block; margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  background: #121212;
  color: var(--text);
  border: 1px solid #303030;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #717171;
  box-shadow: 0 0 0 1px #717171;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { margin-top: 18px; }
.log-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.log-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 14px;
  background: conic-gradient(from var(--log-angle, 0deg), #ff0000, #ff6b6b, #3ea6ff, #ff0000);
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: log-spin 8s linear infinite;
}
.log-card.live {
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(255, 0, 0, 0.28), 0 18px 50px rgba(255, 0, 0, 0.12);
}
.log-card.live::before { opacity: 0.9; }
.log-card.done { box-shadow: 0 0 0 1px rgba(43, 166, 64, 0.4), 0 16px 40px rgba(43, 166, 64, 0.1); }
.log-card.fail { box-shadow: 0 0 0 1px rgba(255, 78, 69, 0.45); }
.log-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}
.log-head h2 { margin: 0; }
.log-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
#log-stage { color: var(--text); font-weight: 600; }
#log-clock {
  font: 12px/1 ui-monospace, Menlo, monospace;
  color: var(--yt);
  min-width: 42px;
  text-align: right;
}
.log-orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4);
}
.log-card.live .log-orb {
  background: var(--yt);
  animation: log-pulse 1.2s ease-in-out infinite;
}
.log-card.done .log-orb { background: var(--ok); }
.log-card.fail .log-orb { background: var(--danger); }
.log-art {
  position: relative;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #0a0a0a;
  border: 1px solid #303030;
}
.log-aurora {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 0, 0, 0.32), transparent 42%),
    radial-gradient(circle at 80% 40%, rgba(62, 166, 255, 0.16), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.08), transparent 45%);
  animation: log-aurora 7s ease-in-out infinite;
  filter: blur(8px);
}
.log-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 70%, #ff4d4d 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 58%, #aaa 50%, transparent 51%),
    radial-gradient(1px 1px at 81% 34%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 76%, #ff0000 50%, transparent 51%);
  animation: log-twinkle 2.8s ease-in-out infinite;
  opacity: 0.75;
}
.log-eq {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}
.log-eq i {
  flex: 1;
  height: 20%;
  border-radius: 99px;
  background: linear-gradient(180deg, #ff8a80, #ff0000 70%);
  opacity: 0.35;
  transform-origin: bottom;
}
.log-card.live .log-eq i {
  opacity: 1;
  animation: log-eq 0.9s ease-in-out infinite;
}
.log-eq i:nth-child(2n) { animation-duration: 0.7s; }
.log-eq i:nth-child(3n) { animation-duration: 1.1s; }
.log-eq i:nth-child(4n) { animation-duration: 0.8s; animation-delay: -0.2s; }
.log-mantra {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 12px;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
  animation: log-mantra 4.2s ease-in-out infinite;
}
.log-track {
  height: 3px;
  border-radius: 99px;
  background: #303030;
  overflow: hidden;
  margin-bottom: 10px;
}
.log-track i {
  display: block;
  height: 100%;
  width: 28%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #ff0000, #fff, #ff0000, transparent);
  transform: translateX(-120%);
}
.log-card.live .log-track i { animation: log-sweep 1.6s linear infinite; }
.log-card.done .log-track i { width: 100%; transform: none; background: var(--ok); }
.log {
  height: 520px;
  overflow: auto;
  background: #0a0a0a;
  border-radius: 12px;
  padding: 12px;
  font: 12px/1.45 ui-monospace, Menlo, monospace;
  white-space: pre-wrap;
}
.log-card .log { height: 360px; position: relative; }
.log-line {
  display: block;
  padding: 2px 0 2px 8px;
  border-left: 2px solid transparent;
  animation: log-in 0.38s ease both;
}
.log-line.cmd { color: #ff8a80; border-left-color: var(--yt); }
.log-line.ok { color: #81c995; border-left-color: var(--ok); }
.log-line.err { color: #ff8a80; border-left-color: var(--danger); }
.log-line.step { color: #8dc7ff; border-left-color: var(--link); }
.log-line.dim { color: #8a8a8a; }
@keyframes log-spin { to { --log-angle: 360deg; } }
@keyframes log-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(255, 0, 0, 0); }
}
@keyframes log-aurora {
  0%, 100% { transform: translate3d(-4%, 0, 0) scale(1); }
  50% { transform: translate3d(6%, -6%, 0) scale(1.08); }
}
@keyframes log-twinkle { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes log-eq {
  0%, 100% { height: 18%; }
  50% { height: 100%; }
}
@keyframes log-mantra {
  0%, 18% { opacity: 0; transform: translateY(8px); }
  28%, 72% { opacity: 1; transform: translateY(0); }
  86%, 100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes log-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(380%); }
}
@keyframes log-in {
  from { opacity: 0; transform: translateX(-10px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .log-card::before, .log-aurora, .log-stars, .log-eq i, .log-mantra, .log-track i, .log-line, .log-orb {
    animation: none !important;
  }
}
.pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #3f3f3f;
  background: #212121;
}
.pill.idle { color: var(--muted); }
.pill.busy { color: #fff; background: var(--yt); border-color: var(--yt); }
.pill.fail { color: var(--danger); }
.pill.ok { color: var(--ok); }
.video-list { list-style: none; padding: 0; margin: 0; }
.video-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #303030;
}
.video-list a, .video-list button.ghost { color: var(--link); }
.video-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.caption-title { margin: 18px 0 8px; font-size: 15px; }
.video-caption {
  margin: 0;
  padding: 12px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #181818;
  border: 1px solid #303030;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #e5e5e5;
}
.player-phone {
  margin-top: 12px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  max-width: 280px;
  aspect-ratio: 9 / 16;
  border: 1px solid #303030;
}
.player-phone video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.pill.warn { color: #ffb300; border-color: #ffb300; }
.pill.full { color: var(--danger); border-color: var(--danger); }
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 0, 0, 0.16), transparent 36%),
    #0f0f0f;
}
.login-card { width: min(420px, 92vw); }
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.error { color: var(--danger); }
.hint { font-size: 12px; color: var(--muted); }
code { color: var(--link); }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.check input { width: auto; }
.font-grid { grid-template-columns: minmax(280px, 1fr) 320px; align-items: start; }
@media (max-width: 900px) { .font-grid { grid-template-columns: 1fr; } }
.preview-card { position: sticky; top: 16px; }
.preview-phone {
  margin-top: 12px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  max-width: 280px;
  aspect-ratio: 9 / 16;
  border: 1px solid #303030;
}
.preview-phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1a1a1a;
}
.preview-phone.busy img { opacity: 0.45; }
.channel-grid { grid-template-columns: 1fr 360px; align-items: start; }
@media (max-width: 900px) { .channel-grid { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
.channel-table { width: 100%; border-collapse: collapse; }
.channel-table th, .channel-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #303030; font-size: 13px; vertical-align: top; }
.channel-table th { color: var(--muted); font-weight: 550; }
.danger { color: var(--danger); border-color: #5a2a2a; }
#channel-hint { margin: 6px 0 8px; }
#btn-channel-default { margin: 0 0 8px; }
.subhead { margin: 22px 0 8px; font-size: 15px; }
.music-log { height: auto; min-height: 120px; max-height: 280px; }
