/* 장부형(achromatic ledger) — 크롬은 무채색, 브랜드 그린은 마크·데이터·진행 신호에만. 주 버튼은 near-black.
   회색 글자는 모두 흰 바탕·돌색 바탕에서 4.5:1 이상. 반경은 카드 8 / 컨트롤 6, 그림자는 떠 있는 것(메뉴·팝오버·토스트)에만. */
:root {
  --bg: #f4f3f1;
  --surface: #ffffff;
  --surface-2: #f8f8f7;
  --active: #e9e8e5;
  --ink: #111111;
  --ink-2: #2e2e2c;
  --muted: #5c5f63;
  --faint: #6b6b6b;
  --line: #e6e5e2;
  --line-2: #d1d5db;
  --primary: #1d1f20;
  --primary-ink: #ffffff;
  --brand: #2f5d50;
  --brand-ink: #ffffff;
  --brand-soft: #e7efeb;
  --accent: #2f5d50;
  --attn: #a34a06;
  --attn-soft: #fdf3e5;
  --attn-line: #f1d3a8;
  --good: #247b50;
  --good-soft: #dcfae5;
  --bad: #c4242a;
  --bad-soft: #ffedea;
  --info: #2f4fb8;
  --info-soft: #ebeffc;
  --focus: #2f4fb8;
  --s1: #2f5d50;
  --s2: #9a9a96;
  --s3: #111111;
  --shadow: none;
  --float: 0 8px 24px rgba(0, 0, 0, .12);
  --r: 8px;
  --r-sm: 6px;
  --sidebar: 240px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111; --surface: #191919; --surface-2: #1f1f1f; --active: #2a2a2a; --ink: #f2f2f2; --ink-2: #d6d6d6; --muted: #b4b4b4;
    --faint: #949494; --line: #2e2e2e; --line-2: #474747; --primary: #f2f2f2; --primary-ink: #111111; --brand: #7fb8a3; --brand-ink: #10231c;
    --brand-soft: #1c2a24; --accent: #7fb8a3; --attn: #f0a65a; --attn-soft: #2d2216; --attn-line: #5a4022; --good: #3fc07a; --good-soft: #172a1d;
    --bad: #e5566f; --bad-soft: #2c1a20; --info: #93a9f5; --info-soft: #1d2236; --focus: #93a9f5; --s1: #7fb8a3; --s2: #7a7a7a; --s3: #f2f2f2;
    --shadow: none; --float: 0 8px 24px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111111; --surface: #191919; --surface-2: #1f1f1f; --active: #2a2a2a; --ink: #f2f2f2; --ink-2: #d6d6d6; --muted: #b4b4b4;
  --faint: #949494; --line: #2e2e2e; --line-2: #474747; --primary: #f2f2f2; --primary-ink: #111111; --brand: #7fb8a3; --brand-ink: #10231c;
  --brand-soft: #1c2a24; --accent: #7fb8a3; --attn: #f0a65a; --attn-soft: #2d2216; --attn-line: #5a4022; --good: #3fc07a; --good-soft: #172a1d;
  --bad: #e5566f; --bad-soft: #2c1a20; --info: #93a9f5; --info-soft: #1d2236; --focus: #93a9f5; --s1: #7fb8a3; --s2: #7a7a7a; --s3: #f2f2f2;
  --shadow: none; --float: 0 8px 24px rgba(0, 0, 0, .5); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.01em; }
.boot { padding: 40px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 레이아웃 ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: var(--bg); padding: 20px 12px;
}
.brandmark { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.brandmark .logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; flex: none;
}
.brandmark .logo svg { width: 18px; height: 18px; }
.brandmark b { display: block; font-size: 14px; }
.brandmark span { display: block; font-size: 12.5px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: var(--r-sm);
  text-decoration: none; color: var(--ink-2); font-size: 14px; transition: background .12s, color .12s;
}
.nav a svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--active); color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"] svg { color: var(--ink); }
.nav .count {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; background: var(--attn); color: #fff;
}
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.whoami { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.side-foot .links { display: flex; gap: 12px; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }

.main { min-width: 0; padding: 28px 36px 64px; }
.page { max-width: 1240px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.devbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; padding: 8px 12px; margin: -8px auto 18px;
  max-width: 1240px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); color: var(--muted);
}

