.layout-toggle,.layout-editor{position:fixed;z-index:110;color:#e6e7e9;background:#24262a;border:1px solid #45484e;font:11px/1.45 Futura,'Futura PT',sans-serif;box-shadow:0 8px 30px #0005;border-radius:7px}
.layout-toggle{right:12px;bottom:12px;padding:8px 15px;min-height:34px;cursor:pointer}
@media(max-height:480px){body:has(#landing-shell:not(.is-collapsed)) .layout-toggle{top:12px;bottom:auto}}
.layout-editor{right:12px;top:84px;width:272px;max-width:calc(100vw - 16px);max-height:calc(100svh - 142px);display:flex;flex-direction:column;overflow:hidden}
.layout-editor[hidden],.layout-overlay[hidden],.layout-overlay [hidden]{display:none!important}
.layout-panel-handle{display:flex;align-items:center;gap:10px;min-height:42px;padding:8px 12px;border-bottom:1px solid #41444a;cursor:grab;touch-action:none;user-select:none;flex-shrink:0}
.layout-panel-handle strong{font-size:12px;font-weight:500}.layout-scope{margin-left:auto;color:#b3b8c4;font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.layout-editor.is-minimized .layout-panel-body{display:none}.layout-editor.is-minimized .layout-panel-handle{border-bottom:0}
.layout-panel-body{padding:12px;overflow-y:auto;overscroll-behavior:contain}
.layout-editor label{display:block;color:#a8aeb9;font-size:10px}
.layout-editor input,.layout-editor select,.layout-editor button{font:inherit;color:#e6e7e9}
.layout-editor input[type=number],.layout-editor select,.layout-editor output{display:block;width:100%;min-width:0;border:1px solid #474b53;border-radius:4px;background:#303339;min-height:30px;padding:5px 7px;margin-top:4px;line-height:18px}
.layout-editor input[type=number]{appearance:textfield}.layout-editor input::-webkit-inner-spin-button{opacity:.4}
.layout-editor output{color:#939baa}
.layout-editor button{border:1px solid #474b53;border-radius:4px;background:transparent;min-height:28px;padding:4px 8px;cursor:pointer;white-space:nowrap}
.layout-editor button:hover,.layout-toggle:hover{background:#3b3f47}
.layout-editor button:disabled{opacity:.3;cursor:default}
.layout-editor input:focus-visible,.layout-editor select:focus-visible,.layout-editor button:focus-visible,.layout-toggle:focus-visible{outline:2px solid #9b9fff;outline-offset:2px}
.layout-editor input[type=checkbox]{accent-color:#9b9fff;margin:0 6px 0 0}
.layout-toolbar{display:flex;gap:5px;align-items:center;margin-bottom:12px}.layout-toolbar span{flex:1}
.layout-editor #layout-minimize{font-size:16px;line-height:16px;min-width:25px;padding:2px;min-height:24px}
.layout-jump select{font-size:10px}
.layout-layers{margin:12px 0;border-top:1px solid #41444a;border-bottom:1px solid #41444a;padding:9px 0}
.layout-layers summary{cursor:pointer;color:#c3c7d0;font-size:10px}.layout-layers summary span{float:right;color:#969dab}
#layout-layer-list{max-height:146px;overflow:auto;margin-top:8px}#layout-layer-list label{display:flex;align-items:center;min-height:28px;color:#bfc5d0;cursor:pointer;padding:3px 4px;border-radius:3px}#layout-layer-list label:has(input:checked){background:#45415e;color:#e3deff}#layout-layer-list span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.layout-selection-title{display:flex;justify-content:space-between;gap:8px;margin:12px 0}.layout-selection-title strong{font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#layout-selection-count{color:#b9b1ff;white-space:nowrap}
.layout-properties{border:0;margin:0;padding:0;min-width:0}.layout-properties:disabled{opacity:.4}
.layout-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:9px}
.layout-section-label{display:flex;justify-content:space-between;margin:14px 0 8px;font-size:10px;color:#c7ccd6}.layout-section-label span{color:#8e96a5}
.layout-align{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}.layout-align button{padding:4px;font-size:10px}
.layout-distribute{display:flex;gap:5px;margin-top:6px}.layout-distribute button{font-size:9px;flex:1;padding:4px 2px}
.layout-color{display:flex!important;align-items:center;gap:12px;justify-content:space-between}.layout-color input{width:48px;height:27px;border:1px solid #474b53;background:transparent;padding:2px;border-radius:3px}
.layout-toggles{display:flex;gap:18px;margin-top:14px;padding-top:12px;border-top:1px solid #41444a}.layout-toggles label{display:flex;align-items:center;color:#c7ccd6;cursor:pointer}
.layout-help{margin:10px 0;color:#8993a2;font-size:9px;line-height:1.6}
.layout-actions{display:flex;gap:5px;margin-top:12px}.layout-actions button{font-size:10px;padding:5px 7px}.layout-actions button:first-child{flex:1}
.layout-status{margin:10px 0 0;color:#b0c5a9;font-size:9px;min-height:14px}.layout-warning{margin:7px 0 0;color:#f0c99d;font-size:10px}
.layout-editor .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.layout-overlay{position:fixed;inset:0;z-index:90;pointer-events:none;outline:0}
.layout-selection-box{position:absolute;border:1px solid #aaa0ff;pointer-events:none}
.layout-dimensions{position:absolute;left:50%;top:calc(100% + 10px);transform:translateX(-50%);padding:2px 6px;background:#8b7be5;color:white;border-radius:3px;font:10px/1.4 Futura,sans-serif;white-space:nowrap}
.layout-handle{position:absolute;pointer-events:auto;display:block;width:9px;height:9px;background:#eeeaff;border:1px solid #8979e5;touch-action:none}
.layout-handle-nw{top:-5px;left:-5px;cursor:nwse-resize}.layout-handle-ne{top:-5px;right:-5px;cursor:nesw-resize}.layout-handle-sw{bottom:-5px;left:-5px;cursor:nesw-resize}.layout-handle-se{bottom:-5px;right:-5px;cursor:nwse-resize}
.layout-handle-w{left:-5px;top:calc(50% - 5px);cursor:ew-resize}.layout-handle-e{right:-5px;top:calc(50% - 5px);cursor:ew-resize}
.layout-marquee{position:absolute;border:1px solid #aaa0ff;background:#a299ff22}
.layout-guide{position:absolute;background:#ed89dc}.layout-guide-x{top:0;bottom:0;width:1px}.layout-guide-y{left:0;right:0;height:1px}
.layout-grid-overlay{position:absolute;inset:0;background-image:linear-gradient(#c9bfff12 1px,transparent 1px),linear-gradient(90deg,#c9bfff12 1px,transparent 1px);background-size:20px 20px}
body.layout-editing [data-layout-key]{cursor:move;touch-action:none;user-select:none;-webkit-user-select:none}
body.layout-editing [data-layout-key]:hover{outline:1px dashed #aaa0ff88;outline-offset:2px}
body.layout-editing [data-layout-selected]{outline:1px solid #aaa0ff55;outline-offset:0}
body.layout-editing .text-sequence{touch-action:none}
body.has-layout-overrides .reading-area,body.layout-editing .reading-area{overflow:visible}
.text-sequence.is-paginating [data-layout-key]{translate:none!important}
@media(max-width:700px){.layout-editor{top:auto;bottom:58px;max-height:56svh;width:260px}.layout-panel-body{padding:10px}.layout-panel-handle{min-height:38px;padding:7px 10px}.layout-handle{width:12px;height:12px}}
