:root {
  --bg: #f5f2ed;
  --panel: #fffdfa;
  --ink: #151515;
  --muted: #706b63;
  --line: #ded7cc;
  --accent: #0f766e;
  --accent-2: #b45309;
  --gold: #d8b15f;
  --soft: #f8f2e8;
  --danger: #b91c1c;
  --success: #0f766e;
  --warning: #b45309;
  --info: #2563eb;
  --shadow: 0 18px 48px rgba(43, 35, 25, .09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px 1fr;
  color: var(--ink);
  background: var(--bg);
  font-family: "Pretendard", Inter, "Segoe UI", "Malgun Gothic", sans-serif;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background:
    linear-gradient(180deg, #171614, #111111 58%, #181410);
  color: white;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  color: var(--gold);
  font-weight: 800;
  box-shadow: inset 0 0 18px rgba(216, 177, 95, .12);
}

.brand strong { display: block; font-size: 15px; }
.brand small { display: block; margin-top: 3px; color: #aaa39a; font-size: 11px; }

nav { display: grid; gap: 8px; }
nav p {
  margin: 18px 10px 4px;
  color: #7e776e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #d7d2ca;
  text-decoration: none;
  font-size: 14px;
}
nav a span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  color: #f7d58b;
  font-size: 10px;
  font-weight: 800;
}
nav a.active, nav a:hover { background: #2a2824; color: #fff; }

main {
  min-width: 0;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .06), transparent 34%),
    radial-gradient(circle at 88% 3%, rgba(216, 177, 95, .16), transparent 28%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; letter-spacing: 0; }
h1 { max-width: 760px; font-size: 30px; line-height: 1.2; }
h2 { font-size: 18px; line-height: 1.25; }

.status-pill {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--panel);
  font-size: 13px;
}

.work-mode-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: -6px 0 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, .72);
}

.work-mode-tabs button {
  display: grid;
  gap: 3px;
  min-height: 56px;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  text-align: left;
}

.work-mode-tabs button.selected {
  background: #151515;
  color: #fff;
  box-shadow: 0 10px 22px rgba(21, 21, 21, .14);
}

.work-mode-tabs span {
  font-weight: 800;
}

.work-mode-tabs small {
  color: var(--muted);
  font-size: 11px;
}

.work-mode-tabs button.selected small {
  color: #d7d2ca;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-metrics article {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, .86);
  box-shadow: 0 10px 26px rgba(43, 35, 25, .06);
}

.dashboard-metrics small {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.dashboard-metrics strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
  line-height: 1.2;
}

.dashboard-metrics span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.command-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.utility-summary[hidden] {
  display: none !important;
}

.command-center {
  grid-template-columns: 1.1fr .95fr .95fr;
}

.next-action-card {
  border-color: rgba(15, 118, 110, .35);
  background: linear-gradient(180deg, #ffffff, #f0fdfa);
}

.command-strip article {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, var(--soft));
  box-shadow: var(--shadow);
}

.command-strip span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #151515;
  color: #f7d58b;
  font-size: 12px;
  font-weight: 800;
}

.command-strip strong {
  display: block;
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 600;
}

.command-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.publish-flow-board {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, .20);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .07), transparent 38%),
    rgba(255, 253, 250, .92);
  box-shadow: 0 12px 30px rgba(43, 35, 25, .07);
}

.publish-flow-head {
  display: flex;
  gap: 14px;
  align-items: start;
  justify-content: space-between;
}

.publish-flow-head h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.publish-flow-head span {
  display: block;
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.flow-basis {
  display: inline-grid;
  margin-top: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(21, 21, 21, .08);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.publish-flow-head .run {
  width: auto;
  min-width: 150px;
  margin-top: 0;
}

.publish-flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
}

.publish-flow-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  min-height: 92px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.publish-flow-step b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
}

.publish-flow-step strong,
.publish-flow-step small,
.publish-flow-step em {
  display: block;
}

.publish-flow-step strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.publish-flow-step small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.publish-flow-step em {
  grid-column: 2;
  justify-self: start;
  margin-top: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(43, 35, 25, .06);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.publish-flow-step.done {
  border-color: rgba(15, 118, 110, .32);
  background: #f0fdfa;
}

.publish-flow-step.done b,
.publish-flow-step.done em {
  background: var(--accent);
  color: #fff;
}

.publish-flow-step.progress {
  border-color: rgba(180, 83, 9, .34);
  background: #fff7ed;
}

.publish-flow-step.progress b,
.publish-flow-step.progress em {
  background: var(--accent-2);
  color: #fff;
}

.publish-flow-step.ready {
  border-color: rgba(37, 99, 235, .25);
  background: #eff6ff;
}

.publish-flow-step.ready b,
.publish-flow-step.ready em {
  background: var(--info);
  color: #fff;
}

.publish-flow-step.waiting {
  background: #fffdf8;
}

.publish-flow-step.skipped {
  opacity: .72;
  background: #f3f0ea;
}

.publish-flow-step.skipped b,
.publish-flow-step.skipped em {
  background: #8a8176;
  color: #fff;
}

.publish-flow-step.previous {
  border-color: rgba(138, 129, 118, .34);
  background: #f7f3ec;
}

.publish-flow-step.previous b,
.publish-flow-step.previous em {
  background: #8a8176;
  color: #fff;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(460px, 1.1fr) minmax(360px, .9fr);
  gap: 18px;
  margin-bottom: 18px;
}
/* #create 는 Step2 입력·스튜디오 탭·Step3·실행 바가 한 열로 흐르도록 1열 레이아웃을 사용한다.
   스튜디오 탭과 스티키 실행 바가 좁은 컬럼에 끼어 세로로 늘어나는 현상을 방지. */
#create.workspace {
  grid-template-columns: 1fr;
}

.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, .94);
  box-shadow: var(--shadow);
}

.primary-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.68), rgba(255,253,248,.98)),
    var(--panel);
}

.panel.full { margin-bottom: 18px; }
.panel.wide { min-height: 420px; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eee8df;
}

button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

button:hover { border-color: #b8afa2; }
button:active { transform: translateY(1px); }
.segmented button { border: 0; background: transparent; }
.segmented button.selected { background: #151515; color: #fff; }
.ghost { background: transparent; }
.danger { color: var(--danger); }

.mode-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 14px;
}

.mode-cards button {
  min-height: 76px;
  padding: 11px;
  text-align: left;
  background: #fff;
}

.mode-cards button.selected {
  border-color: #151515;
  background: #151515;
  color: #fff;
}

.mode-cards strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.mode-cards span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.mode-cards button.selected span {
  color: #d7d2ca;
}

.commerce-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #d6c7b4;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 13px;
}

.commerce-note strong {
  white-space: nowrap;
}

.handoff-banner {
  display: grid;
  gap: 5px;
  margin: -2px 0 14px;
  padding: 11px 12px;
  border: 1px solid rgba(15, 118, 110, .28);
  border-radius: 8px;
  background: #f0fdfa;
  color: #134e4a;
  font-size: 13px;
}

.handoff-banner strong,
.handoff-banner span,
.handoff-banner small {
  display: block;
}

.handoff-banner small {
  color: var(--muted);
  line-height: 1.45;
}

.handoff-banner button {
  justify-self: start;
  margin-top: 3px;
  padding: 7px 10px;
  border-color: rgba(15, 118, 110, .35);
  background: #fff;
  color: var(--accent);
  font-weight: 800;
}

.run {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border-color: #151515;
  background: #151515;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(21, 21, 21, .14);
}

.mini-run {
  width: auto;
  min-height: 34px;
  margin-top: 10px;
  padding: 8px 12px;
  box-shadow: none;
}

