:root {
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif;
  color: #1f2937;
  background: #f5f6f8;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar {
  height: 78px; padding: 14px 24px; background: #fff;
  border-bottom: 1px solid #e5e7eb; display: flex;
  align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.eyebrow { font-size: 12px; color: #6b7280; margin-bottom: 2px; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 22px; letter-spacing: -0.03em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.health { font-size: 12px; color: #6b7280; }
.health.ok { color: #047857; }
.health.bad { color: #b91c1c; }
.app-shell {
  min-height: calc(100vh - 78px);
  display: grid; grid-template-columns: 330px minmax(0, 1fr);
}
.sidebar {
  padding: 16px; border-right: 1px solid #e5e7eb; background: #fafafa;
}
.main { padding: 20px; min-width: 0; }
.panel {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); padding: 18px;
}
.panel.compact { padding: 16px; }
label { display: grid; gap: 6px; font-size: 12px; color: #4b5563; margin-top: 12px; }
input, textarea, select {
  width: 100%; border: 1px solid #d1d5db; border-radius: 9px;
  padding: 9px 10px; color: #111827; background: #fff;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid #dbeafe; border-color: #60a5fa;
}
fieldset {
  margin: 12px 0 0; border: 0; padding: 0; display: flex; gap: 12px;
}
legend { font-size: 12px; color: #4b5563; margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 5px; margin: 0; }
.check input { width: auto; }
.button {
  border: 1px solid #d1d5db; border-radius: 9px; background: #fff;
  color: #374151; padding: 8px 11px; font-weight: 600; font-size: 13px;
}
.button:hover { background: #f9fafb; }
.button.primary { background: #111827; color: #fff; border-color: #111827; }
.button.primary:hover { background: #1f2937; }
.button.success { background: #047857; border-color: #047857; color: #fff; }
.button.danger { color: #b91c1c; }
.button.ghost { background: transparent; }
.button.wide { width: 100%; margin-top: 14px; }
.icon-button { border: 0; background: transparent; font-size: 20px; color: #6b7280; }
.sidebar-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 4px 9px;
}
.job-list { display: grid; gap: 8px; }
.job-card {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 11px;
  padding: 11px 12px; cursor: pointer;
}
.job-card:hover { border-color: #cbd5e1; }
.job-card.active { border-color: #111827; box-shadow: inset 3px 0 #111827; }
.job-card-title {
  display: flex; gap: 8px; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 13px;
}
.job-card-meta { color: #6b7280; font-size: 11px; margin-top: 5px; }
.status {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 3px 8px; font-size: 11px; font-weight: 700;
  color: #475569; background: #f1f5f9;
}
.status.approved, .status.published { color: #047857; background: #d1fae5; }
.status.failed { color: #b91c1c; background: #fee2e2; }
.status.researching, .status.drafting, .status.review, .status.publishing {
  color: #92400e; background: #fef3c7;
}
.empty-state { text-align: center; padding: 70px 24px; color: #6b7280; }
.empty-state h2 { color: #111827; margin: 10px 0 6px; }
.empty-icon { font-size: 42px; }
.job-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 14px;
}
.job-head h2 { font-size: 24px; letter-spacing: -0.03em; }
.job-sub { color: #6b7280; font-size: 12px; margin-top: 5px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stagebar {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden;
  margin-bottom: 16px; background: #fff;
}
.stage {
  padding: 10px 4px; text-align: center; font-size: 11px; color: #94a3b8;
  border-right: 1px solid #e5e7eb;
}
.stage:last-child { border-right: 0; }
.stage.done { color: #047857; background: #ecfdf5; font-weight: 700; }
.stage.current { color: #111827; background: #f8fafc; font-weight: 800; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.stack { display: grid; gap: 16px; }
.section-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.muted { color: #6b7280; font-size: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.source-list, .pub-list, .event-list { display: grid; gap: 8px; margin-top: 12px; }
.source, .publication, .event {
  border: 1px solid #e5e7eb; border-radius: 9px; padding: 10px;
  font-size: 12px;
}
.source a, .publication a { color: #2563eb; text-decoration: none; word-break: break-all; }
.source-top { display: flex; justify-content: space-between; gap: 8px; }
.source.verified { border-left: 3px solid #10b981; }
.draft-tabs { display: flex; gap: 6px; margin-bottom: 9px; flex-wrap: wrap; }
.tab {
  border: 1px solid #d1d5db; background: #fff; border-radius: 999px;
  padding: 5px 9px; font-size: 12px;
}
.tab.active { background: #111827; color: #fff; border-color: #111827; }
.counter { text-align: right; font-size: 11px; color: #6b7280; margin-top: 4px; }
.counter.over { color: #b91c1c; font-weight: 700; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.channel-connect {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 12px;
  margin-bottom: 12px; background: #f8fafc;
}
.pipeline-next {
  border-left: 3px solid #111827; padding: 10px 12px; background: #f8fafc;
  border-radius: 8px; font-size: 13px; line-height: 1.5;
}
.codebox {
  background: #0f172a; color: #e2e8f0; padding: 10px; border-radius: 8px;
  font-size: 11px; white-space: pre-wrap; word-break: break-word;
}
.toast {
  position: fixed; right: 20px; bottom: 20px; background: #111827; color: #fff;
  padding: 10px 14px; border-radius: 9px; font-size: 12px;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: .18s ease; z-index: 50;
}
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid #e5e7eb; }
  .content-grid { grid-template-columns: 1fr; }
  .stagebar { grid-template-columns: repeat(4, 1fr); }
}