/* ---------- 공통 컴포넌트 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-head h2 { font-size: 16px; font-weight: 600; }
.card-head a { font-size: 13px; color: var(--muted); text-decoration: none; }
.card-head a:hover { color: var(--ink); }
.card-body { padding: 12px 20px 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; color: var(--ink);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary); opacity: .86; }
.btn.attn { background: var(--attn); border-color: var(--attn); color: #fff; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible, .nav a:focus-visible, .opt:focus-within, .chip:focus-visible, .tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.attn { background: var(--attn-soft); color: var(--attn); border-color: var(--attn-line); }
.pill.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

.av {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--faint); letter-spacing: -0.02em;
}
.av.lg { width: 44px; height: 44px; font-size: 14px; }
.av.xs { width: 20px; height: 20px; font-size: 9px; }
.mfoot, .mmenu { display: none; }
.av-pm { background: #57534e; }
.av-strategy-lead { background: #2f5d50; }
.av-creative-lead { background: #c2703d; }
.av-growth-lead { background: #3756c9; }
.av-cx-ops-lead { background: #8a4f9e; }
.av-reviewer { background: #6b7280; }
.av-ceo { background: #1d1d1b; }
.av-admin { background: #0f766e; }
:root[data-theme="dark"] .av-ceo { background: #ecebe6; color: #141513; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av-ceo { background: #ecebe6; color: #141513; } }

.empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; cursor: pointer;
  font-weight: 600; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; margin-bottom: -1px;
}
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.tab .n { font-size: 12px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.tab .n.attn { background: var(--attn); color: #fff; border-color: var(--attn); }

/* type 이 없는 input 도 같은 모양 (로그인 아이디·이름 칸이 기본 모양으로 나오던 문제) */
textarea, select, input:not([type]), input[type="password"], input[type="text"], input[type="email"], input[type="url"], input[type="number"], input[type="search"], input[type="tel"] {
  width: 100%; min-height: 40px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); padding: 9px 12px;
}
::placeholder { color: var(--faint); opacity: 1; }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: var(--focus); }
label.field { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }

/* ---------- 개요 ---------- */
.attn-banner {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--r);
  background: var(--attn-soft); border: 1px solid var(--attn-line); margin-bottom: 16px;
}
.attn-banner .ico { color: var(--attn); display: grid; place-items: center; flex: none; }
.attn-banner .ico svg { width: 20px; height: 20px; }
.attn-banner b { display: block; }
.attn-banner span { color: var(--ink-2); font-size: 14px; }
.attn-banner .btn { margin-left: auto; }

.project { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: center; }
.project .goal { font-size: 16.5px; font-weight: 600; margin-top: 4px; }
.project .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 16px 18px; }
.kpi .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi .d { font-size: 12.5px; margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.up { color: var(--good); } .down { color: var(--bad); }

.pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.stage {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; background: var(--surface-2); min-height: 74px;
  display: flex; flex-direction: column; gap: 4px; text-decoration: none; position: relative;
}
.stage .no { font-size: 12px; font-weight: 600; color: var(--muted); }
.stage .nm { font-size: 13px; font-weight: 600; line-height: 1.35; }
.stage .st { font-size: 12px; color: var(--muted); margin-top: auto; }
.stage.done { background: var(--brand-soft); border-color: transparent; }
.stage.done .no, .stage.done .st { color: var(--brand); }
.stage.doing { background: var(--surface); border-color: var(--brand); }
.stage.doing .st { color: var(--brand); font-weight: 600; }
.stage .gate { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; color: var(--attn); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line-2); }
.legend .l-done { background: var(--brand-soft); border-color: transparent; }
.legend .l-doing { background: var(--surface); border-color: var(--brand); }