.run-status { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.dense { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* 채널 스튜디오 탭 — 한 번에 하나만 노출해서 페이지 높이를 줄인다 */
.studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}
.studio-tabs button {
  appearance: none;
  border: 1px solid rgba(15, 118, 110, .22);
  background: #fff;
  color: var(--muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.studio-tabs button:hover { border-color: rgba(15, 118, 110, .5); color: var(--ink); }
.studio-tabs button.selected {
  background: var(--ink, #111827);
  color: #fff;
  border-color: var(--ink, #111827);
}
.studio-panel { display: none; }
.studio-panel.is-active { display: block; }

/* 스튜디오 컴팩트 힌트 한 줄 */
.studio-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, .14);
  border-radius: 8px;
  background: rgba(15, 118, 110, .04);
}
.studio-hints span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.studio-hints span::before { content: "·"; margin-right: 6px; color: rgba(15, 118, 110, .5); }
.studio-hints span:first-child::before { content: ""; margin-right: 0; }

/* Step 3 + 실행 버튼 통합 블록 — 설정은 좌측, 실행 버튼은 우측 */
.run-block { position: sticky; bottom: 0; z-index: 30; }
.run-block-body {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 20px;
  align-items: stretch;
}
.run-block-settings { align-content: center; }
.run-block-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-left: 1px solid var(--line);
  background: rgba(15, 118, 110, .05);
  border-radius: 10px;
}
.run-block-action .run {
  width: 100%;
  margin: 0;
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 700;
}
.run-block-action .run-status { margin: 0; text-align: center; font-size: 13px; }
.run-block-action .scope-hint { margin: 0; }
.scope-hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

textarea { resize: vertical; min-height: 96px; }

.toggles {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.publish-scope-card {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .24);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdfa, #f0fdfa);
}

.publish-scope-card .field {
  margin-bottom: 8px;
}

.publish-scope-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.blog-studio {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .07), transparent 40%),
    linear-gradient(180deg, #fffdfb, #fff8ef);
}

.card-studio {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, .07), transparent 40%),
    linear-gradient(180deg, #fffdfb, #fff8ef);
}

.instatoon-studio {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(217, 119, 6, .08), transparent 40%),
    linear-gradient(180deg, #fffdfb, #fff8ef);
}

.threads-studio {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, .08), transparent 40%),
    linear-gradient(180deg, #fffdfb, #fff8ef);
}

.format-hub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .7);
}
.format-hub a {
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
}
.format-hub a:hover { background: #111827; color: #fff; }

.case-picker {
  margin: 4px 0 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.76);
}

.case-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.case-picker-head strong {
  font-size: 14px;
}

.case-picker-head span {
  color: var(--muted);
  font-size: 12px;
}

.case-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.case-picker-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #3a342c;
  font-size: 13px;
}

.case-picker-grid input {
  width: auto;
}

.editor-automation-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.editor-automation-board article {
  min-height: 104px;
  padding: 13px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 8px;
  background: #fff;
}

.editor-automation-board strong {
  display: block;
  margin-bottom: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
}

.editor-automation-board span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.inline-actions { display: flex; gap: 8px; }

.section-lead {
  max-width: 720px;
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.analysis-control {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px) 132px;
  gap: 10px;
  align-items: end;
}

.analysis-control .field {
  margin-bottom: 0;
}

.compact-run {
  min-height: 42px;
  margin-top: 0;
}

.analysis-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.analysis-context strong {
  margin-right: 4px;
  font-size: 16px;
}

.analysis-context span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
}

.degraded-banner {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr auto;
  gap: 10px;
  align-items: center;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #e2c99f;
  border-radius: 8px;
  background: #fff8e7;
  color: #7c2d12;
  font-size: 13px;
}

.degraded-banner span {
  color: #8a5a24;
  line-height: 1.45;
}

.degraded-banner button {
  padding: 7px 9px;
  background: #fff;
}

.candidate-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed #d6c7b4;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf2, #fffdf8);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
}

.empty-state p {
  max-width: 360px;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.candidate {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.candidate.linked {
  border-color: rgba(15, 118, 110, .55);
  background: linear-gradient(180deg, #ffffff, #f0fdfa);
}

.candidate:hover {
  border-color: #b8afa2;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(43, 35, 25, .10);
}

.candidate img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 7px;
  background: #eee;
}

.candidate strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.4;
}

.candidate p { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.candidate input { margin-top: 8px; padding: 8px; font-size: 12px; }

.inbox {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.inbox-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.inbox-item strong { display: block; font-size: 13px; line-height: 1.4; }
.inbox-item code { display: block; margin: 6px 0; overflow-wrap: anywhere; color: var(--accent); font-size: 12px; }

.source-analysis-board {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, .9), rgba(255, 253, 250, .94) 48%, rgba(248, 242, 232, .86));
}

.source-analysis-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.source-analysis-head small,
.source-analysis-head strong,
.source-analysis-head span {
  display: block;
}

.source-analysis-head small {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.source-analysis-head strong {
  margin-top: 4px;
  font-size: 18px;
}

.source-analysis-head span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.source-analysis-head b {
  min-width: 96px;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 12px;
}

.source-analysis-grid {
  display: grid;
  grid-template-columns: .9fr 1.15fr .95fr;
  gap: 10px;
}

.source-analysis-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
}

.source-analysis-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.source-analysis-grid ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 17px;
  color: #4b453d;
  font-size: 12px;
  line-height: 1.45;
}

.source-analysis-grid p,
.source-analysis-grid em {
  display: block;
  margin: 0;
  color: #4b453d;
  font-size: 12px;
  line-height: 1.45;
}

.source-analysis-grid p + p {
  margin-top: 6px;
}

.source-analysis-grid b {
  color: var(--accent);
}

.source-analysis-grid em {
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
}

.output-preview {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(320px, .95fr);
  gap: 14px;
}

.preview-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.channel-ratio-board {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .20);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, .9), rgba(255, 253, 250, .96) 44%, rgba(248, 242, 232, .82));
}

.ratio-board-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.ratio-board-head strong,
.ratio-board-head span {
  display: block;
}

.ratio-board-head strong {
  font-size: 16px;
}

.ratio-board-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ratio-board-head b {
  min-width: 54px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 12px;
}

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ratio-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ratio-grid article.active {
  border-color: rgba(15, 118, 110, .32);
  box-shadow: inset 3px 0 0 var(--accent);
}

.ratio-grid article.muted {
  opacity: .62;
}

.ratio-grid small,
.ratio-grid strong,
.ratio-grid span,
.ratio-grid p,
.ratio-grid em {
  display: block;
}

.ratio-grid small {
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ratio-grid strong {
  margin-top: 7px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1;
}

.ratio-grid span {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 900;
}

.ratio-grid p {
  margin: 7px 0 0;
  color: #4b453d;
  font-size: 12px;
  line-height: 1.45;
}

.ratio-grid em {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
}

.mascot-decision {
  display: grid;
  grid-template-columns: minmax(120px, .28fr) 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid rgba(15, 118, 110, .18);
}

.mascot-decision strong,
.mascot-decision span {
  display: block;
}

.mascot-decision strong {
  font-size: 13px;
}

.mascot-decision span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.preview-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.preview-title {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.25;
}

.preview-body {
  max-height: 260px;
  overflow: auto;
  color: #36312b;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.rendered-blog-card {
  grid-column: 1 / -1;
}

.blog-render {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #1f2933;
}

.blog-render header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid #ece7df;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
}

.blog-render header small,
.blog-render-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, .08);
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.blog-render h1,
.blog-render-title {
  max-width: 860px;
  margin: 0;
  color: #111827;
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.blog-render header p,
.blog-render-meta {
  max-width: 780px;
  margin: 12px 0 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.65;
}

.blog-render header .run-status,
.blog-render-note {
  margin-top: 10px;
  color: #6b7280;
  font-size: 12.5px;
  line-height: 1.5;
}

.blog-render figure {
  margin: 0;
  padding: 16px 24px 0;
}

.blog-render figure img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee8df;
}

