/* =========================================================
   AI 협업 도우미 — 디자인 C (소프트 카드)
   밝은 색감 · 큰 둥근 모서리 · 부드러운 그림자 · 파랑-보라 포인트
   다크 모드는 Windows/브라우저 설정을 따른다 (prefers-color-scheme).
   ========================================================= */
:root {
  --bg: #eef1f8;
  --main-bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #f1f3f9;
  --text: #1a1f36;
  --text-2: #3c4257;
  --muted: #6b7489;
  --line: #e6e9f2;
  --line-strong: #d9deea;
  --accent: #4f5bd5;
  --accent-2: #8b5cf6;
  --accent-grad: linear-gradient(135deg, #5b6cf0, #8b5cf6);
  --accent-soft: rgba(79, 91, 213, 0.12);
  --accent-text: #4f5bd5;
  --on-accent: #ffffff;
  --ok: #12a26b;
  --ok-soft: #e3f7ee;
  --warn: #c27c05;
  --warn-soft: #fff4dc;
  --err: #e5484d;
  --err-soft: #fdecec;
  --item-hover: #f1f3fa;
  --item-on: #eef0fe;
  --shadow-sm: 0 1px 2px rgba(26, 31, 54, 0.06);
  --shadow: 0 1px 2px rgba(26, 31, 54, 0.04), 0 10px 30px rgba(26, 31, 54, 0.07);
  --shadow-lg: 0 18px 50px rgba(26, 31, 54, 0.16);
  --composer-shadow: 0 12px 36px rgba(79, 91, 213, 0.14);
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --side-w: 288px;
  --mono: Consolas, "D2Coding", "Cascadia Code", monospace;
  color-scheme: light;
  font-family: "Pretendard", "Pretendard Variable", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f17;
    --main-bg: #11131c;
    --surface: #171a26;
    --surface-2: #1c2030;
    --surface-3: #202436;
    --text: #e8eaf3;
    --text-2: #c3c7d8;
    --muted: #8d93ab;
    --line: #262a3b;
    --line-strong: #31364b;
    --accent: #7b86ff;
    --accent-soft: rgba(123, 134, 255, 0.16);
    --accent-text: #a9b0ff;
    --ok: #3fcf8e;
    --ok-soft: rgba(63, 207, 142, 0.14);
    --warn: #f0b03c;
    --warn-soft: rgba(240, 176, 60, 0.13);
    --err: #ff6b70;
    --err-soft: rgba(255, 107, 112, 0.13);
    --item-hover: #1e2232;
    --item-on: #23284a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 12px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
    --composer-shadow: 0 0 0 1px rgba(123, 134, 255, 0.18), 0 16px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.sprite { display: none; }
svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.pre { white-space: pre-wrap; word-break: break-word; }
::selection { background: var(--accent-soft); }

/* ---------- 레이아웃 ---------- */
.mobile-bar { display: none; }
.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  gap: 12px;
  height: 100vh;
  padding: 12px;
}
body.panel-open .app { grid-template-columns: var(--side-w) minmax(0, 1fr) minmax(340px, 34%); }

/* ---------- 사이드바 ---------- */
.sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 16px 10px 14px; }
.brand-logo { display: block; line-height: 0; }
.brand-logo img { display: block; height: auto; max-width: 100%; }
.brand-tag { font-size: 11px; color: var(--muted); padding-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hero-mark { display: block; width: 72px; height: 72px; margin: 0 auto 6px; }
.new-btn {
  margin: 6px 14px 10px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px;
  border: 0; border-radius: var(--r-md); background: var(--accent-grad); color: #fff; font-weight: 650; cursor: pointer;
  box-shadow: 0 8px 20px rgba(91, 108, 240, 0.32); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.new-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(91, 108, 240, 0.4); }
.search {
  margin: 0 14px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); cursor: text;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input, .search input[type="search"], .search input:focus { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; padding: 0; box-shadow: none; height: auto; }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.seg { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--surface-3); }
.list-tabs { margin: 12px 14px 4px; }
.seg > button, .seg > label {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 4px; height: 30px; margin: 0;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.seg > button:hover, .seg > label:hover { color: var(--text); }
.seg > button.selected, .seg > label:has(input:checked) { background: var(--surface); color: var(--text); font-weight: 650; box-shadow: var(--shadow-sm); }
.seg .count { font-size: 11px; color: var(--muted); font-weight: 600; }
.list-warning { margin: 8px 14px 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--err-soft); color: var(--err); font-size: 12px; }