.rows { display: flex; flex-direction: column; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .main-col { min-width: 0; flex: 1; }
.row .t { font-weight: 600; font-size: 14.5px; }
.row .s { font-size: 13px; color: var(--muted); }
.row .r { margin-left: auto; text-align: right; flex: none; font-size: 12.5px; color: var(--muted); }
.row a.t { text-decoration: none; }
.row a.t:hover { text-decoration: underline; }

/* ---------- 대표 소통 ---------- */
.ceo-intro { display: flex; gap: 14px; align-items: center; padding: 16px 20px; margin-bottom: 18px; }
.ceo-intro p { margin: 0; font-size: 14px; color: var(--ink-2); }
.decision { padding: 22px 24px; margin-bottom: 16px; }
.decision.open { border-color: var(--attn-line); border-left: 3px solid var(--attn); }
.decision .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.decision h3 { font-size: 19px; margin: 10px 0 14px; }
.facts { margin: 0 0 14px; padding: 12px 16px 12px 32px; background: var(--surface-2); border-radius: var(--r-sm); font-size: 14px; color: var(--ink-2); }
.facts li + li { margin-top: 4px; }
.sub-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.question { font-weight: 700; font-size: 15.5px; margin: 0 0 12px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line-2);
  border-radius: var(--r); cursor: pointer; background: var(--surface); transition: border-color .12s, background .12s;
}
.opt:not(.readonly):hover { border-color: var(--faint); }
.opt input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--brand); }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt .ol { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.opt .ol .id { color: var(--muted); }
.opt .od { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.opt dl { margin: 8px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; font-size: 13.5px; }
.opt dt { color: var(--muted); font-weight: 600; }
.opt dd { margin: 0; color: var(--ink-2); }
.opt.readonly { cursor: default; }
.unknowns { margin: 14px 0 0; padding: 12px 16px; border-radius: var(--r-sm); border: 1px dashed var(--attn-line); font-size: 13.5px; color: var(--ink-2); }
.unknowns b { color: var(--attn); }
.unknowns ul { margin: 4px 0 0; padding-left: 18px; }
.answer-box { margin-top: 16px; }
.answer-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.answer-actions .hint { font-size: 13px; color: var(--muted); }
.answered {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--brand-soft); font-size: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.answered .who { font-weight: 700; color: var(--brand); }
.answered .memo { color: var(--ink-2); white-space: pre-wrap; }
.collapsible > summary { cursor: pointer; font-size: 13.5px; color: var(--muted); list-style: none; margin-top: 12px; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary::before { content: "▸ "; }
.collapsible[open] > summary::before { content: "▾ "; }

.composer { padding: 18px 20px; margin-bottom: 18px; }
.composer h2 { font-size: 16px; margin-bottom: 4px; }
.composer p { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.composer .chips { margin: 10px 0 0; }
.composer .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

.thread { display: flex; flex-direction: column; gap: 14px; margin: 14px 0; }
.post { display: flex; gap: 10px; }
.post .bubble { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px var(--r) var(--r) var(--r); padding: 10px 14px; font-size: 14px; max-width: 760px; }
.post .who { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.post .who b { color: var(--ink); }
.post.ceo { flex-direction: row-reverse; }
.post.ceo .bubble { background: var(--brand-soft); border-color: transparent; border-radius: var(--r) 4px var(--r) var(--r); }
.post .body { white-space: pre-wrap; }

.req { padding: 16px 20px; }
.req + .req { border-top: 1px solid var(--line); }
.req .q { font-size: 14.5px; white-space: pre-wrap; }
.req .reply { margin-top: 10px; display: flex; gap: 10px; font-size: 14px; }
.req .reply .bubble { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; flex: 1; }

/* ---------- 업무 보드 ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(196px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 120px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; font-weight: 700; font-size: 14px; }
.col-head .n { color: var(--muted); font-weight: 600; font-size: 13px; }
.col-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.col.c-doing .col-head i { background: var(--info); }
.col.c-review .col-head i { background: var(--s2); }
.col.c-waiting .col-head i { background: var(--attn); }
.col.c-done .col-head i { background: var(--good); }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.task .tt { font-weight: 600; font-size: 14px; line-height: 1.45; }
.task .tm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.task .tm .av { width: 22px; height: 22px; font-size: 9.5px; }
.task .tf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12.5px; }
.task select { width: auto; padding: 3px 6px; font-size: 12.5px; }
.task a { color: var(--info); text-decoration: none; font-size: 12.5px; }
.overdue { color: var(--bad); font-weight: 600; }
.soon { color: var(--attn); font-weight: 600; }
.prio-high { border-left: 3px solid var(--attn); }

/* ---------- 성과 ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 12px; }
.chart .ln { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.s1 { stroke: var(--s1); } .chart .ln.s2 { stroke: var(--s2); } .chart .ln.s3 { stroke: var(--s3); }
.chart .dot.s1 { fill: var(--s1); } .chart .dot.s2 { fill: var(--s2); } .chart .dot.s3 { fill: var(--s3); }
.chart .target { stroke: var(--attn); stroke-dasharray: 4 4; stroke-width: 1.5; }
.chart .target-l { fill: var(--attn); font-size: 12px; font-weight: 700; }
.chart .area.s1 { fill: var(--s1); opacity: .08; }
.series-legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.series-legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
.series-legend .s1 { background: var(--s1); } .series-legend .s2 { background: var(--s2); } .series-legend .s3 { background: var(--s3); }
.grid > * { min-width: 0; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: right; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { text-align: right; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data tr.total td { font-weight: 700; border-bottom: 0; }
/* 결정 이력: 짧은 칸은 내용만큼, 남는 너비는 안건·반영이 나눠 씀 */
table.data.history th, table.data.history td { text-align: left; vertical-align: top; }
table.data.history td:nth-child(1) { white-space: normal; width: 42%; min-width: 14em; }
table.data.history td:nth-child(2), table.data.history td:nth-child(4) { width: 1%; }
table.data.history td:nth-child(3) { white-space: normal; min-width: 9em; max-width: 13em; }
table.data.history td:nth-child(5) { white-space: normal; width: 42%; min-width: 14em; overflow-wrap: anywhere; color: var(--ink-2); font-size: 13.5px; }
.funnel { display: flex; flex-direction: column; gap: 10px; }
.fstep .fl { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 4px; }
.fstep .fb { height: 26px; border-radius: 6px; background: var(--brand); opacity: .85; }
.fstep:nth-child(2) .fb { opacity: .65; } .fstep:nth-child(3) .fb { opacity: .45; }
.frate { font-size: 12.5px; color: var(--muted); padding-left: 8px; border-left: 2px solid var(--line); margin-left: 6px; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* ---------- 산출물 ---------- */
.docs { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.doclist { padding: 8px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.doclist h3 { font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 10px 4px; }
.doclist a { display: block; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; font-size: 14px; }
.doclist a:hover { background: var(--surface-2); }
.doclist a[aria-current="true"] { background: var(--active); font-weight: 600; }
.doclist a .dm { display: flex; gap: 6px; align-items: center; margin-top: 2px; font-size: 12px; color: var(--muted); }
.viewer { padding: 28px 36px; min-height: 60vh; }
.viewer .path { font-size: 12.5px; color: var(--faint); margin-bottom: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.md { font-size: 15px; line-height: 1.75; max-width: 820px; }
.md h1 { font-size: 24px; margin: 0 0 14px; }
.md h2 { font-size: 18px; margin: 28px 0 10px; padding-top: 6px; }
.md h3 { font-size: 16px; margin: 22px 0 8px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.md pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; overflow-x: auto; }
.md pre code { border: 0; padding: 0; background: none; }
.md blockquote { margin: 0 0 12px; padding: 4px 16px; border-left: 3px solid var(--line-2); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.md-table { overflow-x: auto; margin: 0 0 14px; }
.md table { border-collapse: collapse; font-size: 14px; min-width: 50%; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); font-weight: 600; }

/* ---------- 문서 펼쳐 보기 (아코디언) ---------- */
.peeks { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.peek { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); min-width: 0; }
.peek > summary {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none;
  font-size: 13.5px; color: var(--ink-2); border-radius: var(--r-sm);
}
.peek > summary::-webkit-details-marker { display: none; }
.peek > summary::after { content: "▸"; margin-left: auto; color: var(--faint); font-size: 12px; }
.peek[open] > summary::after { content: "▾"; }
.peek > summary:hover { background: var(--surface-2); }
.peek > summary:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.peek-ico { display: inline-flex; flex: none; color: var(--brand); }
.peek-ico svg { width: 16px; height: 16px; }
.peek-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek[open] .peek-t { white-space: normal; }
.peek-role { font-weight: 700; color: var(--ink); margin-right: 6px; }
.peek-body { border-top: 1px solid var(--line); padding: 14px 18px; max-height: 70vh; overflow: auto; }
.peek-body .md { font-size: 14.5px; line-height: 1.7; }
.peek-body .empty { padding: 12px; }
/* 머리줄(경로·링크·닫기)은 본문을 스크롤해도 위에 붙어 있다. 음수 여백은 .peek-body 안쪽 여백을 상쇄한다. */
.peek-path {
  position: sticky; top: -14px; z-index: 1; display: flex; align-items: center; gap: 12px;
  margin: -14px -18px 12px; padding: 6px 18px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--faint);
}
.peek-path span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.peek-path a { color: var(--info); text-decoration: none; white-space: nowrap; }
.peek-body .md h1 { font-size: 19px; }
.peek-video { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; background: #000; border-radius: var(--r-sm); }
.peek-close { margin-left: auto; flex: none; }
.task .peeks { margin-top: 8px; }
.task .peek > summary { font-size: 12.5px; padding: 6px 8px; }
.task .peek > summary .pill { display: none; }
.task .peek-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* 보드 칸은 좁아서 펼친 본문을 오른쪽 패널로 띄운다 */
.task .peek[open] > .peek-body {
  position: fixed; top: 16px; right: 16px; bottom: 16px; width: min(780px, calc(100vw - 32px)); max-height: none; z-index: 40;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--float); padding: 20px 26px;
}
.task .peek[open] > .peek-body > .peek-path { top: -20px; margin: -20px -26px 14px; padding: 8px 26px; }
.row .main-col .peeks { margin-top: 8px; }

/* ---------- 포스팅 현황 ---------- */
.post-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.post-url { font-size: 13px; font-weight: 500; color: var(--info); text-decoration: none; overflow-wrap: anywhere; }
.post-url:hover { text-decoration: underline; }
.chip.sm { height: 26px; padding: 0 10px; font-size: 12.5px; text-decoration: none; color: var(--ink-2); display: inline-flex; align-items: center; }

/* ---------- 팀 ---------- */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.member { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.member .top { display: flex; gap: 12px; align-items: center; }
.member .top b { display: block; font-size: 16px; }
.member .top div > span { font-size: 13px; color: var(--muted); }
.member p { margin: 0; font-size: 14px; color: var(--ink-2); }
.member .stats { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.member .stats b { color: var(--ink); font-size: 18px; display: block; }
.member ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.member li { padding: 6px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; }
.member .foot { margin-top: auto; }

/* ---------- 활동 ---------- */
.day-group h3 { font-size: 13px; color: var(--muted); font-weight: 700; margin: 18px 0 6px; }
.day-group:first-child h3 { margin-top: 0; }

/* ---------- 로그인 ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login .card { width: min(400px, 100%); padding: 32px; }
.login .brandmark { gap: 10px; font-weight: 700; font-size: 15px; }
.login h1 { font-size: 22px; margin: 24px 0 6px; }
.login p { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.login form { display: flex; flex-direction: column; gap: 16px; }
.login .lf { display: flex; flex-direction: column; gap: 6px; }
.login .lf > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.login .lf > span small { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.login form .btn { height: 44px; margin-top: 8px; font-size: 15px; }
.login .roles .btn { height: 44px; }
.login .err:empty { display: none; }
.login .err { margin-top: 14px; }
.login .roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--bad); font-size: 13.5px; min-height: 20px; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 600;
  transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--bad); color: #fff; }

/* ---------- 반응형 ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side, .nav { min-width: 0; }
  .side { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brandmark { padding: 0; }
  .brandmark div { display: none; }
  /* 폰·태블릿: 48px 상단 바(워크스페이스 + 메뉴 버튼), 메뉴는 전체 화면 시트 */
  .side { min-height: 56px; justify-content: space-between; }
  .mmenu { display: grid; place-items: center; position: relative; width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); cursor: pointer; }
  .mmenu svg { width: 22px; height: 22px; }
  .mmenu:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .mdot { position: absolute; top: 10px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--attn); }
  .nav, .side-foot { display: none; }
  .menu-open .side { position: fixed; inset: 0; z-index: 40; flex-direction: column; align-items: stretch; justify-content: flex-start; height: 100dvh; padding: 6px 16px 20px; overflow-y: auto; background: var(--bg); }
  .menu-open .side > .ws { align-self: flex-start; }
  .menu-open .mmenu { position: absolute; top: 6px; right: 16px; margin: 0; }
  .menu-open .nav { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
  .menu-open .nav a { min-height: 48px; font-size: 16px; }
  .menu-open .nav a svg { width: 18px; height: 18px; }
  .menu-open .side-foot { display: flex; }
  .mfoot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); max-width: 1240px; margin: 32px auto 0; padding-top: 16px; border-top: 1px solid var(--line); }
  .main { padding: 20px 16px 56px; }
  .g2, .g-main, .project, .docs { grid-template-columns: 1fr; }
  .doclist { position: static; max-height: none; }
  .viewer { padding: 20px; }
  .decision { padding: 18px; }
  .attn-banner { flex-wrap: wrap; }
  .attn-banner .btn { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .kpis, .team { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 22px; }
}

/* ---------- 팀 실행·착수 ---------- */
.run-banner {
  display: flex; align-items: center; gap: 14px; max-width: 1240px; margin: 0 auto 18px; padding: 12px 16px;
  border-radius: var(--r); background: var(--info-soft); color: var(--ink);
}
.run-banner b { display: block; font-size: 14.5px; }
.run-banner span { font-size: 13px; color: var(--ink-2); }
.run-banner .btn { margin-left: auto; }
.pulse, .nav .live { width: 10px; height: 10px; border-radius: 50%; background: var(--info); flex: none; animation: pulse 1.6s ease-in-out infinite; }
.nav .live { margin-left: auto; width: 8px; height: 8px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pulse, .nav .live { animation: none; } }
.attn-banner.fail, .answered.fail { background: var(--bad-soft); border-color: transparent; }
.answered.fail .who { color: var(--bad); }
.ob-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.ob-field.wide, .ob-field:nth-child(-n+3) { grid-column: 1 / -1; }
.ob-list { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.ob-list li + li { margin-top: 6px; }
.ob-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ob-step { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 14px; background: var(--surface-2); }
.ob-step .no { font-size: 12px; color: var(--muted); }
.ob-step .st { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ob-step.doing, .ob-step.review { border-color: var(--info); background: var(--surface); }
.ob-step.doing .st, .ob-step.review .st { color: var(--info); }
.ob-step.done, .ob-step.waiting { background: var(--brand-soft); border-color: transparent; }
.ob-step.done .st { color: var(--brand); }
.ob-step.waiting .st { color: var(--attn); }
.run-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.run-kind { display: flex; flex-direction: column; gap: 6px; }
.run-kind p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); flex: 1; }
.run-kind .btn { align-self: flex-start; }
.run-settings { display: flex; flex-direction: column; gap: 10px; }
.toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.runlog {
  margin: 0; max-height: 480px; overflow: auto; padding: 14px; border-radius: var(--r-sm); background: #151614; color: #d9d8d2;
  font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word;
}
.runs-table tr.sel td { background: var(--active); }
.runs-table a { color: var(--info); text-decoration: none; font-weight: 600; }
input[type="date"] { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); padding: 9px 12px; }
@media (max-width: 1180px) { .run-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .ob-form, .ob-steps { grid-template-columns: 1fr 1fr; }
  .run-banner { flex-wrap: wrap; }
}
@media (max-width: 560px) { .ob-form, .run-kinds { grid-template-columns: 1fr; } }

/* 활성화 지표 */
.kpi.north { border-color: var(--brand); }
.kpi.north .k { color: var(--brand); }

/* 리드형 결정 안내 */
.auto-note { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--brand-soft); font-size: 13.5px; color: var(--ink-2); }
.auto-note.hold { background: var(--attn-soft); }
.answer-locked { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--info-soft); font-size: 13.5px; color: var(--ink-2); }

/* 본사 홈 (hq.html) */
.hq { max-width: 1152px; margin: 0 auto; padding: 36px 24px 48px; }
.hq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.hq-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; color: inherit; text-decoration: none; transition: border-color .12s; }
.hq-card:hover { border-color: var(--ink); }
.hq-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hq-title { display: flex; align-items: center; gap: 10px; }
.hq-title b { font-size: 17px; }
.hq-title span:not(.ws-ico) { font-size: 12.5px; color: var(--faint); }
.hq-sub { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
/* 지표는 타일이 아니라 한 줄을 세로선으로 나눈 띠 */
.hq-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 18px 0 14px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hq-stat { padding: 0 14px; border-left: 1px solid var(--line); }
.hq-stat:first-child { padding-left: 0; border-left: 0; }
.hq-stat b { display: block; font-size: 24px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hq-stat span { font-size: 13px; color: var(--muted); }
.hq-stat.hot b { color: var(--attn); }
.hq-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }


/* 워크스페이스 전환기 (왼쪽 위) */
.ws { position: relative; margin: 0 0 16px; }
.ws > summary, div.ws { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); list-style: none; }
.ws > summary { cursor: pointer; }
.ws > summary::-webkit-details-marker { display: none; }
.ws > summary:hover, .ws[open] > summary { background: var(--surface-2); }
.ws-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; font-weight: 800; font-size: 16px; }
.ws-ico.sm { width: 24px; height: 24px; border-radius: 7px; font-size: 12.5px; }
.ws-name { min-width: 0; flex: 1; }
.ws-name b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-name span { display: block; font-size: 12px; color: var(--muted); }
.ws-caret { color: var(--muted); font-size: 12px; }
.ws-pop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px; box-shadow: var(--float); }
.ws-label { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px 4px; }
.ws-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; font-size: 14px; color: var(--ink); text-decoration: none; }
a.ws-item:hover { background: var(--surface-2); }
.ws-item.cur { font-weight: 700; }
.ws-check { margin-left: auto; color: var(--brand); }
.ws-all { border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 8px 8px; color: var(--muted); }
@media (max-width: 900px) {
  .ws { margin: 0; }
  .ws-name span, .ws-caret { display: none; }
  .ws-name b { max-width: 96px; }
  .ws-pop { right: auto; }
}

