/* 지성컴퍼니 AI Council — 아이보리 에디토리얼 */
:root {
  --paper: #f6f2e9;
  --surface: #fffdf8;
  --surface-2: #f1ebdf;
  --ink: #1c1b19;
  --ink-2: #4f4b44;
  --ink-3: #8a8478;
  --rule: #e4ddcf;
  --rule-2: #cfc6b4;
  --accent: #9a7b45;
  --accent-soft: #d8c49a;
  --night: #1f1d1a;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', 'AppleMyungjo', 'Batang', serif;
  --sans: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --shadow: 0 1px 0 rgba(28, 27, 25, .02), 0 22px 44px -34px rgba(28, 27, 25, .38);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 15px/1.6 var(--sans); color: var(--ink); background: var(--paper);
  letter-spacing: -.005em; -webkit-font-smoothing: antialiased;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
code { font: 12.5px/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; }
button { font-family: inherit; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.error { color: #9b2c2c; font-weight: 600; }
.warn { color: #9a5b1c; font-weight: 600; }
.loading, .waiting { text-align: center; padding: 48px 0; font-family: var(--serif); color: var(--ink-3); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── 상단 ── */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 32px; background: rgba(246, 242, 233, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-word { font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: .3em; }
.brand-sep { width: 1px; height: 16px; background: var(--rule-2); }
.brand-sub { font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.topbar nav { display: flex; gap: 28px; }
.topbar nav a { text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.topbar nav a:hover { color: var(--ink); }
.topbar nav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.banner { background: #f8ecdf; border-bottom: 1px solid #e6cdb0; color: #7a4a1f; padding: 12px 32px; font-size: 14px; }

/* ── 공통 타이포 ── */
.page { max-width: 1180px; margin: 0 auto; padding: 60px 32px 100px; }
.page.narrow { max-width: 780px; }
.page-head { margin-bottom: 44px; }
.eyebrow { margin: 0 0 14px; font-size: 11.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.eyebrow .sep { display: inline-block; width: 18px; height: 1px; background: var(--accent); vertical-align: middle; margin: 0 10px; }
.display { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.18; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: anywhere; }
.display-sm { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.25; letter-spacing: -.015em; }
.lede { max-width: 640px; margin: 18px 0 0; font-size: 16.5px; line-height: 1.75; color: var(--ink-2); word-break: keep-all; }
.footnote { margin-top: 48px; text-align: center; font-size: 13px; color: var(--ink-3); }
.label { margin: 0 0 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 600 14px var(--sans); letter-spacing: .01em; color: var(--ink); text-decoration: none;
  background: transparent; border: 1px solid var(--rule-2); border-radius: 6px; padding: 11px 20px;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #000; transform: translateY(-1px); }
.btn.danger { color: #9b2c2c; border-color: #dcb4ad; }
.btn.danger:hover { border-color: #9b2c2c; }
.btn.large { padding: 15px 48px; font-size: 15.5px; }
.btn.small { padding: 7px 14px; font-size: 13px; }

/* ── 인물 사진 ── */
.face { display: inline-block; flex: none; object-fit: cover; object-position: center 28%; background: var(--surface-2); vertical-align: middle; }
.face.round { border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px color-mix(in srgb, var(--pc) 50%, var(--rule-2)); }
.face.portrait { border-radius: 0; }
.face.photo { background-color: var(--surface-2); background-repeat: no-repeat; background-size: var(--zoom, 140%) auto; background-position: var(--x, 50%) var(--y, 0%); }
.face.mono {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 500; line-height: 1; color: #f8f3e7; letter-spacing: 0;
  background:
    radial-gradient(120% 90% at 28% 18%, rgba(255, 255, 255, .22), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--pc) 82%, #fff) 0%, var(--pc) 48%, color-mix(in srgb, var(--pc) 72%, #000) 100%);
}

/* ── 조직 ── */
.org-tree { overflow-x: auto; padding: 4px 4px 12px; }
.org-tree ul { display: flex; justify-content: center; position: relative; margin: 0; padding: 36px 0 0; }
.org-tree > ul { padding-top: 0; width: max-content; min-width: 100%; }
.org-tree li { list-style: none; position: relative; display: flex; flex-direction: column; align-items: center; padding: 36px 7px 0; }
.org-tree li::before, .org-tree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 36px; border-top: 1px solid var(--rule-2); }
.org-tree li::after { right: auto; left: 50%; border-left: 1px solid var(--rule-2); }
.org-tree li:only-child::before, .org-tree li:only-child::after { display: none; }
.org-tree li:only-child { padding-top: 0; }
.org-tree li:first-child::before, .org-tree li:last-child::after { border: 0; }
.org-tree li:last-child::before { border-right: 1px solid var(--rule-2); border-radius: 0 6px 0 0; }
.org-tree li:first-child::after { border-radius: 6px 0 0 0; }
.org-tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 36px; border-left: 1px solid var(--rule-2); }
@media (min-width: 761px) {   /* 팀장이 한 명뿐인 줄도 옆 줄과 같은 높이에 */
  .org-tree ul ul > li:only-child { padding-top: 36px; }
  .org-tree ul ul > li:only-child::after { display: block; border-top: 0; border-left: 1px solid var(--rule-2); border-radius: 0; }
}

.p-card {
  all: unset; box-sizing: border-box; cursor: pointer; width: 140px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease;
}
.p-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(28, 27, 25, .02), 0 28px 48px -30px rgba(28, 27, 25, .5); }
.p-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.p-photo { display: block; line-height: 0; }
.p-photo .face { width: 100% !important; height: auto !important; aspect-ratio: 4 / 5; }
.p-body { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px; box-shadow: inset 0 2px 0 var(--pc); }
.p-title { font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.p-name { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.p-dept { font-size: 12.5px; color: var(--ink-3); }
.p-card.lead { width: 168px; }
.p-card.lead .p-body { background: var(--night); color: var(--paper); box-shadow: inset 0 2px 0 var(--accent); }
.p-card.lead .p-title { color: var(--accent-soft); }
.p-card.lead .p-dept { color: #a39d90; }
/* 창이 좁아 줄여도 안 들어가면 (태블릿 세로 등) 휴대폰처럼 목록으로 — app.js fitTree 가 .as-list 를 붙임 */
.org-tree.as-list ul { display: block; padding: 0 0 0 16px; }
.org-tree.as-list > ul { padding-left: 0; width: auto; min-width: 0; }
.org-tree.as-list ul ul { margin-left: 18px; border-left: 1px solid var(--rule-2); }
.org-tree.as-list li, .org-tree.as-list ul ul > li:only-child { display: block; padding: 12px 0 0; }
.org-tree.as-list li::before, .org-tree.as-list li::after, .org-tree.as-list ul ul::before, .org-tree.as-list ul ul > li:only-child::after { display: none; }
.org-tree.as-list .p-card, .org-tree.as-list .p-card.lead { width: 100%; flex-direction: row; }
/* 회의 밖 실무 담당(worker) — 상사 카드 밑 연결선 옆 작은 이름표. 높이·칸을 차지하지 않아 조직도가 넓어지거나 아래 칸이 밀리지 않음 */
.org-aide { position: relative; height: 0; width: 100%; }
.org-aide .aide { position: absolute; top: 4px; left: calc(50% + 8px); z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border: 1px dashed var(--pc); border-radius: 999px; background: var(--surface); font: inherit; color: inherit; cursor: pointer; text-align: left; white-space: nowrap; }
.org-aide .aide:hover { border-style: solid; }
.org-aide .aide b { display: block; font-size: 12px; line-height: 1.15; }
.org-aide .aide small { display: block; font-size: 10px; line-height: 1.1; color: var(--ink-3); }
.org-tree.as-list .org-aide { height: auto; padding: 6px 0 0 18px; }
.org-tree.as-list .org-aide .aide { position: static; }
.org-tree.as-list .p-photo { width: 84px; flex: none; }
.org-tree.as-list .p-body { justify-content: center; box-shadow: inset 2px 0 0 var(--pc); }
.org-tree.as-list .p-card.lead .p-body { box-shadow: inset 2px 0 0 var(--accent); flex: 1; }

/* ── 프로필 ── */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(28, 27, 25, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet { position: relative; width: min(880px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 10px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45); }
.sheet .x { position: absolute; top: 16px; right: 16px; z-index: 1; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--rule-2); background: var(--surface); font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-2); }
.sheet .x:hover { border-color: var(--ink); color: var(--ink); }
.sheet-grid { display: grid; grid-template-columns: 300px 1fr; min-height: 420px; }
.sheet-photo { line-height: 0; box-shadow: inset -1px 0 0 var(--rule); }
.sheet-photo .face { width: 100% !important; height: 100% !important; min-height: 375px; }
.sheet-photo .face.photo { background-size: cover; background-position: center 28%; }   /* 프로필 칸은 세로가 길어 칸을 꽉 채움 */
.sheet-body { padding: 44px 44px 40px; }
.sheet-body .display-sm { margin-bottom: 14px; }
.sheet-intro { margin: 0 0 18px; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; word-break: keep-all; }
.sheet-quote { margin: 0 0 22px; padding: 2px 0 2px 16px; border-left: 2px solid var(--pc); font-family: var(--serif); font-size: 15.5px; line-height: 1.7; color: var(--ink); word-break: keep-all; }
.facts { display: grid; grid-template-columns: 88px 1fr; margin: 0 0 24px; border-top: 1px solid var(--rule); }
.facts dt, .facts dd { padding: 11px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--ink-3); }
.facts dd { font-size: 14.5px; word-break: keep-all; }
.work-how { margin: -8px 0 22px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.work-how summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 4px 0; }
.work-how .label { margin: 10px 0 4px; }
.work-how ol, .work-how ul { margin: 0 0 6px 18px; padding: 0; font-size: 14px; line-height: 1.6; word-break: keep-all; }
.dot { margin: 0 7px; color: var(--rule-2); }
.mood-strip { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
.mood-strip figure { margin: 0; text-align: center; }
.mood-strip figcaption { margin-top: 6px; font-size: 11px; color: var(--ink-3); }

/* ── 새 회의 ── */
.section { display: flex; align-items: baseline; gap: 14px; margin: 46px 0 18px; padding-top: 26px; border-top: 1px solid var(--rule); font-family: var(--serif); font-size: 21px; font-weight: 600; }
.section span { font: 600 12px var(--sans); letter-spacing: .14em; color: var(--accent); }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mode, .flow {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; transition: border-color .2s, box-shadow .2s;
}
.mode { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 22px; }
.mode-name { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.mode-desc { font-size: 13px; line-height: 1.65; color: var(--ink-2); word-break: keep-all; }
.mode:hover, .flow:hover { border-color: var(--rule-2); }
.mode.on, .flow.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mode.on::after { content: ''; position: absolute; top: 18px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.mode:focus-visible, .flow:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mode-body { margin-top: 22px; }
.flows { display: flex; flex-direction: column; gap: 10px; }
.flow { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 22px; }
.flow-head { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; min-width: 0; }
.flow-name { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.flow-desc { font-size: 13px; color: var(--ink-3); }
.flow-steps { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 10px 8px; flex: 0 1 auto; min-width: 0; }   /* 단계가 많으면 다음 줄로 */
.arrow { position: relative; width: 16px; height: 1px; margin-top: 20px; background: var(--rule-2); }
.arrow::after { content: ''; position: absolute; right: 0; top: -3px; width: 6px; height: 6px; border-top: 1px solid var(--rule-2); border-right: 1px solid var(--rule-2); transform: rotate(45deg); }
.cast { display: flex; flex-wrap: wrap; gap: 18px; }
.cast-item { display: inline-flex; flex-direction: column; align-items: center; gap: 7px; }
.cast-item small { font-size: 12px; color: var(--ink-2); }
.pickable { all: unset; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px; border-radius: 10px; opacity: .45; filter: grayscale(1); transition: opacity .2s, filter .2s; }
.pickable.on { opacity: 1; filter: none; }
.pickable:focus-visible { outline: 2px solid var(--accent); }
.mode-body .label + .cast { margin-bottom: 22px; }
.seg { display: inline-flex; margin: 0 12px 0 10px; border: 1px solid var(--rule-2); border-radius: 999px; overflow: hidden; vertical-align: middle; }
.seg button { all: unset; cursor: pointer; padding: 4px 14px; font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.seg button.on { background: var(--ink); color: var(--paper); }
.field { display: block; margin: 0 0 18px; }
.field > span { display: block; margin-bottom: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; color: var(--ink-3); }
.field em { font-style: normal; letter-spacing: .04em; font-weight: 500; margin-left: 6px; color: var(--rule-2); }
.field input, .field textarea {
  width: 100%; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-2); border-radius: 8px; padding: 14px 16px; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(154, 123, 69, .16); }
.field textarea { resize: vertical; min-height: 160px; }
.mat-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.go-row { text-align: center; margin-top: 40px; }

/* ── 회의록 ── */
.issues { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.issue {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 224px; padding: 22px 24px 18px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow);
  text-decoration: none; transition: transform .3s, box-shadow .3s;
}
.issue:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(28, 27, 25, .02), 0 28px 48px -32px rgba(28, 27, 25, .5); }
.issue-top { display: flex; align-items: center; justify-content: space-between; }
.issue-no { font-family: var(--serif); font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--accent); }
.issue-title { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.38; letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere; }
.issue-meta { font-size: 13px; color: var(--ink-3); }
.issue-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; }
.issue-date { font-size: 12px; color: var(--ink-3); }
.issue .del { position: absolute; top: -11px; right: -11px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule-2); background: var(--surface); color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1; opacity: 0; transition: opacity .2s; }
.issue:hover .del, .issue .del:focus-visible { opacity: 1; }
@media (hover: none) { .issue .del { opacity: 1; } }
.stack { display: inline-flex; flex-wrap: wrap; align-items: center; row-gap: 6px; max-width: 100%; padding-left: 8px; }   /* 참석자가 많으면 다음 줄로 */
.stack > * { margin-left: -8px; line-height: 0; }
.status { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rule-2); color: var(--ink-2); background: var(--surface); }
.s-running { color: #2f6b4f; border-color: #a9cdb9; background: #eef6f0; }
.s-queued { color: #8a6a1f; border-color: #e0cf9f; background: #faf4e2; }
.s-error { color: #9b2c2c; border-color: #e1b9b2; background: #fbf1ef; }
.s-stopped { color: var(--ink-3); }
.empty { text-align: center; padding: 60px 0; }
.empty .display-sm { margin-bottom: 20px; color: var(--ink-2); }

/* ── 회의 장면 ── */
.session { max-width: 1140px; margin: 0 auto; padding: 60px 32px 100px; }
.cover { padding-bottom: 30px; margin-bottom: 38px; border-bottom: 1px solid var(--rule); }
.cover .display { max-width: 920px; }
.cover-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; font-size: 13.5px; }
.cover-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; grid-auto-flow: row dense; }
.panel {
  position: relative; padding: 20px 24px 24px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow);
}
.panel::before { content: ''; position: absolute; left: 24px; top: -1px; width: 34px; height: 2px; background: var(--pc); }
.panel.wide { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.step-no { font-family: var(--serif); font-size: 14px; font-weight: 600; letter-spacing: .06em; color: var(--accent); }
.step-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mood-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); }
.mood-tag i { width: 6px; height: 6px; border-radius: 50%; background: #8a8478; }
.mood-tag.m-happy i { background: #5c8a5e; }
.mood-tag.m-serious i { background: #6b6459; }
.mood-tag.m-worried i { background: #b07a3c; }
.mood-tag.m-surprised i { background: #a14d4d; }
.mood-tag.m-thinking i { background: #7a7fa8; animation: pulse 1.4s ease-in-out infinite; }
.scene { display: flex; align-items: flex-start; gap: 20px; }
.panel.right .scene { flex-direction: row-reverse; }
.speaker { flex: none; width: 96px; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.speaker figcaption { display: flex; flex-direction: column; gap: 1px; }
.speaker b { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.speaker figcaption span { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.bubble {
  --bb: color-mix(in srgb, var(--pc) 20%, var(--rule));
  position: relative; flex: 1; min-width: 0; margin: 4px 0 0; padding: 18px 22px;
  background: color-mix(in srgb, var(--pc) 5%, #fbf8f1); border: 1px solid var(--bb); border-radius: 14px;
}
.bubble::before {
  content: ''; position: absolute; top: 28px; left: -7px; width: 12px; height: 12px; background: inherit;
  border-left: 1px solid var(--bb); border-bottom: 1px solid var(--bb); transform: rotate(45deg);
}
.panel.right .bubble::before { left: auto; right: -7px; border: 0; border-right: 1px solid var(--bb); border-top: 1px solid var(--bb); }
.bubble p { margin: 0; font-family: var(--serif); font-size: 18.5px; font-weight: 500; line-height: 1.62; color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.panel.is-thinking .bubble { border-style: dashed; }
.dots { display: inline-flex; gap: 5px; vertical-align: middle; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: pulse 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.more {
  all: unset; cursor: pointer; display: inline-block; margin: 18px 0 0 116px;
  font-size: 13px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 1px;
}
.more::after { content: ' →'; }
.panel.right .more { margin-left: 0; }
.more:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.live {
  margin: 16px 0 0 116px; max-height: 96px; overflow: hidden; white-space: pre-wrap; font-size: 12.5px; line-height: 1.6; color: var(--ink-3);
  border-left: 1px solid var(--rule-2); padding-left: 12px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%);
}
.panel.right .live { margin-left: 0; }
.report {
  margin-top: 20px; padding: 24px 28px; background: #fff; border: 1px solid var(--rule); border-radius: 8px;
  font-size: 14.5px; line-height: 1.85; color: var(--ink); overflow-wrap: anywhere;
}
.report > :first-child { margin-top: 0; }
.report h1, .report h2, .report h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 22px 0 8px; }
.report table { border-collapse: collapse; display: block; overflow-x: auto; margin: 12px 0; font-size: 13.5px; }
.report th, .report td { padding: 9px 14px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.report th { background: var(--surface-2); font-weight: 600; border-bottom-color: var(--rule-2); }
.report code { font-size: 12px; }
.report ul, .report ol { padding-left: 22px; }
.report.err { background: #fbf1ef; }
.erp-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0 116px; font-size: 12px; color: var(--ink-2); }
.panel.right .erp-tag { margin-left: 0; }
.talk { margin: 10px 0 0 116px; display: grid; gap: 4px; }
.panel.right .talk { margin-left: 0; }
.ask { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.ask b { color: var(--pc, var(--ink)); font-weight: 700; }
.ask q { color: var(--ink); quotes: "“" "”"; }
.ask-arrow { display: inline-block; width: 18px; color: var(--pc, var(--ink-2)); font-weight: 700; }
.ask.reply { font-size: 12.5px; }
@media (max-width: 640px) { .talk { margin-left: 0; } }
.erp-badge { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: #2f4a6d; border: 1px solid #b9c6d8; background: #eef2f8; border-radius: 4px; padding: 1px 6px; }
.erp-err { color: #9a5b1c; border-bottom: 1px dotted #9a5b1c; cursor: help; }
.erp-data { margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 12px; }
.erp-data summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.erp-data table { font-size: 12.5px; }
.s-erp { color: #2f4a6d; border-color: #b9c6d8; background: #eef2f8; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--ink); }
.check b { color: var(--ink); }
.plain { white-space: pre-wrap; }

/* 안건 (대표님) */
.panel.request { background: var(--night); border-color: var(--night); color: var(--paper); }
.panel.request::before { background: var(--accent); }
.panel.request .step-label { color: var(--accent-soft); letter-spacing: .2em; font-size: 11.5px; }
.panel.request .bubble { --bb: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); }
.panel.request .bubble p { color: var(--paper); font-size: 23px; }
.panel.request .speaker b { color: var(--paper); }
.panel.request .speaker figcaption span { color: #a39d90; }
.panel.request .face.round { box-shadow: 0 0 0 2px var(--night), 0 0 0 3px var(--accent); }
.panel.request .more { color: var(--paper); border-color: var(--paper); }

.closing { margin-top: 44px; padding: 40px 20px 44px; text-align: center; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.closing-title { margin: 16px 0 8px; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.closing .btn { margin-top: 18px; }
.closing.is-error .closing-title { color: #9b2c2c; }
.ornament { display: inline-flex; align-items: center; gap: 12px; }
.ornament::before, .ornament::after { content: ''; width: 46px; height: 1px; background: var(--accent); }
.ornament i { width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }
.tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
/* 대표님 발언 · 이어서 회의하기 */
.say-box { max-width: 760px; margin: 34px auto 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule-2); border-radius: 14px; box-shadow: var(--shadow); }
.say-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.say-head b { font-family: var(--serif); font-size: 17px; }
.say-head p { margin: 2px 0 0; }
.say-kind { margin: 0 0 10px; }
.say-box textarea { display: block; width: 100%; box-sizing: border-box; min-height: 76px; resize: vertical; padding: 12px 14px; font: 15px/1.55 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--rule-2); border-radius: 10px; }
.say-box textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(154, 123, 69, .16); }
.say-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.say-to { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.say-to select { max-width: 240px; padding: 7px 10px; font: 14px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--rule-2); border-radius: 8px; }
.say-keys { margin-left: auto; }
.say-box .error { margin: 10px 0 0; }
@media (max-width: 560px) {
  .say-box { padding: 14px; }
  .say-to { width: 100%; }
  .say-to select { flex: 1; max-width: none; }
  .say-keys { display: none; }
  .say-foot .btn { width: 100%; }
}
.enter { animation: enter .6s cubic-bezier(.2, .7, .2, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── 2판: 로그인 · 메뉴 · 공용 부품 ── */
.topbar nav { flex: 1; justify-content: center; }
.user-slot { position: relative; display: flex; justify-content: flex-end; align-items: center; gap: 10px; min-width: 80px; }
.bell { position: relative; display: inline-flex; align-items: center; color: #a23b2a; padding: 6px; border-radius: 999px; text-decoration: none; animation: bell-ring 2.4s ease-in-out 3; }
.bell b { position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #c0392b; color: #fff; font-size: 11px; line-height: 17px; text-align: center; font-weight: 700; }
.bell[hidden] { display: none; }
@keyframes bell-ring { 0%, 90%, 100% { transform: rotate(0); } 92% { transform: rotate(14deg); } 95% { transform: rotate(-12deg); } 98% { transform: rotate(6deg); } }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 60; max-width: 360px; display: grid; gap: 3px; padding: 14px 16px; background: var(--ink, #1d1b18); color: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); text-decoration: none; font-size: 13.5px; line-height: 1.45; }
.toast b { font-size: 14px; }
.toast small { opacity: .7; }
.toast[hidden] { display: none; }
.ask-quote { margin: 8px 0; padding: 10px 14px; border-left: 3px solid #c0392b; background: #fbf3f1; border-radius: 6px; font-size: 15px; color: var(--ink); }
.inbox-q { margin-bottom: 14px; }
.inbox-q .card-top { display: flex; align-items: center; gap: 8px; }
.ask.to-ceo b { color: #a23b2a; }
.ask.unanswered q { color: var(--ink-2); }
.retry-note { margin: 6px 0; padding: 8px 12px; border-radius: 6px; background: #fdf3e6; color: #8a4b12; font-size: 13px; }
.inbox-new { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: #fdf6f4; border: 1px solid #f0c9c1; font-size: 14px; }
.inbox-done { margin-bottom: 14px; color: var(--ink-2); font-size: 14px; }
.today-item.ceo-q { border-left-color: #c0392b; background: #fdf6f4; }
@media (max-width: 560px) { .toast { left: 12px; right: 12px; max-width: none; } }
.user-chip { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding: 6px 12px; border: 1px solid var(--rule-2); border-radius: 999px; }
.user-chip:hover { border-color: var(--ink); color: var(--ink); }
.caret { width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.user-menu { position: absolute; top: 44px; right: 0; z-index: 30; min-width: 200px; display: flex; flex-direction: column; padding: 8px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); }
.user-menu p { margin: 4px 10px 8px; }
.user-menu a, .user-menu button { all: unset; cursor: pointer; padding: 9px 10px; border-radius: 6px; font-size: 14px; }
.user-menu a:hover, .user-menu button:hover { background: var(--surface-2); }
body.logged-out .topbar nav, body.logged-out .user-slot { visibility: hidden; }
.login { max-width: 440px; margin: 0 auto; padding: 70px 24px 100px; text-align: center; }
.login .display { margin-bottom: 32px; }
.login-faces { display: flex; justify-content: center; padding-left: 10px; margin-bottom: 28px; }
.login-faces > * { margin-left: -10px; }
.login-form { text-align: left; }
.login-form .btn { width: 100%; margin: 6px 0 16px; }
.note { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: #f8ecdf; color: #7a4a1f; font-size: 13.5px; }
.note.warn { font-weight: 500; }
.ops-lv { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ops-lv.ok { background: #e7f0e6; color: #2f5d2c; }
.ops-lv.warn { background: #f8ecdf; color: #8a4f17; }
.ops-lv.fail { background: #f6dede; color: #8a1f1f; }
.ops-lv.off { background: var(--surface-2); color: var(--ink-3); }
.tbl.ops tr.lv-fail td:first-child { box-shadow: inset 3px 0 0 #b03a3a; }
.tbl.ops tr.lv-warn td:first-child { box-shadow: inset 3px 0 0 #c98a3c; }
.today-item.ops-alert { border-color: #e6cdb0; background: #fbf3ea; }
.tag { display: inline-block; padding: 1px 7px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 11px; color: var(--ink-3); vertical-align: middle; }
.accent { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.chip { all: unset; cursor: pointer; font-size: 13px; padding: 5px 14px; border: 1px solid var(--rule-2); border-radius: 999px; color: var(--ink-2); text-decoration: none; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips.filter { margin-bottom: 26px; }
.tags { display: inline-flex; gap: 6px; }
.s-lock { color: #6b4a6e; border-color: #d5c3d6; background: #f6f0f6; }
.s-doc { color: #3d5a45; border-color: #b8cfbe; background: #eef5f0; }
.erp-badge.doc { color: #3d5a45; border-color: #b8cfbe; background: #eef5f0; }
.erp-badge.calc { color: #6b4a6e; border-color: #d5c3d6; background: #f6f0f6; }
.erp-badge.warn { color: #9a5b1c; border-color: #e6cdb0; background: #f8ecdf; }
.sep-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--rule-2); }
.checks { margin: 16px 0; padding: 12px 16px; border-radius: 8px; background: #fbf5ea; border: 1px solid #ecd9b8; font-size: 13.5px; }
.checks > b { display: block; margin-bottom: 6px; color: #8a6a1f; }
.checks > div { padding: 3px 0; }
.old { text-decoration: line-through; color: #9b2c2c; }
.new { color: #2f6b4f; font-weight: 600; }
.ok-line { color: #2f6b4f; font-weight: 600; font-size: 14px; }
.doc-hit { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.doc-hit p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; }
.form-sheet { max-width: 640px; }
.form-body { padding: 36px 36px 30px; }
.form-body .display-sm { margin-bottom: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.field select { width: 100%; font: 15px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--rule-2); border-radius: 8px; padding: 13px 14px; }
.field.sm input, .field.sm select { padding: 9px 12px; font-size: 14.5px; }
.field.sm { margin-bottom: 12px; }
#fields textarea { min-height: 0; }
#fields textarea[rows="1"] { padding: 10px 14px; }
.check.sm { margin: 4px 0 10px; font-size: 13.5px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar select { font: 14px var(--sans); padding: 8px 10px; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--surface); max-width: 100%; }
.grow { flex: 1; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.card h4 { margin: 0; font-family: var(--serif); font-size: 17.5px; font-weight: 600; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.card h4 a { text-decoration: none; }
.card h4 a:hover { text-decoration: underline; }
.card p { margin: 0; }
.card details summary { cursor: pointer; font-size: 12.5px; color: var(--ink-3); }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.verdict, .tag, .dd { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--rule-2); color: var(--ink-2); background: var(--surface); }
.verdict.ok { color: #2f6b4f; border-color: #a9cdb9; background: #eef6f0; }
.verdict.mid { color: #8a6a1f; border-color: #e0cf9f; background: #faf4e2; }
.verdict.no { color: var(--ink-3); }
.dd { margin-left: auto; color: var(--ink); }
.dd.soon, .dl.soon .dd, .dls li.soon b { color: #9b2c2c; border-color: #e1b9b2; background: #fbf1ef; }
.reason { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.who { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); margin-left: auto; }
.dl-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.dl { display: grid; grid-template-columns: 82px minmax(0, 2fr) minmax(0, 1fr) 130px 120px; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; font-size: 14px; }
.dl .dd { margin: 0; text-align: center; }
.dl.over { opacity: .65; }
.dl .who { margin: 0; }
.dls { list-style: none; margin: 4px 0; padding: 0; font-size: 13.5px; }
.dls li { display: grid; grid-template-columns: 1fr auto 70px; gap: 10px; padding: 5px 0; border-bottom: 1px dotted var(--rule); }
.dls li b { text-align: right; font-size: 12px; }
.dls li.done { color: var(--ink-3); text-decoration: line-through; }
.dl-row { display: grid; grid-template-columns: 1fr 160px auto 40px; gap: 8px; align-items: center; margin-bottom: 6px; }
.dl-row input[type=text], .dl-row input:not([type]), .dl-row input[type=date] { padding: 8px 10px; border: 1px solid var(--rule-2); border-radius: 6px; font: 14px var(--sans); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.tbl th { background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.kv th { width: 34%; }
.tbl input:not([type=checkbox]), .tbl select { width: 100%; min-width: 80px; padding: 6px 8px; border: 1px solid var(--rule-2); border-radius: 6px; font: 13.5px var(--sans); background: #fff; }
.tbl.users .perms { display: flex; flex-direction: column; gap: 2px; min-width: 170px; }
.row-actions { display: flex; flex-direction: column; gap: 4px; }
.tbl tr.saved td { background: #eef6f0; transition: background .3s; }
.st-ok { color: #2f6b4f; }
.st-error { color: #9b2c2c; }
.st-pending { color: #8a6a1f; }
.doc-group .tbl { table-layout: fixed; }
.doc-group .tbl td:nth-child(1) { width: 40%; overflow-wrap: anywhere; }
.doc-group .tbl td:nth-child(2) { width: 30%; overflow-wrap: anywhere; }
.doc-group .tbl td:nth-child(3) { width: 12%; }
.doc-group .tbl td:nth-child(4) { width: 18%; }
.doc-group .tbl td:nth-child(5) { width: 200px; text-align: right; }   /* 옮기기·지우기 칸은 고정 — 창이 좁아도 버튼이 잘리지 않게 */
.drop { padding: 22px 24px 10px; border: 1.5px dashed var(--rule-2); border-radius: 12px; background: var(--surface); margin-bottom: 10px; transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--accent); background: #fbf6ec; }
.drop input[type=file] { font: 14px var(--sans); padding: 10px 0; }
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row input { flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--rule-2); border-radius: 8px; font: 15px var(--sans); background: var(--surface); }
.search-row select { flex: 0 0 200px; width: 200px; min-width: 0; padding: 0 10px; border: 1px solid var(--rule-2); border-radius: 8px; font: 14px var(--sans); background: var(--surface); text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }   /* 분류 이름이 길어도 너비는 그대로 */
.search-row .btn { flex: 0 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 28px; min-height: 210px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); text-decoration: none; transition: transform .3s, box-shadow .3s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(28, 27, 25, .02), 0 28px 48px -32px rgba(28, 27, 25, .5); }
.tile-no { font-family: var(--serif); font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--accent); }
.tile-title { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.tile-desc { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); word-break: keep-all; }
.card.calc .calc-out:not(:empty) { margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stats div { padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.stats b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 600; }
.stats span { font-size: 12.5px; color: var(--ink-3); }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .6s; }
.card.rec h4 { font-size: 16.5px; }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 20px; }
.card.idea { box-shadow: inset 0 3px 0 var(--pc), var(--shadow); padding-top: 22px; }
.card.idea h4 { font-size: 20px; margin: 4px 0 2px; }
.idea-people { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.idea-people .who { margin-left: 0; font-size: 13.5px; gap: 8px; }
.idea-facts { grid-template-columns: 78px 1fr; margin: 6px 0 4px; }
.idea-facts dd { font-size: 14px; line-height: 1.65; }
.theme-in { min-width: 240px; padding: 8px 12px; border: 1px solid var(--rule-2); border-radius: 6px; font: 14px var(--sans); background: var(--surface); }
.today { margin: -18px 0 34px; }
.today-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.today-item { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 8px; text-decoration: none; }
.today-item .label { margin: 0; font-size: 10.5px; }
.today-item b { font-size: 14.5px; font-weight: 600; line-height: 1.45; word-break: keep-all; }
.today-item small { font-size: 12.5px; color: var(--ink-3); }

/* ── 좁은 화면 ── */
@media (max-width: 900px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl { grid-template-columns: 70px minmax(0, 1fr); }
  .dl > span:nth-child(n+3), .dl .who { grid-column: 2; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .modes { grid-template-columns: minmax(0, 1fr); }
  .flow { flex-direction: column; align-items: stretch; gap: 14px; }
  .flow-head { flex-basis: auto; }
  .flow-steps { justify-content: flex-start; }
  .sheet-grid { grid-template-columns: 1fr; }
  .sheet-photo { box-shadow: inset 0 -1px 0 var(--rule); }
  .sheet-photo .face { height: 360px !important; min-height: 0; }
  .sheet-body { padding: 30px 26px 30px; }
}
@media (max-width: 1080px) {
  .topbar nav { gap: 20px; }
  .brand-sep, .brand-sub { display: none; }
}
@media (max-width: 920px) {
  .topbar { padding: 0 18px; height: auto; min-height: 56px; flex-wrap: wrap; row-gap: 0; }
  .topbar nav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 22px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .topbar nav a { white-space: nowrap; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 14px; }
  .topbar nav { gap: 18px; }
  .grid2, .grid4 { grid-template-columns: minmax(0, 1fr); }
  .form-body { padding: 28px 20px 24px; }
  .dl-row { grid-template-columns: 1fr 140px; }
  .tbl { display: block; overflow-x: auto; }
  .search-row { flex-wrap: wrap; }
  .search-row input { flex-basis: 100%; }
  .search-row select { flex: 1 1 0; width: auto; min-height: 44px; }
  .page, .session { padding: 40px 18px 80px; }
  .org-tree ul { display: block; padding: 0 0 0 16px; }
  .org-tree > ul { padding-left: 0; width: auto; min-width: 0; }
  .org-tree ul ul { margin-left: 18px; border-left: 1px solid var(--rule-2); }
  .org-tree li { display: block; padding: 12px 0 0; }
  .org-tree .org-aide { height: auto; padding: 6px 0 0 18px; }   /* 휴대폰: 이름표는 상사 카드 바로 밑 한 줄 */
  .org-tree .org-aide .aide { position: static; }
  .org-tree li::before, .org-tree li::after, .org-tree ul ul::before { display: none; }
  .p-card, .p-card.lead { width: 100%; flex-direction: row; }
  .p-photo { width: 84px; flex: none; }
  .p-body { justify-content: center; box-shadow: inset 2px 0 0 var(--pc); }
  .p-card.lead .p-body { box-shadow: inset 2px 0 0 var(--accent); flex: 1; }
  .cover-right { margin-left: 0; }
}
@media (max-width: 560px) {
  .scene, .panel.right .scene { flex-direction: column; gap: 14px; }
  .speaker { width: auto; flex-direction: row; gap: 12px; text-align: left; align-self: flex-start; }
  .panel.right .speaker { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
  .speaker .face.round { width: 52px !important; height: 52px !important; }
  .bubble { margin: 0; }
  .bubble::before { top: -7px; left: 22px; border: 0; border-left: 1px solid var(--bb); border-top: 1px solid var(--bb); }
  .panel.right .bubble::before { left: auto; right: 22px; border: 0; border-left: 1px solid var(--bb); border-top: 1px solid var(--bb); }
  .bubble p { font-size: 17px; }
  .panel.request .bubble p { font-size: 19px; }
  .more, .live, .erp-tag { margin-left: 0; }
  .issues, .ideas { grid-template-columns: minmax(0, 1fr); }
  .theme-in { min-width: 0; flex: 1 1 100%; }
  .theme-in + .btn { flex: 1 1 100%; }
}

/* ── 인쇄 ── */
@media print {
  .topbar, .banner, .no-print, .tools, .more, .issue .del { display: none !important; }
  body { background: #fff; }
  .session { padding: 0; }
  .panel, .issue, .p-card { box-shadow: none; break-inside: avoid; }
  .enter { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .enter, .dots i, .mood-tag i { animation: none; }
  .p-card, .btn, .issue { transition: none; }
}

/* 자료실: 분류(폴더)를 눌러야 문서가 펼쳐짐 · 옮기기 */
details.doc-group { margin: 0 0 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
details.doc-group > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
details.doc-group > summary::-webkit-details-marker { display: none; }
details.doc-group > summary::before { content: '▸'; color: var(--ink-3); transition: transform .2s; }
details.doc-group[open] > summary::before { transform: rotate(90deg); }
details.doc-group > summary:hover .doc-folder { text-decoration: underline; }
.doc-folder { font-weight: 600; }
.doc-n { padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.doc-note { flex-basis: 100%; padding-left: 18px; }
details.doc-group > .tbl { width: calc(100% - 24px); margin: 0 12px 12px; }
.doc-acts { text-align: right; white-space: nowrap; }
.tbl .doc-move { width: auto; min-width: 0; max-width: 112px; margin-right: 6px; padding: 5px 6px; font: 12.5px var(--sans); color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule-2); border-radius: 6px; }
.flow-groups { margin: 0 0 12px; }
@media (max-width: 760px) {   /* 휴대폰: 문서마다 이름 → 상태·크기·날짜 → 버튼 순서로 쌓음 */
  details.doc-group > .tbl, details.doc-group > .tbl tbody, details.doc-group > .tbl tr { display: block; width: auto; }
  details.doc-group > .tbl { overflow: visible; }
  details.doc-group > .tbl tr { padding: 10px 2px; border-top: 1px solid var(--rule); }
  details.doc-group .tbl td { display: inline-block; width: auto !important; padding: 2px 10px 2px 0; border: 0; text-align: left; vertical-align: baseline; }
  details.doc-group .tbl td:nth-child(1) { display: block; font-weight: 500; }
  details.doc-group .tbl td.doc-acts { display: flex; gap: 6px; margin-top: 6px; padding-right: 0; }
  .tbl .doc-move { flex: 1; max-width: none; margin: 0; }
}
