/* 문서 방 (docs.js · docs-editor.js) — 컨플루언스 클라우드처럼 깔끔하게: 흰 바탕, 파란 강조 #0C66E4 */
:root {
  --doc-blue: #0C66E4;
  --doc-blue-h: #0055CC;
  --doc-blue-bg: #E9F2FF;
  --doc-text: #172B4D;
  --doc-sub: #626F86;
  --doc-line: #DCDFE4;
  --doc-hover: #F1F2F4;
  --doc-side: #FAFBFC;
  --doc-code: #F7F8F9;
  --info-bg: #E9F2FF; --info-fg: #0C66E4;
  --warn-bg: #FFF7D6; --warn-fg: #B38600;
  --ok-bg: #DCFFF1; --ok-fg: #1F845A;
  --add-bg: #CFF5E1; --del-bg: #FFE2E0; --del-fg: #C9372C;
}
@media (prefers-color-scheme: dark) {
  :root {
    --doc-blue: #579DFF;
    --doc-blue-h: #85B8FF;
    --doc-blue-bg: #1C2B41;
    --doc-text: #DEE4EA;
    --doc-sub: #9FADBC;
    --doc-line: #2C333A;
    --doc-hover: #22272B;
    --doc-side: #161A1D;
    --doc-code: #1D2125;
    --info-bg: #1C2B41; --info-fg: #579DFF;
    --warn-bg: #332E1B; --warn-fg: #E2B203;
    --ok-bg: #1C3329; --ok-fg: #4BCE97;
    --add-bg: #1F4030; --del-bg: #3D2321; --del-fg: #FD9891;
  }
}

/* ── 방 목록 (카테고리 화살표 · 안 읽은 점 · 문서 방 그림 · 페이지 줄) */
.section-head .caret { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.section-head .section-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-head.static { cursor: default; padding-left: 12px; }
.section-head.static:hover { color: var(--sub); }
.section-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #1D7AFC; margin-left: 2px; }
.section-head.dragging { opacity: .45; }
.section-head.drop-before { box-shadow: 0 2px 0 var(--focus) inset; }
.section-head.drop-after { box-shadow: 0 -2px 0 var(--focus) inset; }
.av-doc { background: var(--doc-blue); border-radius: 30%; }
.av-doc .doc-glyph { width: 56%; height: 56%; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* '문서' 목록: 최근 본 페이지 · 즐겨찾기 · 문서 방 + 페이지 나무 (한 칸) */
.page-row { width: 100%; text-align: left; padding-left: 10px; }
.page-row .pr-room { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--dim); }
.droom { position: relative; display: flex; align-items: center; gap: 2px; height: 36px; padding: 0 4px; border-radius: 8px; }
.droom:hover { background: var(--hover); }
.droom.on { background: var(--active); }
.droom-main { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 8px; text-align: left; }
.droom-main .av.xs { width: 22px; height: 22px; border-radius: 7px; }
.droom-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; }
.droom .tr-acts { display: none; gap: 1px; }
.droom:hover .tr-acts { display: flex; }
.droom .tr-fold { color: var(--dim); }
.dtree { padding-bottom: 4px; }
.tr-none { padding: 4px 8px 6px calc(30px + var(--d) * 14px); font-size: 13px; color: var(--dim); }

/* 새 방: 대화 / 문서 고르기 */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 12px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow var(--t), background var(--t); }
.seg span .ic { grid-row: span 2; color: var(--sub); }
.seg b { font-size: 14px; }
.seg small { font-size: 12px; color: var(--sub); }
.seg input:checked + span { box-shadow: 0 0 0 2px var(--doc-blue) inset; background: var(--doc-blue-bg); }
.seg input:checked + span .ic { color: var(--doc-blue); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── 문서 화면: 대화 자리를 덮는다 */
.app.doc-mode .room-head, .app.doc-mode .pinned, .app.doc-mode .messages, .app.doc-mode .composer, .app.doc-mode .sel-bar { display: none !important; }
.doc-view { flex: 1; min-height: 0; display: flex; background: var(--bg); color: var(--doc-text); }
.dv { flex: 1; min-width: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.dv.solo { grid-template-columns: minmax(0, 1fr); }
.dv.solo .dv-side { display: none; }
.dv-side { background: var(--doc-side); border-right: 1px solid var(--doc-line); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.dv-room { display: flex; align-items: center; gap: 9px; padding: 16px 10px 10px 16px; }
.dv-room b { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-room .av.xs { width: 26px; height: 26px; }
.dv-x, .dv-label button { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--doc-sub); flex: none; }
.dv-x:hover, .dv-label button:hover { background: var(--doc-hover); color: var(--doc-text); }
.dv-x .ic, .dv-label .ic { width: 17px; height: 17px; }
.dv-back { display: none; }
.dv-label { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px 16px; font-size: 12px; font-weight: 700; color: var(--doc-sub); }
.dv-tree { flex: 1; overflow-y: auto; padding: 2px 8px 24px; }
.tr { position: relative; display: flex; align-items: center; gap: 4px; height: 32px; padding-left: calc(4px + var(--d) * 14px); padding-right: 4px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--doc-text); user-select: none; }
.tr:hover { background: var(--doc-hover); }
.tr.on { background: var(--doc-blue-bg); color: var(--doc-blue); font-weight: 600; }
.tr.on .tr-ic { color: var(--doc-blue); }
.tr-fold { width: 20px; height: 20px; flex: none; border-radius: 4px; display: grid; place-items: center; color: var(--doc-sub); }
.tr-fold:hover { background: rgba(9, 30, 66, .08); }
.tr-fold .ic { width: 14px; height: 14px; stroke-width: 2.2; transform: rotate(90deg); transition: transform var(--t) var(--ease); }
.tr-fold.shut .ic { transform: none; }
.tr-fold:not(.shut) .ic { transform: rotate(90deg); }
.tr-fold.none { pointer-events: none; }
.tr-ic { flex: none; color: var(--doc-sub); display: grid; }
.tr-ic .ic { width: 16px; height: 16px; }
.tr-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 2px; }
.tr-acts { display: none; gap: 1px; }
.tr:hover .tr-acts { display: flex; }
.tr-acts button { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; color: var(--doc-sub); }
.tr-acts button:hover { background: rgba(9, 30, 66, .1); color: var(--doc-text); }
.tr-acts .ic { width: 15px; height: 15px; }
.tr.dragging { opacity: .4; }
.tr.drop-inside { box-shadow: 0 0 0 2px var(--doc-blue) inset; background: var(--doc-blue-bg); }
.tr.drop-before::before, .tr.drop-after::after { content: ''; position: absolute; left: calc(8px + var(--d) * 14px); right: 4px; height: 2px; background: var(--doc-blue); border-radius: 2px; }
.tr.drop-before::before { top: -1px; }
.tr.drop-after::after { bottom: -1px; }
.tr-empty { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 6px; color: var(--doc-sub); font-size: 14px; }
.tr-empty:hover { background: var(--doc-hover); color: var(--doc-text); }
.tr-empty .ic { width: 16px; height: 16px; }

.dv-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.pg-bar { flex: none; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 28px; border-bottom: 1px solid transparent; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--doc-sub); overflow: hidden; white-space: nowrap; }
.crumbs button { color: inherit; padding: 2px 4px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.crumbs button:hover { color: var(--doc-text); text-decoration: underline; }
.cr-sep { color: var(--doc-line); }
.pg-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.pg-acts .icon-btn { width: 32px; height: 32px; border-radius: 6px; color: var(--doc-sub); }
.pg-acts .icon-btn:hover { background: var(--doc-hover); }
.pg-acts .icon-btn .ic { width: 18px; height: 18px; }
.pg-acts .starred { color: #E2B203; }
.pg-acts .starred .ic { fill: #E2B203; }
.save-state { font-size: 12.5px; color: var(--doc-sub); margin-right: 4px; white-space: nowrap; }
.vis-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 6px; font-size: 14px; color: var(--doc-text); box-shadow: 0 0 0 1px var(--doc-line) inset; }
.vis-btn:hover { background: var(--doc-hover); }
.vis-btn .ic { width: 16px; height: 16px; color: var(--doc-sub); }
.btn-blue { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 6px; background: var(--doc-blue); color: #fff; font-weight: 600; font-size: 14px; transition: background var(--t); }
.btn-blue:hover { background: var(--doc-blue-h); }
.btn-blue .ic { width: 16px; height: 16px; }
.btn-blue.sm, .btn-plain.sm { height: 30px; padding: 0 12px; font-size: 13.5px; }
.btn-plain.sm { display: inline-flex; align-items: center; border-radius: 6px; }

.pg-tools { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px 16px 6px 24px; border-top: 1px solid var(--doc-line); border-bottom: 1px solid var(--doc-line); background: var(--bg); }
.pg-tools[hidden] { display: none; }
.pg-tools button { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 5px; display: inline-grid; place-items: center; color: var(--doc-text); font-size: 15px; }
.pg-tools button:hover { background: var(--doc-hover); }
.pg-tools button.on { background: var(--doc-blue-bg); color: var(--doc-blue); }
.pg-tools button .ic { width: 18px; height: 18px; }
.pg-tools small { font-size: 12.5px; }
.tb-style { height: 30px; border: 0; border-radius: 5px; padding: 0 6px; background: none; color: var(--doc-text); font: inherit; font-size: 14px; cursor: pointer; }
.tb-style:hover { background: var(--doc-hover); }
.tb-sep { width: 1px; height: 18px; background: var(--doc-line); margin: 0 4px; }
.tb-gap { flex: 1; }
.tb-table { display: inline-flex; gap: 2px; padding-left: 4px; margin-left: 2px; border-left: 1px solid var(--doc-line); }
.tb-table[hidden] { display: none; }
.tb-a { font-weight: 700; text-decoration: underline 3px var(--doc-blue); text-underline-offset: 3px; }
.pg-tools .tb-insert { display: inline-flex; gap: 4px; padding: 0 10px 0 6px; font-size: 14px; font-weight: 600; }

.pg-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.pg { max-width: 760px; margin: 0 auto; padding: 28px 40px 120px; }
.pg-title { width: 100%; border: 0; outline: none; resize: none; overflow: hidden; background: none; color: var(--doc-text); font: 700 30px/1.25 Pretendard, system-ui, sans-serif; letter-spacing: -.02em; padding: 0; margin: 0 0 10px; min-height: 38px; }
.pg-title::placeholder { color: var(--doc-line); }
.pg-title[readonly] { cursor: default; }
.byline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--doc-sub); margin-bottom: 26px; flex-wrap: wrap; }
.by-av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }
.by-init { display: inline-grid; place-items: center; background: var(--doc-blue); color: #fff; font-size: 11px; font-weight: 700; }
.by-dot { color: var(--doc-line); }
.by-vis { display: inline-flex; align-items: center; gap: 3px; }
.by-vis .ic { width: 14px; height: 14px; }
.pg-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--doc-sub); padding: 40px; text-align: center; }
.pg-empty p { margin: 0; font-size: 16px; color: var(--doc-text); font-weight: 600; }
.pg-empty small { font-size: 13.5px; margin-bottom: 6px; }
.pg-loading { color: var(--doc-sub); font-size: 14px; padding: 8px 0; }

