.view-switcher{padding:16px 22px;border-bottom:1px solid var(--line);background:var(--panel)}.view-tabs{display:flex;gap:6px;flex-wrap:wrap}.view-tabs button{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:7px;padding:8px 12px;font-size:12px;color:var(--muted)}.view-tabs button.selected{background:#173c61;color:#b4ecff;border-color:#3986b2}.view-tabs svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7}.diagram-controls{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:12px}.diagram-controls label{display:flex;gap:9px;align-items:center;color:var(--muted);font-size:11px;margin-right:auto}.diagram-controls select{background:var(--panel2);color:var(--ink);border:1px solid var(--line2);border-radius:6px;padding:7px;font-size:12px;max-width:310px}.diagram-controls button{border:1px solid var(--line);background:var(--panel2);color:var(--muted);border-radius:5px;padding:6px 9px;font-size:11px}.view-note{font-size:10px;line-height:1.8;margin-top:10px;color:var(--dim)}
/* Normal reading and SOP tables belong to the page's vertical scroll. */
.structure-viewport{position:relative;overflow:visible;overscroll-behavior:auto;touch-action:auto;min-width:0}.structure-body{max-width:none!important}.structure-body.mode-read{max-width:880px!important}.structure-node{position:relative;min-width:0}.structure-node[hidden],.sop-row[hidden]{display:none!important}.structure-card{position:relative;min-width:0;overflow-wrap:anywhere}.structure-card p,.structure-card h1,.structure-card h2,.structure-card h3{font-size:14px;line-height:1.65;margin:0;padding:0;border:0;background:none;color:inherit;font-weight:400}.structure-card .list-paragraph,.sop-original .list-paragraph{padding:0!important;margin:0!important;border:0!important}.structure-card .list-paragraph::before,.sop-original .list-paragraph::before{display:none!important}.structure-card .empty-paragraph,.sop-original .empty-paragraph{display:none}.structure-card .original-image{margin:2px 0;width:100%;border-radius:3px}.structure-card .table-scroll{margin:0}.branch-toggle{position:absolute;z-index:2;right:-24px;top:50%;transform:translateY(-50%);width:21px;height:21px;border:1.4px solid var(--branch,#4a8ddd);background:#fff;color:var(--branch,#4a8ddd);display:grid;place-items:center;border-radius:50%;font:11px/1 Arial,sans-serif;padding:0}.branch-toggle::before{content:'−'}.branch-closed>.structure-card>.branch-toggle::before{content:attr(data-child-count)}.branch-closed>.structure-children{display:none}.context-node>.structure-card{display:none}.context-node>.structure-children{margin:0!important;padding:0!important;border:0!important}.context-node::before,.context-node::after{display:none!important}
/* Compact, native HTML mind map; SVG only draws the rounded connectors. */
.structure-viewport.view-map{height:74vh;min-height:400px;max-height:950px;overflow:auto;overscroll-behavior:auto;touch-action:auto;background:#fff;scrollbar-color:#c9ced5 #f6f7f9;border-top:1px solid #eef1f4}.map-scene{position:relative;width:max-content;min-width:100%;isolation:isolate}.map-connections{position:absolute;left:0;top:0;z-index:0;overflow:visible;pointer-events:none!important;fill:none;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}.map-connections *{pointer-events:none!important}.mode-map{position:relative;z-index:1;width:max-content;min-width:100%;padding:36px 50px 60px!important;margin:0!important;background:transparent;color:#553731;white-space:normal!important;font-size:14px!important}.mode-map>.structure-children{gap:36px}.mode-map .structure-children{display:flex;flex-direction:column;align-items:flex-start;gap:13px}.mode-map .structure-node{display:flex;align-items:center;gap:56px;width:max-content;max-width:none}.mode-map .structure-card{flex:0 0 auto;width:max-content;min-width:56px;max-width:420px;padding:7px 10px;background:#ffe0de;background:color-mix(in srgb,var(--branch) 18%,white);border:0;border-radius:8px;box-shadow:none;color:#673b37;user-select:text}.mode-map .structure-node>.structure-children{margin:0;padding:0;border:0}.mode-map .structure-card::before,.mode-map .structure-card::after,.mode-map .structure-node::before,.mode-map .structure-node::after{display:none!important}.mode-map .role-heading>.structure-card:has(h2){min-width:145px;max-width:290px}.mode-map .role-heading>.structure-card:has(h3){min-width:90px;max-width:360px}.mode-map .structure-card h1{font-size:21px;font-weight:600;line-height:1.5}.mode-map .structure-card h2,.mode-map .structure-card h3{font-size:15px;line-height:1.5;font-weight:500}.mode-map .structure-node[data-depth='0']>.structure-card{background:var(--branch);color:white;padding:10px 17px;max-width:340px}.mode-map .role-image>.structure-card{width:310px;max-width:310px;background:#fff;padding:5px;border:1px solid #e3e6ec}.mode-map .role-image>.structure-card p{font-size:0}.mode-map .role-image .original-image{display:block;width:100%;height:auto;max-width:100%;border:0;box-shadow:none}.mode-map .structure-card:has(.table-scroll){width:440px;max-width:440px;background:white;border:1px solid #e1e6eb;padding:8px}.mode-map .structure-card strong{color:inherit}.mode-map .context-node{gap:0}.mode-map mark{background:#ffcc62!important;color:#523921!important}.mode-map .branch-toggle{background:white}.mode-map .role-note>.structure-card{font-size:14px}.reader-layout:has(.mode-map),.reader-layout:has(.mode-table){grid-template-columns:minmax(0,1fr);max-width:none}.reader-layout:has(.mode-map) .toc-rail,.reader-layout:has(.mode-table) .toc-rail{display:none}
/* The original text is in one content column; other columns are system metadata. */
.mode-table{padding:0!important;background:#fff;color:#32445b!important;white-space:normal!important}.sop-table-scroll{width:100%;overflow-x:auto;overflow-y:visible;overscroll-behavior:auto;touch-action:auto}.sop-table{border-collapse:collapse!important;table-layout:fixed;width:100%!important;min-width:680px!important;margin:0!important;font-size:14px!important}.sop-table>thead>tr>th{background:#edf2f8;color:#5b6b80;border:0;border-bottom:1px solid #d4deea;padding:13px 15px;text-align:left;font-size:12px;font-weight:500}.sop-table>thead>tr>th:nth-child(1){width:94px}.sop-table>thead>tr>th:nth-child(2){width:188px}.sop-table>thead>tr>th:nth-child(4){width:74px}.system-label::before{content:attr(data-label);white-space:pre-wrap;overflow-wrap:anywhere}.sop-table>tbody>.sop-row>td{background:#fff!important;color:#344660!important;border:0!important;border-bottom:1px solid #e2e8f0!important;padding:13px 15px!important;vertical-align:top}.sop-table>tbody>.sop-row:nth-child(even)>td{background:#fafcfe!important}.sop-table>tbody>.role-heading>td,.sop-table>tbody>.focus-root>td{background:#edf5ff!important;color:#285c92!important;border-bottom-color:#d5e4f3!important}.sop-table>tbody>.parent-highlight>td{background:#fff0c2!important}.sop-table .sop-number{font:12px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace!important;color:#4283b9!important;overflow-wrap:anywhere}.sop-table .parent-jump{font-size:12px;line-height:1.8;color:#6c8098;text-align:left;padding:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.sop-table .parent-jump:hover{color:#267ac1;text-decoration:underline}.sop-table .sop-type{font-size:11px;color:#8090a4!important}.sop-table .role-note>.sop-type{color:#b08342!important}.sop-original p,.sop-original h1,.sop-original h2,.sop-original h3{margin:0!important;padding:0!important;border:0!important;background:none!important;color:inherit!important;font-size:14px!important;line-height:1.85!important;font-weight:400}.sop-original strong{color:inherit!important}.sop-original .original-image{display:block;width:auto;max-width:100%;max-height:430px;margin:3px 0}.sop-original .table-scroll{margin:0}.sop-original .table-scroll table{min-width:450px}.sop-original mark{background:#fff0a4!important;color:#3c4d66!important}.sop-row.context-node>.sop-original{font-size:12px}.sop-original table{white-space:normal}
.mode-steps,.mode-flow{padding:25px!important;white-space:normal!important;max-width:1150px!important;margin:auto}.mode-steps .structure-children,.mode-flow .structure-children{display:flex;flex-direction:column;gap:12px}.mode-steps .structure-node>.structure-children,.mode-flow .structure-node>.structure-children{margin:12px 0 0 16px;padding-left:14px;border-left:1px solid #2b4964}.mode-steps .structure-card,.mode-flow .structure-card{background:#132236;border:1px solid #2b435e;border-radius:9px;padding:15px 17px 15px 77px;min-height:56px;color:#c8daed}.mode-steps .structure-card::before,.mode-flow .structure-card::before{content:attr(data-number);position:absolute;top:17px;left:13px;font:600 12px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;color:#5ed4f3;max-width:57px;overflow-wrap:anywhere;letter-spacing:-.4px}.mode-steps .role-heading>.structure-card,.mode-flow .role-heading>.structure-card{background:#173651;border-color:#367da5;color:#d1f0ff}.mode-steps .role-heading>.structure-card h3,.mode-flow .role-heading>.structure-card h3{font-size:17px;font-weight:600}.mode-steps .focus-root>.structure-card,.mode-flow .focus-root>.structure-card{padding-left:18px;background:linear-gradient(110deg,#183c60,#14293f);margin-bottom:6px}.mode-steps .focus-root>.structure-card h3,.mode-flow .focus-root>.structure-card h3{font-size:24px;font-weight:500}.mode-steps .role-note>.structure-card,.mode-flow .role-note>.structure-card{background:#131e2e;border-color:#263b52;padding-left:52px;color:#96acc6}.mode-steps .role-note>.structure-card::before,.mode-flow .role-note>.structure-card::before{content:'注';color:#889caf;font-size:11px}.mode-steps .role-note>.structure-card p,.mode-flow .role-note>.structure-card p{font-size:12px}.mode-steps .role-option>.structure-card,.mode-flow .role-option>.structure-card{border-color:#666095;background:#202740}.mode-steps .role-option>.structure-card::after,.mode-flow .role-option>.structure-card::after{content:'◇';position:absolute;right:17px;top:8px;color:#b1a7ea;font-size:18px}.mode-flow .structure-children{gap:26px}.mode-flow .structure-children>.structure-node+.structure-node::before{content:'↓';position:absolute;top:-26px;left:26px;color:#538caf;font-size:17px;line-height:26px}.mode-flow .role-note::before{content:''!important}.mode-flow .parallel-children{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));align-items:start;gap:16px!important;border-left:0!important;padding-left:0!important}.mode-flow .parallel-children>.structure-node::before{content:''!important}.mode-flow .parallel-children>.structure-node>.structure-card{border-top:2px solid #8c7bce}.mode-flow .parallel-children .structure-card{padding-left:55px}.mode-flow .parallel-children .structure-card::before{max-width:40px}.mode-flow .parallel-children .structure-children{margin-left:0;padding-left:10px}.structure-card[data-number='']::before{display:none}.role-note>.structure-card[data-number='']::before{display:block}.structure-body:not(.mode-read) .integrity-state{display:none}.mode-steps .branch-toggle,.mode-flow .branch-toggle{right:-12px;background:#172f47;color:#8bcced;border-color:#456b8b}.mode-steps .structure-card p,.mode-flow .structure-card p{white-space:pre-wrap}.mode-steps .structure-card,.mode-flow .structure-card{color:#c8daed}.structure-card[data-number='']::before{display:none}.role-note>.structure-card[data-number='']::before{display:block}[data-theme=light] .view-tabs button.selected{background:#dfeeff;color:#286caf}[data-theme=light] .mode-steps .structure-card,[data-theme=light] .mode-flow .structure-card{background:#f1f7ff;color:#36546e;border-color:#c7dced}.app-header .global-search{min-width:0}
@media(max-width:760px){.view-switcher{padding:13px}.view-tabs{gap:5px}.view-tabs button{padding:7px 8px;font-size:10px}.view-tabs svg{width:14px;height:14px}.diagram-controls label{width:100%}.diagram-controls select{max-width:calc(100vw - 155px);flex:1}.structure-viewport.view-map{height:72vh;min-height:350px}.mode-map{padding:25px 35px!important}.mode-map .structure-card{max-width:330px}.mode-map .structure-node{gap:45px}.mode-steps,.mode-flow{padding:15px!important}.mode-steps .structure-node>.structure-children,.mode-flow .structure-node>.structure-children{margin-left:5px;padding-left:8px}.mode-flow .parallel-children{grid-template-columns:1fr}}@media(max-width:520px){.app-header .brand>span:last-child{display:none}.app-header .brand{width:30px;min-width:30px}.app-header .global-search{max-width:none;min-width:0}}
@media print{.view-switcher,.branch-toggle,.map-connections{display:none!important}.structure-viewport,.sop-table-scroll{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;background:none!important}.map-scene{zoom:1!important;width:auto!important}.structure-body{zoom:1!important;width:auto!important;padding:0!important;background:white!important}.structure-node,.structure-node[hidden],.structure-children,.context-node,.context-node>.structure-card,.branch-closed>.structure-children{display:block!important}.structure-node,.structure-card,.structure-children{width:auto!important;max-width:none!important;min-width:0!important;border:0!important;box-shadow:none!important;background:none!important;margin:0!important;padding:0!important;color:#111!important}.structure-node::before,.structure-node::after,.structure-card::before,.structure-card::after{display:none!important}.structure-card p,.structure-card h1,.structure-card h2,.structure-card h3{font-size:12pt!important;margin:8pt 0!important;break-inside:avoid}.structure-card h1{font-size:20pt!important}.structure-card h2{font-size:16pt!important}.structure-card h3{font-size:14pt!important}.structure-card .original-image,.sop-original .original-image{max-height:none!important;width:auto!important;max-width:100%!important}.sop-table>thead,.sop-number,.sop-parent,.sop-type{display:none!important}.sop-table,.sop-table>tbody,.sop-table>tbody>.sop-row,.sop-table>tbody>.sop-row[hidden],.sop-table>tbody>.sop-row>.sop-original{display:block!important;min-width:0!important;width:auto!important;background:white!important;border:0!important;padding:0!important}.sop-original p,.sop-original h1,.sop-original h2,.sop-original h3{font-size:12pt!important;margin:8pt 0!important}.sop-original .table-scroll table{min-width:0!important}}
