/* DSD 편집기 — DART 편집기 배치: 왼쪽 목록창 · 가운데 편집창 · 오른쪽 검증창 */
:root { --de-line:#d6dde6; --de-soft:#f3f6fa; --de-ink:#1e293b; --de-mute:#64748b; --de-blue:#2563eb; --de-blue-soft:#e8f0fe; --de-red:#dc2626; --de-green:#15803d; --de-sel:rgba(37,99,235,.18); }
.de-start { max-width:880px; margin:32px auto; padding:0 16px; }
.de-start h2 { font-size:20px; margin-bottom:6px; }
.de-start .de-lead { color:var(--de-mute); font-size:14px; margin-bottom:18px; line-height:1.6; }
.de-drafts { margin-top:24px; }
.de-drafts h3 { font-size:15px; margin-bottom:10px; }
.de-draft { display:flex; align-items:center; gap:12px; padding:10px 14px; border:1px solid var(--de-line); border-radius:8px; background:#fff; margin-bottom:8px; }
.de-draft .de-draft-name { flex:1; font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.de-draft .de-draft-time { color:var(--de-mute); font-size:12px; white-space:nowrap; }
.de-btn { border:1px solid var(--de-line); background:#fff; color:var(--de-ink); border-radius:6px; padding:5px 10px; font-size:13px; cursor:pointer; font-family:inherit; line-height:1.3; }
.de-btn:hover { background:var(--de-soft); }
.de-btn.primary { background:var(--de-blue); border-color:var(--de-blue); color:#fff; }
.de-btn.primary:hover { background:#1d4ed8; }
.de-btn:disabled { opacity:.45; cursor:default; }

/* 작업 화면 */
.de-work { display:flex; flex-direction:column; height:calc(100vh - 64px); min-height:520px; background:#eef1f5; }
/* 문서를 여는 동안(body.de-editing): 사이트 머리글을 감추고 편집기가 창 높이를 다 쓴다 — 세로 작업 공간을 DART 편집기만큼 (docs/DSD_EDITOR.md 2026-10-20) */
body.de-editing { overflow:hidden; }
body.de-editing .header, body.de-editing .dev-head { display:none; }
body.de-editing #app { padding-bottom:0; }
body.de-editing .de-work { height:100vh; }
/* 파일 줄: 리본 탭 줄 위 한 줄 (낮게) */
.de-filebar { display:flex; align-items:center; gap:6px; padding:3px 10px; background:#fff; border-bottom:1px solid var(--de-line); flex-wrap:wrap; min-height:32px; }
.de-filebar .de-btn { padding:3px 8px; font-size:12.5px; white-space:nowrap; }
.de-filename { font-weight:700; font-size:13px; max-width:40vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.de-savestate { color:var(--de-mute); font-size:12px; margin-left:auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.de-savestate.dirty { color:#b45309; }
/* 열어 둔 Dropbox 파일이 다른 곳에서 저장됐는데 자동으로 못 바꿀 때 파일 줄 아래에 나오는 경고 */
.de-dbxwarn { margin:4px 8px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12.5px; color:#9a3412; background:#fff7ed; border:1px solid #fdba74; border-radius:6px; padding:6px 10px; }
.de-dbxwarn[hidden] { display:none; }
.de-dbxwarn .de-btn { padding:3px 10px; font-size:12px; }

/* 리본 (DART 메뉴 탭) */
.de-ribbon { background:#fff; border-bottom:1px solid var(--de-line); position:relative; }
.de-rtabs { display:flex; align-items:center; gap:2px; padding:0 8px; border-bottom:1px solid var(--de-line); background:var(--de-soft); flex-wrap:wrap; min-height:36px; }
.de-rfold { border:0; background:none; cursor:pointer; color:var(--de-mute); font-size:13px; padding:4px 8px; border-radius:5px; font-family:inherit; line-height:1; }
.de-rfold:hover { background:var(--de-blue-soft); color:var(--de-ink); }
/* 리본 접기: 탭 줄만 남기고, 탭을 누르면 리본이 문서 위에 잠깐 떠서(peek) 쓰고 사라진다 */
.de-ribbon.folded .de-rpanel.active { display:none; }
.de-ribbon.folded.peek .de-rpanel.active { display:flex; position:absolute; left:0; right:0; top:100%; z-index:40; background:#fff; border-bottom:1px solid var(--de-line); box-shadow:0 8px 20px rgba(15,23,42,.14); }
.de-rtab { border:0; background:none; padding:6px 14px; font-size:13px; cursor:pointer; color:var(--de-mute); border-bottom:2px solid transparent; font-family:inherit; }
.de-rtab.active { color:var(--de-blue); border-bottom-color:var(--de-blue); font-weight:600; background:#fff; }
/* 그룹은 모두 같은 높이: 내용 58px(큰 버튼 1개 = 작은 줄 2개) + 아래 그룹 이름 */
.de-rpanel { display:none; padding:6px 4px 2px; align-items:stretch; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; }
.de-rpanel.active { display:flex; }
.de-group { display:flex; flex-direction:column; flex-shrink:0; padding:0 7px; position:relative; }
.de-group + .de-group::before { content:""; position:absolute; left:0; top:4px; bottom:6px; width:1px; background:var(--de-line); }
.de-group-body { display:flex; align-items:flex-start; gap:2px; height:58px; }
.de-group-title { height:18px; line-height:18px; font-size:11px; color:var(--de-mute); text-align:center; white-space:nowrap; }
.de-small-grid { display:grid; grid-template-rows:repeat(2, 28px); grid-auto-flow:column; grid-auto-columns:max-content; gap:2px 2px; margin-left:2px; }
.de-rows { display:flex; flex-direction:column; gap:2px; }
.de-row { display:flex; align-items:center; gap:2px; height:28px; }
.de-row:has(> .de-align9r), .de-row:has(> .de-imginfo) { height:58px; align-items:flex-start; } /* 3×3 정렬 단추·그림정보는 리본 두 줄 높이를 다 씀 */
.de-tool { display:flex; align-items:center; border:1px solid transparent; background:none; border-radius:5px; cursor:pointer; font-family:inherit; color:#334155; transition:background .12s, border-color .12s; }
.de-tool:hover { background:var(--de-blue-soft); border-color:#c7d7fb; color:var(--de-ink); }
.de-tool:active { background:#dbe7fd; }
.de-tool:focus-visible { outline:2px solid var(--de-blue); outline-offset:1px; }
.de-tool.on { background:var(--de-blue-soft); border-color:var(--de-blue); }
.de-tool:disabled { opacity:.38; cursor:default; background:none; border-color:transparent; } /* DART 처럼 지금 쓸 수 없는 명령은 흐리게 (자동 목차 생성·삭제) */
.de-tool .ic { display:inline-flex; width:20px; height:20px; flex-shrink:0; }
.de-tool .ic svg { display:block; }
.de-tool .lb { font-size:11.5px; white-space:nowrap; line-height:1.2; }
.de-tool.big { flex-direction:column; justify-content:center; gap:4px; min-width:52px; height:58px; padding:0 5px; }
.de-tool.big .ic { width:24px; height:24px; }
.de-tool.big .ic svg { width:24px; height:24px; }
.de-tool.small { flex-direction:row; gap:6px; height:28px; padding:0 8px 0 5px; }
.de-tool.icon { justify-content:center; width:30px; height:28px; padding:0; }
.de-sel-in { height:26px; font-size:12px; padding:0 4px; border:1px solid var(--de-line); border-radius:5px; font-family:inherit; background:#fff; color:var(--de-ink); cursor:pointer; }
.de-sel-in:hover { border-color:#b6c2d1; }
.de-sel-in[data-ctl="font"] { width:104px; }
.de-sel-in[data-ctl="size"] { width:60px; }
.de-row .de-sel-in:not([data-ctl]) { width:100px; margin-left:4px; }
.de-colorbox { display:inline-flex; align-items:center; gap:5px; height:28px; padding:0 2px 0 5px; border-radius:5px; color:#334155; }
.de-colorbox:hover { background:var(--de-soft); }
.de-colorbox .lb { font-size:11.5px; white-space:nowrap; }
.de-color { width:20px; height:20px; padding:0; border:1px solid #b6c2d1; border-radius:4px; background:#fff; cursor:pointer; }
.de-color::-webkit-color-swatch-wrapper { padding:1px; }
.de-color::-webkit-color-swatch { border:0; border-radius:2px; }
.de-color-x { width:18px; height:18px; border:0; background:none; color:var(--de-mute); border-radius:4px; cursor:pointer; font-size:14px; line-height:1; padding:0; }
.de-color-x:hover { background:#e2e8f0; color:var(--de-ink); }

/* 세 창 */
.de-panes { flex:1; display:flex; min-height:0; }
.de-toc { width:250px; background:#fff; border-right:1px solid var(--de-line); overflow:auto; font-size:13px; flex-shrink:0; }
.de-toc-head { padding:8px 12px; font-weight:700; font-size:12px; color:var(--de-mute); border-bottom:1px solid var(--de-line); display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; background:#fff; z-index:1; }
.de-toc ul { list-style:none; margin:0; padding:0; }
.de-toc li > .de-ti { display:flex; align-items:center; gap:4px; padding:5px 8px; cursor:pointer; border-left:3px solid transparent; }
.de-toc li > .de-ti:hover { background:var(--de-soft); }
.de-toc li > .de-ti.active { background:var(--de-blue-soft); border-left-color:var(--de-blue); font-weight:600; }
.de-toc .de-tw { width:14px; flex-shrink:0; color:var(--de-mute); font-size:10px; text-align:center; }
.de-toc .de-tt { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.de-toc .de-note .de-tt { color:#475569; font-size:12px; }
.de-toc li.collapsed > ul { display:none; }

.de-editor { flex:1; overflow:auto; position:relative; padding:8px 16px 80px; }
.de-page { position:relative; z-index:0; background:#fff; margin:0 auto; width:fit-content; min-width:680px; max-width:none; padding:48px 40px 64px; box-shadow:0 1px 4px rgba(15,23,42,.12); font-family:"Batang","바탕",serif; font-size:16px; color:#000; line-height:24px; transform-origin:top center; }
/* 편집 화면 안내선: DART 편집기 화면처럼 글(600px) 양옆 30px 에 연회색 1px 세로선. 글 뒤에 깔리고(z-index:-1) 넓은 표는 흰 바탕으로 가린다. 인쇄·미리보기에는 없다 */
.de-page::before, .de-page::after { content:""; position:absolute; top:0; bottom:0; width:0; border-left:1px solid #b4b4b4; z-index:-1; pointer-events:none; }
.de-page::before { left:9px; }   /* 글 시작(40px) 30px 앞 */
.de-page::after { left:670px; }  /* 글 끝(640px) 30px 뒤 */
.de-page .de-table { background:#fff; }
/* 블록 합계·평균·곱: 결과를 넣을 셀을 고르는 중 */
.de-page.de-picking td, .de-page.de-picking th { cursor:cell; }
.de-page.de-picking td:hover, .de-page.de-picking th:hover { outline:2px solid var(--de-blue); outline-offset:-2px; }
.de-side { width:300px; background:#fff; border-left:1px solid var(--de-line); display:flex; flex-direction:column; flex-shrink:0; min-height:0; }
.de-side-tabs { display:flex; border-bottom:1px solid var(--de-line); }
.de-side-tab { flex:1; border:0; background:var(--de-soft); padding:8px 4px; font-size:12px; cursor:pointer; font-family:inherit; color:var(--de-mute); border-bottom:2px solid transparent; }
.de-side-tab.active { background:#fff; color:var(--de-blue); border-bottom-color:var(--de-blue); font-weight:600; }
.de-side-body { flex:1; overflow:auto; padding:10px 12px; font-size:12.5px; }
.de-hide-toc .de-toc, .de-hide-side .de-side { display:none; }
/* Dropbox 열기 창 */
.de-dbx { width:min(720px, 94vw); }
.de-dbx-roots { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.de-dbx-root { border:1px solid var(--de-line); background:#fff; border-radius:14px; padding:4px 12px; font-size:12.5px; cursor:pointer; font-family:inherit; color:#334155; }
.de-dbx-root:hover { border-color:var(--de-blue); color:var(--de-blue); }
.de-dbx-root.on { background:var(--de-blue-soft); border-color:var(--de-blue); color:var(--de-blue); font-weight:600; }
.de-dbx-crumb { display:flex; align-items:center; gap:8px; margin-bottom:6px; min-height:30px; }
.de-dbx-path { font-size:12px; color:var(--de-mute); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; direction:rtl; text-align:left; }
.de-dbx-list { height:min(420px, 55vh); overflow:auto; border:1px solid var(--de-line); border-radius:6px; }
.de-dbx-list > p { padding:12px; margin:0; }
.de-dbx-row { display:grid; grid-template-columns:24px 1fr auto 56px; gap:8px; align-items:center; width:100%; border:0; border-bottom:1px solid #f1f5f9; background:#fff; padding:7px 10px; text-align:left; font-family:inherit; font-size:13px; cursor:pointer; }
.de-dbx-row:hover { background:var(--de-blue-soft); }
.de-dbx-row .nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.de-dbx-row.file .nm { color:var(--de-blue); font-weight:600; }
.de-dbx-row .de-muted { font-size:11.5px; text-align:right; }
.de-err { color:#b91c1c; }
.de-newyear.de-dbx-card { border-color:#bae6fd; background:#f0f9ff; }

/* 양쪽 가장자리 막대 (목록창·검증창 열기/닫기) */
.de-rail { width:28px; flex-shrink:0; border:0; background:#f8fafc; color:var(--de-mute); cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 0; font-family:inherit; }
.de-rail.left { border-right:1px solid var(--de-line); }
.de-rail.right { border-left:1px solid var(--de-line); }
.de-rail:hover { background:var(--de-blue-soft); color:var(--de-blue); }
.de-rail.on { background:#fff; color:var(--de-blue); }
.de-rail-ic { font-size:14px; line-height:1; }
.de-rail-tx { writing-mode:vertical-rl; font-size:12px; font-weight:600; letter-spacing:2px; }
.de-rail-badge { min-width:18px; height:18px; padding:0 4px; border-radius:9px; font-size:11px; font-weight:700; line-height:18px; text-align:center; box-sizing:border-box; }
.de-rail-badge:empty { display:none; }
.de-rail-badge.bad { background:#dc2626; color:#fff; }
.de-rail-badge.ok { background:#dcfce7; color:#15803d; }

.de-status { display:flex; gap:16px; align-items:center; padding:4px 12px; font-size:12px; background:#fff; border-top:1px solid var(--de-line); color:var(--de-mute); min-height:26px; }
.de-status b { color:var(--de-ink); font-weight:600; }
.de-status .de-sum { margin-left:auto; color:var(--de-ink); }
.de-status-user { display:flex; gap:8px; align-items:center; white-space:nowrap; }
.de-status-user:empty { display:none; }
.de-link { border:0; background:none; color:var(--de-blue); cursor:pointer; font:inherit; padding:0; text-decoration:underline; }

/* 문서 내용 */
.de-page [contenteditable="true"] { outline:none; white-space:pre-wrap; word-break:break-all; cursor:text; }
/* 고치는 칸에 상자를 두르지 않는다 — DART 편집기는 커서만 보인다 (글씨가 칸 안에 들어가는 것처럼 보여 헷갈림, 2026-10-20) */
.de-page [contenteditable="true"]:focus { outline:none; }
.de-p { min-height:1lh; margin:0; padding:0; }
.de-title { margin:0; min-height:1lh; }

.de-cover-title { margin:0; min-height:1lh; }
/* 글은 DART 본문 폭(600px) 안에 놓는다 — 넓은 표가 있어도 가운데 정렬 글이 옆으로 밀리지 않게 (넓은 표만 오른쪽으로 넘쳐 나옴) */
.de-page .de-p, .de-page .de-title, .de-page .de-cover-title, .de-page .de-image, .de-page .de-warn, .de-page .de-raw { width:600px; box-sizing:border-box; }
.de-page td .de-p, .de-page th .de-p, .de-page td .de-title, .de-page th .de-title, .de-page td .de-image, .de-page th .de-image { width:auto; }
.de-group-block { margin:0; }
.de-sub-section { margin-top:10px; padding-top:4px; border-top:1px dashed #e2e8f0; }
/* 쪽 나누기: DART 편집기처럼 글 폭(600px)만큼 가는 회색 점선 한 줄 (글자 한 줄 높이). 커서를 둘 수 있고(tabindex) 그때 파란 점선 */
.de-pgbrk { display:flex; align-items:center; width:600px; height:24px; margin:0; cursor:default; outline:none; }
.de-pgbrk::before { content:""; flex:1; border-top:1px dashed #808080; }
.de-pgbrk:focus { background:var(--de-blue-soft); }
.de-pgbrk:focus::before { border-top-color:var(--de-blue); }
.de-warn { margin:8px 0; border:1px solid #fcd34d; background:#fffbeb; border-radius:6px; font-family:'Noto Sans KR',sans-serif; font-size:12px; color:#78350f; }
.de-warn summary { cursor:pointer; padding:5px 10px; font-weight:600; }
.de-warn div { padding:0 10px 8px; white-space:pre-wrap; line-height:1.55; }
.de-insertion { margin:6px 0; font-size:11px; color:#94a3b8; font-family:'Noto Sans KR',sans-serif; border:1px dotted #cbd5e1; padding:2px 8px; border-radius:4px; display:inline-block; user-select:none; }
.de-ins-btn { display:block; margin:8px 0; padding:4px 10px; border:1px dashed #86efac; background:#f0fdf4; color:#15803d; font-weight:600; font-size:12px; border-radius:5px; cursor:pointer; font-family:'Noto Sans KR',sans-serif; }
.de-ins-btn:hover { background:#dcfce7; border-style:solid; }
.de-ins-del { display:block; margin:10px 0 4px; padding:2px 8px; border:0; background:none; color:#c2410c; font-size:11.5px; cursor:pointer; font-family:'Noto Sans KR',sans-serif; border-radius:4px; }
.de-ins-del:hover { background:#fff7ed; text-decoration:underline; }
.de-raw { color:#64748b; font-size:11px; border:1px dotted #cbd5e1; padding:2px 6px; margin:4px 0; white-space:pre-wrap; }
.de-image { text-align:center; margin:10px 0; }
.de-image img { max-width:100%; height:auto; border:1px solid #e2e8f0; }
.de-image img { cursor:pointer; }
.de-image.on img { outline:2px solid var(--de-blue); outline-offset:2px; }
.de-image .de-cap { color:#000; margin:0; }

/* 표 */
/* DART: 표 아래 8px (DartStyle.css 의 margin-bottom:6pt) */
.de-table { border-collapse:collapse; table-layout:fixed; margin:0 0 8px; }
/* DART 칸 여백: 위 4 · 좌우 4 · 아래 2 + 테두리 1 → 칸 WIDTH = 열 − 9, HEIGHT = 행 − 7 (DSD 규칙과 같음) */
.de-table td, .de-table th { border:1px solid #000; padding:4px 4px 2px 4px; overflow:hidden; position:relative; vertical-align:middle; }
.de-table.noborder > * > tr > td, .de-table.noborder > * > tr > th { border:1px dashed #cbd5e1; }
.de-table thead td, .de-table thead th { background:#f8fafc; }
.de-table thead.de-headrow td, .de-table thead.de-headrow th { box-shadow:inset 0 0 0 999px rgba(148,163,184,.12); }
.de-table td.de-locked, .de-table th.de-locked { color:#1e3a8a; }
.de-table td.de-fixed-cell { cursor:default; }
.de-table td.de-tu { color:#1d4ed8; cursor:pointer; text-decoration:underline dotted; }
.de-table .de-autosum { color:#7c3aed; background-image:linear-gradient(45deg, rgba(124,58,237,.06) 25%, transparent 25%); }
/* 블록 합계·평균·곱 셀: DART 처럼 칸 왼쪽 위에 작은 SUM·AVE·MUL (화면에만, 인쇄·미리보기에는 없음) */
.de-table td[data-calc] { position:relative; }
.de-table td[data-calc]::before { content:attr(data-calc); position:absolute; left:2px; top:0; font:7px/1 Arial,sans-serif; letter-spacing:0; color:#8b8b8b; pointer-events:none; }
.de-table td[data-level="1"]::before { content:"·"; color:#94a3b8; margin-right:2px; }
.de-table td[data-level="2"]::before { content:"‥"; color:#94a3b8; margin-right:2px; }
.de-table td[data-level="3"]::before { content:"…"; color:#94a3b8; margin-right:2px; }
.de-table .de-sel { box-shadow:inset 0 0 0 999px var(--de-sel); }
.de-table.de-fixed { outline:1px dotted #93c5fd; outline-offset:2px; }
/* 표 선 끌기 모양: 칸 안 요소까지 (글 칸의 cursor:text 가 이겨 선 위에서도 I 모양이던 것 — 2026-10-23) */
.de-col-resize, .de-col-resize * { cursor:col-resize !important; }
.de-row-resize, .de-row-resize * { cursor:row-resize !important; }
.de-resize-guide { position:fixed; background:var(--de-blue); z-index:50; pointer-events:none; }
.de-find-hit { background:#fde047; }

/* 검증창 */
.de-vsum { display:flex; gap:6px; margin-bottom:10px; flex-wrap:wrap; }
.de-chip { border-radius:999px; padding:2px 9px; font-size:11.5px; font-weight:600; background:var(--de-soft); color:var(--de-mute); }
.de-chip.ok { background:#dcfce7; color:var(--de-green); }
.de-chip.bad { background:#fee2e2; color:var(--de-red); }
.de-vgroup { margin-bottom:14px; }
.de-vgroup h4 { font-size:12.5px; margin:0 0 6px; color:var(--de-ink); }
.de-vrow { display:grid; grid-template-columns:18px 1fr; gap:4px; padding:5px 6px; border-radius:5px; margin-bottom:3px; line-height:1.45; }
.de-vrow.fail { background:#fef2f2; }
.de-vrow.pass { color:#334155; }
.de-vrow .num { font-variant-numeric:tabular-nums; color:var(--de-mute); font-size:11.5px; }
.de-vrow.clickable { cursor:pointer; }
.de-vrow.clickable:hover { outline:1px solid #fca5a5; }
.de-muted { color:var(--de-mute); }
.de-props { width:100%; border-collapse:collapse; }
.de-props td { border-bottom:1px solid #eef2f6; padding:4px 2px; vertical-align:top; word-break:break-all; }
.de-props td:first-child { color:var(--de-mute); width:86px; }
.de-warn-side { background:#fffbeb; border:1px solid #fcd34d; border-radius:6px; padding:8px 10px; white-space:pre-wrap; line-height:1.55; color:#78350f; margin-bottom:8px; }

/* 대화상자·떠 있는 창 */
.de-modal-back { position:fixed; inset:0; background:rgba(15,23,42,.35); z-index:1000; display:flex; align-items:center; justify-content:center; }
.de-modal { background:#fff; border-radius:10px; min-width:300px; max-width:92vw; box-shadow:0 12px 40px rgba(15,23,42,.25); }
.de-modal h3 { font-size:15px; padding:14px 18px 0; margin:0; }
.de-modal .de-mbody { padding:12px 18px; font-size:13px; line-height:1.6; }
.de-modal .de-mbody label { display:flex; align-items:center; gap:8px; margin:6px 0; }
.de-modal .de-mbody input[type=number], .de-modal .de-mbody input[type=text], .de-modal .de-mbody input[type=date], .de-modal .de-mbody select { border:1px solid var(--de-line); border-radius:5px; padding:5px 8px; font-size:13px; font-family:inherit; }
.de-modal .de-mfoot { display:flex; justify-content:flex-end; gap:8px; padding:0 18px 14px; }
.de-float { position:fixed; z-index:900; background:#fff; border:1px solid var(--de-line); border-radius:8px; box-shadow:0 8px 28px rgba(15,23,42,.18); font-size:13px; width:320px; }
.de-float .de-fhead { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; border-bottom:1px solid var(--de-line); font-weight:700; cursor:move; user-select:none; }
.de-float .de-fbody { padding:10px 12px; }
.de-float .de-fbody input[type=text] { width:100%; border:1px solid var(--de-line); border-radius:5px; padding:5px 8px; font-family:inherit; font-size:13px; margin-bottom:6px; }
.de-float .de-frow { display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }
/* 찾기/바꾸기 창 (DART 창처럼 찾은 곳 목록) */
.de-float:has(.de-find) { width:420px; }
.de-find .de-frow { flex-wrap:nowrap; align-items:center; }
.de-find .de-frow input[type=text] { margin-bottom:0; }
.de-find-opts { gap:12px !important; font-size:12px; }
.de-find-opts label { display:flex; align-items:center; gap:3px; }
.de-find-count { font-size:12px; color:var(--de-mute); margin:6px 0 3px; }
.de-find-list { height:180px; overflow:auto; border:1px solid var(--de-line); border-radius:4px; font-size:12px; margin-bottom:8px; }
.de-find-row { display:flex; align-items:flex-start; gap:5px; padding:3px 6px; cursor:pointer; border-bottom:1px solid #f1f5f9; white-space:nowrap; }
.de-find-row span { overflow:hidden; text-overflow:ellipsis; }
.de-find-row:hover { background:var(--de-soft); }
.de-find-row.on { background:var(--de-blue-soft); }
.de-find-mark { color:#1d4ed8; }
/* 표 편집·그림편집 탭: 커서가 표·그림에 있을 때만 (DART 처럼 색을 달리) */
.de-rtab.ctx { color:#9a3412; }
.de-rtab.ctx.active { color:#c2410c; border-bottom-color:#ea580c; }
.de-rtab[hidden] { display:none; }
.de-heading-gallery .de-pop-item { display:block; width:100%; text-align:left; font-family:"Gulim","굴림",sans-serif; }
/* 문서 헤더정보 입력 (F8) */
.de-modal.de-hdr { width:min(720px, 94vw); }
.de-hdr .de-mbody { max-height:70vh; overflow:auto; }
.de-htabs { display:flex; gap:2px; border-bottom:1px solid var(--de-line); margin-bottom:10px; }
.de-htabs button { border:1px solid var(--de-line); border-bottom:0; background:var(--de-soft); padding:5px 14px; border-radius:5px 5px 0 0; cursor:pointer; font:inherit; font-size:12.5px; color:var(--de-mute); }
.de-htabs button.on { background:#fff; color:var(--de-ink); font-weight:600; margin-bottom:-1px; padding-bottom:6px; }
.de-hpane fieldset { border:1px solid var(--de-line); border-radius:6px; padding:6px 12px 8px; margin:0 0 10px; }
.de-hpane legend { font-size:12px; color:var(--de-mute); padding:0 4px; }
.de-hrow { display:flex; align-items:center; gap:6px; margin:5px 0; font-size:13px; }
.de-hrow .de-hlabel { width:76px; flex-shrink:0; color:var(--de-mute); }
.de-modal .de-mbody .de-hrow input[type=text] { border:1px solid var(--de-line); border-radius:5px; padding:4px 7px; font:inherit; font-size:13px; }
.de-htable { width:100%; border-collapse:collapse; font-size:12.5px; }
.de-htable th, .de-htable td { border:1px solid var(--de-line); padding:4px 7px; vertical-align:top; text-align:left; }
.de-htable thead th { background:var(--de-soft); text-align:center; font-weight:600; }
.de-htable tbody th { width:38%; font-weight:500; background:#fafafa; }
.de-htable select, .de-htable input[type=text], .de-htable input[type=date] { border:1px solid var(--de-line); border-radius:4px; padding:3px 6px; font:inherit; font-size:12.5px; }
.de-modal .de-mbody .de-htable label { display:inline-flex; margin:0 10px 0 0; gap:3px; }
.de-hcheck { display:inline-flex; align-items:center; gap:3px; margin-right:10px; }
.de-htree { list-style:none; margin:0; padding-left:0; }
.de-htree .de-htree { padding-left:18px; }
.de-htree li { margin:1px 0; }
.de-modal .de-mbody .de-htree label { display:inline-flex; margin:0; }
.de-cik-list { max-height:240px; overflow:auto; min-width:240px; }
.de-cik-list .de-pop-item { display:block; width:100%; text-align:left; font-variant-numeric:tabular-nums; }
/* 파일형식 검사 (F7) 결과 창: 편집기 아래에 붙음 */
.de-checkpane { position:fixed; left:0; right:0; bottom:26px; z-index:880; background:#fff; border-top:2px solid var(--de-line); box-shadow:0 -6px 18px rgba(15,23,42,.10); font-size:12.5px; }
.de-check-head { display:flex; align-items:center; gap:6px; padding:4px 10px; background:var(--de-soft); border-bottom:1px solid var(--de-line); }
.de-check-head .de-btn { padding:2px 8px; font-size:12px; }
.de-check-list { max-height:min(30vh, 240px); overflow:auto; padding:4px 0; }
.de-check-row { padding:2px 12px; cursor:default; white-space:pre-wrap; }
.de-check-row.err { color:#dc2626; cursor:pointer; }
.de-check-row.on { background:var(--de-blue-soft); }
.de-check-row.sum { color:var(--de-ink); font-weight:600; }
.de-check-row.sum.ok { color:#15803d; }
/* 리본 툴팁: 명령 이름 + 단축키 + 설명 (마우스를 올리면 바로) */
.de-tip { position:fixed; z-index:1200; max-width:320px; background:#1f2937; color:#f9fafb; border-radius:6px; padding:6px 9px; font-size:12px; line-height:1.45; box-shadow:0 6px 18px rgba(15,23,42,.25); pointer-events:none; }
.de-tip[hidden] { display:none; }
.de-tip-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.de-tip-head b { font-weight:600; }
.de-tip-key { color:#e5e7eb; white-space:nowrap; }
.de-tip-key kbd { display:inline-block; min-width:16px; padding:0 4px; margin:0 1px; border:1px solid #6b7280; border-bottom-width:2px; border-radius:4px; background:#374151; color:#fff; font:11px/16px inherit; font-family:inherit; text-align:center; }
.de-tip-or { color:#9ca3af; }
.de-tip-text { color:#d1d5db; margin-top:3px; white-space:pre-line; }
/* 리본 셀 정렬 3×3 단추 (DART '셀 편집' 자리, 지금 칸 정렬은 눌린 모양) */
.de-align9r { display:grid; grid-template-columns:repeat(3, 20px); grid-template-rows:repeat(3, 18px); gap:1px 2px; margin:1px 4px 0; }
.de-a9 { border:1px solid transparent; background:none; border-radius:3px; padding:0; cursor:pointer; color:var(--de-ink); display:flex; align-items:center; justify-content:center; }
.de-a9:hover { background:var(--de-blue-soft); }
.de-a9.on { background:var(--de-blue-soft); border-color:var(--de-blue); color:var(--de-blue); }
.de-a9 .ic, .de-a9 svg { width:15px; height:15px; }
/* 리본 그림정보 (읽기만) */
.de-imginfo { display:flex; flex-direction:column; gap:1px; font-size:11.5px; margin:1px 4px 0; min-width:170px; }
.de-imginfo div { display:flex; gap:6px; height:18px; align-items:center; }
.de-imginfo span { color:var(--de-mute); width:48px; flex-shrink:0; }
.de-imginfo b { font-weight:400; border:1px solid var(--de-line); background:var(--de-soft); padding:0 5px; min-width:110px; max-width:180px; height:16px; line-height:15px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
/* 그림 자동 변환·그림 속성 창 (DART 창 모양) */
.de-imgconv { width:min(460px, 86vw); font-size:12.5px; }
.de-imgconv p { margin:0 0 4px; }
.de-imgconv-r { text-align:right; color:var(--de-mute); }
.de-imgconv-view { border:1px solid var(--de-line); height:240px; overflow:auto; padding:6px; background:#fff; }
.de-imgconv-view img { display:block; max-width:none; }
.de-imgconv-info { background:#e8e8f4; border:1px solid #b9b9d6; padding:4px 6px; margin:4px 0; word-break:break-all; }
.de-imgconv-q { color:#dc2626; font-weight:600; }
.de-imgprop { width:min(400px, 86vw); font-size:12.5px; }
.de-imgprop fieldset { border:1px solid var(--de-line); border-radius:4px; padding:4px 10px 6px; margin:0 0 6px; }
.de-imgprop legend { font-size:12px; color:var(--de-mute); padding:0 3px; }
.de-imgprop-row { display:flex; gap:6px; }
.de-imgprop-row fieldset:first-child { flex:1; }
.de-modal .de-mbody .de-imgprop label { display:flex; margin:3px 0; gap:3px; }
.de-imgprop-size { display:flex; align-items:center; gap:4px; margin:3px 0; }
.de-modal .de-mbody .de-imgprop input[type=number] { padding:2px 4px; }
.de-imgprop-note { color:#1d4ed8; margin:2px 0 0; }
/* 주민등록번호 패턴 검색 결과 창 (DART 창 모양) */
.de-rrn { width:min(420px, 86vw); font-size:12.5px; }
.de-rrn p { margin:0 0 6px; }
.de-rrn-head { display:flex; gap:10px; }
.de-rrn-warn { font-size:22px; line-height:1; color:#d97706; }
.de-rrn-blue { color:#1d4ed8; }
.de-rrn-list { border:1px solid var(--de-line); height:130px; overflow:auto; margin-top:4px; }
.de-rrn-list table { width:100%; border-collapse:collapse; }
.de-rrn-list th { background:var(--de-soft); font-weight:500; border-bottom:1px solid var(--de-line); padding:2px 6px; }
.de-rrn-list td { padding:2px 6px; text-align:center; cursor:default; font-variant-numeric:tabular-nums; }
.de-rrn-list tr:hover td { background:var(--de-blue-soft); }
.de-rrn-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#84cc16; margin-right:8px; vertical-align:middle; }
.de-rrn-note { text-align:center; color:var(--de-mute); margin-top:4px !important; }
.de-rrn-q { border-top:1px solid var(--de-line); padding-top:8px; margin-top:6px; }
.de-modal .de-mbody .de-rrn-q label { margin:2px 0 2px 12px; }
/* 선택 합계 창 */
.de-sum-out { font-size:20px; font-weight:700; margin:6px 0; padding:4px 8px; border:1px solid var(--de-line); border-radius:4px; text-align:right; font-variant-numeric:tabular-nums; }
.de-x { border:0; background:none; font-size:16px; cursor:pointer; color:var(--de-mute); }
.de-symbols { display:grid; grid-template-columns:repeat(10, 1fr); gap:3px; }
.de-symbols button { border:1px solid var(--de-line); background:#fff; border-radius:4px; padding:4px 0; cursor:pointer; font-size:14px; font-family:"Gulim","굴림",sans-serif; }
.de-symbols button:hover { background:var(--de-blue-soft); }
.de-align9 { display:grid; grid-template-columns:repeat(3, 30px); gap:3px; }
.de-align9 button { height:26px; border:1px solid var(--de-line); background:#fff; border-radius:4px; cursor:pointer; font-size:11px; }
.de-align9 button:hover { background:var(--de-blue-soft); }
.de-popover { position:fixed; z-index:950; background:#fff; border:1px solid var(--de-line); border-radius:8px; box-shadow:0 8px 24px rgba(15,23,42,.18); padding:8px; }
.de-popover .de-pop-item { display:block; width:100%; text-align:left; border:0; background:none; padding:6px 10px; border-radius:5px; cursor:pointer; font-size:13px; font-family:inherit; }
.de-popover .de-pop-item:hover { background:var(--de-blue-soft); }
.de-toast { position:fixed; left:50%; bottom:40px; transform:translateX(-50%); background:#1e293b; color:#fff; padding:8px 16px; border-radius:6px; font-size:13px; z-index:1100; box-shadow:0 6px 20px rgba(0,0,0,.2); max-width:80vw; }
.de-toast.err { background:#b91c1c; }
.de-keys { width:100%; border-collapse:collapse; font-size:12.5px; }
.de-keys td { padding:3px 6px; border-bottom:1px solid #eef2f6; }
.de-keys td:last-child { color:var(--de-blue); white-space:nowrap; text-align:right; font-family:Consolas,monospace; }

/* 인쇄: 미리보기(.de-pv)를 열고 인쇄하면 A4 쪽만, 그냥 인쇄하면 지금 편집창 */
@media print {
  body:not(.de-printing) * { visibility:hidden; }
  body:not(.de-printing) .de-page, body:not(.de-printing) .de-page * { visibility:visible; }
  body:not(.de-printing) .de-page { position:absolute; left:0; top:0; box-shadow:none; width:auto; padding:0; zoom:1 !important; }
  body:not(.de-printing) .de-pgbrk { border:0; break-after:page; height:0; margin:0; }
  .de-pgbrk::before, .de-pgbrk::after, .de-warn, .de-insertion, .de-ins-btn, .de-ins-del, .de-page::before, .de-page::after { display:none !important; }
  .de-table.noborder > * > tr > td, .de-table.noborder > * > tr > th { border-color:transparent !important; }
  .de-table .de-sel { box-shadow:none; }
  .de-table td[data-level]::before { content:none; }
  body.de-printing > * { display:none !important; }
  body.de-printing > .de-pv { display:block !important; position:static; overflow:visible; background:none; }
  body.de-printing .de-pv-side, body.de-printing .de-pv-bar { display:none !important; }
  body.de-printing .de-pv-main { overflow:visible; padding:0; display:block; }
  body.de-printing .de-pv-pages { zoom:1 !important; gap:0; padding:0; }
  body.de-printing .de-pv-page { box-shadow:none; margin:0; break-after:page; }
  body.de-printing .de-pv .de-warn { display:block !important; }
}
@page dsdA4 { size:A4 portrait; margin:0; }

/* 인쇄 미리보기 (DART 5.22) */
.de-pv { position:fixed; inset:0; z-index:1200; background:#525659; display:flex; flex-direction:column; font-family:'Noto Sans KR',sans-serif; }
.de-pv-bar { display:flex; align-items:center; gap:8px; padding:8px 14px; background:#1e293b; color:#fff; font-size:13px; }
.de-pv-bar b { font-size:14px; }
.de-pv-bar .de-btn { padding:4px 12px; }
.de-pv-bar .sp { flex:1; }
.de-pv-body { flex:1; display:flex; min-height:0; }
.de-pv-side { width:250px; background:#fff; overflow:auto; padding:12px 14px; font-size:12.5px; border-right:1px solid #cbd5e1; }
.de-pv-side h4 { font-size:12px; color:#1d4ed8; margin:14px 0 6px; border-bottom:1px solid #e2e8f0; padding-bottom:3px; }
.de-pv-side h4:first-child { margin-top:0; }
.de-pv-side label { display:flex; align-items:center; gap:6px; margin:5px 0; cursor:pointer; }
.de-pv-side select, .de-pv-side input[type=number] { font-size:12px; padding:2px 4px; border:1px solid var(--de-line); border-radius:4px; font-family:inherit; }
.de-pv-side input[type=number] { width:62px; }
.de-pv-side .row { display:grid; grid-template-columns:60px 1fr; align-items:center; gap:6px; margin:5px 0; }
.de-pv-pos { display:grid; grid-template-columns:repeat(3, 1fr); gap:3px; width:150px; margin:4px 0 6px; }
.de-pv-pos button { height:22px; font-size:11px; border:1px solid var(--de-line); background:#fff; border-radius:3px; cursor:pointer; }
.de-pv-pos button.on { background:var(--de-blue); color:#fff; border-color:var(--de-blue); }
.de-pv-pos .mid { grid-column:1 / span 3; height:28px; border:1px dashed #cbd5e1; border-radius:3px; display:flex; align-items:center; justify-content:center; color:#94a3b8; font-size:10px; }
.de-pv-main { flex:1; overflow:auto; padding:20px; }
.de-pv-pages { display:flex; flex-direction:column; align-items:center; gap:18px; transform-origin:top center; }
.de-pv-page { page:dsdA4; position:relative; width:21cm; height:29.7cm; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.35); overflow:hidden; flex-shrink:0; }
.de-pv-flow { position:absolute; overflow:visible; }
/* 줄인 표를 담는 상자: 표는 transform 으로 줄어들고 상자가 줄어든 높이만큼 자리를 차지한다 */
/* overflow:hidden — 인쇄 쪽 나눔은 transform 전 높이(예: 0.7배 표의 1080px)로 보므로, 상자 밖(줄이기 전 높이)이 다음 쪽으로 넘어가 사라지지 않게 */
.de-pv-flow .de-pv-tbox { position:relative; overflow:hidden; break-inside:avoid; box-sizing:content-box; } /* content-box: 위 1px 여백이 높이에 포함되면 표가 1px 밀린다 */
.de-pv-flow .de-pv-tbox > .de-table { margin:0; }
.de-pv-num { position:absolute; font-family:"Batang","바탕",serif; font-size:14px; line-height:1; color:#000; white-space:nowrap; } /* 14px(DART 10.5pt)×0.96 은 안쪽 span 의 transform */
.de-pv-flow, .de-pv-measure { font-family:"Batang","바탕",serif; font-size:16px; color:#000; line-height:24px; }
.de-pv-flow .de-p, .de-pv-flow .de-title, .de-pv-flow .de-cover-title, .de-pv-flow td, .de-pv-flow th, .de-pv-flow .de-cap,
.de-pv-measure .de-p, .de-pv-measure .de-title, .de-pv-measure .de-cover-title, .de-pv-measure td, .de-pv-measure th, .de-pv-measure .de-cap { white-space:pre-wrap; word-break:break-all; }
.de-pv-flow .de-pgbrk, .de-pv-measure .de-pgbrk { display:none; }
.de-pv-flow .de-just, .de-pv-measure .de-just { text-align-last:justify; }
.de-pv-flow .de-table.noborder > * > tr > td, .de-pv-flow .de-table.noborder > * > tr > th { border-color:transparent; }
/* 인쇄 표 선은 SVG 가는 선(de-pv-grid)으로 그린다 — 칸 테두리는 자리만 차지하고 투명 */
.de-pv-flow .de-table > * > tr > td, .de-pv-flow .de-table > * > tr > th { border-color:transparent; }
.de-pv-flow .de-pv-grid { position:absolute; }
.de-pv-flow td[data-level]::before, .de-pv-measure td[data-level]::before { content:none; }
.de-pv-flow .de-table, .de-pv-measure .de-table { outline:0; }
/* 인쇄·미리보기에는 편집 화면용 표시(날짜 칸 파란 밑줄, 고정 글자 남색, 자동 합계 무늬)를 찍지 않는다 — 편집 화면 규칙보다 우선하도록 구체적으로 */
.de-pv-flow .de-table td.de-tu, .de-pv-measure .de-table td.de-tu, .de-pv-flow .de-table td.de-locked, .de-pv-flow .de-table th.de-locked,
.de-pv-flow .de-table .de-autosum, .de-pv-measure .de-table .de-autosum { color:inherit; text-decoration:none; background-image:none; cursor:auto; }
.de-pv-flow .de-table td[data-calc]::before, .de-pv-measure .de-table td[data-calc]::before { content:none; }
/* 인쇄 머리글 음영: DART 는 #DCDCDC 로 채운다 (원당이안 DART PDF 의 칸 채움색 0.863) */
.de-pv-flow .de-headrow td, .de-pv-flow .de-headrow th { background:#dcdcdc; box-shadow:none; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.de-pv.noshade .de-headrow td, .de-pv.noshade .de-headrow th { background:none; box-shadow:none; }
.de-pv-measure { position:absolute; left:-20000px; top:0; visibility:hidden; }
.de-pv-flow [data-nid] { cursor:default; }
@media (max-width: 900px) {
  .de-toc { width:180px; }
  .de-side { display:none; }
  .de-page { width:auto; padding:24px 12px; }
  .de-page::before, .de-page::after { display:none; }
}
.de-toc li > .de-ti:focus-visible { outline:2px solid var(--de-blue); outline-offset:-2px; }
.de-pv-flow .de-p-line, .de-pv-measure .de-p-line { padding:0; min-height:1.45em; }
.de-newyear { display:flex; align-items:center; gap:14px; justify-content:space-between; margin-top:14px; padding:12px 16px; border:1px solid #bfdbfe; background:#eff6ff; border-radius:8px; }
/* 맥·윈도우에서 같은 줄바꿈: 글자 폭을 글꼴 파일 값 그대로 쓰게 (OS별 자동 글자 간격·합자·글자 크기 보정 끔) */
.de-page, .de-pv-flow, .de-pv-measure {
  font-kerning:none; font-variant-ligatures:none; font-feature-settings:"kern" 0, "liga" 0, "clig" 0;
  text-rendering:geometricPrecision; -webkit-text-size-adjust:100%; text-size-adjust:100%; letter-spacing:0; word-spacing:0;
}
/* 윈도우 GDI 기준으로 줄을 나눈 칸: 브라우저 줄바꿈은 끔 */
.de-pv-flow .de-gdi, .de-pv-measure .de-gdi { white-space:pre !important; word-break:normal !important; overflow-wrap:normal !important; }
/* 인쇄: DART 표 높이 = 행 높이 합 (테두리가 행 안에 있음). 크롬 collapse 표는 바깥 테두리 반쪽만큼 1px 더 높으므로 아래 여백을 1px 줄여 흐름 높이를 DART 와 같게 (원당이안 DART PDF: 표 아래 글이 표마다 1px 씩 밀림) */
.de-pv-flow .de-table, .de-pv-measure .de-table { margin-bottom:7px; }