.blog-render figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.blog-render-lead {
  margin: 18px 24px 8px;
  padding: 15px 16px;
  border-left: 3px solid var(--accent);
  background: #f0fdfa;
  color: #134e4a;
  font-size: 15px;
  line-height: 1.7;
}

.blog-render-sections {
  display: grid;
  gap: 14px;
  padding: 12px 24px 18px;
}

.blog-render-sections section {
  padding-top: 10px;
  border-top: 1px solid #eee4d8;
}

.blog-render-sections h2 {
  font-size: 22px;
  line-height: 1.35;
}

.blog-render-sections p {
  margin: 8px 0 0;
  color: #2d2924;
  font-size: 14px;
  line-height: 1.75;
}

.blog-checklist-preview {
  display: grid;
  gap: 8px;
  margin: 0 24px 18px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background: #f8fffc;
}

.blog-checklist-preview strong,
.blog-checklist-preview span {
  display: block;
}

.blog-checklist-preview strong {
  color: var(--accent);
}

.blog-checklist-preview span {
  padding: 8px 10px;
  border-radius: 7px;
  background: #fff;
  color: #36312b;
  font-size: 13px;
}

.blog-disclosure {
  margin: 0 24px 18px;
  padding: 12px 14px;
  border: 1px solid #ead9bc;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 13px;
}

.blog-render footer {
  padding: 14px 24px 18px;
  background: #151515;
  color: #f7d58b;
  font-size: 14px;
  font-weight: 800;
}

.blog-publish-html {
  padding: 8px 28px 32px;
  color: #1f2933;
  font-size: 16px;
  line-height: 1.85;
  background: #fff;
}
.blog-publish-html h2,
.blog-publish-html h3 {
  margin: 28px 0 12px;
  color: #0f766e;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.blog-publish-html h2[style*="30px"],
.blog-publish-html h2[style*="post_title"] {
  color: #111827 !important;
}
.blog-publish-html p { margin: 14px 0; color: inherit; }
.blog-publish-html strong { color: #0f766e; font-weight: 800; }
.blog-publish-html ul,
.blog-publish-html ol { margin: 12px 0 12px 1.2em; }
.publish-preview-figure {
  margin: 22px 0;
}
.publish-preview-figure img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eadfce;
}
.publish-preview-figure figcaption {
  margin-top: 8px;
  color: #68717d;
  font-size: 13px;
}
.blog-render.publish-faithful header .run-status {
  margin-top: 10px;
  color: #6b7280;
}

.threads-phone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.threads-phone-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0f1419;
  color: #e7ecf1;
  padding: 14px 14px 12px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.threads-phone-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #93a4b5;
  font-size: 12px;
}
.threads-phone-body {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}
.threads-hook { color: #7dd3fc; font-size: 13px; margin: 0; }
.threads-cta { color: #86efac; font-size: 13px; margin: 0; }
.threads-phone-card footer {
  color: #64748b;
  font-size: 11px;
  word-break: break-all;
}

.instatoon-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.instatoon-cut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.instatoon-cut-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel, #fff);
}
.instatoon-cut-thumb {
  aspect-ratio: 4 / 5;
  background: #f3efe7;
  display: grid;
  place-items: center;
}
.instatoon-cut-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.instatoon-cut-thumb.missing { color: var(--muted); font-size: 13px; }
.instatoon-cut-copy {
  padding: 10px 12px 12px;
}
.instatoon-cut-copy small {
  color: var(--muted);
  font-size: 11px;
}
.instatoon-cut-copy strong {
  display: block;
  margin: 4px 0 6px;
  font-size: 13px;
}
.instatoon-cut-copy p {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
}

.score-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background: #f0fdfa;
}

.score-row strong {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #151515;
  color: #f7d58b;
  font-size: 20px;
}

.score-row span {
  color: #134e4a;
  font-size: 13px;
  font-weight: 800;
}

.title-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.title-chip-list span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: #2b251f;
  font-size: 12px;
  line-height: 1.35;
}

.quality-checks {
  display: grid;
  gap: 8px;
}

.quality-checks div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
}

.quality-checks strong,
.quality-checks span,
.quality-checks small {
  display: block;
}

.quality-checks strong {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.quality-checks span {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 800;
}

.quality-checks small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.blog-image-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 9px;
}

.image-boundary-note {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background: #f0fdfa;
}

.image-boundary-note strong,
.image-boundary-note span,
.image-boundary-note small {
  display: block;
}

.image-boundary-note strong {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.image-boundary-note span,
.image-boundary-note small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.visual-readiness-board {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, .24);
  border-radius: 8px;
  background: #f0fdfa;
}

.visual-readiness-board.warn {
  border-color: #ead9bc;
  background: #fff7ed;
}

.visual-readiness-board strong,
.visual-readiness-board span,
.visual-readiness-board small {
  display: block;
}

.visual-readiness-board strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.visual-readiness-board span {
  margin-top: 3px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.visual-readiness-board small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.visual-readiness-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
}

.embedded-studio {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfaf6 0%, #f4f1ea 100%);
}

.embedded-studio-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.embedded-studio-head h3 {
  margin: 2px 0 2px;
  font-size: 15px;
}

.embedded-studio-head h3 small {
  font-size: 11px;
  color: #6b6f66;
  font-weight: 600;
}

.embedded-studio-head .muted {
  display: block;
  font-size: 12px;
  color: #6b6f66;
  max-width: 60ch;
}

