.ofc-page{min-width:0;height:100%;display:flex;flex-direction:column}.ofc-context,.ofc-banner{padding:12px 24px;border-bottom:1px solid var(--line);font-size:13px}.ofc-library{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.ofc-file{padding:24px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);min-width:0;position:relative}.ofc-file>svg{width:24px;height:24px;color:var(--muted);margin-bottom:16px}.ofc-file h2{font-size:16px;font-weight:600;margin:0 0 12px;overflow-wrap:anywhere}.ofc-file-link{color:inherit;text-decoration:none}.ofc-file-link:after{content:"";position:absolute;inset:0}.ofc-file:focus-within{outline:2px solid var(--ink);outline-offset:-3px}.ofc-file p,.ofc-file>span{font-size:12px;color:var(--muted);margin:6px 0;line-height:1.6}.ofc-editor-bar{display:flex;gap:16px;align-items:center;padding:16px 24px;border-bottom:1px solid var(--line)}.ofc-editor-bar>div{min-width:0}.ofc-editor-bar strong{display:block;overflow-wrap:anywhere;font-size:14px}.ofc-editor-bar span{font-size:12px;color:var(--muted)}.ofc-editor-stage{display:grid;place-items:center;min-height:360px;flex:1;background:var(--surface);padding:32px 24px;text-align:center}.ofc-editor-stage>div{max-width:480px}.ofc-editor-stage svg{width:32px;height:32px;color:var(--muted)}.ofc-editor-stage h2,.ofc-state h2{font-size:18px;font-weight:600;margin:20px 0 12px}.ofc-editor-stage p,.ofc-state p{font-size:14px;color:var(--muted);line-height:1.6}.ofc-editor-stage .ofc-muted,.ofc-hint{font-size:12px;color:var(--muted);line-height:1.6}.ofc-state{padding:24px}.ofc-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.ofc-error{font-size:13px;color:var(--danger,#b42318)}#ofc-create-form .field{margin-bottom:20px}.ofc-review{font-size:12px}.ofc-review .btn{font-size:12px;height:auto;min-height:0;padding:0;background:none;border:0}.ofc-review label{display:flex;gap:8px;align-items:center}.ofc-review select{font:inherit;max-width:140px;border:0;background:transparent;color:inherit}.ofc-context-link:has(a){padding:12px 16px;border-top:1px solid var(--line)}#in-media-viewer header:has(a[href^="#office"])>.btn{flex-shrink:0}
@media(max-width:1000px){.ofc-library{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:768px){.ofc-library{grid-template-columns:1fr}.ofc-file{padding:20px 16px;border-right:0}.ofc-editor-bar{padding:16px}.ofc-editor-bar>.btn{display:none}.ofc-editor-stage{padding:24px 16px;min-height:320px}.ofc-actions .btn{min-height:44px}.ofc-review label{gap:4px}.ofc-review select{max-width:120px}#in-media-viewer header:has(a[href^="#office"]){flex-wrap:wrap}#in-media-viewer header>a[href^="#office"]{font-size:13px;min-height:44px}.ofc-context,.ofc-state{padding:16px}}

.ofc-library-tools{display:flex;align-items:flex-end;gap:16px;padding:16px 24px;border-bottom:1px solid var(--line)}.ofc-library-tools .field{width:min(480px,100%);margin:0}.ofc-library-tools .field input{height:40px}.ofc-editor-bar{min-height:40px;padding:10px 24px}.ofc-library-tools>.btn{height:40px;flex-shrink:0}@media(max-width:768px){.ofc-library-tools{padding:16px;flex-wrap:wrap}.ofc-library-tools .field{width:100%}.ofc-library-tools .field input,.ofc-library-tools>.btn{height:44px}.ofc-editor-bar{padding:12px 16px}}

/* Focused file creation: independent of the shared side panel. */
#ofc-create-dialog{inset:0;width:560px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);height:fit-content;margin:auto;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--base);color:var(--ink);box-shadow:0 20px 70px #0003;overflow:hidden}
#ofc-create-dialog[open]{display:flex;flex-direction:column}#ofc-create-dialog::backdrop{background:#0006}
.ofc-create-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 24px 16px;flex:none}.ofc-create-head h2{margin:0;font-size:24px;font-weight:600}.ofc-create-head .icon-btn{width:44px;height:44px;flex:none}
#ofc-create-form{overflow:auto;padding:0 24px 24px;min-height:0}#ofc-create-form .field{margin:24px 0 0}#ofc-create-form input[type=text]{height:44px;font-size:15px}#ofc-extension{margin-top:8px}.ofc-type-picker{border:0;padding:0;margin:0;min-width:0}.ofc-type-picker legend{font-size:13px;margin-bottom:8px;padding:0}.ofc-type-picker>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ofc-type{position:relative;display:flex;align-items:center;gap:12px;padding:16px 12px;border:1px solid var(--line);border-radius:10px;min-width:0;cursor:pointer;font-size:14px}.ofc-type input{position:absolute;width:1px;height:1px;opacity:0}.ofc-type small{display:block;color:var(--muted);font-size:12px;margin-top:4px}.ofc-type svg{width:20px;height:20px}.ofc-type-check{margin-left:auto;opacity:0}.ofc-type-check svg{width:16px;height:16px}.ofc-type:has(input:checked){border-color:var(--ink);background:var(--surface);box-shadow:inset 0 0 0 1px var(--ink)}.ofc-type:has(input:checked) .ofc-type-check{opacity:1}.ofc-type:has(input:focus-visible){outline:2px solid var(--ink);outline-offset:3px}.ofc-type:has(input:disabled){opacity:.55;cursor:default}.ofc-draft-note{font-size:12px;line-height:1.5;color:var(--muted);margin:8px 0}.ofc-test-controls{border-top:1px solid var(--line);padding-top:12px;margin-top:16px;font-size:12px;color:var(--muted)}.ofc-test-controls summary{cursor:pointer}.ofc-test-controls .final-check{font-size:12px;margin-top:12px}.ofc-test-controls p{font-size:12px;line-height:1.5;margin:8px 0 0}.ofc-create-foot{padding:16px 24px;display:flex;justify-content:flex-end;gap:12px;border-top:1px solid var(--line);flex:none}.ofc-create-foot .btn{min-height:44px}
@media(max-width:600px){#ofc-create-dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:12px}.ofc-create-head{padding:16px 16px 12px}.ofc-create-head h2{font-size:20px}#ofc-create-form{padding:0 16px 16px}#ofc-create-form input[type=text]{font-size:16px}.ofc-type-picker>div{gap:8px}.ofc-type{padding:12px 10px;gap:8px;font-size:13px}.ofc-type-icon{display:none}.ofc-create-foot{padding:12px 16px;gap:8px}.ofc-create-foot>.btn{flex:1;padding-inline:10px}}
/* The server-authorized Collabora session uses the existing full-bleed editor surface. */
.ofc-live-editor{display:block;width:100%;min-height:360px;flex:1;border:0;background:var(--surface)}
@media(max-width:768px){.ofc-live-editor{min-height:320px}}