.conv-list { list-style: none; margin: 0; padding: 4px 8px 10px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.conv-list li.empty { color: var(--muted); font-size: 13px; padding: 16px 10px; text-align: center; }
.conv-list li.group-head { font-size: 11.5px; font-weight: 650; color: var(--muted); padding: 12px 10px 4px; letter-spacing: 0.02em; }
.conv-row { position: relative; }
.conv-item {
  display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; padding: 8px 34px 8px 12px; margin: 1px 0;
  border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; color: var(--text-2);
}
.conv-item:hover { background: var(--item-hover); color: var(--text); }
.conv-item.selected { background: var(--item-on); color: var(--text); }
.conv-item.selected::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent-grad); }
.c-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-sub { display: flex; align-items: center; gap: 6px; padding-left: 15px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.c-match { display: block; margin: 3px 0 0 15px; font-size: 11.5px; color: var(--text-2); background: var(--warn-soft); border-radius: 6px; padding: 1px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-more { position: absolute; right: 4px; top: 6px; opacity: 0; }
.conv-row:hover .row-more, .conv-item.selected + .row-more, .row-more:focus-visible { opacity: 1; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.dot-ok { background: var(--ok); }
.dot-run { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.6s ease-in-out infinite; }
.dot-wait { background: var(--warn); }
.dot-err { background: var(--err); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }
.trash-head { display: flex; flex-direction: column; gap: 8px; padding: 8px 6px 10px; font-size: 12px; color: var(--muted); }
.trash-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; margin: 0 2px 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.trash-item .c-title { font-size: 13px; }
.trash-item .c-time { font-size: 11.5px; color: var(--muted); }

.side-info { border-top: 1px solid var(--line); padding: 10px 14px 12px; font-size: 12px; color: var(--muted); }
.side-info summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.side-info summary::-webkit-details-marker { display: none; }
.side-info ul { margin: 8px 0 0; padding-left: 18px; max-height: 32vh; overflow-y: auto; }
.side-info li { margin-bottom: 5px; }
.side-info code { word-break: break-all; font-size: 11px; }
.mode-pill { margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-weight: 650; }

/* ---------- 가운데 (대화) ---------- */
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.conv-head { display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 10px; }
.head-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.head-row h2 { flex: 1; min-width: 0; margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.chips .muted { font-size: 12px; }

.thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 6px 16px; scroll-behavior: smooth; }
.thread-col { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.placeholder { max-width: 560px; margin: 8vh auto 0; text-align: center; color: var(--muted); }
.placeholder .hero { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-grad); color: #fff; box-shadow: 0 12px 30px rgba(91, 108, 240, 0.35); }
.placeholder .hero svg { width: 26px; height: 26px; }
.placeholder h3 { margin: 0 0 6px; color: var(--text); font-size: 20px; letter-spacing: -0.02em; }
.placeholder p { margin: 4px 0; }
.flow-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.flow-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 12.5px; color: var(--text-2); }

/* 메시지 */
.msg { display: flex; flex-direction: column; }
.msg-user { align-items: flex-end; gap: 6px; }
.msg-meta { font-size: 11.5px; color: var(--muted); }
.bubble { max-width: min(78%, 680px); padding: 11px 16px; border-radius: 18px 18px 6px 18px; white-space: pre-wrap; word-break: break-word; }
.msg-user .bubble { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 20px rgba(91, 108, 240, 0.22); }
.msg-user.is-answer .bubble { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.msg-ai { flex-direction: row; gap: 12px; align-items: flex-start; }
.avatar { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; margin-top: 2px; }
.avatar svg { width: 16px; height: 16px; }
.ai-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.bubble-q { align-self: flex-start; max-width: 100%; border-radius: 6px 18px 18px 18px; background: var(--warn-soft); color: var(--text); white-space: normal; display: flex; gap: 8px; }
.bubble-q svg { color: var(--warn); margin-top: 3px; }

/* 진행 단계 표시줄 */
.steps { display: flex; align-items: center; flex-wrap: wrap; row-gap: 6px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); font-size: 12px; color: var(--muted); }
.step { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.step .b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 700; }
.step .b svg { width: 12px; height: 12px; stroke-width: 2.6; }
.step.done { color: var(--text-2); }
.step.done .b { background: var(--ok); color: #fff; }
.step.now { color: var(--text); font-weight: 650; }
.step.now .b { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.step.now.wait .b { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.step.now.bad .b { background: var(--err); box-shadow: 0 0 0 4px var(--err-soft); }
.step.now.running .b { animation: pulse 1.6s ease-in-out infinite; }
.bar { flex: 1 1 18px; height: 2px; min-width: 14px; margin: 0 8px; border-radius: 2px; background: var(--line); }
.bar.done { background: var(--ok); }
.step-detail { width: 100%; margin-top: 4px; padding-left: 2px; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 결과 카드 ---------- */
.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.result-active { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.result-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.result-head .muted { font-size: 12px; }
.view-toggle { margin-left: auto; }
.md { padding: 6px 22px 16px; font-size: 14.5px; line-height: 1.75; color: var(--text-2); overflow-wrap: anywhere; }
.md h1, .md h2, .md h3, .md h4 { color: var(--text); letter-spacing: -0.015em; line-height: 1.4; }
.md h1 { font-size: 20px; margin: 16px 0 6px; }
.md h2 { font-size: 17.5px; margin: 16px 0 6px; }
.md h3 { font-size: 15.5px; margin: 14px 0 4px; }
.md h4 { font-size: 14.5px; margin: 12px 0 4px; }
.md p { margin: 6px 0; }
.md ul { margin: 6px 0; padding-left: 4px; list-style: none; }
.md li { position: relative; padding-left: 16px; margin: 3px 0; }
.md li::before { content: ""; position: absolute; left: 3px; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0.7; }
.md li.ordered::before { display: none; }
.md li .mk { position: absolute; left: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.md li.ordered { padding-left: 22px; }
.md li.l1 { margin-left: 18px; } .md li.l2 { margin-left: 36px; } .md li.l3 { margin-left: 54px; }
.md code { font-family: var(--mono); font-size: 0.9em; padding: 1px 5px; border-radius: 6px; background: var(--surface-3); }
.md pre { font-family: var(--mono); font-size: 13px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-3); overflow-x: auto; white-space: pre; }
.md blockquote { margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--muted); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.md .tbl { overflow-x: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r-sm); }
.md table { width: 100%; border-collapse: collapse; font-size: 13px; }
.md th { text-align: left; background: var(--surface-2); color: var(--text); font-weight: 650; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.md td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.md tr:last-child td { border-bottom: 0; }
.md td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.md strong { color: var(--text); }
.note { display: flex; gap: 8px; margin: 12px 0 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--text-2); font-size: 13px; }
.note svg { color: var(--warn); margin-top: 3px; }
.note .md { padding: 0; font-size: 13px; }
.req { margin: 4px 22px 0; }
.req summary { cursor: pointer; font-size: 12px; color: var(--muted); padding: 6px 0; list-style: none; display: flex; align-items: center; gap: 4px; }
.req summary::-webkit-details-marker { display: none; }
.req .md { padding: 0 0 6px; font-size: 13px; }
.doc { margin: 0; padding: 14px 18px; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: var(--surface-2); color: var(--text-2); max-height: 520px; overflow-y: auto; border-radius: var(--r-sm); }
.result > .doc { border-radius: 0; }

.result-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.result-actions .sp { flex: 1; }
.file-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.file-actions.file-requested { padding: 4px 6px; border-radius: var(--r-sm); background: var(--accent-soft); }
.file-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.dl { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 6px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); }
.dl:hover { border-color: var(--line-strong); background: var(--item-hover); }
.dl:disabled { opacity: 0.6; cursor: default; }
.dl i { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; font-style: normal; }
.dl .k-docx { background: #2b5797; } .dl .k-pptx { background: #c4462a; } .dl .k-xlsx { background: #1d7a45; } .dl .k-md { background: #5b6478; }
.dl .made { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-left: 2px; }
.file-note { font-size: 11.5px; color: var(--muted); }
.inline-followup { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px dashed var(--line); align-items: flex-end; }
.inline-followup textarea { flex: 1; min-height: 38px; border-radius: var(--r-sm); background: var(--surface-2); }

.process-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; cursor: pointer; box-shadow: var(--shadow-sm); }
.process-link:hover { color: var(--text); border-color: var(--line-strong); }
.process-link b { color: var(--text-2); font-weight: 650; }
.process-link { max-width: 100%; min-width: 0; }
.process-link b, .process-link svg { flex: none; white-space: nowrap; }
.process-link > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 상태 카드 (실패·질문·모델 선택·합의 실패) ---------- */
.run-state { display: flex; flex-direction: column; gap: 10px; }
.run-state:empty { display: none; }
.alert { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.alert-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.alert-title svg { width: 18px; height: 18px; }
.alert p { margin: 0; }
.alert-error { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.alert-error .alert-title svg { color: var(--err); }
.alert-question { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.alert-question .alert-title svg { color: var(--warn); }
.alert-accent { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.alert-accent .alert-title svg { color: var(--accent); }
.alert .detail-code { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.alert textarea { background: var(--surface-2); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions .sp { flex: 1; }

.model-rows { display: grid; gap: 8px; }
.model-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.model-stage strong { display: block; font-size: 13px; }
.model-stage small { display: block; color: var(--muted); font-size: 11.5px; }
.model-rec { font-size: 12px; color: var(--muted); }
.model-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.model-pick select { min-width: 120px; }

/* ---------- 입력창 ---------- */
.composer-wrap { padding: 4px 6px 4px; }
.composer {
  position: relative; max-width: 860px; margin: 0 auto; padding: 10px 10px 8px 16px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-xl); box-shadow: var(--composer-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); }
.composer-context { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.composer-context:not(:empty) { margin-bottom: 6px; }
.composer-target { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.new-conv-fields { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.title-input { flex: 1 1 220px; height: 32px; }
.seg-sm { padding: 2px; }
.seg-sm > label { height: 26px; padding: 0 10px; font-size: 12px; flex: 0 0 auto; }
.seg-sm input { position: absolute; opacity: 0; pointer-events: none; }
.composer textarea#composer-input { display: block; width: 100%; min-height: 48px; max-height: 38vh; padding: 4px 2px; border: 0; background: transparent; resize: none; font-size: 14.5px; line-height: 1.6; box-shadow: none; }
.composer textarea#composer-input:focus { outline: none; box-shadow: none; }
.composer-actions { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.attach-hint { flex: 1; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.send-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px; margin-left: auto; border: 0; border-radius: 12px; background: var(--accent-grad); color: #fff; font-weight: 650; font-size: 13px; cursor: pointer; box-shadow: 0 6px 16px rgba(91, 108, 240, 0.32); transition: transform 0.12s ease, opacity 0.12s ease; }
.send-btn:hover:not(:disabled) { transform: translateY(-1px); }
.send-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.send-btn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.notice { max-width: 860px; margin: 6px auto 0; text-align: center; font-size: 11.5px; color: var(--muted); }
.form-error { margin: 6px 0 0; color: var(--err); font-size: 12.5px; }
.drop-overlay { display: none; }
.composer.drag-over .drop-overlay { display: flex; position: absolute; inset: 4px; gap: 8px; align-items: center; justify-content: center; border: 2px dashed var(--accent); border-radius: calc(var(--r-xl) - 4px); background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--accent-text); font-weight: 650; pointer-events: none; z-index: 5; }

/* 첨부 칩 */
.attach-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: 12.5px; overflow-wrap: anywhere; }
.ft { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #fff; background: #6b7489; flex: none; text-transform: uppercase; }
.ft.pdf { background: #d1453b; } .ft.xlsx, .ft.csv, .ft.tsv { background: #1d7a45; } .ft.docx { background: #2b5797; } .ft.pptx { background: #c4462a; } .ft.hwp, .ft.hwpx { background: #2f86c9; } .ft.png, .ft.jpg, .ft.jpeg, .ft.gif, .ft.webp { background: #8b5cf6; }
.attach-chip small { color: var(--muted); }
.attach-chip.is-error { border-color: var(--err); background: var(--err-soft); }
.attach-error { color: var(--err); }
.attach-remove { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.attach-remove:hover { background: var(--item-hover); color: var(--text); }
.attach-remove svg { width: 12px; height: 12px; }
.attach-sent { justify-content: flex-end; margin: 0; }
.attach-sent .attach-chip { background: var(--surface); box-shadow: var(--shadow-sm); padding-right: 10px; }

/* ---------- 오른쪽 패널 ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.panel-head h2 { flex: 1; margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.panel-tabs { display: flex; gap: 2px; padding: 6px 10px 0; border-bottom: 1px solid var(--line); overflow-x: auto; flex-shrink: 0; }
.panel-tab { border: 0; background: none; padding: 8px 10px; margin-bottom: -1px; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.panel-tab:hover { color: var(--text); }
.panel-tab.selected { color: var(--text); border-bottom-color: var(--accent); font-weight: 650; }
.panel-tab .count { margin-left: 4px; font-size: 11px; color: var(--muted); }
.panel-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.panel-body h3 { margin: 6px 0 0; font-size: 13.5px; }
.card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface-2); }
.card h4 { margin: 0 0 6px; font-size: 13px; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 6px 12px; font-size: 12.5px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--text-2); }
.list { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.list li { margin: 2px 0; }
.sect-title { font-size: 12px; font-weight: 650; color: var(--muted); margin: 8px 0 2px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.timeline li { position: relative; font-size: 12.5px; color: var(--text-2); }
.timeline li::before { content: ""; position: absolute; left: -17px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ok); }
.timeline li.t-warn::before { border-color: var(--warn); }
.timeline li.t-err::before { border-color: var(--err); }
.timeline li.t-run::before { border-color: var(--accent); }
.timeline time { display: block; font-size: 11px; color: var(--muted); }

.draft { display: flex; flex-direction: column; gap: 6px; }
.draft .muted { font-size: 12px; }
.review { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.review-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.review p { margin: 0; font-size: 13px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.checks li { font-size: 12px; padding: 6px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.checks li .ck { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); }
.checks li .ck svg { width: 13px; height: 13px; color: var(--ok); stroke-width: 2.4; }
.checks li.bad { background: var(--warn-soft); border-color: transparent; }
.checks li.bad .ck svg { color: var(--warn); }
.issues { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); }
.issues li { margin: 3px 0; }
.ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ledger-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface-2); font-size: 13px; }
.ledger-item .lh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.ledger-hist { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--muted); }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan p { margin: 0; font-size: 13px; color: var(--text-2); }
.attach-analysis { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface-2); font-size: 13px; }
.attach-analysis p { margin: 0; }

.version-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.version-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.version-item.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.version-item .vh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.v-request { font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; max-height: 4.8em; overflow: hidden; }
.compare-row { display: flex; gap: 6px; align-items: center; }
.diff { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; max-height: 50vh; overflow: auto; font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); }
.diff-line { display: block; white-space: pre-wrap; word-break: break-word; text-decoration: none; }
.diff-add { background: var(--ok-soft); color: var(--ok); }
.diff-del { background: var(--err-soft); color: var(--err); }

/* ---------- 공통 컨트롤 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.btn:hover:not(:disabled) { background: var(--item-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn-small { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn-primary { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(91, 108, 240, 0.28); }
.btn-primary:hover:not(:disabled) { background: var(--accent-grad); transform: translateY(-1px); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--item-hover); color: var(--text); }
.btn-danger { color: var(--err); }
.btn-danger:hover:not(:disabled) { background: var(--err-soft); }
.btn-link { height: auto; padding: 0 2px; border: 0; background: none; box-shadow: none; color: var(--accent-text); font-weight: 500; font-size: 12px; text-decoration: none; }
.btn-link:hover:not(:disabled) { background: none; text-decoration: underline; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--item-hover); color: var(--text); }
.icon-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.icon-btn.on { color: var(--accent-text); background: var(--accent-soft); }

input[type="text"], input[type="search"], textarea, select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 7px 10px;
}
textarea { width: 100%; resize: vertical; line-height: 1.55; }
select { padding: 5px 28px 5px 10px; height: 32px; font-size: 12.5px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 13px, calc(100% - 10px) 13px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
select:disabled { opacity: 0.55; cursor: not-allowed; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 칩·배지 */
.badge, .chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650; white-space: nowrap; background: var(--surface-3); color: var(--text-2); border: 1px solid transparent; }
.badge svg, .chip svg { width: 12px; height: 12px; stroke-width: 2.4; }
.badge-version { background: var(--accent-grad); color: #fff; border-radius: 7px; }
.badge-active, .ph-consensus_reached, .v-PASS, .iss-resolved, .iss-withdrawn, .ex-ok { background: var(--ok-soft); color: var(--ok); }
.ph-review_passed { background: var(--ok-soft); color: var(--ok); }
.ph-need_user, .ph-answered, .ph-awaiting_models, .v-REVISE, .iss-open, .ex-partial { background: var(--warn-soft); color: var(--warn); }
.ph-failed, .ph-consensus_failed, .v-NEED_USER, .ex-unsupported, .ex-error { background: var(--err-soft); color: var(--err); }
.ph-queued, .ph-analyzing_attachments, .ph-planning_by_codex, .ph-executing_by_claude, .ph-reviewing_by_codex, .ph-revising_by_claude, .ph-intervening_by_codex, .ph-crossreviewing_by_claude, .badge-mode { background: var(--accent-soft); color: var(--accent-text); }
.badge-mode.mode-branch { background: rgba(139, 92, 246, 0.14); color: #8b5cf6; }
.imp-important { background: rgba(47, 134, 201, 0.12); color: #2f86c9; }
.imp-external { background: rgba(139, 92, 246, 0.14); color: #8b5cf6; }
.badge-archived { background: var(--surface-3); color: var(--muted); }

/* ⋯ 메뉴 */
.menu { position: fixed; z-index: 60; min-width: 190px; padding: 6px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 2px; animation: pop 0.12s ease; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 13px; cursor: pointer; color: var(--text-2); }
.menu button:hover { background: var(--item-hover); color: var(--text); }
.menu button.danger { color: var(--err); }
.menu button.danger:hover { background: var(--err-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }

/* 토스트 */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 11px 16px; border-radius: var(--r-md); background: #1a1f36; color: #fff; box-shadow: var(--shadow-lg); font-size: 13px; pointer-events: auto; animation: toast-in 0.18s ease; }
.toast svg { flex: none; }
.toast.ok svg { color: #3fcf8e; } .toast.err svg { color: #ff8a8f; } .toast.info svg { color: #a9b0ff; }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.2s ease, transform 0.2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* 확인·입력 대화상자 */
.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(13, 15, 23, 0.42); backdrop-filter: blur(3px); animation: fade 0.12s ease; }
.modal { width: min(440px, 100%); padding: 20px 20px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; animation: pop 0.14s ease; }
.modal h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.modal h3 svg { width: 18px; height: 18px; color: var(--accent); }
.modal.danger h3 svg { color: var(--err); }
.modal p { margin: 0; color: var(--text-2); white-space: pre-wrap; font-size: 13.5px; }
.modal input { width: 100%; }
.modal .row-actions { justify-content: flex-end; margin-top: 4px; }
.modal .btn-danger-solid { background: var(--err); color: #fff; border-color: transparent; }
@keyframes fade { from { opacity: 0; } }

/* ---------- 좁은 화면 ---------- */
.backdrop { display: none; }
@media (max-width: 960px) {
  body { overflow: hidden; }
  .mobile-bar { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .brand-logo-sm img { width: 120px; }
  .app, body.panel-open .app { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 52px); padding: 8px; }
  .sidebar { position: fixed; top: 60px; left: 8px; bottom: 8px; width: min(320px, 86vw); z-index: 30; transform: translateX(-110%); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s; }
  body.sidebar-open .sidebar { transform: none; visibility: visible; }
  body.sidebar-open .backdrop { display: block; position: fixed; inset: 52px 0 0 0; background: rgba(0, 0, 0, 0.3); z-index: 20; }
  .panel { position: fixed; inset: 60px 8px 8px 8px; z-index: 40; }
  .model-row { grid-template-columns: minmax(0, 1fr); }
  .attach-hint { display: none; }
  .bubble { max-width: 92%; }
  .send-label { display: none; }
  .send-btn { padding: 0 11px; }
}
.placeholder-foot { margin-top: 18px !important; font-size: 12.5px; }
details.fold > summary { cursor: pointer; color: var(--accent-text); font-size: 12.5px; padding: 4px 0; }
.attach-analysis > p:first-child { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.md-note { padding-top: 0; }
.note strong { display: block; margin-bottom: 2px; color: var(--text); }

/* ---------- 로그인·계정·사용자 관리 ---------- */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
body.auth-mode .app, body.auth-mode .mobile-bar { display: none !important; }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.auth-card h1 { margin: 6px 0 0; font-size: 20px; }
.auth-card > p { margin: 0; font-size: 13px; line-height: 1.55; }
.auth-brand { padding: 0; }
.auth-submit { height: 42px; justify-content: center; margin-top: 4px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.form-row input, .form-row select { width: 100%; height: 38px; }
.form-row small { font-size: 11.5px; }
.modal-form { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
input[type="password"], input[type="number"] { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 7px 10px; }
.account { display: flex; align-items: center; gap: 10px; margin: 6px 10px 0; padding: 10px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.acct-avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); color: #fff; font-weight: 700; font-size: 13px; }
.acct-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.acct-name strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-name small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.users-panel { display: flex; flex-direction: column; gap: 12px; }
.users-head p { margin: 10px 0 0; font-size: 12px; }
.users-head .row-actions { margin-top: 10px; }
.user-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.user-item { display: flex; flex-direction: column; gap: 8px; }
.user-item.off { opacity: 0.7; }
.user-item .uh { display: flex; align-items: center; gap: 10px; }
.user-item .badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.user-item p { margin: 0; font-size: 12px; }
.user-item .row-actions { justify-content: flex-start; flex-wrap: wrap; }

/* 진행 기록: 검토 지적·재평가·수정 대응 핵심 줄 */
.timeline .t-points { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.timeline .t-points li { padding: 5px 8px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--line-strong); font-size: 12px; line-height: 1.5; color: var(--text-2); }
.timeline .t-points li::before { display: none; }
.timeline .t-points li b { font-weight: 650; color: var(--text); }
.timeline .t-points li.p-err { border-left-color: var(--err); }
.timeline .t-points li.p-warn { border-left-color: var(--warn); }
.timeline .t-points li.p-ok { border-left-color: var(--ok); }

/* ---------- 프로젝트 자료·출처 표시 ---------- */
.badge-kb { border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent); }
.badge-kb svg { width: 12px; height: 12px; }
.kb-panel { display: flex; flex-direction: column; gap: 12px; }
.kb-panel .card > p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.55; }
.kb-panel .lh { display: flex; align-items: center; gap: 8px; }
.kb-panel .lh svg, .kb-chunks .lh svg, .plan .card .lh > svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.kb-instr, .kb-chunk-text { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 12.5px; line-height: 1.55; color: var(--text-2); background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 10px; max-height: 260px; overflow-y: auto; }
.kb-docs.drag { outline: 2px dashed var(--accent); outline-offset: 2px; }
.kb-doc-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kb-doc-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-2); }
.kb-doc-name { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-chunks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kb-chunks .card.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cite { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin: 0 1px; border-radius: 6px; border: 0; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; vertical-align: 1px; cursor: pointer; font-family: inherit; }
.cite:hover { background: var(--accent); color: #fff; }
.cite.static { cursor: default; }
svg.rot90 { transform: rotate(90deg); }
.row-actions .sp { flex: 1; }
.kb-chunks .lh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kb-chunks .lh .muted { font-size: 12px; }

/* ---------- 프로젝트 ---------- */
.proj-section { margin: 12px 14px 0; }
.proj-head { display: flex; align-items: center; gap: 6px; padding: 0 2px 4px 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.proj-head span { flex: 1; }
.proj-head .btn-link { height: 22px; padding: 0 4px; font-size: 11.5px; }
.proj-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 190px; overflow-y: auto; }
.proj-list .empty { font-size: 11.5px; color: var(--muted); padding: 4px; line-height: 1.5; }
.proj-item { width: 100%; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.proj-item:hover { background: var(--item-hover); }
.proj-item.selected { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.proj-item svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.proj-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-context { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--accent-soft); color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.project-context[hidden] { display: none; }
.project-context svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.project-context span { flex: 1; min-width: 0; }
.project-context .btn-link { flex: none; }
.head-row h2 svg { width: 18px; height: 18px; vertical-align: -2px; color: var(--accent); }
.plan .card > .lh { display: flex; align-items: center; gap: 8px; }

/* ---------- 가입 신청·비밀번호 찾기·복구 코드 ---------- */
.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.auth-links .btn-link { font-size: 12.5px; }
.auth-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text-2); font-size: 13px; line-height: 1.5; }
.auth-note[hidden] { display: none; }
.recovery-codes { margin: 0; padding: 12px 12px 12px 34px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.recovery-codes code { font-family: var(--mono); font-size: 14px; letter-spacing: 0.06em; color: var(--text); }
.kb-ack { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.kb-ack input { width: 16px; height: 16px; margin: 0; }
.acct-avatar { position: relative; }
.acct-alert { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--err); border: 2px solid var(--surface-2); }
.pending-box { border-color: var(--accent); }
.pending-box .sect-title { margin-top: 0; }
.reset-req { margin: 0; padding: 6px 10px; border-radius: 8px; background: rgba(220, 38, 38, 0.08); color: var(--err); font-size: 12px; }