/* 본문 */
.pg-body { font-size: 16px; line-height: 1.7; color: var(--doc-text); }
.pg-prose { outline: none; min-height: 120px; }
.pg-prose > * + * { margin-top: .6em; }
.pg-prose p { margin: 0; }
.pg-prose h1, .pg-prose h2, .pg-prose h3 { line-height: 1.3; letter-spacing: -.015em; margin: 1.4em 0 .3em; }
.pg-prose h1 { font-size: 24px; }
.pg-prose h2 { font-size: 20px; }
.pg-prose h3 { font-size: 17px; }
.pg-prose > :first-child { margin-top: 0; }
.pg-prose a { color: var(--doc-blue); text-decoration: none; }
.pg-prose a:hover { text-decoration: underline; }
.pg-prose ul, .pg-prose ol { padding-left: 1.5em; margin: .4em 0; }
.pg-prose li > p { margin: 0; }
.pg-prose blockquote { margin: .8em 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--doc-line); color: var(--doc-sub); }
.pg-prose code { background: var(--doc-code); border-radius: 4px; padding: 1px 5px; font: 14px/1.5 ui-monospace, Consolas, monospace; }
.pg-prose pre { background: var(--doc-code); border: 1px solid var(--doc-line); border-radius: 8px; padding: 12px 16px; overflow-x: auto; }
.pg-prose pre code { background: none; padding: 0; }
.pg-prose hr { border: 0; border-top: 1px solid var(--doc-line); margin: 1.4em 0; }
.pg-prose hr.ProseMirror-selectednode { border-top-color: var(--doc-blue); }
.pg-prose img { max-width: 100%; height: auto; border-radius: 6px; display: block; }
.pg-prose img.ProseMirror-selectednode { outline: 2px solid var(--doc-blue); }
.pg-prose mark { border-radius: 3px; padding: 0 2px; color: inherit; }
.pg-prose p.is-empty:first-child::before, .pg-prose .is-empty.is-editor-empty::before { content: attr(data-placeholder); color: var(--doc-sub); opacity: .6; float: left; height: 0; pointer-events: none; }
.pg-prose[contenteditable="false"] .is-empty::before { content: none; }
.pg-prose .ProseMirror-gapcursor::after { border-top-color: var(--doc-text); }