.embedded-studio-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.embedded-studio-actions .run {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 9px;
  background: #111827;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}

.blog-image-text-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #2f302c;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.blog-image-text-toggle select {
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.blog-image-add-btn {
  background: #0f7670 !important;
  border-color: #0f7670 !important;
}

.visual-readiness-actions button,
.blog-image-slots button {
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151515;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.blog-image-slots article {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.blog-image-slots article.ok {
  border-color: rgba(15, 118, 110, .26);
}

.blog-image-slots article.warn {
  border-color: #ead9bc;
  background: #fffdfa;
}

.blog-image-slots img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 7px;
  background: #eee8df;
}

.blog-image-slots strong,
.blog-image-slots span,
.blog-image-slots small,
.blog-image-slots b {
  display: block;
}

.blog-image-slots .slot-score {
  margin-top: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.blog-image-slots strong {
  margin-top: 8px;
  font-size: 13px;
}

.blog-image-slots span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.blog-image-slots small {
  margin-top: 5px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
}

.blog-image-slots button {
  width: 100%;
  margin-top: 8px;
}

.publish-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.channel-publish-console {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .07), transparent 42%),
    #fffdfa;
}

.channel-console-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.channel-console-head h3 {
  margin: 0;
  font-size: 19px;
}

.channel-console-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.channel-console-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.channel-console-grid section {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.channel-console-grid section.ready {
  border-color: rgba(15, 118, 110, .28);
  background: #f0fdfa;
}

.channel-console-grid section.pending {
  background: #fff7ed;
}

.channel-console-grid strong,
.channel-console-grid b,
.channel-console-grid small {
  display: block;
}

.channel-console-grid strong {
  font-size: 15px;
}

.channel-console-grid b {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #151515;
  color: #fff;
  font-size: 11px;
}

.channel-console-grid small {
  color: var(--muted);
  font-size: 12px;
}

.channel-console-grid div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.channel-console-grid button {
  min-height: 32px;
  padding: 7px 8px;
  font-size: 12px;
}

.channel-console-grid button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.publish-status-grid div {
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.publish-status-grid strong,
.publish-status-grid span {
  display: block;
}

.publish-status-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.publish-status-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.naver-editor-board,
.channel-report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.naver-editor-board div,
.channel-report-grid div {
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.naver-editor-board div.ok,
.channel-report-grid div.ok {
  border-color: rgba(15, 118, 110, .24);
  background: #f0fdfa;
}

.naver-editor-board div.warn,
.channel-report-grid div.warn {
  border-color: #ead9bc;
  background: #fff7ed;
}

.naver-editor-board strong,
.naver-editor-board span,
.naver-editor-board small,
.channel-report-grid strong,
.channel-report-grid span {
  display: block;
}

.naver-editor-board strong {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.naver-editor-board span,
.channel-report-grid strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.naver-editor-board small,
.channel-report-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.quality-score-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 11px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f0fdfa);
}

.quality-score-panel strong {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #151515;
  color: #f7d58b;
  font-size: 20px;
}

.quality-score-panel span {
  color: #134e4a;
  font-size: 13px;
  font-weight: 900;
}

.editor-style-plan,
.actual-image-audit {
  display: grid;
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .06), transparent 42%),
    #fffdfa;
}

.actual-image-audit.warn {
  border-color: #ead9bc;
  background: #fff7ed;
}

.editor-style-head strong,
.editor-style-head span,
.actual-image-audit-head strong,
.actual-image-audit-head span {
  display: block;
}

.editor-style-head strong,
.actual-image-audit-head strong {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.editor-style-head span,
.actual-image-audit-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.editor-style-grid,
.actual-image-audit-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.editor-style-grid div,
.actual-image-audit-list div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.actual-image-audit-list div.ok {
  border-color: rgba(15, 118, 110, .24);
  background: #f0fdfa;
}

.actual-image-audit-list div.warn {
  border-color: #ead9bc;
  background: #fffaf3;
}

.editor-style-grid strong,
.editor-style-grid span,
.editor-style-grid small,
.actual-image-audit-list strong,
.actual-image-audit-list span,
.actual-image-audit-list small {
  display: block;
}

.editor-style-grid strong,
.actual-image-audit-list strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.editor-style-grid span,
.actual-image-audit-list span {
  margin-top: 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.editor-style-grid small,
.actual-image-audit-list small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.visual-quality-gate {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, .24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, .94), rgba(255, 253, 250, .96) 46%, rgba(248, 242, 232, .86));
}

.visual-quality-gate.blocked {
  border-color: #d9a96a;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, .98), rgba(255, 253, 250, .96) 48%, rgba(248, 242, 232, .86));
}

.visual-quality-gate-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.visual-quality-gate-head h3 {
  margin: 2px 0 0;
  font-size: 22px;
}

.visual-quality-gate-head span,
.visual-quality-gate p {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.visual-quality-gate-head strong {
  min-width: 86px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #151515;
  color: #f7d58b;
  text-align: center;
  font-size: 13px;
}

.visual-quality-gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.visual-quality-gate-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.visual-quality-gate-grid div.ok {
  border-color: rgba(15, 118, 110, .26);
  background: #f0fdfa;
}

.visual-quality-gate-grid div.warn {
  border-color: #ead9bc;
  background: #fffaf3;
}

.visual-quality-gate-grid strong,
.visual-quality-gate-grid b,
.visual-quality-gate-grid span,
.visual-quality-gate-grid small {
  display: block;
}

.visual-quality-gate-grid b {
  margin-top: 6px;
  color: var(--accent);
  font-size: 24px;
}

.visual-quality-gate-grid span {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.visual-quality-gate-grid small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.card-reference-target {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  padding: 11px 12px;
  border: 1px solid rgba(15, 118, 110, .24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 250, .95), rgba(240, 253, 250, .70));
}

.card-reference-target strong,
.card-reference-target span {
  display: block;
}

.card-reference-target strong {
  color: var(--accent);
  font-size: 13px;
}

.card-reference-target span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.motion-preview {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  max-width: 360px;
}

.motion-preview video {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

.motion-preview small {
  color: var(--muted);
  font-size: 13px;
}

.card-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.mini-card {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  padding: 10px;
  border-radius: 8px;
  background: #171614;
  color: white;
}

.mini-card small {
  color: var(--gold);
  font-weight: 800;
}

.mini-card span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.card-review-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background: #f0fdfa;
}

.card-review-head strong,
.card-review-head span {
  display: block;
}

.card-review-head strong {
  color: var(--accent);
  font-size: 15px;
}

.card-review-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.card-review-head > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.card-review-head button,
.card-review-actions button {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151515;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-review-actions button.ghost {
  background: #fff;
  color: var(--ink);
}

.card-review-board {
  display: grid;
  gap: 10px;
}

.card-review-item {
  display: grid;
  grid-template-columns: 64px minmax(150px, 210px) minmax(0, 1fr) minmax(128px, auto);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.card-review-item.ok {
  border-color: rgba(15, 118, 110, .26);
}

.card-review-item.warn {
  border-color: #ead9bc;
  background: #fffdfa;
}

.card-review-select {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--accent);
  font-weight: 900;
}

.card-review-select input {
  width: 18px;
  height: 18px;
}

.card-review-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 250, .96), rgba(240, 253, 250, .8));
}

.card-review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-review-thumb.missing b {
  color: var(--accent-2);
  font-size: 13px;
}

.card-review-copy small,
.card-review-copy strong,
.card-review-copy p,
.card-review-copy em {
  display: block;
}

.card-review-copy small {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
}

.card-review-copy strong {
  margin-top: 5px;
  font-size: 18px;
  line-height: 1.28;
}

.card-review-copy p {
  margin: 7px 0 0;
  color: #4b453d;
  font-size: 13px;
  line-height: 1.45;
}

.card-review-copy ul {
  margin: 8px 0 0;
  padding-left: 16px;
  color: #4b453d;
  font-size: 12px;
  line-height: 1.45;
}

