dialog.sop-wide{width:min(1200px,96vw);max-width:1200px}.sop-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;margin-top:18px}.sop-editor-grid>section{min-width:0}.sop-toolbar{flex-wrap:wrap;margin-bottom:14px}.sop-toolbar button{font-size:12px;padding:6px 9px}#sop-body{width:100%;min-height:400px;resize:vertical;line-height:1.65;font-family:Consolas,monospace}#sop-preview{max-height:65vh;overflow:auto;padding:0 12px}.sop-content{line-height:1.75;overflow-wrap:anywhere;margin:24px 0;max-width:80ch}.sop-content h2,.sop-content h3,.sop-content h4,.sop-content h5{line-height:1.3;margin:1.5em 0 .6em}.sop-content ul,.sop-content ol{padding-left:25px}.sop-content blockquote{border-left:3px solid var(--gold);margin:16px 0;padding:4px 16px;color:var(--muted)}.sop-content pre{overflow:auto;white-space:pre-wrap;background:var(--surface);border:1px solid var(--line);padding:14px;border-radius:6px}.sop-content hr{border:0;border-top:1px solid var(--line);margin:24px 0}@media(max-width:760px){.sop-editor-grid{grid-template-columns:1fr}#sop-preview{max-height:35vh}#sop-body{min-height:300px}}

.unit-table-scroll{overflow:auto;max-height:60vh;margin:12px 0}.unit-table{width:100%;border-collapse:collapse}.unit-table th,.unit-table td{border:1px solid var(--line);padding:7px;text-align:left;vertical-align:top;min-width:9rem;white-space:pre-wrap;overflow-wrap:anywhere}.unit-table th{background:var(--surface)}.unit-table input{width:100%;min-width:8rem}

.unit-table .sheet-coordinate{min-width:2.5rem;width:2.5rem;text-align:center;color:var(--muted)}

.sop-editor-controls{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px;padding-bottom:12px;border-bottom:1px solid var(--line)}.sop-editor-controls button,.sop-toolbar button{min-height:44px}.sop-editor-controls button[aria-pressed="true"]{background:var(--md-primary);color:var(--md-on-primary)}.sop-editor-grid[data-mode="write"],.sop-editor-grid[data-mode="preview"]{grid-template-columns:minmax(0,1fr)}.sop-editor-grid[data-mode="write"] #sop-read,.sop-editor-grid[data-mode="preview"] #sop-write{display:none}.sop-editor-grid[data-mode="preview"] #sop-preview{max-height:none;max-width:80ch;margin-inline:auto}.sop-content a{color:var(--md-primary);text-underline-offset:3px}.sop-content code{white-space:pre-wrap}.sop-content .unit-table-scroll{max-width:100%}
@media(max-width:760px){.sop-editor-controls [data-sop-mode="split"]{display:none}.sop-toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.sop-toolbar button{width:100%;white-space:normal;line-height:1.25}.sop-editor-grid #sop-preview{max-height:none;padding:0}.sop-editor-controls .actions{gap:8px}.sop-editor-controls button{padding-inline:14px}}

.sop-editor-controls [data-sop-mode]{transition:none}

@media(min-width:701px){#dialog.sop-wide footer{position:sticky;bottom:-28px;z-index:2;background:var(--md-surface-high);margin-inline:-28px;margin-bottom:-28px;padding:16px 28px}}

.document-preview-text{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.75;max-width:80ch;margin:24px 0}.document-preview-image{display:block;width:auto;height:auto;max-width:100%;max-height:65vh;object-fit:contain;margin:20px auto}

.document-preview-note{border-left:3px solid var(--md-primary);background:var(--md-surface-low);padding:12px 16px;line-height:1.6}

#dialog.document-reader-dialog{width:min(1200px,96vw);max-width:1200px}.pdf-reader-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.pdf-reader-controls label{display:flex;align-items:center;gap:8px;margin:0}.pdf-reader-controls input{width:65px}.pdf-reader-controls select{width:auto}.pdf-reader-controls button{min-height:44px}.pdf-page-scroll{overflow:auto;max-width:100%;max-height:65vh;background:var(--md-surface-low);border:1px solid var(--md-outline-variant);padding:1px}.pdf-page{display:block;margin:0 auto;background:white}.pdf-page-text{margin-top:16px}.pdf-page-text summary{min-height:44px;padding:12px 0;cursor:pointer}.pdf-page-text pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.6;max-width:80ch}.pdf-reader-controls .actions{gap:8px}
@media(min-width:701px){#dialog.document-reader-dialog footer{position:sticky;bottom:-28px;z-index:2;background:var(--md-surface-high);margin-inline:-28px;margin-bottom:-28px;padding:16px 28px}}
@media(max-width:700px){.pdf-reader-controls{display:block}.pdf-reader-controls .actions{display:grid;grid-template-columns:1fr 1fr}.pdf-reader-controls .actions button{grid-row:1}.pdf-reader-controls .actions label,.pdf-reader-controls [data-pdf-total]{grid-row:2}.pdf-reader-controls .actions label{justify-content:flex-start}.pdf-reader-controls .actions [data-pdf-total]{align-self:center}}