/* 할 일 목록 */
.pg-prose ul[data-type="taskList"] { list-style: none; padding-left: 2px; }
.pg-prose ul[data-type="taskList"] li { display: flex; align-items: flex-start; gap: 8px; border-radius: 6px; }
.pg-prose ul[data-type="taskList"] li > label { flex: none; margin-top: 4px; user-select: none; }
.pg-prose ul[data-type="taskList"] li > label input { width: 16px; height: 16px; margin: 0; accent-color: var(--doc-blue); cursor: pointer; }
.pg-prose ul[data-type="taskList"] li > div { flex: 1; min-width: 0; }
.pg-prose ul[data-type="taskList"] li[data-checked="true"] > div > p { color: var(--doc-sub); text-decoration: line-through; }
.pg-prose li.flash { animation: doc-flash 1.6s var(--ease); }
@keyframes doc-flash { 0%, 60% { background: var(--doc-blue-bg); } 100% { background: transparent; } }
.pg-prose ul[data-type="taskList"] li > div > * + * { margin-top: .4em; }
.task-meta { flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; }
.task-meta [hidden] { display: none; }
.due-chip, .pri-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--doc-hover); color: var(--doc-sub); font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; }
.due-chip .ic, .pri-chip .ic { width: 13px; height: 13px; }
.due-chip.late { background: #FFECEB; color: #C9372C; }
.due-chip.nodue, .pri-chip.nopri { opacity: 0; background: none; }
.pg-prose[contenteditable="true"] li:hover > .task-meta > .nodue, .pg-prose[contenteditable="true"] li:hover > .task-meta > .nopri { opacity: 1; }
.pg-prose[contenteditable="false"] .due-chip, .pg-prose[contenteditable="false"] .pri-chip { cursor: default; }
/* 중요도: 긴급 빨강 · 높음 주황 · 보통 파랑 · 낮음 회색 */
[data-p="urgent"], li[data-priority="urgent"] { --pc: #C9372C; }
[data-p="high"], li[data-priority="high"] { --pc: #E56910; }
[data-p="medium"], li[data-priority="medium"] { --pc: #0C66E4; }
[data-p="low"], li[data-priority="low"] { --pc: #8590A2; }
.pri-chip:not(.nopri) { color: var(--pc); background: color-mix(in srgb, var(--pc) 13%, transparent); }
.pri-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--pc, transparent); box-shadow: 0 0 0 1.5px var(--pc, var(--doc-line)) inset; }
.pg-prose ul[data-type="taskList"] li[data-priority] > label input { appearance: none; -webkit-appearance: none; display: grid; place-items: center; border: 2px solid var(--pc); border-radius: 4px; background: color-mix(in srgb, var(--pc) 10%, transparent); }
.pg-prose ul[data-type="taskList"] li[data-priority] > label input:checked { background: var(--pc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.2 3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pg-prose ul[data-type="taskList"] li[data-priority="urgent"]:not([data-checked="true"]) > div > p:first-child { font-weight: 600; }

/* 표: 바깥은 둥근 1px 틀(.tableWrapper), 안쪽 선은 칸마다 왼쪽·위 1px. 넓은 표는 틀 안에서 가로로 민다 */
:root { --cbg-gray: rgba(9,30,66,.07); --cbg-blue: rgba(12,102,228,.13); --cbg-green: rgba(31,132,90,.15); --cbg-yellow: rgba(226,178,3,.2); --cbg-red: rgba(201,55,44,.14); --cbg-purple: rgba(110,93,198,.15); --tbl-sel: rgba(12,102,228,.14); }
@media (prefers-color-scheme: dark) {
  :root { --cbg-gray: rgba(161,189,217,.1); --cbg-blue: rgba(87,157,255,.2); --cbg-green: rgba(75,206,151,.17); --cbg-yellow: rgba(226,178,3,.2); --cbg-red: rgba(253,152,145,.17); --cbg-purple: rgba(159,143,239,.22); --tbl-sel: rgba(87,157,255,.22); }
}
html[data-theme="dark"] { --cbg-gray: rgba(161,189,217,.1); --cbg-blue: rgba(87,157,255,.2); --cbg-green: rgba(75,206,151,.17); --cbg-yellow: rgba(226,178,3,.2); --cbg-red: rgba(253,152,145,.17); --cbg-purple: rgba(159,143,239,.22); --tbl-sel: rgba(87,157,255,.22); }
html[data-theme="white"] { --cbg-gray: rgba(9,30,66,.07); --cbg-blue: rgba(12,102,228,.13); --cbg-green: rgba(31,132,90,.15); --cbg-yellow: rgba(226,178,3,.2); --cbg-red: rgba(201,55,44,.14); --cbg-purple: rgba(110,93,198,.15); --tbl-sel: rgba(12,102,228,.14); }
.pg-prose table { border-collapse: collapse; width: 100%; table-layout: fixed; margin: .8em 0; }
.pg-prose td, .pg-prose th { border: 1px solid var(--doc-line); padding: 7px 10px; vertical-align: top; position: relative; min-width: 48px; line-height: 1.55; box-sizing: border-box; overflow-wrap: anywhere; }
.pg-prose th { background: var(--doc-code); font-weight: 600; text-align: left; }
.pg-prose :is(td, th)[data-bg] { background-color: var(--cbg-gray) !important; }
.pg-prose :is(td, th)[data-bg="blue"] { background-color: var(--cbg-blue) !important; }
.pg-prose :is(td, th)[data-bg="green"] { background-color: var(--cbg-green) !important; }
.pg-prose :is(td, th)[data-bg="yellow"] { background-color: var(--cbg-yellow) !important; }
.pg-prose :is(td, th)[data-bg="red"] { background-color: var(--cbg-red) !important; }
.pg-prose :is(td, th)[data-bg="purple"] { background-color: var(--cbg-purple) !important; }
.pg-prose td > p, .pg-prose th > p { margin: 0; }
.pg-prose td > * + *, .pg-prose th > * + * { margin-top: .35em; }
.pg-prose td > ul, .pg-prose td > ol, .pg-prose th > ul, .pg-prose th > ol { margin: 0; padding-left: 1.3em; }
.pg-prose td > :first-child, .pg-prose th > :first-child { margin-top: 0; }
.pg-prose td > :last-child, .pg-prose th > :last-child { margin-bottom: 0; }
.pg-prose .tableWrapper { margin: .9em 0; border: 1px solid var(--doc-line); border-radius: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
/* 열 너비를 모두 정한 표: 틀도 표 너비만큼 (쪽보다 넓으면 쪽 너비에서 밀기) */
.pg-prose .tableWrapper:has(> table[style^="width"]) { width: fit-content; max-width: 100%; }
.pg-prose .tableWrapper > table { margin: -1px 0 0 -1px; width: calc(100% + 1px); border-collapse: separate; border-spacing: 0; }
.pg-prose .tableWrapper > table > tbody > tr > :is(td, th) { border: 0; border-left: 1px solid var(--doc-line); border-top: 1px solid var(--doc-line); }
.pg-prose .selectedCell::after { content: ''; position: absolute; inset: 0; background: var(--tbl-sel); pointer-events: none; z-index: 1; }
.pg-prose.ProseMirror-hideselection .selectedCell { caret-color: transparent; }
.pg-prose .column-resize-handle { position: absolute; right: -2px; top: -1px; bottom: 0; width: 3px; background: var(--doc-blue); pointer-events: none; z-index: 2; }
.pg-prose.resize-cursor, .pg-prose.resize-cursor * { cursor: col-resize !important; }
.pg-prose[contenteditable="false"] .column-resize-handle { display: none; }

/* 표 손잡이·+·칸 메뉴 단추 (편집기 위에 겹쳐 그린다) */
.ed-host { position: relative; }
.tbl-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 4; }
.tbl-layer > * { position: absolute; padding: 0; margin: 0; }
.tbl-layer > [hidden] { display: none; }
.tbl-grip, .tbl-corner { display: grid; place-items: center; border-radius: 4px; background: var(--card, #fff); box-shadow: 0 0 0 1px var(--doc-line), 0 1px 3px rgba(9, 30, 66, .14); cursor: grab; color: var(--doc-sub); transition: background .12s, box-shadow .12s; }
.tbl-corner { width: 12px; height: 12px; border-radius: 3px; cursor: pointer; }
.tbl-grip i { display: block; width: 10px; height: 6px; background: radial-gradient(circle, currentColor 1px, transparent 1.4px) 0 0 / 3.4px 3px; }
.tbl-grip.row i { width: 6px; height: 10px; background-size: 3px 3.4px; }
.tbl-grip:hover, .tbl-grip.on, .tbl-corner:hover { background: var(--doc-blue); color: #fff; box-shadow: 0 0 0 1px var(--doc-blue); }
.tbl-cellbtn { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--card, #fff); color: var(--doc-sub); box-shadow: 0 0 0 1px var(--doc-line), 0 1px 3px rgba(9, 30, 66, .16); cursor: pointer; }
.tbl-cellbtn:hover { background: var(--doc-blue); color: #fff; box-shadow: 0 0 0 1px var(--doc-blue); }
.tbl-cellbtn .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.tbl-add { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--doc-blue); color: #fff; box-shadow: 0 1px 4px rgba(9, 30, 66, .25); cursor: pointer; }
.tbl-add .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.tbl-line { background: var(--doc-blue); border-radius: 2px; pointer-events: none; }
body.tbl-dragging, body.tbl-dragging * { cursor: grabbing !important; user-select: none !important; }
/* 표 메뉴 · 크기 고르기 */
.ed-menu.tbl-menu { width: 236px; max-height: calc(100vh - 16px); }
.ed-mi:disabled { opacity: .38; pointer-events: none; }
.ed-mi.danger { color: var(--danger, #C9372C); }
.ed-mi.danger .ed-mi-ic { color: var(--danger, #C9372C); }
.ed-mi .tbl-chk { margin-left: auto; width: 16px; height: 16px; color: var(--doc-blue); stroke-width: 2.4; }
.ctx-row .ctx-bg.on { box-shadow: 0 0 0 2px var(--doc-blue) inset; }
.ed-menu.tbl-size { width: auto; max-height: none; overflow: visible; padding: 10px; outline: none; }
.tsz-grid { display: grid; grid-template-columns: repeat(10, 18px); gap: 3px; }
.tsz-grid i { width: 18px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px var(--doc-line) inset; background: var(--bg); cursor: pointer; }
.tsz-grid i.on { background: var(--doc-blue-bg); box-shadow: 0 0 0 1px var(--doc-blue) inset; }
.tsz-t { margin-top: 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--sub); font-variant-numeric: tabular-nums; }

/* 정보 패널 */
.info-panel { display: flex; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--info-bg); margin: .8em 0; }
.info-panel[data-kind="warn"] { background: var(--warn-bg); }
.info-panel[data-kind="success"] { background: var(--ok-bg); }
.info-ic { flex: none; width: 22px; height: 22px; display: grid; place-items: center; color: var(--info-fg); margin-top: 2px; border-radius: 5px; }
.info-panel[data-kind="warn"] .info-ic { color: var(--warn-fg); }
.info-panel[data-kind="success"] .info-ic { color: var(--ok-fg); }
.pg-prose[contenteditable="true"] .info-ic:hover { background: rgba(9, 30, 66, .08); }
.info-ic .ic { width: 20px; height: 20px; }
.info-body { flex: 1; min-width: 0; }
.info-body > * + * { margin-top: .4em; }

/* draw.io · 구글 · 채팅방 카드 */
.drawio { position: relative; margin: .8em 0; border-radius: 8px; border: 1px solid var(--doc-line); padding: 12px; display: grid; place-items: center; background: #fff; }
.drawio img { max-width: 100%; height: auto; }
.drawio.ProseMirror-selectednode, .g-embed.ProseMirror-selectednode, .cr.ProseMirror-selectednode { outline: 2px solid var(--doc-blue); outline-offset: 2px; }
.drawio-hint { position: absolute; right: 8px; bottom: 6px; font-size: 11.5px; color: var(--doc-sub); opacity: 0; transition: opacity var(--t); }
.drawio:hover .drawio-hint { opacity: 1; }
.drawio-empty { display: flex; align-items: center; gap: 8px; padding: 24px; color: var(--doc-sub); cursor: pointer; font-size: 14px; }
.dv-overlay { position: fixed; inset: 0; z-index: 60; background: #fff; }
.dv-overlay iframe { width: 100%; height: 100%; border: 0; }
.g-embed { margin: .8em 0; border: 1px solid var(--doc-line); border-radius: 8px; overflow: hidden; background: var(--bg); position: relative; }
.g-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13.5px; border-bottom: 1px solid var(--doc-line); }
.g-head b { flex: 1; }
.g-head a { color: var(--doc-blue); font-size: 13px; text-decoration: none; }
.g-ic { width: 16px; height: 16px; border-radius: 3px; background: #4285F4; flex: none; }
.g-ic.g-sheet { background: #0F9D58; }
.g-ic.g-slides { background: #F4B400; }
.g-ic.g-form { background: #7248B9; }
.g-embed iframe { display: block; width: 100%; border: 0; background: #fff; }
.g-grip { height: 10px; cursor: ns-resize; background: var(--doc-code); border-top: 1px solid var(--doc-line); }
.g-grip::after { content: ''; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--doc-line); margin: 3px auto 0; }
.g-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--doc-blue); text-decoration: none; font-size: 14px; word-break: break-all; }

.cr, .chat-embed { margin: .8em 0; border: 1px solid var(--doc-line); border-radius: 12px; overflow: hidden; background: var(--room); font-size: 14px; line-height: 1.45; }
.cr-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; background: var(--bg); border-bottom: 1px solid var(--doc-line); }
.cr-head b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-mode, .cr-mode-sel { font-size: 12.5px; color: var(--doc-sub); }
.cr-mode-sel { border: 0; background: var(--doc-hover); border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 12.5px; color: var(--doc-text); cursor: pointer; }
.cr-shared { color: var(--doc-blue); display: grid; }
.cr-shared .ic { width: 15px; height: 15px; }
.cr-gap { flex: 1; }
.cr-open { font-size: 13px; color: var(--doc-blue); padding: 3px 6px; border-radius: 6px; white-space: nowrap; }
.cr-open:hover { background: var(--doc-blue-bg); }
.cr-more { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--doc-sub); }
.cr-more:hover { background: var(--doc-hover); }
.cr-more .ic { width: 17px; height: 17px; }
.cr-range { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg); border-bottom: 1px solid var(--doc-line); font-size: 13px; }
.cr-range input { border: 1px solid var(--doc-line); border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 13px; background: var(--bg); color: var(--doc-text); }
.cr-body { max-height: 340px; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.cr-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 86%; }
.cr-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.cr-bub { background: var(--other); color: var(--text); border-radius: 14px; padding: 6px 11px; min-width: 0; word-break: break-word; white-space: pre-wrap; }
.cr-msg.mine .cr-bub { background: var(--mine); color: var(--on-mine); }
.cr-msg.done .cr-text { text-decoration: line-through; opacity: .6; }
.cr-msg time { flex: none; font-size: 11px; color: var(--room-sub); }
.cr-text a { color: var(--link); }
.cr-photos { display: flex; gap: 3px; }
.cr-photos { flex-wrap: wrap; gap: 6px; }
.cr-ph { position: relative; display: block; max-width: 100%; }
.cr-ph img { height: 260px; width: auto; max-width: 100%; object-fit: contain; border-radius: 10px; display: block; background: var(--doc-hover); }
.cr-ph.full img { height: auto; max-height: none; }
.cr-ph-acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.cr-ph:hover .cr-ph-acts, .cr-ph:focus-within .cr-ph-acts { opacity: 1; }
.cr-ph-acts button { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; }
.cr-ph-acts button:hover { background: rgba(0, 0, 0, .75); }
.cr-ph-acts .ic { width: 16px; height: 16px; }
.cr-photos .only-phone { width: 88px; height: 88px; font-size: 11px; }
.cr-todo { flex: none; align-self: center; width: 18px; height: 18px; border-radius: 50%; border: 1.7px solid var(--room-sub); display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.cr-todo.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.cr-none, .cr-private { margin: 0; padding: 18px 12px; text-align: center; color: var(--room-sub); font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cr-private .ic { width: 16px; height: 16px; }
.cr-foot { display: flex; gap: 6px; padding: 8px; background: var(--bg); border-top: 1px solid var(--doc-line); }
.cr-foot input { flex: 1; min-width: 0; border: 0; outline: none; background: var(--doc-hover); border-radius: 18px; padding: 7px 14px; font: inherit; font-size: 14px; color: var(--doc-text); }
.cr-foot input:focus { box-shadow: 0 0 0 2px var(--doc-blue) inset; }
.cr-foot button { width: 32px; height: 32px; border-radius: 50%; background: var(--doc-blue); color: #fff; display: grid; place-items: center; flex: none; }
.cr-foot .ic { width: 17px; height: 17px; stroke-width: 2.2; }

/* 좋아요 · 라벨 · 댓글 */
.pg-src:empty { display: none; }
.pg-src { margin-top: 32px; }
.src-row { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; margin-left: -10px; border-radius: 8px; font-size: 14px; color: var(--doc-sub); }
.src-row:hover { background: var(--doc-hover); color: var(--doc-text); }
.src-row .ic { width: 17px; height: 17px; }
.src-row small { font-size: 12.5px; color: var(--doc-sub); opacity: .8; }
.src-card { width: min(820px, 96vw); height: min(86vh, 900px); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.src-head h3 { margin: 0; font-size: 17px; }
.src-head small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--doc-sub); }
/* 대화 원문: 채팅방 말풍선(app.css .msg) 그대로, 배경도 채팅방 색 */
.src-chat { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--room); border-radius: 12px; padding: 4px 0 16px; user-select: text; -webkit-user-select: text; }
.src-chat .msg { padding: 2px 14px; }
.src-chat .stack { max-width: min(600px, 78%); }
.src-chat .text { font-size: 14px; line-height: 1.55; }
.src-av { background: #1b1b1b; color: #ffd400; }
.src-av .ic { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.src-card a.btn-plain { display: inline-flex; align-items: center; text-decoration: none; }
.pg-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--doc-line); }
.like { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; font-size: 14px; color: var(--doc-sub); box-shadow: 0 0 0 1px var(--doc-line) inset; }
.like:hover { background: var(--doc-hover); }
.like .ic { width: 17px; height: 17px; }
.like.on { color: #C9372C; box-shadow: 0 0 0 1px #FFD5D2 inset; background: #FFF1F0; }
.like.on .ic { fill: #C9372C; }
.like b { color: var(--doc-text); }
.labels { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.label { display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 4px 0 10px; border-radius: 4px; background: var(--doc-hover); font-size: 13px; color: var(--doc-text); }
.label button { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; color: var(--doc-sub); }
.label button:hover { background: rgba(9, 30, 66, .1); }
.label .ic { width: 13px; height: 13px; }
.label.add { padding: 0 10px; gap: 5px; color: var(--doc-sub); background: none; box-shadow: 0 0 0 1px var(--doc-line) inset; cursor: pointer; }
.label.add:hover { background: var(--doc-hover); }
.label-input { height: 26px; width: 140px; border: 0; outline: none; border-radius: 4px; padding: 0 8px; font: inherit; font-size: 13px; box-shadow: 0 0 0 2px var(--doc-blue) inset; background: var(--bg); color: var(--doc-text); }
.cmts { margin-top: 36px; }
.cmts h3 { font-size: 16px; margin: 0 0 14px; }
.cmts h3 span { color: var(--doc-sub); font-weight: 600; }
.cmt, .cmt-new { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.cmt .by-av, .cmt-new .by-av { width: 30px; height: 30px; font-size: 13px; }
.cmt-main { flex: 1; min-width: 0; }
.cmt-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cmt-head time { color: var(--doc-sub); font-size: 12.5px; }
.cmt-head button { margin-left: auto; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--doc-sub); opacity: 0; }
.cmt:hover .cmt-head button { opacity: 1; }
.cmt-head button:hover { background: var(--doc-hover); }
.cmt-head .ic { width: 16px; height: 16px; }
.cmt-text { font-size: 14.5px; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.cmt-text a { color: var(--doc-blue); }
.cmt-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.cmt-box textarea { width: 100%; resize: none; border: 0; outline: none; border-radius: 8px; padding: 9px 12px; background: var(--bg); box-shadow: 0 0 0 1px var(--doc-line) inset; font-size: 14.5px; color: var(--doc-text); }
.cmt-box textarea:focus { box-shadow: 0 0 0 2px var(--doc-blue) inset; }

/* 여백 댓글: 본문엔 아주 옅은 밑배경 + 작은 번호 원, 넓은 화면은 오른쪽 여백에 카드 */
.pg { position: relative; }
.pg-scroll.cm-on { padding-right: 300px; }
.pg-body { position: relative; }
.pg-prose .cmark { background: rgba(250, 204, 21, .1); border-radius: 2px; cursor: pointer; transition: background var(--t); }
.pg-prose .cmark:hover { background: rgba(250, 204, 21, .26); }
.pg-prose .cmark.on { background: rgba(250, 204, 21, .42); }
.cnum { display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: #7A5AF8; color: #fff; font: 700 10px/1 Pretendard, system-ui, sans-serif; vertical-align: super; margin: 0 1px 0 2px; cursor: pointer; user-select: none; }
.cnum.done { background: #B4B4B4; }
.pg-prose .cnum { font-size: 10px; text-indent: 0; }
.pg-prose .cnum.on { box-shadow: 0 0 0 2px rgba(122, 90, 248, .25); }
.cm-rail { position: absolute; top: 0; left: 100%; width: 264px; }
.cm-rail[hidden] { display: none; }
.cm-card { position: absolute; left: 0; right: 0; background: var(--bg); border: 1px solid var(--doc-line); border-radius: 8px; padding: 9px 12px 10px; font-size: 13.5px; cursor: pointer; transition: top .18s var(--ease), box-shadow var(--t), border-color var(--t); }
.cm-card:hover { border-color: var(--pill-line); }
.cm-card.on { border-color: transparent; box-shadow: var(--shadow); }
.cm-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cm-head .cnum { vertical-align: 0; margin: 0 2px 0 0; cursor: inherit; }
.cm-head b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-head time { color: var(--doc-sub); font-size: 12px; white-space: nowrap; }
.cm-done { margin-left: auto; flex: none; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--doc-sub); }
.cm-done:hover { background: var(--doc-hover); color: var(--doc-blue); }
.cm-done .ic { width: 16px; height: 16px; }
.cm-text { margin-top: 4px; white-space: pre-wrap; word-break: break-word; color: var(--doc-text); line-height: 1.5; }
.cm-text a { color: var(--doc-blue); }
.cm-new { cursor: default; border-color: transparent; box-shadow: var(--shadow); }
.cm-new textarea { width: 100%; resize: none; border: 0; outline: none; background: none; padding: 2px 0; font: inherit; font-size: 14px; color: var(--doc-text); }
.cm-btns { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.cm-pill { position: absolute; z-index: 5; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--doc-text); color: var(--bg); font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.cm-pill[hidden], .cm-plus[hidden] { display: none; }
.cm-plus { position: absolute; z-index: 4; right: -32px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--doc-sub); border: 1px solid var(--doc-line); background: var(--bg); }
.cm-plus:hover { color: #fff; background: #7A5AF8; border-color: #7A5AF8; }
.cm-plus .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.cmt-head .cnum { margin: 0; width: auto; height: 15px; opacity: 1; border-radius: 8px; color: #fff; vertical-align: 0; }
.cmt-head .cnum:hover { background: #6847E8; }
.cmt-head .cnum.done:hover { background: #9a9a9a; }
.cmt-head [data-cm-done] + [data-cmt-del] { margin-left: 0; }
.cmt-done { font-size: 12px; color: var(--doc-sub); }
.cmt-quote { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; padding-left: 8px; border-left: 2px solid rgba(250, 204, 21, .6); color: var(--doc-sub); font-size: 13px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cmt-box .cmt-quote { display: flex; width: 100%; -webkit-line-clamp: unset; margin: 0; }
.cmt-box .cmt-quote button { margin-left: auto; flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; color: var(--doc-sub); }
.cmt-box .cmt-quote button:hover { background: var(--doc-hover); }
.cmt-box .cmt-quote .ic { width: 14px; height: 14px; }
.cmt.flash { animation: doc-flash 1.6s var(--ease); border-radius: 8px; }
.cmt-head [data-cm-link] + button { margin-left: 0; }
/* 아래 목록: 여백 댓글은 번호 원 + 고른 글 한 줄 (누르면 본문 그 자리로). 원문이 지워졌으면 취소선 */
.cmt-mark { display: flex; align-items: center; gap: 6px; max-width: 100%; margin-bottom: 2px; color: var(--doc-sub); font-size: 13px; text-align: left; }
.cmt-mark .cnum { margin: 0; vertical-align: 0; flex: none; }
.cmt-q { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.cmt-mark:hover .cmt-q { color: var(--doc-text); }
.cmt-mark.lost .cmt-q { text-decoration: line-through; color: #B4B4B4; }
.cmt-mark.lost small { flex: none; font-size: 12px; }
.cmt-mark.lost button { flex: none; font-size: 12px; color: var(--doc-blue); }
.cmt-mark.lost button:hover { text-decoration: underline; }
.cmt.reply { margin-left: 40px; }
.cmt.reply .by-av { width: 24px; height: 24px; font-size: 11px; }
::highlight(cm-flash) { background-color: rgba(250, 204, 21, .75); }
::highlight(cm-orig) { background-color: rgba(250, 204, 21, .5); }
/* 여백 카드의 답글: 고르면 펼침 (카드 안에서 얇은 줄로 나눔), 아니면 '답글 N개' */
.cm-rcount { margin-top: 6px; font-size: 12px; color: var(--doc-sub); }
.cm-thread { margin-top: 8px; cursor: default; }
.cm-reply { border-top: 1px solid var(--doc-line); padding: 8px 0; }
.cm-head .cm-av { width: 18px; height: 18px; font-size: 10px; }
.cm-reply .cm-text { margin-top: 3px; }
.cm-reply .cm-del { opacity: 0; }
.cm-reply:hover .cm-del { opacity: 1; }
.cm-rin { display: block; width: 100%; border-top: 1px solid var(--doc-line); padding-top: 8px; text-align: left; }
.cm-rin textarea, .cm-rin span { display: block; width: 100%; resize: none; border: 0; outline: none; border-radius: 6px; padding: 6px 10px; background: var(--bg); box-shadow: 0 0 0 1px var(--doc-line) inset; font: inherit; font-size: 13.5px; line-height: 1.5; color: var(--doc-text); }
.cm-rin textarea:focus { box-shadow: 0 0 0 2px var(--doc-blue) inset; }
.cm-rin span { color: var(--doc-sub); }

/* 메뉴 · 작은 창 */
.dv-pop { position: fixed; min-width: 200px; z-index: 50; }
.dv-mi { display: flex; align-items: center; gap: 10px; }
.dv-mi .ic { width: 17px; height: 17px; color: var(--sub); }
.dv-mi.danger, .dv-mi.danger .ic { color: var(--danger); }
.mi-on { margin-left: auto; color: var(--doc-blue); font-weight: 700; }
.dv-mi .ai-ic { width: 17px; height: 17px; vertical-align: 0; }
.pop-cap { font-size: 12px; color: var(--sub); padding: 6px 12px 4px; }
.vis-pop { width: 300px; }
.vis-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; }
.vis-opt > .ic { margin-top: 2px; color: var(--sub); }
.vis-opt span { flex: 1; display: flex; flex-direction: column; }
.vis-opt b { font-size: 14px; }
.vis-opt small { font-size: 12.5px; color: var(--sub); line-height: 1.4; }
.vis-opt.on b { color: var(--doc-blue); }
.vis-check { color: var(--doc-blue); margin-top: 2px; }
.perm-list { padding: 0 0 4px; }
.perm-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; min-height: 40px; }
.perm-row .perm-av { width: 26px; height: 26px; flex: none; font-size: 12px; }
.perm-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.perm-name b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perm-name small { font-size: 11.5px; color: var(--sub); }
.perm-role { font-size: 13px; color: var(--sub); padding-right: 2px; }
.perm-sel { appearance: none; -webkit-appearance: none; border: 0; border-radius: 8px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 4px center / 14px; color: var(--text); font: inherit; font-size: 13px; padding: 5px 22px 5px 8px; cursor: pointer; }
.perm-sel:hover:not(:disabled) { background-color: var(--hover); }
.perm-sel:disabled { color: var(--sub); cursor: default; background-image: none; padding-right: 2px; }
.perm-none { font-size: 12.5px; color: var(--sub); padding: 4px 12px 6px; margin: 0; line-height: 1.4; }
.pick-room, .trash-card { width: min(420px, 100%); }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; margin: 0 -8px; }
.pick-list > button { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-align: left; font-size: 14.5px; }
.pick-list > button:hover, .pick-list > button:focus-visible { background: var(--hover); }
.pick-none { color: var(--sub); font-size: 14px; text-align: center; padding: 16px 0; margin: 0; }
.trash-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.trash-row > .ic { width: 18px; height: 18px; color: var(--sub); }
.trash-row span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14.5px; }
.trash-row small { color: var(--sub); font-size: 12px; }
.ask-card .btn-blue { height: auto; padding: 8px 16px; border-radius: 10px; }

/* 편집기 떠 있는 것들: 고른 글자 도구 · '/' 메뉴 · 색 */
.ed-bubble { position: fixed; z-index: 55; display: flex; gap: 1px; padding: 4px; border-radius: 8px; background: var(--card); box-shadow: 0 4px 16px rgba(9, 30, 66, .2), 0 0 0 1px var(--line); }
.ed-bubble[hidden] { display: none; }
.ed-bubble button { min-width: 30px; height: 30px; border-radius: 5px; display: grid; place-items: center; font-size: 15px; color: var(--text); }
.ed-bubble button:hover { background: var(--hover); }
.ed-bubble button.on { background: var(--doc-blue-bg); color: var(--doc-blue); }
.ed-bubble .ic { width: 17px; height: 17px; }
.ed-menu { position: fixed; z-index: 55; width: 260px; max-height: 360px; overflow-y: auto; padding: 6px; border-radius: 10px; background: var(--card); box-shadow: 0 8px 28px rgba(9, 30, 66, .22), 0 0 0 1px var(--line); }
.ed-menu[hidden] { display: none; }
.ed-mi { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; font-size: 14px; text-align: left; color: var(--text); }
.ed-mi:hover, .ed-mi.sel { background: var(--doc-blue-bg); }
.ed-mi-ic { width: 30px; height: 30px; flex: none; border-radius: 6px; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line) inset; background: var(--bg); color: var(--sub); }
.ed-mi-ic .ic { width: 17px; height: 17px; }
.ed-none { padding: 10px; font-size: 13.5px; color: var(--sub); }
.ed-palette { position: fixed; z-index: 56; display: flex; gap: 4px; padding: 6px; border-radius: 8px; background: var(--card); box-shadow: 0 4px 16px rgba(9, 30, 66, .2), 0 0 0 1px var(--line); }
.ed-palette button { width: 26px; height: 26px; border-radius: 5px; font-weight: 800; font-size: 14px; box-shadow: 0 0 0 1px var(--line) inset; }
.ed-palette button.none { background: linear-gradient(135deg, transparent 45%, var(--danger) 45%, var(--danger) 55%, transparent 55%) !important; }

@media (max-width: 899px) {
  .dv-back { display: inline-grid; }
  .dv { grid-template-columns: 200px minmax(0, 1fr); }
  .dv-room .dv-back { margin-left: -6px; }
  .pg-bar .dv-back { display: none; }
  .dv.solo .pg-bar .dv-back { display: inline-grid; }
  .pg { padding: 20px 20px 100px; }
  .pg-bar { padding: 0 10px 0 16px; }
  .vis-btn span, .save-state { display: none; }
}
@media (max-width: 640px) {
  .dv { grid-template-columns: minmax(0, 1fr); }
  .dv-side { display: none; }
  .pg-bar .dv-back { display: inline-grid; }
}
.seg[hidden], .rail-btn[hidden] { display: none; }

/* ── 채팅 안 문서 카드 (링크 메시지 #p/{id}) */
.doc-wrap { display: block; }
.doc-wrap > .todo-box { left: -30px; top: 14px; color: var(--text); background: none; opacity: .55; }
.doc-card { width: 320px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; border-radius: 16px; background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); cursor: pointer; text-align: left; transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t); }
.doc-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(9, 30, 66, .12); border-color: transparent; }
.doc-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dc-top { display: flex; gap: 12px; align-items: flex-start; }
.dc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dc-room { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--sub); min-width: 0; }
.dc-room > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-ic { flex: none; width: 18px; height: 18px; border-radius: 5px; background: var(--doc-blue); display: grid; place-items: center; }
.dc-ic .ic { width: 12px; height: 12px; stroke: #fff; stroke-width: 2.2; }
.dc-ic.dim { background: var(--dim); }
.dc-title { font-size: 16px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; overflow-wrap: anywhere; }
.dc-sum { font-size: 13.5px; line-height: 1.5; color: var(--sub); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.photos .doc-card img.dc-pic, .dc-pic { flex: none; width: 64px; height: 64px; min-width: 0; min-height: 0; max-width: none; max-height: none; border-radius: 10px; object-fit: cover; background: #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.dc-prog { display: flex; align-items: center; gap: 8px; }
.dc-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--field); overflow: hidden; }
.dc-bar i { display: block; height: 100%; border-radius: 3px; background: var(--doc-blue); transition: width var(--t-mid) var(--ease); }
.dc-prog small { flex: none; font-size: 12px; font-weight: 600; color: var(--sub); font-variant-numeric: tabular-nums; }
.dc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.dc-vis { display: inline-flex; align-items: center; gap: 4px; }
.dc-vis .ic { width: 13px; height: 13px; }
.doc-card.denied { cursor: default; }
.doc-card.denied:hover { transform: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); border-color: var(--line); }
.doc-card.denied .dc-title { color: var(--sub); }
.dc-skel { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--field), var(--hover), var(--field)); background-size: 200% 100%; animation: dc-shine 1.2s linear infinite; margin-top: 6px; }
.dc-skel.short { width: 60%; }
@keyframes dc-shine { to { background-position: -200% 0; } }

/* 첨부 메뉴 · 보낼 페이지 고르기 */
.attach-pop { min-width: 180px; }
.pick-page { width: min(520px, 100%); }
.pp-list { max-height: 52vh; overflow-y: auto; padding: 4px 8px 10px; }
.pp-room { display: flex; align-items: center; gap: 8px; padding: 12px 8px 4px; font-size: 12px; font-weight: 700; color: var(--sub); }
.pp-room .av.xs { width: 18px; height: 18px; border-radius: 5px; }
.pp-row { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px calc(8px + var(--d) * 16px); border-radius: 8px; font-size: 14.5px; text-align: left; }
.pp-row .ic { width: 16px; height: 16px; color: var(--sub); flex: none; }
.pp-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-row:hover, .pp-row.sel { background: var(--hover); }
.pp-row.sel { box-shadow: 0 0 0 1px var(--line) inset; }
/* 채팅방 카드: 아래 손잡이를 끌어 세로 길이 조절 */
.cr-grip { height: 10px; cursor: ns-resize; border-top: 1px solid var(--doc-line); background: var(--bg); position: relative; touch-action: none; }
.cr-grip::after { content: ''; position: absolute; left: 50%; top: 3px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--doc-line); }
.cr-grip:hover::after { background: var(--doc-sub); }
/* 채팅방 카드: 말풍선 / 표 보기 */
.cr-view { display: inline-flex; background: var(--doc-hover); border-radius: 7px; padding: 2px; gap: 2px; }
.cr-view button { width: 26px; height: 22px; border-radius: 5px; display: grid; place-items: center; color: var(--doc-sub); }
.cr-view button.on { background: var(--bg); color: var(--doc-text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.cr-view .ic { width: 15px; height: 15px; }
.cr-body.tbl { padding: 0; display: block; }
.cr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cr-table th { position: sticky; top: 0; background: var(--doc-hover); text-align: left; font-weight: 600; color: var(--doc-sub); padding: 7px 12px; border-bottom: 1px solid var(--doc-line); }
.cr-table td { padding: 7px 12px; border-bottom: 1px solid var(--doc-line); vertical-align: top; color: var(--doc-text); white-space: pre-wrap; word-break: break-word; }
.cr-table .cr-td-date { width: 1%; white-space: nowrap; color: var(--doc-sub); font-variant-numeric: tabular-nums; }
.cr-table .cr-td-todo { width: 1%; text-align: center; }
.cr-table tr.done .cr-td-text { color: var(--doc-sub); text-decoration: line-through; }
/* 방 홈 (컨플루언스 스페이스 개요처럼) */
.rh { max-width: 760px; margin: 0 auto; padding: 48px 32px 80px; }
.rh-head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.rh-head .av { width: 52px; height: 52px; border-radius: 12px; }
.rh-head > div { flex: 1; min-width: 0; }
.rh-head h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--doc-text); }
.rh-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--doc-sub); }
.rh-head .btn-blue { display: inline-flex; align-items: center; gap: 4px; }
.rh-head .btn-blue .ic { width: 16px; height: 16px; }
.rh h3 { font-size: 13px; font-weight: 600; color: var(--doc-sub); margin: 0 0 8px; }
.rh-list { border: 1px solid var(--doc-line); border-radius: 10px; overflow: hidden; }
.rh-page { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px 10px calc(14px + var(--d) * 22px); border-bottom: 1px solid var(--doc-line); text-align: left; color: var(--doc-text); font-size: 14.5px; }
.rh-page:last-child { border-bottom: 0; }
.rh-page:hover { background: var(--doc-hover); }
.rh-page .ic { width: 17px; height: 17px; color: var(--doc-sub); flex: none; }
.rh-page span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-page time { font-size: 12.5px; color: var(--doc-sub); }
/* 채팅 목록 안의 맨 위 문서: 채팅방 줄과 같은 높이 */
#rooms .dtree.flat { padding: 0; }
/* 목록 안 맨 위 문서: 채팅방 줄과 같은 크기·같은 왼쪽 줄 (접기 화살표는 왼쪽 여백에) */
#rooms .tr.top { height: auto; min-height: 64px; padding: 9px 10px; gap: 12px; border-radius: 12px; font-size: 15px; font-weight: 600; }
#rooms .tr.top .tr-fold { width: 20px; }
#rooms .tr.top .tr-fold.none { visibility: hidden; } /* 자리는 남겨 AI 아이콘이 모든 줄에서 같은 세로줄에 */
#rooms .tr.top .tr-ic { width: 46px; height: 46px; border-radius: 35.5%; background: var(--doc-blue, #1868db); color: #fff; display: grid; place-items: center; margin: 0; flex: none; }
#rooms .tr.top .tr-ic .ic { width: 22px; height: 22px; }
#rooms .tr.top.on .tr-ic { color: #fff; }
#rooms .tr.top .tr-t { padding-left: 0; }
html:is([data-theme="white"], [data-theme="dark"]) #rooms .tr.top { min-height: 0; padding: 6px 8px; gap: 10px; border-radius: 9px; font-size: 14px; font-weight: 400; }
html:is([data-theme="white"], [data-theme="dark"]) #rooms .tr.top .tr-ic { width: 24px; height: 24px; border-radius: 7px; }
html:is([data-theme="white"], [data-theme="dark"]) #rooms .tr.top .tr-ic .ic { width: 14px; height: 14px; }
/* 표 보기는 문서 표처럼 전체를 펼친다 (카드 안 스크롤 없음) */
.cr-body.tbl { max-height: none; overflow: visible; }
.cr-table { table-layout: fixed; }
.cr-table th:first-child, .cr-table .cr-td-date { width: 128px; }
.cr-table th:nth-child(3), .cr-table .cr-td-todo { width: 64px; }
.cr-table .cr-ph img { height: 240px; }
.cr-table .cr-ph.full img { height: auto; }
/* 탭 (안드로이드/아이폰 등) */
.doc-tabs { margin: 14px 0; border: 1px solid var(--doc-line); border-radius: 10px; overflow: hidden; }
.doc-tabbar { display: flex; gap: 2px; padding: 6px 6px 0; background: var(--doc-hover); border-bottom: 1px solid var(--doc-line); overflow-x: auto; }
.doc-tab { position: relative; padding: 8px 14px; border-radius: 8px 8px 0 0; font-size: 14px; font-weight: 600; color: var(--doc-sub); white-space: nowrap; }
.doc-tab.on { background: var(--bg); color: var(--doc-text); box-shadow: 0 1px 0 var(--bg); }
.doc-tab-x { margin-left: 6px; color: var(--doc-sub); font-weight: 400; }
.doc-tab-x:hover { color: var(--danger); }
.doc-tab-add { padding: 6px 12px; color: var(--doc-sub); font-size: 16px; }
.doc-tabs-body { padding: 4px 16px; }
.doc-tabs-body > .doc-tab-panel { display: none; }
.doc-tabs[data-active="0"] > .doc-tabs-body > .doc-tab-panel:nth-child(1), .doc-tabs[data-active="1"] > .doc-tabs-body > .doc-tab-panel:nth-child(2), .doc-tabs[data-active="2"] > .doc-tabs-body > .doc-tab-panel:nth-child(3), .doc-tabs[data-active="3"] > .doc-tabs-body > .doc-tab-panel:nth-child(4), .doc-tabs[data-active="4"] > .doc-tabs-body > .doc-tab-panel:nth-child(5), .doc-tabs[data-active="5"] > .doc-tabs-body > .doc-tab-panel:nth-child(6), .doc-tabs[data-active="6"] > .doc-tabs-body > .doc-tab-panel:nth-child(7), .doc-tabs[data-active="7"] > .doc-tabs-body > .doc-tab-panel:nth-child(8), .doc-tabs[data-active="8"] > .doc-tabs-body > .doc-tab-panel:nth-child(9), .doc-tabs[data-active="9"] > .doc-tabs-body > .doc-tab-panel:nth-child(10), .doc-tabs[data-active="10"] > .doc-tabs-body > .doc-tab-panel:nth-child(11), .doc-tabs[data-active="11"] > .doc-tabs-body > .doc-tab-panel:nth-child(12) { display: block; }
/* 빨간 네모가 있는 그림 */
.doc-boxed { position: relative; display: block; width: fit-content; margin: 10px 0; max-width: min(100%, 360px); }
.doc-boxed img { display: block; max-width: 100%; height: auto; }
.doc-hl { position: absolute; border: 2.5px solid #e5322d; border-radius: 6px; pointer-events: none; box-sizing: border-box; }
/* 하위 페이지 목록: 설정 화면처럼 한 카드 안에 줄 (아이콘 · 제목 · ›) */
.doc-children { list-style: none; padding: 0; margin: 6px 0 20px; border: 1px solid var(--doc-line); border-radius: 12px; overflow: hidden; max-width: 640px; }
.doc-children li { position: relative; display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px; min-height: 48px; margin: 0; padding: 10px 38px 10px 16px; }
.doc-children li + li::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: 1px solid var(--doc-line); }
.doc-children li.has-ic + li::before { left: 58px; }
.doc-children li::after { content: "\203A"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--doc-sub); font-size: 20px; line-height: 1; }
.doc-children a { flex: 1; min-width: 0; font-weight: 500; color: var(--doc-text); text-decoration: none; }
.doc-children a::before { content: ""; position: absolute; inset: 0; }
.doc-children span { flex-basis: 100%; font-size: 13.5px; color: var(--doc-sub); }
.doc-children li:hover { background: var(--doc-hover); }
.doc-children .cp-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--doc-sub); }
.doc-children .cp-ic svg { width: 19px; height: 19px; fill: #fff; stroke: none; }
.pg-prose h3:has(+ .doc-children) { font-size: 13px; font-weight: 600; color: var(--doc-sub); margin: 22px 0 0 16px; }
/* 가이드 단계 그림·움짤은 폰 화면 크기로 */
.pg.is-guide .pg-prose li img { max-width: min(100%, 280px); border: 1px solid var(--doc-line); border-radius: 10px; margin: 8px 0; }
.pg.is-guide .pg-prose li .doc-boxed { max-width: min(100%, 280px); }
.pg.is-guide .pg-prose li .doc-boxed img { margin: 0; }
/* 남의 문서: 위 페이지로 */
.crumbs .cr-up { display: inline-flex; align-items: center; gap: 2px; color: var(--doc-blue); font-weight: 600; max-width: 320px; }
.crumbs .cr-up svg { flex: none; width: 18px; height: 18px; }
.cmt-off { font-size: 13.5px; color: var(--doc-sub); }
/* 휴대폰: 문서 화면 여백·글자 */
@media (max-width: 640px) {
  .pg { padding: 16px 16px 90px; }
  .pg-prose img { max-width: 100%; height: auto; }
  .doc-tabs-body { padding: 2px 12px; }
  .doc-tab { padding: 8px 12px; }
}

/* ───────── 편집기 더하기: 표 도구 · 오른쪽 단추 메뉴 · 넣기 메뉴 */
.ed-bubble button:disabled, .ctx-row button:disabled { opacity: .35; pointer-events: none; }
.ed-bubble .tb-sep { width: 1px; height: 18px; background: var(--line); margin: 6px 3px; align-self: center; }
.ed-bubble .tb-turn { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; font-size: 13.5px; font-weight: 600; }
.ed-bubble .tb-turn .ic { width: 14px; height: 14px; }
.ed-sep { height: 1px; background: var(--line); margin: 5px 2px; }
.ed-menu .ctx-h { font-size: 12px; font-weight: 700; color: var(--sub); padding: 6px 8px 3px; }
.ed-menu.ctx { width: 296px; max-height: calc(100vh - 16px); }
.ctx-row { display: flex; flex-wrap: wrap; gap: 1px; padding: 2px; }
.ctx-row button { min-width: 30px; height: 30px; border-radius: 5px; display: grid; place-items: center; font-size: 15px; color: var(--text); }
.ctx-row button:hover { background: var(--hover); }
.ctx-row button.on { background: var(--doc-blue-bg); color: var(--doc-blue); }
.ctx-row .ic { width: 17px; height: 17px; }
.ctx-row .ctx-bg { width: 26px; min-width: 26px; height: 26px; margin: 2px; box-shadow: 0 0 0 1px var(--line) inset; }
.ctx-row .ctx-bg.none { background: linear-gradient(135deg, transparent 45%, var(--danger) 45%, var(--danger) 55%, transparent 55%) !important; }
.ed-mi.sm { padding: 5px 8px; gap: 8px; font-size: 13.5px; }
.ed-mi.on { color: var(--doc-blue); font-weight: 600; }
.ed-mi kbd { margin-left: auto; font: 11.5px/1 ui-monospace, Consolas, monospace; color: var(--sub); background: none; }
.ed-mi-ic.xs { width: 24px; height: 24px; border-radius: 5px; }
.ed-mi-ic.xs .ic { width: 15px; height: 15px; }
.ed-mi .ic { width: 16px; height: 16px; flex: none; }
.ed-pop { width: auto; min-width: 150px; max-width: 280px; }
.ed-menu.insert { width: 290px; max-height: min(480px, calc(100vh - 120px)); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ins-find { margin: 8px 8px 4px; border: 0; outline: none; background: var(--field); border-radius: 8px; padding: 8px 10px; font-size: 14px; color: var(--text); }
.ins-list { overflow-y: auto; padding: 0 6px 6px; }
.ed-menu.emoji-menu { display: grid; grid-template-columns: repeat(8, 32px); gap: 2px; width: auto; max-width: none; padding: 6px; }
.emoji-menu .emo { width: 32px; height: 32px; border-radius: 6px; font-size: 19px; line-height: 1; }
.emoji-menu .emo:hover { background: var(--hover); }
.pg-tools .tb-style { display: inline-flex; align-items: center; gap: 2px; min-width: 76px; justify-content: space-between; padding: 0 4px 0 8px; font-size: 14px; }
.pg-tools .tb-style .ic { width: 14px; height: 14px; }
.style-menu .sty { font-size: 14px; }
.style-menu .sty-1 { font-size: 18px; font-weight: 700; }
.style-menu .sty-2 { font-size: 16px; font-weight: 700; }
.style-menu .sty-3 { font-size: 15px; font-weight: 700; }
.style-menu { min-width: 210px; }
.cols-shape { display: inline-flex; gap: 2px; width: 34px; height: 16px; flex: none; }
.cols-shape i { border-radius: 2px; background: var(--doc-blue-bg); box-shadow: 0 0 0 1px var(--doc-blue) inset; }

/* 단 나누기 */
.doc-cols-wrap { position: relative; margin: .8em 0; }
.doc-cols { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; margin: .8em 0; }
.doc-cols-wrap > .doc-cols { margin: 0; }
.doc-cols[data-layout="1-2"] { grid-template-columns: 1fr 2fr; }
.doc-cols[data-layout="2-1"] { grid-template-columns: 2fr 1fr; }
.doc-cols[data-layout="1-1-1"] { grid-template-columns: 1fr 1fr 1fr; }
.doc-cols[data-layout="1-2-1"] { grid-template-columns: 1fr 2fr 1fr; }
.doc-col { min-width: 0; }
.doc-col > * + * { margin-top: .6em; }
.doc-col > :first-child { margin-top: 0; }
.pg-prose[contenteditable="true"] .doc-col { outline: 1px dashed var(--doc-line); outline-offset: 4px; border-radius: 2px; }
.cols-btn { position: absolute; top: -12px; right: -6px; z-index: 2; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: var(--card); color: var(--doc-sub); box-shadow: 0 0 0 1px var(--doc-line), 0 2px 6px rgba(9, 30, 66, .12); opacity: 0; transition: opacity var(--t); }
.cols-btn .ic { width: 15px; height: 15px; }
.doc-cols-wrap:hover > .cols-btn, .doc-cols-wrap:focus-within > .cols-btn { opacity: 1; }

/* 접기 펼치기 */
.doc-toggle { display: flex; gap: 4px; margin: .5em 0; }
.toggle-arrow { flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 5px; display: grid; place-items: center; color: var(--doc-sub); }
.toggle-arrow:hover { background: var(--doc-hover); }
.toggle-arrow .ic { width: 16px; height: 16px; transition: transform var(--t); }
.doc-toggle.open > .toggle-arrow .ic { transform: rotate(90deg); }
.doc-toggle-in { flex: 1; min-width: 0; }
.doc-toggle-sum { display: block; font-weight: 600; min-height: 1.7em; }
.doc-toggle:not(.open) > .doc-toggle-in > .doc-toggle-body { display: none; }
.doc-toggle-body { margin-top: .2em; }
.doc-toggle-body > * + * { margin-top: .5em; }
.pg-prose .doc-toggle-sum.is-empty::before { content: attr(data-placeholder); color: var(--doc-sub); opacity: .6; float: left; height: 0; pointer-events: none; }
/* 저장된 html (details) */
details.doc-toggle { display: block; }
details.doc-toggle > summary { cursor: pointer; font-weight: 600; }
details.doc-toggle > .doc-toggle-body { padding-left: 1.2em; }

/* 상태 · 날짜 (글 안) */
.doc-status { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: .75em; font-weight: 700; line-height: 1.75; letter-spacing: .02em; text-transform: uppercase; vertical-align: .08em; background: #DCDFE4; color: #44546F; user-select: none; }
.doc-status[data-color="blue"] { background: #CCE0FF; color: #0055CC; }
.doc-status[data-color="green"] { background: #BAF3DB; color: #216E4E; }
.doc-status[data-color="yellow"] { background: #F8E6A0; color: #7F5F01; }
.doc-status[data-color="red"] { background: #FFD5D2; color: #AE2E24; }
.doc-status[data-color="purple"] { background: #DFD8FD; color: #5E4DB2; }
.pg-prose[contenteditable="true"] span.doc-status, .pg-prose[contenteditable="true"] span.doc-date { cursor: pointer; }
.doc-date { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: 4px; background: var(--doc-hover); font-size: .9em; line-height: 1.6; vertical-align: .04em; user-select: none; }
.doc-date .ic { width: 13px; height: 13px; }
.ProseMirror-selectednode.doc-status, .ProseMirror-selectednode.doc-date { outline: 2px solid var(--doc-blue); }

/* 목차 */
.doc-toc { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; margin: .8em 0; border-radius: 8px; border: 1px solid var(--doc-line); }
.doc-toc .toc-t { font-size: 12.5px; font-weight: 700; color: var(--doc-sub); margin-bottom: 4px; }
.doc-toc a { color: var(--doc-text); text-decoration: none; font-size: 14.5px; line-height: 1.7; }
.doc-toc a:hover { color: var(--doc-blue); text-decoration: underline; }
.doc-toc .toc-l2 { padding-left: 14px; }
.doc-toc .toc-l3 { padding-left: 28px; font-size: 14px; }
.doc-toc .toc-empty { margin: 0; color: var(--doc-sub); font-size: 13.5px; }
.ProseMirror-selectednode.doc-toc { outline: 2px solid var(--doc-blue); }

/* 동영상 · 파일 */
.doc-video { position: relative; margin: .8em 0; border-radius: 8px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.doc-video iframe, .doc-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.doc-video > a { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.doc-video-cover { position: absolute; inset: 0; cursor: pointer; }
.doc-video.sel { outline: 2px solid var(--doc-blue); outline-offset: 2px; }
.doc-video.sel .doc-video-cover { display: none; }
.doc-file { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: .6em 0; border: 1px solid var(--doc-line); border-radius: 8px; max-width: 480px; }
.doc-file .ic { width: 18px; height: 18px; color: var(--doc-sub); flex: none; }
.doc-file a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.doc-file-size { font-size: 12.5px; color: var(--doc-sub); flex: none; }
.ProseMirror-selectednode.doc-file { outline: 2px solid var(--doc-blue); }

/* 코드 블록 언어 */
.code-wrap { position: relative; margin: .8em 0; }
.code-wrap > pre { margin: 0; }
.code-lang { position: absolute; top: 6px; right: 8px; z-index: 1; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 12px; color: var(--doc-sub); background: var(--bg); box-shadow: 0 0 0 1px var(--doc-line) inset; }
.code-lang:hover { color: var(--doc-text); }
.pg-prose[contenteditable="false"] .code-lang { pointer-events: none; }

/* 할 일 패널: 문서 할 일 중요도 */
.p-item .todo-box.pri { color: var(--pc); opacity: 1; border-width: 2px; }
.p-pri { color: var(--pc); font-weight: 700; }
.p-room-pri { flex: none; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 18px; color: var(--pc); background: color-mix(in srgb, var(--pc) 13%, transparent); }

/* 카톡 대화 가져오기 */
.kk-card { width: min(460px, 100%); max-height: calc(100vh - 28vh); overflow-y: auto; }
.kk-file { margin: -6px 0 0; font-size: 13.5px; color: var(--sub); overflow-wrap: anywhere; }
.kk-field { display: flex; flex-direction: column; gap: 6px; }
.kk-field > span { font-size: 13px; font-weight: 700; color: var(--sub); }
.kk-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.kk-seg button { padding: 6px 12px; border-radius: 8px; font-size: 14px; box-shadow: 0 0 0 1px var(--line) inset; color: var(--text); }
.kk-seg button.on { background: var(--doc-blue-bg); color: var(--doc-blue); box-shadow: 0 0 0 1.5px var(--doc-blue) inset; font-weight: 600; }
.kk-range { display: flex; align-items: center; gap: 8px; }
.kk-range input { flex: 1; min-width: 0; padding: 8px 10px !important; font: inherit; font-size: 14px !important; }
.kk-who { display: flex; flex-direction: column; gap: 2px; max-height: 160px; overflow-y: auto; }
.kk-who label { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 14px; cursor: pointer; }
.kk-who input { width: 16px; height: 16px; padding: 0 !important; accent-color: var(--doc-blue); }
.kk-who small { margin-left: auto; color: var(--sub); font-size: 12.5px; }
.kk-count { margin: 0; font-size: 14px; font-weight: 600; }
.kk-count.warn { color: var(--danger); }
.kk-note { margin: -8px 0 0; font-size: 12.5px; color: var(--sub); }
.kk-card .btn-blue:disabled { opacity: .5; }

@media (max-width: 640px) {
  .doc-cols, .doc-cols[data-layout] { grid-template-columns: 1fr; gap: 12px; }
  .pg-prose[contenteditable="true"] .doc-col { outline-offset: 2px; }
  .ed-menu.ctx { width: min(296px, calc(100vw - 16px)); }
}
.page-row .pr-star { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: #e2a100; flex: none; }
.page-row .pr-star .ic { width: 15px; height: 15px; fill: currentColor; }
.page-row .pr-star:hover { background: var(--doc-hover); }
/* 문서: 맨 위 줄은 공통 상단바, 그 아래 한 줄에 편집 도구(왼쪽) + 나만·☆·•••(오른쪽) */
.pg-sub { flex: none; display: flex; align-items: center; min-height: 44px; border-top: 1px solid var(--doc-line); border-bottom: 1px solid var(--doc-line); background: var(--bg); }
.pg-sub .pg-tools { flex: 1; min-width: 0; border: 0; flex-wrap: nowrap; overflow: hidden; padding: 6px 6px 6px 14px; }
.pg-sub .pg-tools .tb-sep { margin: 0 2px; }
.pg-tools > * { flex: none; }
.pg-tools .tb-grp { display: contents; }
.pg-tools .tb-hide, .pg-tools .tb-more[hidden] { display: none !important; }
.pg-tools .tb-more .ic { fill: currentColor; stroke: none; }
.ed-menu.tb-more-menu { width: 220px; }
.pg-sub .pg-acts { margin-left: auto; padding: 0 14px; }

/* 버전 기록 */
.ver-card { width: min(920px, 96vw); height: min(640px, 88vh); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.ver-head { display: flex; align-items: center; justify-content: space-between; }
.ver-head h3 { margin: 0; font-size: 17px; }
.ver-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; }
.ver-list { overflow-y: auto; border-right: 1px solid var(--doc-line); padding-right: 8px; display: flex; flex-direction: column; gap: 2px; }
.ver-row { text-align: left; padding: 8px 10px; border-radius: 8px; display: flex; flex-direction: column; gap: 2px; }
.ver-row b { font-size: 13.5px; font-weight: 600; color: var(--doc-text); }
.ver-row small { font-size: 12px; color: var(--doc-sub); }
.ver-row:hover { background: var(--doc-hover); }
.ver-row.on { background: var(--doc-blue-bg); }
.ver-view { min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.ver-preview { flex: 1; overflow-y: auto; border: 1px solid var(--doc-line); border-radius: 10px; padding: 16px 20px; }
.ver-view .btn-blue { align-self: flex-end; }
.ver-note { margin: -2px 0 12px; font-size: 12.5px; color: var(--doc-sub); }
.ver-add { background: var(--add-bg); border-radius: 6px; padding: 1px 6px; margin: 0 -6px; }
.ver-del { background: var(--del-bg); color: var(--del-fg); text-decoration: line-through; border-radius: 6px; padding: 1px 6px; margin: 0 -6px; }
.ver-preview ins { background: var(--add-bg); text-decoration: none; border-radius: 3px; }
.ver-preview del { background: var(--del-bg); color: var(--del-fg); border-radius: 3px; }
@media (max-width: 640px) { .ver-body { grid-template-columns: 1fr; grid-template-rows: 140px 1fr; } .ver-list { border-right: 0; border-bottom: 1px solid var(--doc-line); } }

/* 앱 화면 안(WebView, ?app=1): 위 줄과 뒤로는 앱이 그린다. 문서만 보이고, 도구 줄과 오른쪽 버튼은 한 줄로 옆으로 밀어 본다 */
html.embed .rail, html.embed .list, html.embed .app .main > .topbar, html.embed .app.doc-mode .main > .topbar { display: none !important; }
html.embed .pg-sub { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
html.embed .pg-sub::-webkit-scrollbar { display: none; }
html.embed .pg-tools, html.embed .pg-acts { flex: none !important; flex-wrap: nowrap !important; overflow: visible !important; }
html.embed .pg-tools > *, html.embed .pg-acts > * { flex: none; }
html.embed .pg { padding: 16px 18px 140px; }

/* ── AI 가 고친 문서: 작은 AI 로고 (나무 줄 · 제목 아래 줄 · 댓글) */
.ai-ic { width: 14px; height: 14px; flex: none; border-radius: 50%; display: inline-block; vertical-align: -2px; }
.ai-dots { display: inline-flex; flex: none; align-items: center; margin-left: 2px; }
.ai-dots .ai-ic { width: 13px; height: 13px; box-shadow: 0 0 0 1.5px var(--list, #fff); }
.ai-dots .ai-ic + .ai-ic { margin-left: -4px; }
.tr:hover .ai-dots { display: none; }
/* 나무 줄의 AI 아이콘은 회색으로 옅게 (줄마다 색 동그라미가 반복돼 눈이 아프지 않게) · 고른 줄·올린 줄만 원래 색 */
.tr .ai-dots { filter: grayscale(1); opacity: .45; transition: filter var(--t) var(--ease), opacity var(--t) var(--ease); }
.tr .ai-dots .ai-ic { width: 11px; height: 11px; }
.tr.on .ai-dots, .tr:hover .ai-dots { filter: none; opacity: 1; }
.droom-main .ai-dots { margin-right: 2px; }
.byline .by-ai { display: inline-flex; align-items: center; gap: 5px; }
.byline .by-ai .ai-ic { width: 16px; height: 16px; }

/* 공개 문서 미리보기: 가운데 넓은 창 · 위에 주소와 버튼 · 아래 공개 페이지 */
.modal.pubp { place-items: center; padding: 3vh 16px; }
.pubp-card { width: min(1040px, 96vw); height: 94vh; display: flex; flex-direction: column; }
.pubp-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--doc-line); }
.pubp-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--doc-text); }
.pubp-url > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pubp-url .ic { width: 16px; height: 16px; flex: none; color: var(--doc-sub); }
.pubp-url.dim { color: var(--doc-sub); }
.pubp-head .btn-plain.sm, .pubp-bar .btn-blue { display: inline-flex; align-items: center; gap: 6px; }
.pubp-head .btn-plain.sm .ic, .pubp-bar .btn-blue .ic { width: 16px; height: 16px; }
.pubp-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 10px 16px; background: var(--doc-blue-bg); font-size: 13.5px; color: var(--doc-text); }
.pubp-bar > span { font-weight: 600; }
.pubp-bar .btn-blue { margin-left: auto; }
.pubp-note { margin: 0; padding: 8px 16px; font-size: 12.5px; color: var(--doc-sub); border-bottom: 1px solid var(--doc-line); }
.pubp-bar .pubp-note { padding: 0; border: 0; }
.pubp-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }

/* 머리말(```properties)·일정(```timeline) 블록 — 공개 페이지(functions/src/pages.ts)와 같은 모양 */
.doc-blockview{--fg:var(--doc-text);--sub:var(--doc-sub);--dim:#a0a0a7;--line:var(--doc-line);--line2:var(--doc-hover);--soft:var(--doc-side);--bg:var(--bg,#fff);margin:2px 0;font-size:15px;line-height:1.6}
.code-wrap.is-view{margin:.4em 0 1em}
.code-raw{position:absolute;top:6px;right:8px;z-index:2;height:24px;padding:0 9px;border-radius:6px;font-size:12px;color:var(--doc-sub);background:var(--bg);box-shadow:0 0 0 1px var(--doc-line) inset;opacity:0;transition:opacity .15s}
.code-wrap:hover .code-raw,.code-wrap:not(.is-view) .code-raw{opacity:1}
.code-wrap.is-view .code-raw{top:-4px}
.doc-blockview .props{margin:0;padding:0 0 12px;border-bottom:0}
.doc-blockview .tl{margin:0}
.doc-blockview .ag{display:none!important}
.doc-blockview .tl-grid{display:block!important;min-width:560px}
.doc-blockview .tl{overflow-x:auto}
.doc-blockview.can-edit .props .st,.doc-blockview.can-edit .tl-r:not(:has(.tl-ms)){cursor:pointer}
.doc-blockview.can-edit .props .st:hover{filter:brightness(.96);box-shadow:0 0 0 1.5px currentColor inset}
.doc-blockview.can-edit .tl-r:not(:has(.tl-ms)):hover{background:var(--doc-hover)}
.st-menu .ed-mi .st{pointer-events:none}
.st{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 9px 0 8px;border-radius:6px;font-size:13px;font-weight:600;white-space:nowrap;line-height:1}
.st i{width:7px;height:7px;border-radius:50%;background:currentColor}
.st-todo{color:#7c818b;background:#f1f2f4}.st-doing{color:#2f6fde;background:#e9f0fd}.st-wait{color:#b7791f;background:#fdf3e1}.st-done{color:#1f9d55;background:#e5f6ec}.st-hold{color:#c2410c;background:#fdece4}
.doc-blockview .props{margin:4px 0 8px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.doc-blockview .pr{display:flex;align-items:center;min-height:36px;gap:8px}
.doc-blockview .pk{flex:none;width:120px;color:var(--sub);font-size:14px}
.doc-blockview .pv{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:15px;font-variant-numeric:tabular-nums}
.doc-blockview .tg{height:24px;padding:0 9px;border-radius:6px;background:var(--soft);font-size:13px;color:var(--sub);display:inline-flex;align-items:center}
.doc-blockview .ppl{display:flex;flex-wrap:wrap;gap:4px 14px}
.doc-blockview .pp{display:inline-flex;align-items:center;gap:6px}
.doc-blockview .av{flex:none;width:22px;height:22px;border-radius:50%;object-fit:cover;display:inline-grid;place-items:center;font-size:10.5px;font-weight:700;color:#fff;letter-spacing:-.02em}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .st-todo{background:#2a2b2f}:root:not([data-theme=light]) .st-doing{background:#1d2a44}:root:not([data-theme=light]) .st-wait{background:#3a2e17}:root:not([data-theme=light]) .st-done{background:#163325}:root:not([data-theme=light]) .st-hold{background:#3b2218}}
:root[data-theme=dark] .st-todo{background:#2a2b2f}:root[data-theme=dark] .st-doing{background:#1d2a44}:root[data-theme=dark] .st-wait{background:#3a2e17}:root[data-theme=dark] .st-done{background:#163325}:root[data-theme=dark] .st-hold{background:#3b2218}
.doc-blockview .tl{margin:18px 0 30px}
.doc-blockview .tl-grid{border:1px solid var(--line);border-radius:12px;overflow:hidden}
.doc-blockview .tl-h,.doc-blockview .tl-r{display:flex}
.doc-blockview .tl-n{flex:none;width:240px;display:flex;align-items:center;gap:8px;padding:0 14px;font-size:14px;min-width:0}
.doc-blockview .tl-n span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.doc-blockview .tl-t{flex:1;position:relative;background-image:linear-gradient(to right,var(--line2) 1px,transparent 1px);background-size:calc(100% / var(--n) * var(--step)) 100%}
.doc-blockview .tl-h{height:42px;background:var(--soft);border-bottom:1px solid var(--line)}
.doc-blockview .tl-h .tl-n{color:var(--dim);font-size:12px}
.doc-blockview .tl-h .tl-t{background:none}
.doc-blockview .tl-d{position:absolute;top:0;bottom:0;display:flex;align-items:center;justify-content:center;gap:4px;font-size:12px;color:var(--dim);border-left:1px solid var(--line2)}
.doc-blockview .tl-d b{color:var(--sub);font-weight:600;font-size:13px}
.doc-blockview .tl-d.on b{background:#e8602c;color:#fff;border-radius:5px;padding:0 6px}
.doc-blockview .tl-body{position:relative}
.doc-blockview .tl-g{height:32px;display:flex;align-items:center;gap:8px;padding:0 14px;font-size:13px;font-weight:700;color:var(--sub);background:var(--soft);border-top:1px solid var(--line2)}
.doc-blockview .tl-g:first-child{border-top:0}
.doc-blockview .tl-g small{font-weight:500;color:var(--dim)}
.doc-blockview .tl-r{height:42px;border-top:1px solid var(--line2)}
.doc-blockview .tl-body>.tl-r:first-child{border-top:0}
.doc-blockview .tl-r .dot{flex:none;width:7px;height:7px;border-radius:50%;background:currentColor}
.doc-blockview .dot.st-done{color:#1f9d55}.dot.st-doing{color:#2f6fde}.dot.st-wait{color:#b7791f}.dot.st-todo{color:#a0a0a7}.dot.st-hold{color:#c2410c}.dot.st-ms{color:#e8602c}
.doc-blockview .dot.st-done,.doc-blockview .dot.st-doing,.doc-blockview .dot.st-wait,.doc-blockview .dot.st-todo,.doc-blockview .dot.st-hold,.doc-blockview .dot.st-ms{background:currentColor}
.doc-blockview .tl-b{position:absolute;top:9px;height:24px;border-radius:6px;display:flex;align-items:center;justify-content:flex-end;padding:0 3px;margin:0 3px;box-sizing:border-box;max-width:calc(100% - 6px)}
.doc-blockview .tl-b .av{width:18px;height:18px;font-size:9.5px;margin-left:2px}
.doc-blockview .tl-b.st-done{background:#e5f6ec;box-shadow:inset 0 0 0 1px #bfe6cf}
.doc-blockview .tl-b.st-doing{background:#2f6fde}
.doc-blockview .tl-b.st-wait{background:#fdf3e1;box-shadow:inset 0 0 0 1.5px #e9c27a}
.doc-blockview .tl-b.st-todo{background:repeating-linear-gradient(135deg,var(--soft) 0 6px,var(--bg) 6px 12px);box-shadow:inset 0 0 0 1.5px var(--line)}
.doc-blockview .tl-b.st-hold{background:#fdece4;box-shadow:inset 0 0 0 1px #f3c3ac}
.doc-blockview .tl-ms{position:absolute;top:14px;width:14px;height:14px;transform:rotate(45deg);background:#e8602c;border-radius:3px}
.doc-blockview .tl-msl{position:absolute;top:10px;font-size:12.5px;font-weight:700;color:#e8602c;white-space:nowrap}
.doc-blockview .tl-over{position:absolute;top:0;bottom:0;left:240px;right:0;pointer-events:none}
.doc-blockview .tl-now{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:#e8602c}
.doc-blockview .tl-f{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 14px;border-top:1px solid var(--line);font-size:12px}
.doc-blockview .tl-f .st{height:22px;font-size:12px}
.doc-blockview .tl-asof{margin-left:auto;color:var(--dim)}
.doc-blockview .ag{display:none;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.doc-blockview .ag-d{font-size:12px;font-weight:700;color:var(--sub);padding:8px 14px;background:var(--soft);border-top:1px solid var(--line)}
.doc-blockview .ag-d:first-child{border-top:0}
.doc-blockview .ag-d.on{color:#e8602c}
.doc-blockview .ag-i{display:flex;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--line2);font-size:15px;line-height:1.4}
.doc-blockview .ag-i .t{flex:1;min-width:0}
.doc-blockview .ag-i .t small{margin-left:6px;color:var(--dim);font-size:12px}
.doc-blockview .ag-i.dn .t{color:var(--dim);text-decoration:line-through;text-decoration-color:var(--line)}
.doc-blockview .ag-i .st{height:22px;font-size:12px}
.doc-blockview .ag-i .av{width:20px;height:20px;font-size:10px}
.doc-blockview .ag-i.ms .tl-ms{position:static;flex:none;width:11px;height:11px;margin:0 4px}
.doc-blockview .ag-i.ms .t{font-weight:700;color:#e8602c}
.doc-blockview .props{margin:0;padding:0 0 4px;border-bottom:0}
.doc-blockview .pv{display:flex;grid-template-columns:none;height:auto;border-radius:0;overflow:visible;box-shadow:none;text-align:left}
.doc-blockview .pk{flex:none;width:120px;min-width:0;display:block;padding:0;border-radius:0;gap:0;font-size:14px;color:var(--sub)}
.doc-blockview .pk:hover{background:none}
.doc-blockview .av{position:static;overflow:visible;border-radius:50%;width:22px;height:22px;flex:none;display:inline-grid;place-items:center;font-size:10.5px;font-weight:700;color:#fff;object-fit:cover}
.doc-blockview .tl-b .av{width:18px;height:18px;font-size:9.5px}
.doc-blockview .ag-i .av{width:20px;height:20px;font-size:10px}
