:root {
  --brand: #1F3A8A;
  --brand-dark: #172C6B;
  --brand-soft: #E8EDFB;
  --brand-softer: #F2F5FD;
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #F7F8FB;
  --text: #141B2D;
  --text-2: #4B556B;
  --muted: #8A93A6;
  --ok: #138A5B;
  --ok-soft: #E3F5EC;
  --bad: #C2372F;
  --bad-soft: #FCE9E7;
  --warn: #A86A00;
  --warn-soft: #FFF3D9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 6px 20px rgba(20, 30, 60, .06);
  --shadow-lg: 0 2px 6px rgba(20, 30, 60, .06), 0 16px 40px rgba(20, 30, 60, .10);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14px; line-height: 1.55; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; min-width: 1200px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* 골격 */
.shell { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }
.side { background: var(--surface); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; box-shadow: 1px 0 0 rgba(20, 30, 60, .04), 4px 0 20px rgba(20, 30, 60, .03); z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.brand b { display: block; font-size: 16px; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: -2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: var(--text-2); font-weight: 500; }
.nav-item:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.side-foot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 7px; vertical-align: 1px; }
.side-foot.ok::before { background: var(--ok); }
.side-foot.bad::before { background: var(--bad); }
.side-foot.bad { color: var(--bad); background: var(--bad-soft); }

.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; background: var(--bg); }
.top h1 { font-size: 22px; font-weight: 800; }
.product-pick { display: flex; align-items: center; gap: 10px; background: var(--surface); padding: 6px 6px 6px 14px; border-radius: 12px; box-shadow: var(--shadow); }
.product-pick span { color: var(--muted); font-size: 13px; font-weight: 600; }
.product-pick select { border: 0; background: var(--brand-softer); border-radius: 9px; padding: 7px 30px 7px 12px; font-weight: 700; color: var(--brand); min-width: 200px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231F3A8A' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.view { flex: 1; overflow: auto; padding: 4px 28px 28px; display: flex; flex-direction: column; gap: 16px; }

/* 카드 */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 16px; font-weight: 750; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 650; white-space: nowrap; transition: background .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.soft:hover:not(:disabled) { background: #DCE3F8; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.icon-only { padding: 9px; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-btn { border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 13px; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* 배지·태그 */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge.muted { background: #EEF0F4; color: var(--text-2); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); font-size: 12px; margin: 2px 4px 2px 0; }
.tag.brand { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.k { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }

/* 입력 */
.inp { border: 0; background: var(--surface-2); border-radius: 9px; padding: 9px 12px; min-width: 0; outline: none; box-shadow: inset 0 0 0 1px rgba(20, 30, 60, .06); }
.inp:focus { box-shadow: inset 0 0 0 2px var(--brand); background: #fff; }
.inp.sm { padding: 6px 10px; font-size: 13px; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 600; flex: 1 1 160px; }
.form-row label.check { flex-direction: row; align-items: center; flex: 0 0 auto; padding-bottom: 9px; }
.form-row .btn { flex: none; }
.inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.top-gap { margin-top: 18px; }

/* 표 */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); padding: 10px 12px; background: var(--surface-2); white-space: nowrap; }
.tbl th:first-child { border-radius: 9px 0 0 9px; }
.tbl th:last-child { border-radius: 0 9px 9px 0; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid #EEF0F4; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--brand-softer); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .right { text-align: right; }
.tbl .w-80 { width: 80px; } .tbl .w-100 { width: 100px; } .tbl .w-120 { width: 120px; } .tbl .w-200 { width: 200px; }
.tbl tr.row-bad td { background: #FFF8F7; }
.cell-file { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* 상태 */
.empty { text-align: center; padding: 28px 16px; color: var(--muted); background: var(--surface-2); border-radius: 12px; }
.empty b { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 4px; }
.empty p { margin: 0 0 10px; font-size: 13px; }
.empty.error { background: var(--bad-soft); color: var(--bad); }
.empty.error b { color: var(--bad); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px; justify-content: center; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; }
.spin.sm { width: 12px; height: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { padding: 10px 14px; border-radius: 10px; font-size: 13px; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 50; font-weight: 600; }
.toast.ok { background: var(--brand-dark); }
.toast.bad { background: var(--bad); }

/* 홈 */
.view-home { overflow: hidden; }
.home { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; height: 100%; min-height: 0; }
.chat { display: flex; flex-direction: column; padding: 0; min-height: 0; overflow: hidden; position: relative; }
.chat.drop::after { content: "여기에 놓으면 자료로 올립니다"; position: absolute; inset: 8px; border-radius: 14px; background: rgba(232, 237, 251, .92); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 16px; outline: 2px dashed var(--brand); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 18px 24px; background: linear-gradient(180deg, var(--brand-softer), #fff); }
.chat-head b { display: block; font-size: 15px; }
.chat-head small { color: var(--muted); font-size: 12.5px; }
.agent-ava { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.agent-ava.sm { width: 30px; height: 30px; border-radius: 10px; }
.agent-ava.lg { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 14px; }
.chat-list { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.chat-empty { margin: auto; text-align: center; color: var(--text-2); }
.chat-empty b { font-size: 18px; display: block; margin-bottom: 4px; color: var(--text); }
.chat-empty p { margin: 0; color: var(--muted); }
.msg { display: flex; gap: 10px; max-width: 100%; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; max-width: 72%; }
.msg.agent .bubble { background: var(--surface-2); border-radius: 4px 16px 16px 16px; }
.bubble { padding: 11px 15px; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.agent-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; max-width: 86%; }
.agent-body .bubble { align-self: flex-start; }
.msg-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.steps { list-style: none; margin: 0; padding: 12px 14px; background: #fff; border-radius: 12px; box-shadow: inset 0 0 0 1px #EEF0F4; display: flex; flex-direction: column; gap: 7px; align-self: flex-start; min-width: 280px; }
.steps li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.step-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #EEF0F4; color: var(--muted); }
.steps li.done .step-dot { background: var(--ok-soft); color: var(--ok); }
.steps li.done { color: var(--text); }
.steps li.fail .step-dot { background: var(--bad-soft); color: var(--bad); }
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rcard { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; border-top: 3px solid var(--brand); }
.rcard.t-facts { border-top-color: #5B7BD5; }
.rcard.t-metrics, .rcard.t-leads { border-top-color: var(--ok); }
.rcard.t-publication { border-top-color: #7A5BD5; }
.rc-top { display: flex; justify-content: space-between; align-items: center; }
.rc-type { font-size: 12px; font-weight: 700; color: var(--brand); }
.rc-title { font-size: 14.5px; }
.rc-sum { margin: 0; color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.rc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.composer { padding: 12px 18px 18px; background: #fff; box-shadow: 0 -1px 0 #EEF0F4; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; background: var(--surface-2); border-radius: 14px; padding: 8px; box-shadow: inset 0 0 0 1px rgba(20, 30, 60, .06); }
.composer-row:focus-within { box-shadow: inset 0 0 0 2px var(--brand); background: #fff; }
.chat-input { flex: 1; border: 0; background: transparent; resize: none; outline: none; padding: 8px 6px; min-height: 40px; max-height: 160px; }
.kind-select { border: 0; background: #fff; border-radius: 8px; font-size: 12.5px; padding: 8px; color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(20, 30, 60, .08); align-self: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand); padding: 5px 8px 5px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.chip.muted { background: var(--surface-2); color: var(--muted); }
.chip.light { background: rgba(255, 255, 255, .18); color: #fff; }
.chip-x { border: 0; background: none; color: inherit; padding: 2px; display: inline-flex; }
.revise-bar { display: flex; justify-content: space-between; align-items: center; background: var(--warn-soft); color: var(--warn); font-weight: 650; padding: 8px 12px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; }

.home-side { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; min-height: 0; padding-bottom: 4px; }
.side-card { padding: 18px 18px; }
.side-card .card-head { margin-bottom: 12px; }
.side-card .card-head h2 { font-size: 14.5px; }
.side-card .empty { padding: 16px 10px; font-size: 13px; }
.sugg { display: flex; flex-direction: column; gap: 8px; }
.sugg-item { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 0; background: var(--brand-softer); color: var(--text); padding: 11px 12px; border-radius: 11px; font-size: 13px; line-height: 1.45; }
.sugg-item .ico { color: var(--brand); margin-top: 1px; }
.sugg-item:hover { background: var(--brand-soft); }
.prod-cards { display: flex; flex-direction: column; gap: 8px; }
.prod-card { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.prod-card b { display: block; font-size: 13.5px; }
.prod-card small { color: var(--muted); font-size: 12px; }
.prod-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.prod-stats div { background: #fff; border-radius: 9px; padding: 6px 8px; text-align: center; }
.prod-stats em { display: block; font-style: normal; font-weight: 800; font-size: 16px; color: var(--brand); font-variant-numeric: tabular-nums; }
.prod-stats span { font-size: 11.5px; color: var(--muted); }
.queue { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-item { background: var(--brand-softer); border-radius: 12px; padding: 12px; color: var(--text-2); font-size: 12.5px; }
.q-item:hover { text-decoration: none; background: var(--brand-soft); }
.q-item em { display: block; font-style: normal; font-size: 24px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.q-item.bad { background: var(--bad-soft); }
.q-item.bad em { color: var(--bad); }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-list li { display: grid; grid-template-columns: 78px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.mini-date { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.mini-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-title small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.funnel-mini { display: flex; flex-direction: column; gap: 7px; }
.fm-row { display: grid; grid-template-columns: 34px 1fr 36px; gap: 8px; align-items: center; font-size: 12.5px; }
.fm-label { color: var(--text-2); }
.fm-bar { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.fm-bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.fm-row b { text-align: right; font-variant-numeric: tabular-nums; }
.rev { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rev div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.rev span { display: block; font-size: 12px; color: var(--muted); }
.rev b { font-size: 15px; font-variant-numeric: tabular-nums; }

/* 콘텐츠 */
.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.c-list-card { position: sticky; top: 0; max-height: calc(100vh - 110px); display: flex; flex-direction: column; padding: 18px; }
.c-list-card > div:last-child { overflow-y: auto; }
.c-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.c-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; color: var(--text); }
.c-item:hover { background: var(--surface-2); text-decoration: none; }
.c-item.on { background: var(--brand-soft); }
.c-item-top { display: flex; justify-content: space-between; align-items: center; }
.c-item small { color: var(--muted); font-size: 12px; }
.chan { font-size: 12px; font-weight: 700; color: var(--brand); }
.detail-stack { display: flex; flex-direction: column; gap: 16px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.detail-head .btn-row { flex-wrap: nowrap; }
.detail-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.detail-meta small { color: var(--muted); }
.detail-title { font-size: 20px; font-weight: 800; }
.revise-row { display: flex; gap: 8px; margin-top: 16px; }
.revise-row .inp { flex: 1; }
.track { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text-2); background: var(--surface-2); padding: 9px 12px; border-radius: 10px; }
.track a { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.detail-col { display: flex; flex-direction: column; gap: 16px; }
.detail-col .form-row label { flex-basis: 100%; }
.score { font-weight: 800; padding: 4px 10px; border-radius: 8px; font-size: 13px; }
.score.ok { background: var(--ok-soft); color: var(--ok); }
.score.bad { background: var(--bad-soft); color: var(--bad); }
.md { font-size: 15px; line-height: 1.75; color: var(--text); }
.md h1, .md h2, .md h3 { margin: 1.2em 0 .5em; line-height: 1.35; }
.md h1 { font-size: 22px; } .md h2 { font-size: 19px; } .md h3 { font-size: 16.5px; }
.md p { margin: 0 0 1em; }
.md img { max-width: 100%; border-radius: 12px; }
.md table { border-collapse: collapse; margin: 1em 0; }
.md td, .md th { padding: 6px 10px; background: var(--surface-2); border: 2px solid #fff; }
.md blockquote { margin: 1em 0; padding: 10px 16px; background: var(--brand-softer); border-radius: 10px; color: var(--text-2); }
.slider { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.slide-frame { flex: 1; background: var(--surface-2); border-radius: 14px; aspect-ratio: 1 / 1; max-height: 460px; display: grid; place-items: center; overflow: hidden; position: relative; }
.slide-frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.slide-count { position: absolute; bottom: 10px; right: 12px; background: rgba(20, 27, 45, .7); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.slide-btn { border: 0; background: #fff; width: 38px; height: 38px; border-radius: 50%; box-shadow: var(--shadow); display: grid; place-items: center; color: var(--text-2); }

/* 자료 */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px; border-radius: 14px; background: var(--brand-softer); color: var(--brand); cursor: pointer; outline: 2px dashed #C5D0F0; outline-offset: -8px; }
.dropzone.on, .dropzone:hover { background: var(--brand-soft); }
.dropzone small { color: var(--muted); }

/* 사실 카드 */
.groups { display: flex; flex-direction: column; gap: 22px; }
.group-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.group-head b { font-size: 15px; }
.group-head small { color: var(--muted); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.seg button:hover { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.guide { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.tag-label { font-size: 12px; color: var(--muted); font-weight: 600; width: 78px; flex: none; }
.guide .tag { background: #fff; }

/* 전략 */
.seg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.seg-card { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; }
.seg-card p { margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.strat-list { display: flex; flex-direction: column; gap: 16px; }
.strat { background: var(--surface-2); border-radius: 14px; padding: 18px 20px; }
.strat-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.strat-head h3 { font-size: 17px; margin-top: 2px; }
.appeals { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.appeal { background: #fff; border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 1fr 1.2fr 1.6fr; gap: 16px; }
.ap-facts ul { margin: 0; padding-left: 16px; font-size: 13px; }
.ap-facts li { margin-bottom: 4px; }
.ap-facts small { color: var(--muted); margin-left: 6px; font-size: 11.5px; }
.strat-foot { display: flex; gap: 32px; flex-wrap: wrap; }

/* 캘린더 */
.week-nav { display: flex; align-items: center; gap: 6px; }
.week-label { font-size: 16px; min-width: 130px; text-align: center; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.day { background: var(--surface-2); border-radius: 12px; padding: 10px; min-height: 280px; display: flex; flex-direction: column; gap: 8px; }
.day.today { background: var(--brand-softer); box-shadow: inset 0 0 0 2px var(--brand-soft); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 0 2px 4px; }
.day-head b { font-size: 17px; color: var(--text); }
.day.today .day-head b { color: var(--brand); }
.day-empty { color: #B5BCCB; font-size: 12px; text-align: center; margin-top: 10px; }
.pub { background: #fff; border-radius: 10px; padding: 9px 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--brand); }
.pub.st-published { border-left-color: var(--ok); }
.pub.st-failed { border-left-color: var(--bad); }
.pub small { color: var(--muted); font-size: 11.5px; }
.pub b { font-size: 12.5px; line-height: 1.4; }
.pub-foot { display: flex; justify-content: space-between; align-items: center; gap: 4px; flex-wrap: wrap; }

/* 리드 */
.amt-cell { display: flex; align-items: center; gap: 6px; }
.amt-cell .amt { width: 120px; text-align: right; }

/* 성과 */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi small { color: var(--text-2); font-size: 12.5px; }
.kpi.strong { background: var(--brand); color: #fff; }
.kpi.strong span, .kpi.strong small { color: rgba(255, 255, 255, .78); }
.funnel { display: flex; flex-direction: column; gap: 12px; }
.f-row { display: grid; grid-template-columns: 56px 1fr 140px; gap: 14px; align-items: center; }
.f-label { font-weight: 700; color: var(--text-2); }
.f-track { background: var(--surface-2); border-radius: 10px; height: 40px; overflow: hidden; }
.f-bar { height: 100%; border-radius: 10px; display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; color: #fff; min-width: 44px; }
.f-bar.s0 { background: #9DB0E6; } .f-bar.s1 { background: #6A86D6; } .f-bar.s2 { background: #3D5DB8; } .f-bar.s3 { background: var(--brand-dark); }
.f-rate { color: var(--muted); font-size: 12.5px; }

/* 설정 */
.toggles { display: flex; flex-direction: column; gap: 8px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--surface-2); border-radius: 12px; cursor: pointer; }
.toggle-row b { display: block; }
.toggle-row small { color: var(--muted); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #CDD3DF; border-radius: 999px; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }

/* 채널 연동 */
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ch-card { background: var(--surface-2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ch-card.off { opacity: .72; }
.ch-top { display: flex; gap: 12px; align-items: center; }
.ch-top b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.ch-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--brand); box-shadow: var(--shadow); flex: none; }
.ch-ico.sm { width: 28px; height: 28px; border-radius: 8px; }
.ch-ico.c-instagram { color: #C13584; } .ch-ico.c-youtube { color: #D93025; } .ch-ico.c-naver_blog { color: #03A94D; }
.ch-ico.c-facebook { color: #1877F2; } .ch-ico.c-linkedin { color: #0A66C2; } .ch-ico.c-kakao { color: #6B5A00; background: #FEE500; }
.ch-needs { color: var(--muted); font-size: 11.5px; word-break: break-all; }
.ch-foot { margin-top: auto; display: flex; justify-content: flex-end; }
.ch-cell { display: inline-flex; align-items: center; gap: 8px; }
.ch-form-wrap { margin-top: 16px; }
.ch-form { background: var(--brand-softer); border-radius: 14px; padding: 18px 20px; }
.ch-form h3 { font-size: 15px; }
.ch-form .form-row label.narrow { flex: 0 0 90px; }
.ch-form .form-row label.wide { flex: 2 1 320px; }
.sub-note { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.btn-row.end { justify-content: flex-end; flex-wrap: nowrap; }
.confirm-text { font-size: 13px; color: var(--bad); font-weight: 650; }

@media (max-width: 1360px) {
  .home { grid-template-columns: minmax(0, 1fr) 300px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .split { grid-template-columns: 280px minmax(0, 1fr); }
  .appeal { grid-template-columns: 1fr 1fr; }
  .appeal .ap-facts { grid-column: 1 / -1; }
}

/* 글 넘침 정리: 고정 열 너비 표, 말줄임, 보조 칩 */
.tbl.fixed { table-layout: fixed; }
.tbl td, .tbl th { overflow: hidden; }
.tbl .nowrap, .nowrap { white-space: nowrap; }
.tbl th { overflow: hidden; text-overflow: ellipsis; }
.clamp { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; }
.clamp-1 { -webkit-line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }
.clamp.strong { font-weight: 700; }
.tbl.expandable tbody tr { cursor: pointer; }
.tbl.expandable tbody tr.open .clamp { -webkit-line-clamp: unset; display: block; }
.src-chip { display: inline-block; max-width: 100%; padding: 2px 8px; border-radius: 6px; background: #EEF0F4; color: var(--muted); font-size: 11.5px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.cell-file { min-width: 0; max-width: 100%; }
.cell-file .clamp { min-width: 0; }
.amt-cell .amt { width: 110px; }

/* 검수 결과 목록 */
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.check-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.check-list li.bad { background: #FFF5F4; }
.badge.fixed { width: 48px; justify-content: center; }
.check-name { font-weight: 600; font-size: 13.5px; }
.check-detail { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 콘텐츠 목록 */
.c-title { font-weight: 700; font-size: 13.5px; line-height: 1.45; }

/* 전략 근거 사실 */
.ap-facts li { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.ap-facts li .src-chip { align-self: flex-start; max-width: 100%; }
.ap-pain, .ap-main { min-width: 0; }

/* 캘린더 */
.pub-title { font-weight: 700; font-size: 12.5px; line-height: 1.4; }
.pub-result { color: var(--muted); font-size: 11.5px; }
.pub small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 대화 결과 카드: 높이 맞춤, 제목 2줄, 요약 3줄 */
.rcards { grid-auto-rows: 1fr; }
.rcard { min-width: 0; }
.rc-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.4; min-height: 2.8em; }
.rc-sum { line-height: 1.5; min-height: 4.5em; flex: 1; }
.rc-foot { margin-top: auto; padding-top: 6px; }

/* 채널 카드 */
.ch-name { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.ch-top { min-width: 0; }
.needs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.needs-label { font-size: 11.5px; color: var(--muted); width: 100%; }
.code-chip { font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; background: #fff; color: var(--text-2); padding: 2px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px #E3E6EE; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-note { color: var(--muted); font-size: 12px; }
.state-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.state-cell .sub-note { margin-top: 0; max-width: 100%; }

/* 퍼널 보조 글 정렬 */
.f-row { grid-template-columns: 56px minmax(0, 1fr) 96px; }
.f-rate { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fm-row b { white-space: nowrap; }

/* 본문 안 마크다운 표(쇼츠 대본 등): 글자 단위로 꺾이지 않게 최소 폭과 가로 스크롤 */
.md table { display: block; width: 100%; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.md th, .md td { min-width: 120px; word-break: keep-all; overflow-wrap: break-word; vertical-align: top; text-align: left; }
.md th { white-space: nowrap; font-weight: 700; color: var(--text-2); }
.md th:first-child, .md td:first-child { min-width: 48px; white-space: nowrap; }
.md td:nth-child(2) { min-width: 200px; }

/* 메뉴가 늘어 세로 간격을 줄인다 */
.nav-item { padding: 8px 12px; }
.side { gap: 16px; overflow-y: auto; }

/* 대화 결과 카드: 넓은 카드와 데이터 */
.rcards { grid-auto-rows: auto; }
.rcard.wide { grid-column: 1 / -1; }
.rc-sum.short { min-height: 0; -webkit-line-clamp: 2; }
.rc-data { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; }
.rc-kv { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.rc-kv .k { margin: 0; }
.rc-ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 2px; }
.rc-stats { display: flex; gap: 4px; flex-wrap: wrap; }
.eps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.eps li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 8px; padding: 6px 10px; }
.ep-no { font-weight: 700; color: var(--brand); font-size: 12px; white-space: nowrap; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 8px; padding: 4px 8px 4px 4px; }
.swatch i { width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); display: block; }
.swatch small { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--text-2); }
.swatches.big .swatch { padding: 6px 12px 6px 6px; }
.swatches.big .swatch i { width: 32px; height: 32px; border-radius: 8px; }
.swatches.big .swatch small { font-family: inherit; font-size: 12.5px; }

/* 제안서 */
.min0 { min-width: 0; }
.win-theme { margin-top: 14px; background: var(--brand-softer); border-radius: 12px; padding: 12px 16px; }
.win-theme b { font-size: 15.5px; }
.write-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 13px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sub-h { font-size: 15px; margin-bottom: 8px; }
.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.eval-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.eval-row .clamp { min-width: 0; }
.chapters { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }

/* 브랜드 */
.brand-list { display: flex; flex-direction: column; gap: 14px; }
.brand-card { background: var(--surface-2); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.brand-pos { font-size: 15.5px; font-weight: 700; color: var(--text); margin-top: 2px; }
.brand-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; font-size: 13.5px; }
.brand-grid .span2 { grid-column: span 2; }
.tag.avoid { background: var(--bad-soft); color: var(--bad); }
.btn-row.nowrap { flex-wrap: nowrap; }
.cur-brand { display: flex; flex-direction: column; gap: 12px; }

/* 콘텐츠 품질 평가 */
.scores { display: flex; flex-direction: column; gap: 7px; }
.score-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 20px; gap: 10px; align-items: center; font-size: 12.5px; }
.score-label { color: var(--text-2); white-space: nowrap; }
.score-bar { height: 8px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.score-bar i.low { background: var(--bad); }
.score-bar i.high { background: var(--ok); }
.score-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* 캘린더 게시물 주소 */
.pub-link { display: flex; flex-direction: column; gap: 4px; }
.pub-link .inp { width: 100%; }
.pub-link .link-btn { font-size: 12px; text-align: left; }

/* 설정·피드백 */
.ai-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-row label.grow2 { flex: 2 1 260px; }
.revise-row.no-gap { margin-top: 0; }
.analysis { margin: 0 0 12px; line-height: 1.7; }

/* 데모 로그인 */
.login-overlay{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#eef2fb 0%,#f7f8fc 60%,#e9eefb 100%)}
.login-card{width:360px;display:flex;flex-direction:column;gap:12px;padding:36px 32px;border-radius:20px;background:#fff;
  box-shadow:0 24px 60px rgba(19,35,91,.14)}
.login-brand{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}
.login-brand b{font-size:22px;color:#13235b}
.login-brand small{color:#6b7896}
.login-card .btn{height:44px;justify-content:center}
.login-msg{min-height:18px;color:#c0392b;font-size:13px;margin:0}

/* 조치 알림 */
.top-right { display: flex; align-items: center; gap: 12px; }
.bell { position: relative; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--text-2); }
.bell:hover { text-decoration: none; color: var(--brand); }
.bell.hot { color: var(--bad); background: var(--bad-soft); }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.nav-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.txt-bad { color: var(--bad); }
.txt-warn { color: var(--warn); }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-row { background: var(--surface-2); border-radius: 12px; overflow: hidden; box-shadow: inset 4px 0 0 var(--warn); }
.alert-row.p-urgent { background: #FFF7F6; box-shadow: inset 4px 0 0 var(--bad); }
.alert-sum { width: 100%; border: 0; background: none; text-align: left; display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 220px) 84px 110px 18px; gap: 12px; align-items: center; padding: 12px 16px 12px 18px; color: var(--text); }
.alert-sum .ico { color: var(--muted); transition: transform .15s; }
.alert-row.open .alert-sum .ico { transform: rotate(90deg); }
.alert-line { font-weight: 600; }
.alert-who { color: var(--muted); font-size: 12.5px; min-width: 0; }
.alert-sum .badge { justify-self: start; }
.alert-detail { padding: 0 18px 16px; }
.alert-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.alert-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.alert-text { margin: 0; padding: 12px 14px; background: #fff; border-radius: 10px; line-height: 1.6; color: var(--text); box-shadow: inset 3px 0 0 #E3E6EE; }
.alert-src { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px; align-items: center; font-size: 13px; }
.inline-k { margin: 0; }
.reply-box { width: 100%; resize: vertical; min-height: 76px; line-height: 1.55; background: #fff; }
.rcard.t-alert { border-top-color: var(--bad); }
.sugg-item.lv-urgent { background: var(--bad-soft); box-shadow: inset 4px 0 0 var(--bad); }
.sugg-item.lv-urgent .ico { color: var(--bad); }
.sugg-item.lv-high { background: var(--warn-soft); box-shadow: inset 4px 0 0 var(--warn); }
.sugg-item.lv-high .ico { color: var(--warn); }
.lv-tag { margin-right: 6px; font-size: 12px; }
.lv-urgent .lv-tag { color: var(--bad); }
.lv-high .lv-tag { color: var(--warn); }
.logout { background: var(--surface); box-shadow: var(--shadow); height: 44px; padding: 0 14px; border-radius: 12px; color: var(--text-2); }
.logout:hover { color: var(--brand); }