/* ---------- 업무 보드: 끌어 옮기기·사람 확인 ---------- */
.task[draggable="true"] { cursor: grab; }
.task.dragging { opacity: .45; }
.col.drop { outline: 2px dashed var(--brand); outline-offset: -2px; }
.col-head .auto-tg { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.auto-tg input { position: absolute; opacity: 0; width: 0; height: 0; }
.auto-tg .sw { width: 30px; height: 17px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.auto-tg .sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .15s; }
.auto-tg input:checked + .sw { background: var(--brand); }
.auto-tg input:checked + .sw::after { transform: translateX(13px); }
.auto-tg input:focus-visible + .sw { outline: 2px solid var(--brand); outline-offset: 2px; }
.post-card { border-left: 3px solid var(--brand); }
.post-thumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; }
.post-thumbs img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.post-acts { flex-wrap: wrap; justify-content: flex-start; }
.post-acts .linkbtn { font-size: 12.5px; }
.dec-board { margin-bottom: 22px; }
.dec-board h2 { font-size: 16px; margin: 0 0 6px; }
.dec-board h2 + .muted { margin: 0 0 10px; font-size: 13.5px; }
.dec-board .card + h2 { margin-top: 18px; }
.dec-fold { margin-bottom: 8px; }
.dec-fold > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; cursor: pointer; font-size: 14.5px; }
.dec-fold .decision { border: 0; box-shadow: none; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); margin: 0; }
.dec-history { margin-top: 10px; }
.dec-history > summary { cursor: pointer; font-size: 13.5px; color: var(--muted); padding: 4px 0 8px; }