.card-review-copy em {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.card-review-actions {
  display: grid;
  gap: 7px;
}

.card-review-empty {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px dashed #d9cbb7;
  border-radius: 8px;
  background: #fffdfa;
}

.card-review-empty strong,
.card-review-empty span {
  display: block;
}

.card-review-empty span {
  color: var(--muted);
  font-size: 13px;
}

.shopping-slots {
  display: grid;
  gap: 8px;
}

.shopping-slot {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.shopping-slot strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.shopping-slot span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.shopping-slot a {
  display: block;
  overflow-wrap: anywhere;
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.asset-placeholder {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.asset-placeholder article {
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.asset-placeholder strong,
.asset-placeholder span {
  display: block;
}

.asset-placeholder strong {
  margin-bottom: 8px;
}

.asset-placeholder span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.asset-audit-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 14px;
}

.asset-audit-board article {
  min-height: 96px;
  padding: 13px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f0fdfa);
}

.asset-audit-board strong,
.asset-audit-board span,
.asset-audit-board small {
  display: block;
}

.asset-audit-board strong {
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.asset-audit-board span {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 800;
}

.asset-audit-board small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.asset-recommendation-board {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, .20);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f0fdfa);
}

.recommendation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.recommendation-head strong,
.recommendation-head span {
  display: block;
}

.recommendation-head strong {
  font-size: 16px;
}

.recommendation-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.asset-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.asset-recommendation {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.asset-recommendation img,
.asset-recommendation-mark {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
  background: #eee8df;
}

.asset-recommendation-mark {
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-weight: 900;
}

.asset-recommendation small,
.asset-recommendation strong,
.asset-recommendation span {
  display: block;
}

.asset-recommendation small {
  margin-top: 8px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
}

.asset-recommendation strong {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.asset-recommendation span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.asset-control {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(220px, 1.1fr) 120px;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.asset-control .field {
  margin-bottom: 0;
}

.asset-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.asset-toolbar button {
  padding: 7px 10px;
}

.asset-toolbar button.selected {
  background: #151515;
  color: #fff;
}

.asset-list {
  display: grid;
  gap: 10px;
}

.asset-path {
  margin-top: 5px;
  max-width: 760px;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-item {
  display: grid;
  grid-template-columns: minmax(128px, 168px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.asset-item.template-asset {
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr) auto;
  background:
    linear-gradient(135deg, rgba(255, 253, 250, .98), rgba(240, 253, 250, .36)),
    #fff;
}

.asset-thumb {
  width: 100%;
  height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #eee8df;
}

.template-asset .asset-thumb {
  height: 152px;
}

.asset-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.asset-thumb.placeholder small {
  display: block;
  max-width: 78px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.template-preview {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  gap: 7px;
  min-height: 118px;
  padding: 9px;
  overflow: hidden;
  color: #151515;
}

.template-preview-cover {
  display: grid;
  align-content: space-between;
  min-height: 66px;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(43, 35, 25, .08);
}

.template-preview-cover span {
  color: var(--accent-2);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .06em;
}

.template-preview-cover strong {
  margin: 0;
  max-width: 12ch;
  font-size: 19px;
  line-height: 1.05;
}

.template-preview-cover i {
  display: block;
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: .18;
}

.template-preview-pages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.template-preview-pages b {
  display: grid;
  place-items: center;
  min-height: 24px;
  padding: 2px 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .76);
  box-shadow: inset 0 0 0 1px rgba(43, 35, 25, .08);
  color: rgba(21, 21, 21, .68);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
}

.template-preview-spec {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.template-preview-spec b {
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .64);
  box-shadow: inset 0 0 0 1px rgba(43, 35, 25, .07);
  color: rgba(21, 21, 21, .78);
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-preview > small {
  color: rgba(21, 21, 21, .68);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}

.template-preview.minimal {
  background: linear-gradient(135deg, #f8f2e8, #ffffff);
}

.template-preview.commerce {
  background: linear-gradient(135deg, #fff7ed, #f0fdfa);
}

.template-preview.editorial {
  background:
    linear-gradient(135deg, rgba(255, 253, 250, .88), transparent 45%),
    linear-gradient(150deg, #102f28, #151515 72%);
  color: #fff;
}

.template-preview.editorial .template-preview-cover {
  background: rgba(255, 255, 255, .92);
  color: #151515;
}

.template-preview.editorial > small {
  color: rgba(255, 255, 255, .82);
}

.template-preview.soft {
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.85), transparent 30%),
    linear-gradient(135deg, #fde2e4, #e0f2fe);
}

.template-preview.viral {
  background:
    linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px),
    linear-gradient(135deg, #111827, #b45309);
  color: #fff;
}

.template-preview.viral .template-preview-cover {
  background: rgba(255, 255, 255, .94);
  color: #111827;
}

.template-preview.viral > small {
  color: rgba(255, 255, 255, .82);
}

.asset-preview-note {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.asset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.asset-meta span {
  display: inline-flex;
  width: auto;
  padding: 4px 7px;
  border: 1px solid rgba(15, 118, 110, .16);
  border-radius: 999px;
  background: #f0fdfa;
  color: #134e4a;
  font-size: 11px;
}

.asset-item.selected {
  border-color: rgba(15, 118, 110, .55);
  background: linear-gradient(180deg, #fff, #f0fdfa);
}

.asset-item.muted {
  opacity: .66;
}

.asset-item small,
.asset-item strong,
.asset-item p,
.asset-item span {
  display: block;
}

.asset-item small {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
}

.asset-item strong {
  margin-top: 4px;
  font-size: 15px;
}

.asset-item p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.asset-item span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.asset-item b {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
}

.asset-actions {
  display: grid;
  gap: 6px;
  min-width: 98px;
}

.asset-actions button {
  padding: 7px 8px;
  font-size: 12px;
}

.keyword-results {
  overflow: auto;
  margin-top: 14px;
}

#keywords > .panel.wide {
  grid-column: 1 / -1;
}

.advanced-keyword-detail {
  display: none !important;
}

.today-keyword-panel {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .08), transparent 42%),
    #fffdfa;
}

.today-keyword-panel.compact-optional {
  display: block;
}

.today-keyword-panel.compact-optional summary {
  cursor: pointer;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
}

.today-keyword-panel.compact-optional[open] {
  display: grid;
}

.today-keyword-panel.compact-optional:not([open]) {
  padding: 12px 14px;
  background: rgba(255, 253, 250, .76);
}

.today-keyword-panel.compact-optional:not([open]) .today-keyword-head,
.today-keyword-panel.compact-optional:not([open]) .today-keyword-board,
.today-keyword-panel.compact-optional:not([open]) .run-status {
  display: none;
}

.today-keyword-head {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.today-keyword-head h3 {
  margin: 2px 0 5px;
  font-size: 20px;
}

.today-keyword-head span,
.today-keyword-note span,
.today-keyword-card span,
.today-keyword-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.today-keyword-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.today-keyword-controls select {
  min-width: 112px;
}

.today-keyword-board {
  display: grid;
  gap: 14px;
}

.today-keyword-note {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.today-keyword-note strong {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.today-decision-board {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .72fr);
  gap: 12px;
  align-items: start;
}

.today-keyword-hero {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(43, 35, 25, .10);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, .05), transparent 34%),
    linear-gradient(145deg, rgba(15, 118, 110, .08), rgba(255, 255, 255, .82) 45%),
    #fff;
  box-shadow: 0 16px 34px rgba(43, 35, 25, .08);
}

.today-hero-eyebrow,
.today-rank-head,
.today-strategy-board > div {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.today-hero-eyebrow span,
.today-rank-head strong,
.today-strategy-board strong {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.today-hero-eyebrow b {
  padding: 5px 9px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 12px;
}

.today-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(230px, .82fr);
  gap: 14px;
}

.today-hero-copy small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.today-hero-copy h4 {
  margin: 7px 0 8px;
  color: var(--ink);
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.today-hero-copy p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.today-intent-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.today-intent-line b,
.today-intent-line span {
  padding: 6px 9px;
  border: 1px solid rgba(43, 35, 25, .11);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.today-intent-line span {
  color: var(--muted);
  font-weight: 800;
}

.today-hero-keywords {
  display: grid;
  gap: 10px;
  align-content: start;
}

.channel-fit-bars {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.fit-bar {
  display: grid;
  grid-template-columns: 58px 1fr 34px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.fit-bar div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(43, 35, 25, .08);
}

.fit-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #111827;
}

.fit-bar.blog i {
  background: #0f766e;
}

.fit-bar.threads i {
  background: #7c3aed;
}

.fit-bar.shopping i {
  background: #d97706;
}

.fit-bar b {
  color: var(--ink);
  text-align: right;
}

.today-rank-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
}

.today-rank-head {
  align-items: start;
}

.today-rank-head span,
.today-strategy-board span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.today-rank-list {
  display: grid;
  gap: 7px;
}

.today-rank-item {
  display: grid;
  grid-template-columns: 28px 1fr 34px;
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(43, 35, 25, .10);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.today-rank-item b,
.today-rank-item em {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.today-rank-item em {
  background: #111827;
  color: #fff;
}

.today-rank-item strong,
.today-rank-item small {
  display: block;
}

.today-rank-item strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.today-rank-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.today-strategy-board {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.today-hero-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.today-hero-actions button {
  min-height: 38px;
  padding: 8px;
  font-size: 12px;
}

.today-keyword-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.today-secondary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.today-keyword-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(43, 35, 25, .06);
}

.today-keyword-card small {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
}

.today-keyword-card strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.today-keyword-card p {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.keyword-chip-block {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 247, 240, .72);
}

.keyword-chip-block > span {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
}

.keyword-chip-block > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keyword-chip-block b {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(43, 35, 25, .10);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.2;
}

.keyword-chip-block em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.keyword-chip-block.longtail {
  background: rgba(15, 118, 110, .06);
}

.title-strategy-panel {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.title-strategy-panel summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.selected-title-banner {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, .24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .08), transparent 45%),
    #fffdfa;
}

.selected-title-banner span,
.selected-title-banner strong,
.selected-title-banner small {
  display: block;
}

.selected-title-banner span {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.selected-title-banner strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.selected-title-banner small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.title-strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.title-strategy-grid section,
.title-strategy-grid button {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--ink);
  text-align: left;
}

.title-strategy-grid button {
  min-height: 142px;
  cursor: pointer;
}

.title-strategy-grid button:hover {
  border-color: rgba(15, 118, 110, .42);
  box-shadow: 0 10px 24px rgba(43, 35, 25, .08);
  transform: translateY(-1px);
}

.title-strategy-grid button.selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, #f0fdfa, #fffdfa);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .3), 0 14px 28px rgba(15, 118, 110, .09);
}

.title-strategy-grid button.selected::after {
  content: "선택됨";
  justify-self: start;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.title-strategy-grid small {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
}

.title-strategy-grid strong {
  font-size: 13px;
  line-height: 1.35;
}

.title-strategy-grid span,
.title-strategy-grid em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
}

.title-selection-editor {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, .2);
  border-radius: 8px;
  background: rgba(240, 253, 250, .45);
}

.title-selection-editor .field {
  margin: 0;
}

.title-selection-editor small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.today-keyword-metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.today-keyword-metrics b,
.today-keyword-metrics em {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.today-keyword-metrics em {
  color: var(--muted);
  font-weight: 800;
}

.today-keyword-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.today-keyword-actions button {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.source-picker {
  margin: 12px 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.source-picker summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.source-list label {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-size: 12px;
}

.source-list input {
  width: auto;
}

.source-list small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.top-opportunities {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.top-opportunities h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.keyword-decision-board {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.decision-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, .28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .10), transparent 46%),
    #fffdfa;
  box-shadow: 0 14px 32px rgba(43, 35, 25, .08);
}

.decision-hero h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.22;
}

.decision-hero span,
.decision-lane p,
.decision-lane small,
.decision-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.decision-score {
  display: grid;
  place-items: center;
  min-height: 88px;
  border-radius: 8px;
  background: #151515;
  color: white;
}

.decision-score strong {
  color: #f7d58b;
  font-size: 34px;
  line-height: 1;
}

.decision-score small {
  margin-top: 4px;
  color: #d7d2ca;
  font-size: 11px;
}

.decision-actions {
  display: grid;
  gap: 8px;
  min-width: 156px;
}

.decision-actions button {
  width: 100%;
  min-height: 38px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.decision-lane {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.decision-lane > span {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.decision-lane strong {
  font-size: 17px;
  line-height: 1.32;
}

.decision-lane .score-cell {
  margin-top: 2px;
}

.decision-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.decision-meta article {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, .78);
}

.decision-meta strong {
  display: block;
  font-size: 18px;
}

.trend-support-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .06), transparent 48%),
    #fff;
}

.trend-support-panel.UNAVAILABLE,
.trend-support-panel.FAILED {
  border-color: rgba(180, 83, 9, .22);
  background:
    linear-gradient(135deg, rgba(180, 83, 9, .06), transparent 48%),
    #fffdfa;
}

.trend-support-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.trend-support-head span {
  display: block;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.trend-support-head strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.trend-support-head small,
.trend-support-panel p,
.trend-match-list span,
.trend-evidence-box span,
.trend-evidence-box small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.trend-support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.trend-support-grid article {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, .8);
}

.trend-support-grid b {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.trend-support-grid span {
  color: var(--muted);
  font-size: 11px;
}

.trend-match-list {
  display: grid;
  gap: 7px;
}

.trend-match-list div,
.trend-evidence-box {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(43, 35, 25, .10);
  border-radius: 8px;
  background: #fffdfa;
}

.trend-match-list strong,
.trend-evidence-box strong {
  color: var(--ink);
  font-size: 13px;
}

.trend-evidence-box.OBSERVED {
  border-color: rgba(15, 118, 110, .28);
  background: #f0fdfa;
}

.trend-evidence-box > div {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.trend-evidence-box a {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(43, 35, 25, .10);
  border-radius: 7px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.trend-evidence-box a:hover {
  border-color: rgba(15, 118, 110, .38);
}

.opportunity-list {
  display: grid;
  gap: 8px;
}

.opportunity {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 10px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.opportunity:hover {
  background: var(--soft);
}

.opportunity span {
  grid-row: span 4;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #151515;
  color: #f7d58b;
  font-weight: 900;
}

.opportunity strong {
  font-size: 16px;
  line-height: 1.35;
}

.opportunity small,
.opportunity em,
.opportunity i {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.opportunity i {
  color: var(--accent);
  font-weight: 700;
}

.result-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(130px, .75fr));
  gap: 10px;
  align-items: end;
  margin: 16px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-toolbar .field {
  margin-bottom: 0;
}

.keyword-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.keyword-table th,
.keyword-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.keyword-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.keyword-table tr {
  cursor: pointer;
}

.keyword-table tr:hover {
  background: var(--soft);
}

.keyword-table tr:focus {
  outline: 2px solid rgba(15, 118, 110, .35);
  outline-offset: -2px;
  background: #f0fdfa;
}

.keyword-table td strong,
.keyword-table td small {
  display: block;
}

.keyword-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.rank-cell {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.platform-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #151515;
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.overall-score {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.score-cell {
  display: grid;
  gap: 4px;
  min-width: 64px;
}

.score-cell b {
  font-variant-numeric: tabular-nums;
}

.score-cell i,
.score-breakdown-row i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe4da;
}

.score-cell em,
.score-breakdown-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.keyword-mobile-list {
  display: none;
}

.evidence {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
}

.evidence.OBSERVED {
  color: #11645a;
  background: #eefaf7;
}

.evidence.DERIVED {
  color: #1d4ed8;
  background: #eff6ff;
}

.evidence.MOCK {
  color: #9a5b16;
  background: #fff7ed;
}

.evidence.INFERRED,
.evidence.UNAVAILABLE {
  color: var(--muted);
  background: var(--soft);
}

.keyword-detail {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
}

.selection-basket {
  display: grid;
  gap: 8px;
  margin: -4px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fffc, #f5f2ed);
  color: var(--muted);
  font-size: 12px;
}

.selection-basket strong,
.selection-basket span {
  display: block;
}

.selection-basket strong {
  color: var(--ink);
}

.selection-basket span {
  color: var(--muted);
  line-height: 1.4;
}

.selection-basket div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selection-chip-row {
  max-height: 36px;
  overflow: hidden;
}

.selection-basket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selection-basket button:not(.run) {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
}

.selection-basket > button:not(.run) {
  justify-self: start;
  border-radius: 7px;
}

.selection-basket button.primary {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 800;
}

.handoff-popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 21, 21, .24);
  backdrop-filter: blur(3px);
}

.handoff-popup-card {
  width: min(460px, 100%);
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(216, 177, 95, .35);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(24, 20, 15, .24);
}

.handoff-popup-card h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.handoff-popup-card p,
.handoff-popup-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.handoff-popup-summary,
.handoff-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.handoff-popup-summary span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: #4c4439;
  font-size: 12px;
  font-weight: 800;
}

.handoff-popup-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.detail-decision {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, var(--soft));
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 14px;
}

.detail-actions button {
  flex: 1 1 auto;
}

.detail-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.detail-decision strong {
  display: block;
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.detail-decision span {
  color: var(--accent);
  font-weight: 800;
}

.detail-decision b {
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.detail-decision small {
  color: var(--muted);
}

.keyword-detail h4 {
  margin: 16px 0 8px;
  font-size: 13px;
}

.reason-list {
  margin: 0;
  padding-left: 18px;
  color: #39342d;
}

.reason-list li + li {
  margin-top: 6px;
}

.score-breakdown {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.score-breakdown-row {
  display: grid;
  grid-template-columns: 94px 44px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.score-breakdown-row b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.evidence-list {
  display: grid;
  gap: 6px;
}

.evidence-list span {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.evidence-list b {
  color: var(--ink);
}

.evidence-list small {
  color: var(--muted);
}

.compact-raw {
  margin-top: 10px;
}

.content-actions {
  display: grid;
  gap: 8px;
}

.content-actions button {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.content-actions b,
.content-actions span {
  display: block;
}

.content-actions b {
  margin-bottom: 3px;
  font-size: 12px;
  color: var(--accent);
}

.content-actions small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.source-health {
  display: grid;
  gap: 8px;
}

.source-health-summary {
  padding: 11px;
  border: 1px solid rgba(15, 118, 110, .26);
  border-radius: 8px;
  background: #f0fdfa;
}

.source-health-summary strong,
.source-health-summary span {
  display: block;
}

.source-health-summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.source-health-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.source-health-item strong,
.source-health-item span,
.source-health-item small,
.source-health-item p {
  display: block;
}

.source-health-item span {
  margin-top: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.source-health-item small,
.source-health-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.raw-output {
  margin-top: 12px;
}

.raw-output summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}

pre {
  max-height: 520px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: #151515;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.55;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.system-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.system-grid strong { display: block; margin-bottom: 6px; }
.system-grid span { color: var(--muted); font-size: 13px; }

.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.settings-column {
  display: grid;
  gap: 14px;
}

.settings-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 177, 95, .09), transparent 38%),
    #fff;
}

.settings-block-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.settings-block-head > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #151515;
  color: #f7d58b;
  font-size: 12px;
  font-weight: 900;
}

.settings-block-head strong,
.settings-block-head small {
  display: block;
}

.settings-block-head strong {
  font-size: 17px;
}

.settings-block-head small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-block .field-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.settings-block .field-help code {
  color: var(--ink);
  font-size: 11px;
}

.settings-test-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.settings-test-row .field-help {
  margin: 0;
}

.user-list,
.license-result {
  display: grid;
  gap: 8px;
}

.user-row,
.license-result article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.user-row.master {
  border-color: rgba(216, 177, 95, .55);
  background: #fff8e6;
}

.user-row strong,
.user-row span,
.license-result strong,
.license-result span {
  display: block;
}

.user-row span,
.license-result span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.user-row code,
.settings-endpoint code {
  padding: 5px 7px;
  border-radius: 6px;
  background: #151515;
  color: #f7d58b;
  font-size: 11px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}

.permission-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3a342c;
  font-size: 13px;
}

.permission-grid input {
  width: auto;
}

.license-result {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.license-result .issued {
  border-color: rgba(15, 118, 110, .34);
  background: #f0fdfa;
}

.settings-endpoint {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 11px;
  border: 1px solid rgba(15, 118, 110, .20);
  border-radius: 8px;
  background: #f0fdfa;
}

.settings-endpoint strong {
  font-size: 13px;
}

.usage-board,
.usage-log-list {
  display: grid;
  gap: 10px;
}

.usage-user {
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, .24);
  border-radius: 8px;
  background: #f0fdfa;
}

.usage-user strong,
.usage-user span {
  display: block;
}

.usage-user span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.usage-grid article,
.usage-log-list article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.usage-grid strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.usage-grid span,
.usage-grid small,
.usage-log-list span,
.usage-log-list small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.usage-log-list article.success {
  border-color: rgba(15, 118, 110, .26);
  background: #f0fdfa;
}

.usage-log-list article.blocked,
.usage-log-list article.error {
  border-color: rgba(185, 28, 28, .24);
  background: #fff1f2;
}

.compact-head {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

[hidden] {
  display: none !important;
}

/* 사용자 역할별 로그인·설정 레이어 */
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.session-user {
  max-width: 190px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 1200;
  overflow-y: auto;
  max-height: 100vh;
  margin: 0;
  padding: 22px clamp(14px, 4vw, 52px) 48px;
  border: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 24px 90px rgba(21, 21, 21, .28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.settings-modal:not([hidden]) > .panel-head,
.settings-modal:not([hidden]) > .section-lead,
.settings-modal:not([hidden]) > #settingsStatus,
.settings-modal:not([hidden]) > .settings-layout {
  width: min(1360px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.settings-modal:not([hidden]) > .panel-head {
  position: sticky;
  top: -22px;
  z-index: 2;
  padding: 14px 0 12px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.settings-open { overflow: hidden; }

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 8%, rgba(216, 177, 95, .18), transparent 32%),
    linear-gradient(135deg, #f5f2ed, #eee8df);
}

.login-card {
  width: min(820px, 100%);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 250, .92);
  box-shadow: 0 28px 90px rgba(43, 35, 25, .16);
}

.login-brand { margin-bottom: 34px; }
.login-card h1 { max-width: none; margin-bottom: 10px; font-size: clamp(26px, 4vw, 38px); }
.login-lead { max-width: 640px; margin: 0 0 26px; color: var(--muted); line-height: 1.65; }
.login-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.login-panel { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.login-panel-head { display: flex; align-items: center; gap: 9px; }
.login-panel-head span { color: var(--accent-2); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.login-panel-head strong { font-size: 17px; }
.login-panel p { min-height: 42px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.login-status { min-height: 20px; margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.login-status[data-status="error"] { color: var(--danger); }
.login-status[data-status="success"] { color: var(--success); }

body.theme-night .login-screen { background: radial-gradient(circle at 20% 8%, rgba(212, 184, 134, .1), transparent 32%), #141519; }
body.theme-night .login-card { background: rgba(28, 30, 36, .96); }

@media (max-width: 760px) {
  .topbar-actions { width: 100%; justify-content: flex-end; }
  .login-screen { padding: 14px; }
  .login-grid { grid-template-columns: 1fr; }
  .login-panel p { min-height: 0; }
  .settings-modal:not([hidden]) { padding: 14px 10px 32px; }
  .settings-modal:not([hidden]) > .panel-head { top: -14px; }
}

@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  nav { grid-template-columns: repeat(4, 1fr); }
  .workspace { grid-template-columns: 1fr; }
  .grid.two, .grid.three, .grid.four, .grid.dense, .run-block-body, .system-grid, .settings-layout, .permission-grid, .usage-grid, .command-strip, .mode-cards, .dashboard-metrics, .output-preview, .asset-placeholder, .asset-audit-board, .asset-recommendation-grid, .ratio-grid, .mascot-decision, .source-analysis-grid, .editor-automation-board, .publish-status-grid, .naver-editor-board, .channel-report-grid, .channel-console-grid, .card-review-item, .today-keyword-grid, .today-decision-board, .today-hero-grid, .title-strategy-grid, .today-hero-actions, .trend-support-grid, .editor-style-grid, .actual-image-audit-list { grid-template-columns: 1fr; }
  .run-block-action { border-left: 0; border-top: 1px solid var(--line); }
  .today-keyword-head, .today-keyword-controls { flex-direction: column; align-items: stretch; }
  .publish-flow-head { flex-direction: column; }
  .publish-flow-head .run { width: 100%; }
  .channel-console-head { flex-direction: column; }
  .trend-support-head { flex-direction: column; }
  .today-keyword-note { grid-template-columns: 1fr; }
  .work-mode-tabs { grid-template-columns: repeat(2, 1fr); }
  .analysis-control, .result-toolbar, .degraded-banner, .asset-control, .asset-item { grid-template-columns: 1fr; }
  .asset-thumb {
    width: 100%;
    height: auto;
    max-height: 220px;
    aspect-ratio: 16 / 9;
  }
  .asset-actions {
    grid-template-columns: repeat(2, 1fr);
    min-width: 0;
  }
  .source-list { grid-template-columns: 1fr; }
  .keyword-table { display: none; }
  .keyword-mobile-list {
    display: grid;
    gap: 8px;
  }
  .mobile-keyword-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 10px;
    width: 100%;
    padding: 12px;
    text-align: left;
    background: #fff;
  }
  .mobile-keyword-item span {
    grid-row: span 3;
    color: var(--accent);
    font-weight: 900;
  }
  .mobile-keyword-item strong,
  .mobile-keyword-item small {
    display: block;
  }
  .mobile-keyword-item small {
    color: var(--muted);
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  main { padding: 18px; }
  h1 { font-size: 24px; }
  .panel { padding: 14px; }
  .topbar, .panel-head { flex-direction: column; }
  .inline-actions { width: 100%; flex-wrap: wrap; }
  .inline-actions > * { flex: 1 1 auto; text-align: center; }
  .segmented { grid-template-columns: repeat(2, 1fr); }
  nav { grid-template-columns: repeat(2, 1fr); }
  .blog-render h1 { font-size: 25px; }
  .blog-render header,
  .blog-render figure,
  .blog-render-sections,
  .blog-render footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .blog-render-lead,
  .blog-checklist-preview,
  .blog-disclosure {
    margin-left: 16px;
    margin-right: 16px;
  }
  .score-breakdown-row {
    grid-template-columns: 86px 42px 1fr;
  }
}

.subscribe-suggestions {
  margin: 4px 0 10px 18px;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #8a8f98);
}
.subscribe-suggestions li {
  margin-bottom: 2px;
}

.asset-candidates {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.asset-candidate {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border, #2c2f36);
  border-radius: 10px;
  padding: 10px;
  max-width: 420px;
}
.asset-candidate img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
}
.asset-candidate-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}
.asset-candidate-thumb:hover img { transform: scale(1.04); }
.asset-candidate-thumb img { transition: transform .18s ease; }
.asset-candidate-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}
.asset-candidate-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.asset-candidate-actions button {
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 10px;
}

.asset-original-modal[hidden] { display: none !important; }
.asset-original-modal {
  position: fixed;
  inset: 0;
  z-index: 2700;
  display: grid;
  place-items: center;
  padding: 18px;
}
.asset-original-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 12, .78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.asset-original-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(96vw, 1500px);
  height: min(94vh, 1100px);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  color: #f7f2e9;
  background: #17181d;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .46);
}
.asset-original-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
}
.asset-original-head h2 { color: #fff; font-size: 17px; }
.asset-original-head .eyebrow { color: #d8b15f; }
.asset-original-head .ghost { color: #f7f2e9; border-color: rgba(255, 255, 255, .25); }
.asset-original-stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 10px;
  background: #0b0c0f;
}
.asset-original-stage img {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  image-rendering: auto;
}
.asset-original-info {
  min-height: 20px;
  padding-top: 10px;
  color: #c8c2b8;
  font-size: 12px;
}
body.asset-original-open { overflow: hidden; }

@media (max-width: 760px) {
  .asset-original-modal { padding: 8px; }
  .asset-original-dialog { width: 100vw; height: 96vh; padding: 10px; }
  .asset-original-head { flex-direction: column; }
  .asset-original-head .inline-actions { width: 100%; }
  .asset-original-head .inline-actions > * { flex: 1 1 auto; text-align: center; }
}

/* ================================================
   스튜디오 나이트 럭셔리 레이어 (토큰 오버라이드)
   ================================================ */
:root {
  --radius: 12px;
  --glass-bg: rgba(255, 253, 250, 0.78);
  --glass-line: rgba(21, 21, 21, 0.08);
}

body.theme-night {
  --bg: #141519;
  --panel: #1c1e24;
  --ink: #ecebe7;
  --muted: #9a978f;
  --line: #2b2d34;
  --accent: #d4b886;
  --accent-2: #d4b886;
  --gold: #d4b886;
  --soft: #22242b;
  --danger: #e0706a;
  --success: #7fbfa2;
  --warning: #d4b886;
  --info: #8fb4d9;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --glass-bg: rgba(28, 30, 36, 0.72);
  --glass-line: rgba(255, 255, 255, 0.08);
}

body.theme-night main {
  background:
    radial-gradient(circle at 88% 0%, rgba(212, 184, 134, 0.07), transparent 30%),
    linear-gradient(180deg, #141519, #131418);
}

body.theme-night .sidebar {
  background: linear-gradient(180deg, #101114, #0d0e11 58%, #12100d);
}

body.theme-night nav a.active,
body.theme-night nav a:hover { background: #24262d; }

/* 촉각 피드백 + 모양 잠금 */
button { transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease; }
button:active { transform: scale(0.98); }

/* 상단바 글라스 (스크롤 시 컨텍스트 유지) */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  padding: 14px 18px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow);
}

@media (prefers-reduced-transparency: reduce) {
  .topbar { background: var(--panel); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.theme-toggle {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* 토스트 */
#toastHost {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-line);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--info);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast-show { opacity: 1; transform: translateY(0); }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }

#runProgressOverlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 16, 14, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#runProgressOverlay[hidden] { display: none !important; }
body.run-progress-open { overflow: hidden; }
.run-progress-card {
  width: min(440px, 100%);
  padding: 28px 26px 22px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--glass-line);
  background: var(--glass-bg);
  box-shadow: var(--shadow);
  text-align: left;
}
.run-progress-card .eyebrow {
  margin: 0 0 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
}
.run-progress-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}
.run-progress-msg {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.run-progress-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
  min-height: 28px;
}
.run-progress-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; transform: none; }
  button:active { transform: none; }
}

/* 작업 스테퍼 */
.job-stepper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.job-step {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.job-step.step-done {
  border-color: var(--accent);
  color: var(--accent);
}
.job-step.step-active {
  border-color: var(--accent);
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.job-step-sep {
  width: 12px;
  height: 1px;
  background: var(--line);
}

/* 오늘의 스튜디오 */
.studio-today {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0 22px;
}
.studio-today:empty { display: none; }
.studio-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.studio-card > small {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.studio-number {
  display: block;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
}
.studio-number span {
  margin-left: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.studio-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.studio-link:hover { text-decoration: underline; }
.studio-gauge {
  display: grid;
  grid-template-columns: 92px 1fr 34px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}
.studio-gauge strong { color: var(--ink); text-align: right; }
.studio-gauge-track {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  overflow: hidden;
}
.studio-gauge-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.studio-keywords {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.9;
}
.studio-empty { margin: 0; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .studio-today { grid-template-columns: 1fr; }
}

/* 상단바 슬림화 (스티키 헤더는 컨텍스트만) */
.topbar h1 { font-size: 19px; line-height: 1.35; max-width: none; }
.topbar .eyebrow { margin-bottom: 3px; }

/* 아이보리 럭스 폴리시 — 라이트가 기본, 샴페인 디테일 */
:root {
  --lux: #8a6d3b;            /* 라이트 배경 위 가독 가능한 딥 샴페인 */
  --lux-soft: rgba(216, 177, 95, 0.16);
  --shadow: 0 14px 40px rgba(120, 96, 58, 0.12);
}
body.theme-night {
  --lux: #d4b886;
  --lux-soft: rgba(212, 184, 134, 0.14);
}

/* 컴포넌트 액센트를 샴페인으로 통일 */
.studio-gauge-fill { background: linear-gradient(90deg, var(--lux), #d8b15f); }
.studio-card > small { color: var(--lux); }
.studio-link { color: var(--lux); }
.job-step.step-done { border-color: var(--lux); color: var(--lux); }
.job-step.step-active {
  border-color: var(--lux);
  background: var(--lux-soft);
}
.theme-toggle:hover { border-color: var(--lux); color: var(--lux); }
.toast-success { border-left-color: var(--lux); }

/* 라이트 패널에 은은한 깊이 (종이 질감의 고급감) */
.studio-card,
.asset-candidate {
  border-color: color-mix(in srgb, var(--lux) 18%, var(--line));
}
.studio-card {
  background: linear-gradient(180deg, var(--panel), color-mix(in srgb, var(--panel) 92%, var(--lux-soft)));
}

/* Instatoon IP panel */
.nested-panel {
  margin: 14px 0 6px;
  padding: 18px 18px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8 0%, #f7f1e7 100%);
}
.nested-panel .panel-head.compact { margin-bottom: 8px; }
.nested-panel h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.nested-panel .hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
