/* 위키에만 목록/읽기/원문/개정 배치를 적용한다. 기존 업무·댓글 편집과 화면 골격은 유지한다. */
.wiki-page{min-width:0;color:var(--ink,#202838)}
.wiki-page-heading{font-size:17px;font-weight:600;margin:0 0 12px;overflow-wrap:anywhere}
.wiki-status{min-height:24px;margin:0 0 12px;color:#657184;font-size:12px;line-height:1.7}
.wiki-layout{display:grid;grid-template-columns:minmax(230px,300px) minmax(0,1fr);gap:18px;align-items:start}
.wiki-list,.wiki-pane{min-width:0;padding:18px;background:var(--surface,#fff);border:1px solid var(--line,#e8ebf0);border-radius:var(--panel-radius,10px)}
.wiki-list-heading,.wiki-document-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.wiki-page h2{font-size:16px;line-height:1.6;margin:0;overflow-wrap:anywhere}
.wiki-page h3{font-size:14px;line-height:1.6;margin:0 0 10px}
.wiki-page p{line-height:1.7;font-size:12px;overflow-wrap:anywhere}
.wiki-page button{min-height:38px;border-radius:7px;padding:8px 12px;font-size:12px;line-height:1.4}
.wiki-page button:disabled{cursor:not-allowed;opacity:.55}
.wiki-page :is(button,input,textarea,summary):focus-visible{outline:2px solid var(--purple,#7162df);outline-offset:2px}
.wiki-actions,.wiki-pagination,.wiki-search{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.wiki-search{margin-bottom:12px}.wiki-search input{flex:1;min-width:100px}
.wiki-page input,.wiki-page textarea{box-sizing:border-box;padding:10px 12px;border:1px solid var(--line,#e8ebf0);border-radius:7px;background:var(--surface,#fff);font:inherit;color:inherit;min-width:0}
.wiki-page input:disabled,.wiki-page textarea:disabled{background:var(--surface-muted,#f7f8fa)}
.wiki-document-list{display:grid;gap:8px;margin:14px 0}
.wiki-page .wiki-document-choice{width:100%;text-align:left;border:1px solid var(--line,#e8ebf0);background:var(--surface,#fff);padding:12px}
.wiki-document-choice[aria-current=true]{background:#f3f0ff;border-color:#c9c0f0}
.wiki-document-choice strong,.wiki-document-choice small{display:block;overflow-wrap:anywhere}
.wiki-document-choice small{font-size:10px;color:#657184;margin-top:6px;line-height:1.6}
.wiki-muted{font-size:11px!important;color:#657184}
.wiki-empty{padding:24px 4px;color:#657184;font-size:12px}
.wiki-editor{display:grid;gap:14px}.wiki-editor label{display:grid;gap:7px;font-size:12px;min-width:0}
.wiki-editor textarea{width:100%;resize:vertical;min-height:320px;line-height:1.65;font:12px/1.65 Consolas,'Noto Sans KR',monospace}
.wiki-editor input[name=title]{width:100%;min-height:42px}
.wiki-editor .pms-markdown-preview{min-height:320px;max-height:65vh;overflow:auto}
.wiki-page .wiki-import{display:flex;align-items:center;gap:8px;font-size:11px;color:#657184;max-width:100%}
.wiki-import input[type=file]{max-width:240px;width:100%;padding:7px;font-size:11px}
.wiki-markdown{min-width:0;max-width:100%;min-height:120px;font-size:13px}
.wiki-markdown.pms-markdown-content{overflow-x:auto}
.wiki-history{border-top:1px solid var(--line,#e8ebf0);padding-top:16px;margin-top:24px;min-width:0}
.wiki-history>summary{cursor:pointer;font-size:13px;font-weight:600;padding:6px 0 12px}
.wiki-history>button{margin:0 8px 8px 0;max-width:100%;overflow-wrap:anywhere;text-align:left}
.wiki-revision,.wiki-comparison{padding:16px;border:1px solid var(--line,#e8ebf0);border-radius:8px;background:var(--surface-muted,#f7f8fa);margin-top:12px}
.wiki-recovery{padding:14px 16px;margin-bottom:16px;border:1px solid #dfc395;background:#fff8ed;border-radius:8px;font-size:12px}
.wiki-recovery[hidden]{display:none}
.wiki-delete-confirm{padding:16px;border:1px solid #e5bcc2;background:#fff7f8;border-radius:8px;margin-top:16px}
.wiki-delete-confirm button+button{margin-left:8px}
.wiki-page .danger{color:white;background:#c34150;border:1px solid #c34150;font-weight:600}
.wiki-page .wiki-danger-outline{color:#ae3341;background:#fff7f8;border:1px solid #e5bcc2}
.wiki-error{color:#a43d37}
@media(max-width:900px){.wiki-layout{grid-template-columns:minmax(0,1fr)}.wiki-document-list{max-height:240px;overflow:auto}}
@media(max-width:600px){.wiki-list,.wiki-pane{padding:14px}.wiki-page :is(button,input:not([type=checkbox]),summary){min-height:44px}.wiki-document-heading{gap:10px}.wiki-actions{width:100%}.wiki-editor textarea{min-height:260px}.wiki-import{width:100%}.wiki-import input[type=file]{max-width:none}.wiki-page-heading{font-size:16px}.wiki-markdown{font-size:12px}}
/* 카드가 아닌 연속 문서 행으로 읽는다. 연결선은 구조만 보조하고 접기·선택·작업은 각각 독립 조작이다.
   여섯 번 이후 들여쓰기는 늘리지 않고 실제 단계·상위 경로로 보완해 깊은 문서도 화면 안에 둔다. */
.wiki-tree-hint{margin:10px 0 0;color:#657184;font-size:10px!important;line-height:1.6!important}
.wiki-document-list:has(>.wiki-tree){display:block;margin-top:12px;max-height:min(68dvh,640px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.wiki-tree{list-style:none;margin:0;padding:0;min-width:0}
.wiki-tree>li{position:relative;min-width:0;margin:2px 0}
.wiki-tree .wiki-tree{margin:2px 0 5px 16px;border-left:1px solid #dde1eb}
.wiki-tree .wiki-tree>li:before{content:'';position:absolute;left:0;top:23px;width:12px;border-top:1px solid #dde1eb;pointer-events:none}
.wiki-tree .wiki-tree.wiki-tree-depth-capped{margin-left:0;border-left:0}
.wiki-tree .wiki-tree.wiki-tree-depth-capped>li:before{display:none}
.wiki-tree-row{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr);gap:0;align-items:center;border-radius:8px;min-height:48px;transition:background-color .12s ease}
.wiki-tree-row[data-has-actions=true]{grid-template-columns:44px minmax(0,1fr) 44px}
.wiki-tree-row:hover{background:#f6f5fc}
.wiki-tree-row:focus-within{background:#f4f2ff;box-shadow:inset 0 0 0 1px #dad3f6}
.wiki-tree-row[data-selected=true]{background:#eeebfc;color:#5d49c3}
.wiki-tree-row[data-selected=true]:after{content:'';position:absolute;left:0;top:10px;bottom:10px;width:3px;border-radius:3px;background:var(--purple,#7162df);pointer-events:none}
.wiki-page .wiki-tree-toggle,.wiki-tree-leaf{display:grid;place-items:center;width:44px;min-width:44px;min-height:44px;padding:4px;background:transparent;border:0;color:#657184}
.wiki-page .wiki-tree-toggle:hover{background:#e9e5f8;color:#5d49c3}
.wiki-tree-leaf{font-size:18px;color:#a8afbf}
.wiki-page .wiki-tree .wiki-document-choice{width:100%;min-width:0;min-height:48px;padding:8px 2px;background:transparent;border:0;border-radius:0;white-space:normal;text-align:left;font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.wiki-tree-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.wiki-tree-row[data-selected=true] .wiki-document-choice{font-weight:650}
.wiki-page .wiki-tree .wiki-document-choice[aria-current=true]{background:transparent;border:0}
.wiki-page .wiki-tree-more{display:grid;place-items:center;width:44px;min-width:44px;min-height:44px;padding:4px;border:0;background:transparent;color:#7a7390;font-size:22px;line-height:1;letter-spacing:1px}
.wiki-page .wiki-tree-more:hover,.wiki-page .wiki-tree-more[aria-expanded=true]{background:#e6e0fa;color:#5d49c3}
.wiki-page .wiki-tree .wiki-document-choice small{font-size:10px;line-height:1.5;margin-top:3px;color:#7b718e}
.wiki-tree-row-tools{display:flex;flex-wrap:wrap;gap:6px;padding:10px;margin:4px 0 8px 12px;min-width:0;border:1px solid #e4def6;border-radius:8px;background:#faf9ff}
.wiki-tree-row-tools[hidden]{display:none}
.wiki-page .wiki-tree-row-tools button{min-height:44px;padding:8px 10px;font-size:11px;line-height:1.45;flex:1 1 92px;background:#fff;border:1px solid #e4def6}
.wiki-page .wiki-tree-row-tools .wiki-tree-actions-close{flex:0 1 auto;border-color:transparent;background:transparent;color:#7b718e}
.wiki-order-panel{padding:14px;margin-top:14px;border:1px solid #dcd5f4;border-radius:9px;background:#faf9ff;min-width:0}
.wiki-order-panel h3{font-size:13px}
.wiki-order-panel button{margin:4px 4px 0 0;max-width:100%;white-space:normal;min-height:44px}
.wiki-revision>summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:600}
@media(max-width:600px){.wiki-tree .wiki-tree{margin-left:12px}.wiki-tree-row-tools{margin-left:0}.wiki-tree-row{min-height:48px}.wiki-document-list:has(>.wiki-tree){max-height:min(50dvh,420px)}.wiki-tree .wiki-tree.wiki-tree-depth-capped{margin-left:0}}
@media(prefers-reduced-motion:reduce){.wiki-tree-row{transition:none}}
.wiki-search-path{margin:0 0 10px;overflow-wrap:anywhere}.wiki-search-path-button{min-height:44px}
.wiki-breadcrumbs{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 14px;font-size:11px;min-width:0}
.wiki-breadcrumbs>*{max-width:100%;overflow-wrap:anywhere}.wiki-breadcrumbs button{min-height:44px}
.wiki-parent-picker{margin:16px 0;padding:14px;border:1px solid var(--line,#e8ebf0);border-radius:8px;background:var(--surface-muted,#f7f8fa);max-height:min(520px,65dvh);overflow:auto;min-width:0}
.wiki-parent-picker .wiki-parent-choice{display:block;width:100%;text-align:left;min-height:44px;margin-top:6px;white-space:normal;overflow-wrap:anywhere}
.wiki-parent-picker :is(button,input){min-height:44px;max-width:100%}.wiki-parent-picker .wiki-pagination{margin-top:10px}
.wiki-hierarchy-approval-detail{min-width:0;max-height:75dvh;overflow:auto;overflow-wrap:anywhere}
/* 문서 탐색과 읽기를 구분한다. 드래그 표시는 저장 성공을 대신하지 않는다. */
.wiki-layout{grid-template-columns:minmax(260px,320px) minmax(0,1fr);gap:16px}
.wiki-list{background:#fafbfe;padding:16px}.wiki-pane{min-height:420px;padding:28px}
.wiki-search{display:grid;grid-template-columns:minmax(0,1fr) auto}.wiki-search input{width:100%;min-width:0;box-sizing:border-box}
.wiki-page .wiki-tree-row[data-draggable=true]{grid-template-columns:32px 32px minmax(0,1fr) 36px}
.wiki-page .wiki-drag-handle{cursor:grab;min-width:28px;min-height:44px;padding:2px;font-size:10px;color:#67758c;background:transparent;border:0}
.wiki-page .wiki-drag-handle:active{cursor:grabbing}.wiki-drag-source{opacity:.45}
.wiki-tree-row[data-drop=before]{box-shadow:0 -3px #7162df;background:#f0edff}.wiki-tree-row[data-drop=after]{box-shadow:0 3px #7162df;background:#f0edff}
.wiki-page .wiki-tree-toggle,.wiki-page .wiki-tree-leaf{width:32px;min-width:32px}.wiki-page .wiki-tree-more{width:36px;min-width:36px}
.wiki-document-heading{padding-bottom:18px;border-bottom:1px solid #edf0f5}.wiki-markdown{line-height:1.85;font-size:14px}
@media(max-width:900px){.wiki-layout{grid-template-columns:minmax(0,1fr)}.wiki-pane{padding:18px;min-height:260px}}
@media(max-width:600px){.wiki-page .wiki-drag-handle{min-height:44px}.wiki-page .wiki-tree-row[data-draggable=true]{grid-template-columns:32px 32px minmax(0,1fr) 36px}}

.wiki-drag-handle{touch-action:none;user-select:none}
@media(max-width:600px){.wiki-page .wiki-tree-row[data-draggable=true]{grid-template-columns:44px 44px minmax(0,1fr) 44px}.wiki-page .wiki-drag-handle,.wiki-page .wiki-tree-toggle,.wiki-page .wiki-tree-leaf,.wiki-page .wiki-tree-more{width:44px;min-width:44px}.wiki-page .wiki-drag-handle{font-size:11px}}

/* 프로젝트 제목·선택 탭이 이미 맥락을 알려준다. 중복 제목/빈 상태 줄은 줄이고 오류 안내는 보존한다. */
.wiki-page-heading{display:none}.wiki-status:empty{display:none}
/* 승인된 첨부는 읽기 본문과 같은 문서 안에서 제공한다. 긴 이름은 문서 열 폭을 늘리지 않는다. */
.wiki-attachments{margin-top:24px;padding-top:18px;border-top:1px solid var(--line,#e8ebf0);min-width:0}
.wiki-attachment-item{display:flex;align-items:center;gap:12px;padding:10px 0;min-width:0;border-bottom:1px solid var(--line,#e8ebf0)}
.wiki-attachment-item>img{width:72px;height:54px;object-fit:contain;flex:0 0 auto;border:1px solid var(--line,#e8ebf0);border-radius:5px}
.wiki-attachment-item>div{min-width:0}.wiki-attachment-item a{overflow-wrap:anywhere;min-height:44px;display:flex;align-items:center}
.wiki-attachment-item small{display:block;color:#657184;font-size:11px;overflow-wrap:anywhere}
.wiki-attachments>button{margin:10px 8px 0 0;min-height:44px}
.wiki-attachment-proposal{min-width:0;padding:14px;border:1px solid var(--line,#e8ebf0);border-radius:8px;background:var(--surface-muted,#f7f8fa)}
.wiki-attachment-proposal-files{padding-left:20px;margin:12px 0}.wiki-attachment-proposal-files li{margin:12px 0;overflow-wrap:anywhere}
.wiki-attachment-proposal-files :is(strong,span,small){display:block}.wiki-attachment-proposal-files small{font-size:11px;color:#657184}

/* 업로드는 본문 저장과 구분하고 파일별 결과를 좁은 화면에서도 줄바꿈한다. */
.wiki-upload-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:12px 0}.wiki-upload-picker{display:flex;flex-direction:column;gap:8px;min-height:44px;font-weight:600}.wiki-upload-picker input{max-width:100%;min-height:44px}.wiki-upload-controls small,.wiki-upload-results{font-size:12px;color:#657184}.wiki-upload-results{padding-left:20px;overflow-wrap:anywhere}.wiki-upload-results li{margin:6px 0}.wiki-attachment-item>button{flex:0 0 auto;min-height:44px;margin-left:auto}@media(max-width:600px){.wiki-attachment-item{flex-wrap:wrap}.wiki-attachment-item>button{margin-left:0}}