/* ---------- 톡방 (카카오톡 단톡방 모양) ---------- */
:root { --kt-bg: #b2c7d9; --kt-other: #ffffff; --kt-other-ink: #1d1d1b; --kt-me: #fee500; --kt-me-ink: #1d1d1b; --kt-meta: #51606b; --kt-head: #a9bdce; --kt-bar: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --kt-bg: #1f2a33; --kt-other: #33414c; --kt-other-ink: #ecebe6; --kt-meta: #93a1ad; --kt-head: #26323c; --kt-bar: #1c1d1b; }
}
:root[data-theme="dark"] { --kt-bg: #1f2a33; --kt-other: #33414c; --kt-other-ink: #ecebe6; --kt-meta: #93a1ad; --kt-head: #26323c; --kt-bar: #1c1d1b; }
.kt { display: flex; flex-direction: column; height: calc(100dvh - 92px); min-height: 420px; max-width: 760px; margin: 0 auto; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--kt-bg); }
.kt-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--kt-head); color: var(--kt-other-ink); }
.kt-title { font-size: 15px; display: flex; gap: 6px; align-items: baseline; }
.kt-title h1 { font-size: 15px; font-weight: 700; }
.kt-count { font-size: 13px; color: var(--kt-meta); }
.kt-people { display: flex; flex: 1; min-width: 0; }
.kt-people .av { width: 24px; height: 24px; font-size: 9px; margin-left: -6px; border: 1.5px solid var(--kt-head); border-radius: 9px; }
.kt-people .av:first-child { margin-left: 0; }
.kt-logs { position: relative; font-size: 13px; }
.kt-logs > summary { cursor: pointer; color: var(--kt-other-ink); list-style: none; }
.kt-logs > summary::-webkit-details-marker { display: none; }
.kt-logs-pop { position: absolute; right: 0; top: 26px; z-index: 5; width: min(420px, 78vw); max-height: 60dvh; overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--float); padding: 6px; }
.kt-sess { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: inherit; font: inherit; }
.kt-sess:hover, .kt-sess.on { background: var(--surface-2); }
.kt-sess b { display: block; font-size: 13.5px; font-weight: 600; }
.kt-sess span { font-size: 12px; color: var(--muted); }
.kt-logtext { white-space: pre-wrap; font: 12.5px/1.6 inherit; font-family: inherit; margin: 6px 0 0; padding: 10px; background: var(--surface-2); border-radius: 6px; }
.kt-list { flex: 1; overflow-y: auto; padding: 14px 12px 8px; }
.kt-empty { text-align: center; color: var(--kt-other-ink); font-size: 14px; padding: 48px 0; }
.kt-day { text-align: center; margin: 14px 0; }
.kt-day span { display: inline-block; font-size: 12px; padding: 4px 12px; border-radius: 99px; background: rgba(0, 0, 0, .18); color: #fff; }
.kt-msg { display: flex; gap: 8px; margin-top: 3px; }
.kt-msg.first { margin-top: 12px; }
.kt-msg .av { flex: none; width: 38px; height: 38px; border-radius: 14px; font-size: 12px; }
.kt-gap { flex: none; width: 38px; }
.kt-col { min-width: 0; flex: 1; }
.kt-name { font-size: 12.5px; color: var(--kt-other-ink); margin-bottom: 4px; }
.kt-line { display: flex; align-items: flex-end; gap: 5px; }
.kt-bubble { background: var(--kt-other); color: var(--kt-other-ink); padding: 7px 11px; border-radius: 3px 12px 12px 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-width: min(72%, 520px); }
.kt-bubble a { color: inherit; text-decoration: underline; }
.kt-time { flex: none; font-size: 11px; color: var(--kt-meta); white-space: nowrap; }
.kt-msg.me { flex-direction: column; align-items: flex-end; }
.kt-msg.me .kt-line { justify-content: flex-end; width: 100%; }
.kt-msg.me .kt-bubble { background: var(--kt-me); color: var(--kt-me-ink); border-radius: 12px 3px 12px 12px; }
.kt-msg .peeks { margin-top: 4px; max-width: min(84%, 560px); }
.kt-msg.me .peeks { width: 84%; }
.kt-typing { display: flex; align-items: center; gap: 4px; margin: 10px 0 2px 46px; font-size: 12.5px; color: var(--kt-meta); }
.kt-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--kt-meta); animation: kt-blink 1.2s infinite; }
.kt-typing i:nth-child(2) { animation-delay: .2s; }
.kt-typing i:nth-child(3) { animation-delay: .4s; }
.kt-typing span { margin-left: 4px; }
@keyframes kt-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .kt-typing i { animation: none; } }
.kt-compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; background: var(--kt-bar); border-top: 1px solid var(--line); }
.kt-compose textarea { flex: 1; min-height: 38px; max-height: 120px; resize: none; border: 0; background: transparent; box-shadow: none; padding: 8px 6px; font-size: 16px; line-height: 1.4; color: var(--ink); }
.kt-compose textarea:focus { outline: none; box-shadow: none; }
.kt-attach { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; color: var(--muted); cursor: pointer; }
.kt-attach:hover { background: var(--surface-2); color: var(--ink); }
.kt-attach.off { opacity: .4; cursor: default; pointer-events: none; }
.kt-attach svg { width: 20px; height: 20px; }
.kt-pending { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px; background: var(--kt-bar); }
.kt-pending:not(:empty) { padding-top: 8px; border-top: 1px solid var(--line); }
.kt-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.kt-chip button { border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 4px; cursor: pointer; }
.kt-files { display: flex; flex-direction: column; gap: 4px; }
.kt-bubble > .kt-files:not(:first-child) { margin-top: 6px; }
.kt-img img { display: block; max-width: 100%; max-height: 260px; border-radius: 6px; }
.kt-file { white-space: normal; }
.kt-file span { opacity: .7; font-size: 12px; }
.kt-send { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 6px; background: var(--kt-me); color: var(--kt-me-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.kt-send:disabled { background: var(--surface-2); color: var(--faint); cursor: default; }
@media (max-width: 900px) { .kt { border-radius: var(--r-sm); } }
@media (max-width: 560px) { .kt-people { display: none; } .kt-title { flex: 1; } }
