:root {
  color-scheme: dark;
  --background: #101117;
  --surface: #171921;
  --surface-alt: #1b1d26;
  --raised: #22252f;
  --border: #2e313c;
  --line: #272a34;
  --ink: #f1f2f6;
  --muted: #a4aabd;
  --subtle: #8b92a6;
  --accent: #ff667a;
  --accent-bg: #33212c;
  --accent-deep: #fa596e;
  --link: #9db9ff;
  --radius: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.55 "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; color: var(--ink); background: var(--background); }
button, input, select, textarea { font: inherit; }
button, .button, select { color: inherit; border: 1px solid var(--border); background: var(--surface-alt); border-radius: 8px; padding: 8px 12px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; white-space: nowrap; font-weight: 600; text-decoration: none; }
button:not(:disabled):hover, .button:hover { background: var(--raised); border-color: #414657; }
button:disabled { opacity: .45; cursor: default; }
button.primary, .button.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #180c12; }
button.primary:not(:disabled):hover, .button.primary:hover { background: #ff7c8e; border-color: #ff7c8e; }
a { color: var(--link); }
:focus-visible { outline: 2px solid #a9bbff; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(23px, 2.5vw, 31px); font-weight: 750; letter-spacing: -.055em; line-height: 1.3; }
h2 { font-size: 15px; font-weight: 700; }
small { color: var(--subtle); }
.layout { display: grid; grid-template-columns: 246px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 19px 13px 14px; background: #14151c; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 1px 7px 20px; color: var(--ink); text-decoration: none; }
.brand strong { display: block; letter-spacing: .075em; font-size: 17px; line-height: 1.2; font-weight: 850; }
.brand small { display: block; margin-top: 4px; font-size: 11px; }
.brand-icon { position: relative; width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: #fa596e; box-shadow: 0 4px 16px #f9526935; }
.brand-icon::before { content: ""; width: 0; height: 0; margin-left: 3px; border-left: 10px solid #241016; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.nav { display: grid; gap: 3px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.nav-item { justify-content: flex-start; width: 100%; color: var(--muted); background: transparent; border: 1px solid transparent; padding: 9px 10px; gap: 9px; font-size: 13px; }
.nav-item.active { color: #ffc2ca; background: var(--accent-bg); border-color: #462b39; }
.nav-item.active:hover { background: #3e2531; }
.nav-count { margin-left: auto; font-size: 10px; color: var(--muted); }
.channel-list { margin-top: 14px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 7px 8px; color: var(--subtle); font-size: 11px; font-weight: 650; }
.icon-button { width: 32px; height: 32px; padding: 0; }
.section-heading .icon-button { width: 26px; height: 26px; background: transparent; border-color: transparent; }
.channel-heading { display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: 13px; }
.channel-heading .count { margin-left: auto; }
.platform-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 19px; height: 18px; border-radius: 5px; font-size: 12px; font-weight: 800; }
.platform-icon.youtube { color: #ff7687; background: #402632; font-size: 8px; }
.platform-icon.instagram { color: #ffa9df; background: #3b2539; }
.platform-icon.tiktok { color: #a4efec; background: #23383e; }
.channel { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; min-width: 0; color: var(--muted); margin: 3px 0; padding: 7px 8px; border-color: transparent; background: transparent; text-align: left; font-size: 12px; }
.channel.active { color: var(--ink); background: var(--raised); border-color: #383d4d; }
.avatar { display: grid; place-items: center; background: #33384b; border: 1px solid #444b60; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; color: #d8def4; font-size: 11px; font-weight: 800; object-fit: cover; }
.channel-text { min-width: 0; }
.channel-text strong, .channel-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-empty { color: var(--subtle); font-size: 11px; padding: 8px 8px 6px 35px; }
.other-platforms { display: grid; gap: 2px; padding: 11px 0; }
.platform-entry { display: flex; justify-content: flex-start; gap: 8px; padding: 7px 8px; border-color: transparent; background: transparent; color: var(--muted); width: 100%; font-size: 12px; }
.platform-entry small { margin-left: auto; font-size: 10px; }
.sidebar-footer { margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line); }
.network { padding: 7px 9px 1px; display: flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 11px; }
.network i { width: 6px; height: 6px; border-radius: 50%; background: #79d8ad; }
.topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); background: #14151c; font-size: 12px; }
.breadcrumbs, .top-platform { display: flex; align-items: center; gap: 9px; color: var(--subtle); }
.breadcrumbs strong { color: var(--ink); font-weight: 550; }
.top-platform { font-weight: 650; color: var(--muted); }
.content { max-width: 1800px; margin: 0 auto; padding: 26px 27px 34px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-heading p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 15px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.summary .avatar { width: 44px; height: 44px; font-size: 16px; }
.summary-info { min-width: 0; flex: 1; }
.summary-info strong { display: block; font-size: 15px; }
.summary-info a, .video-url { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-info a { color: var(--link); }
.summary-numbers { display: flex; align-items: center; gap: clamp(10px, 2vw, 28px); }
.summary-numbers div { min-width: 39px; text-align: center; }
.summary-numbers dt { font-size: 11px; color: var(--muted); }
.summary-numbers dd { margin: 2px 0 0; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; flex-wrap: wrap; }
.toolbar-title, .filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.count { font-size: 11px; color: var(--muted); background: var(--raised); border-radius: 5px; padding: 1px 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.search { display: flex; gap: 7px; align-items: center; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--background); color: var(--subtle); }
.search:focus-within { outline: 2px solid #a9bbff; outline-offset: -1px; }
.search input { background: transparent; color: var(--ink); border: 0; outline: 0; width: 140px; min-width: 0; font-size: 12px; }
.search input::placeholder { color: var(--subtle); }
.filters select, .pagination select { padding: 6px 8px; font-size: 11px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 920px; border-collapse: collapse; table-layout: fixed; }
th, td { text-align: left; padding: 10px 10px; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 15px; }
th { background: var(--surface-alt); border-block: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
th:nth-child(1) { width: 124px; }
th:nth-child(3) { width: 88px; }
th:nth-child(4) { width: 115px; }
th:nth-child(5), th:nth-child(6), th:nth-child(7) { width: 66px; }
th:nth-child(8) { width: 68px; }
th:nth-child(9) { width: 92px; }
td { border-bottom: 1px solid var(--line); font-size: 12px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #1b1e27; }
.sort { border: 0; background: transparent; font: inherit; padding: 0; color: inherit; }
.sort:not(:disabled):hover { background: transparent; color: var(--ink); }
.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thumb { width: 98px; height: 55px; background: #222633; border-radius: 6px; position: relative; overflow: hidden; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.thumb img { inset: 0; position: absolute; width: 100%; height: 100%; object-fit: cover; }
.duration { position: absolute; right: 3px; bottom: 3px; border-radius: 3px; padding: 1px 4px; background: #101117e8; color: #fff; font-size: 10px; font-variant-numeric: tabular-nums; }
.video-title { font-weight: 700; font-size: 13px; overflow-wrap: anywhere; margin-bottom: 3px; }
.video-url { text-underline-offset: 3px; }
.date { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.date small { display: block; font-size: 10px; }
.status { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border-radius: 6px; padding: 3px 7px; font-size: 11px; font-weight: 650; color: #c8cad6; background: #303440; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.public, .status.complete { color: #8ce3b9; background: #233b35; }
.status.scheduled, .status.uploading { color: #a8beff; background: #29344f; }
.status.unlisted, .status.waiting { color: #f4cb84; background: #3a3029; }
.status.failed { color: #ff9ba9; background: #492a36; }
.table-button { padding: 5px 8px; font-size: 11px; font-weight: 550; }
.empty { min-height: 255px; padding: 28px 14px; border-top: 1px solid var(--line); display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; color: var(--muted); }
.empty h3 { font-size: 17px; color: var(--ink); }
.empty p { font-size: 13px; }
.empty .button, .empty button { margin-top: 7px; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 3px; border-radius: 12px; color: var(--accent); background: var(--accent-bg); }
.panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 50px; padding: 9px 15px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pagination { display: flex; gap: 6px; align-items: center; }
.pagination .icon-button { width: 26px; height: 26px; font-size: 17px; }
.pagination span { padding: 4px 8px; color: var(--link); background: #28334f; border-radius: 6px; }
.note { margin-top: 11px; color: var(--subtle); font-size: 11px; }
.integration { display: flex; align-items: flex-start; padding: 16px; gap: 10px; border-bottom: 1px solid var(--line); }
.integration:last-child { border-bottom: 0; }
.integration .platform-icon { width: 32px; height: 32px; font-size: 16px; }
.integration .platform-icon.youtube { font-size: 12px; }
.integration-text { flex: 1; min-width: 0; }
.integration-text p { margin: 4px 0; color: var(--muted); font-size: 12px; }
.integration-text .channel-links { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 12px; }
.job-row { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--line); }
.job-main { flex: 1; min-width: 0; }
.job-main strong, .job-main a { overflow-wrap: anywhere; }
.job-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.job-error { color: #ffacb8; font-size: 12px; margin-top: 5px; }
.job-controls { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
progress { accent-color: var(--accent); width: 100%; height: 10px; margin-top: 5px; }
.job-row progress { max-width: 220px; display: block; }
dialog { width: min(620px, calc(100vw - 28px)); max-height: min(90vh, 760px); background: var(--surface); color: var(--ink); border: 1px solid #3b4052; border-radius: 13px; box-shadow: 0 16px 65px #07080abf; padding: 0; }
dialog::backdrop { background: #090a11b8; backdrop-filter: blur(2px); }
dialog form { display: flex; flex-direction: column; max-height: min(90vh, 760px); }
.modal-header, .modal-footer { display: flex; justify-content: space-between; align-items: center; padding: 13px 17px; gap: 9px; }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 17px; }
.modal-body { overflow-y: auto; padding: 16px 17px; }
.modal-footer { justify-content: flex-end; border-top: 1px solid var(--line); }
.modal-error { padding: 8px 17px; color: #ffacb8; background: #492a36; font-size: 12px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.field.wide { grid-column: 1 / -1; }
.field input, .field textarea, .field select { width: 100%; color: var(--ink); background: var(--background); padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; }
.field textarea { resize: vertical; min-height: 72px; }
.field input[type=file]::file-selector-button { background: var(--raised); color: var(--ink); border: 1px solid var(--border); border-radius: 5px; margin-right: 9px; padding: 4px 8px; }
.field small { font-size: 10px; }
.notice { color: var(--muted); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 12px; margin-bottom: 12px; overflow-wrap: anywhere; }
.notice p + p { margin-top: 8px; }
.notice code { display: block; margin: 6px 0; padding: 6px 7px; border-radius: 5px; background: var(--background); color: var(--ink); overflow-wrap: anywhere; }
.notice a { display: inline-block; margin-top: 8px; }
.transfer { margin-top: 12px; }
.toast { position: fixed; inset: auto 16px 15px auto; max-width: calc(100vw - 32px); z-index: 2; padding: 10px 14px; color: var(--ink); background: var(--raised); border: 1px solid #454b61; box-shadow: 0 6px 26px #090a10a8; border-radius: 8px; font-size: 13px; }
.callback { max-width: 560px; margin: 10vh auto; padding: 18px; }
.callback p { margin: 8px 0 18px; color: var(--muted); }
.glyph { display: inline-grid; width: 16px; height: 16px; place-items: center; flex: 0 0 auto; font-size: 17px; font-weight: 500; line-height: 1; }
.glyph[data-icon=grid]::before { content: "▦"; }
.glyph[data-icon=queue]::before { content: "≡"; }
.glyph[data-icon=plus]::before { content: "+"; }
.glyph[data-icon=settings]::before { content: "⚙"; }
.glyph[data-icon=refresh]::before { content: "↻"; }
.glyph[data-icon=upload]::before { content: "⇧"; }
.glyph[data-icon=search]::before { content: ""; width: 7px; height: 7px; margin-right: 3px; border: 1.5px solid currentColor; border-radius: 50%; }
.glyph[data-icon=search]::after { content: ""; width: 5px; height: 1.5px; margin: -5px 0 0 8px; background: currentColor; transform: rotate(45deg); }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 211px minmax(0, 1fr); }
  .topbar { padding-inline: 17px; }
  .content { padding-inline: 16px; }
}
@media (max-width: 690px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding-bottom: 8px; }
  .nav, .other-platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding-bottom: 6px; }
  .channel-list { margin-top: 5px; }
  #channels { display: flex; overflow: auto; gap: 4px; }
  .channel { width: min(183px, 52vw); flex: 0 0 auto; }
  .sidebar-footer { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
  .sidebar-footer .nav-item { width: auto; }
  .network { padding: 2px 4px; }
  .topbar { height: 44px; padding-inline: 12px; }
  .content { padding: 15px 10px 22px; }
  .page-heading { align-items: flex-start; gap: 11px; }
  .summary { flex-wrap: wrap; padding: 10px; }
  .summary-numbers { width: 100%; margin-block: 0; }
  .summary-numbers div { flex: 1; }
  .toolbar { padding: 9px; }
  .filters { flex: 1 0 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .fields { grid-template-columns: 1fr; }
  .job-row { flex-wrap: wrap; }
  .job-main { flex-basis: 100%; }
}
