.layout-edit-panel{margin-top:12px;padding:12px;border:1px solid #cdd5c7;border-radius:10px;background:#f5f7f1}
.layout-launch{flex-shrink:0;border-color:#a9b99e;color:#40583a;font-weight:650}
.layout-launch[aria-pressed="true"]{background:#e3ecdf;border-color:#729269}
.layout-edit-panel[hidden],.layout-edit-panel [hidden]{display:none!important}
.layout-edit-panel .full{margin-top:8px}
#layout-edit-panel .divider,#layout-save-preset,#layout-reset,#layout-done{display:none!important}
.layout-ratio{display:flex;align-items:center;gap:8px;margin:8px 0}
.layout-ratio input{width:auto}
.layout-editing [data-layout-handle]{touch-action:none}
.layout-editing .layout-outline{fill:none;stroke:#58794d;stroke-width:2;stroke-dasharray:7 5;vector-effect:non-scaling-stroke;pointer-events:none}
.layout-editing .layout-resize{fill:#fff;stroke:#405d39;stroke-width:1.2;pointer-events:none}
.layout-editing .layout-hit{fill:transparent;pointer-events:all;cursor:nwse-resize;touch-action:none}
.layout-editing .layout-hit[data-layout-handle="ne"],.layout-editing .layout-hit[data-layout-handle="sw"]{cursor:nesw-resize}
.layout-editing .layout-hit[data-layout-handle="e"],.layout-editing .layout-hit[data-layout-handle="w"]{cursor:ew-resize}
.layout-editing .layout-hit[data-layout-handle="n"],.layout-editing .layout-hit[data-layout-handle="s"]{cursor:ns-resize}
.layout-editing .layout-rotate-stem{stroke:#405d39;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}
.layout-editing .layout-move,.layout-editing .layout-rotate{cursor:grab}
.layout-editing .layout-move:active,.layout-editing .layout-rotate:active{cursor:grabbing}
.layout-editing .layout-move rect{fill:#e4efdf;fill-opacity:.92;stroke:#58794d;stroke-width:1.2}
.layout-editing .layout-move path{fill:none;stroke:#365b31;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.layout-editing .layout-rotate circle{fill:#e4efdf;fill-opacity:.92;stroke:#58794d;stroke-width:1.2}
.layout-editing .layout-rotate path{fill:none;stroke:#365b31;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.layout-editing .layout-selected{filter:drop-shadow(0 0 3px #85b67b)}
.layout-guides{pointer-events:none}
.layout-guide-line{stroke:#dd3f9d;stroke-width:1.5;stroke-dasharray:6 4;vector-effect:non-scaling-stroke;pointer-events:none}
.layout-page-center{stroke:#7795aa;stroke-width:1;stroke-dasharray:5 5;vector-effect:non-scaling-stroke;pointer-events:none}
.layout-rotation-guide{stroke:#93a4ae;stroke-width:1.2;stroke-dasharray:6 5;vector-effect:non-scaling-stroke;pointer-events:none}
.layout-rotation-guide.is-aligned{stroke:#4c9a4c;stroke-width:2;stroke-dasharray:none}
.layout-measure-line,.layout-measure-tick{stroke:#dd3f9d;stroke-width:1.2;vector-effect:non-scaling-stroke;pointer-events:none}
.layout-measure-label{fill:#b22878;stroke:#fff;stroke-width:.6;vector-effect:non-scaling-stroke;pointer-events:none}
.layout-measure-text{fill:#fff;font-family:LBSans,Arial,sans-serif;font-weight:700;pointer-events:none}
#layout-name-dialog{max-width:min(420px,calc(100vw - 24px));border:0;border-radius:12px;padding:22px;box-shadow:0 20px 70px #0005}
#layout-name-dialog label{display:block;margin:16px 0}
#layout-name-dialog input{display:block;width:100%;margin-top:6px;padding:10px}
.layout-editor-active #color-palettes,.layout-editor-active .document-style-panel,.layout-editor-active .auto-draft,.layout-editor-active #photo-panel,.layout-editor-active .frame-settings,.layout-editor-active #swatches,.layout-editor-active #apply-style{display:none!important}
@media(max-width:760px){.layout-editor-active .inspector{position:fixed;z-index:40;left:0;right:0;bottom:0;max-height:47vh;overflow:auto;background:#fff;box-shadow:0 -8px 35px #0003;border-radius:16px 16px 0 0}.layout-editor-active .stage{padding-bottom:47vh}}

/* Editor themes affect controls and the desk, never the slide or exported PDF. */
.presentation-editor{--stage:#d2d5d3}
.presentation-editor .document-page{background:#e9ecea;border-color:#c9cfca}
.presentation-editor .document-page.active{background:#f1f3f1;border-color:#667b6d;box-shadow:0 10px 28px #1c252526}
.presentation-editor .page-surface>svg{box-shadow:0 7px 24px #17211b38}
.presentation-editor .page-actions{gap:6px;justify-content:flex-end}
.presentation-editor .page-actions button,.presentation-editor .page-actions button.page-layout-library{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:6px 9px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink);font-size:12px;font-weight:600;line-height:1.2;text-decoration:none}
.presentation-editor .page-actions button:hover{background:#e4ebe4}
.presentation-editor .page-label{font-size:12px;min-height:32px;min-width:90px;font-weight:600}
.presentation-editor .insert-page{font-size:12px;min-height:32px;padding:7px 12px}
.presentation-editor .editor-toolbar .secondary,.presentation-editor .editor-toolbar .primary,.presentation-editor .inspector button{font-size:12px;min-height:32px}
.presentation-editor .editor-footer{font-size:12px}
.presentation-editor .editor-theme-switch{display:flex;flex-direction:row;align-items:center;gap:7px;margin:0;color:var(--ink);font-size:12px;font-weight:600;white-space:nowrap}
.presentation-editor .editor-theme-switch select{width:105px;min-height:30px;padding:4px 7px;font-size:12px}
.presentation-editor .library-toolbar,.presentation-editor .text-button{font-size:12px}
@media(max-width:1100px){.presentation-editor .page-actions button:not(:first-child){display:inline-flex}.presentation-editor .document-page-head{flex-wrap:wrap}}
@media(max-width:600px){.presentation-editor .editor-footer{height:auto;min-height:42px;flex-wrap:wrap;padding:6px 10px}.presentation-editor .editor-theme-switch select{width:90px}.presentation-editor .zoom-controls{margin-left:auto}}

.presentation-editor[data-editor-theme="dark"]{--paper:#1b2023;--ink:#eef3f0;--muted:#b6c1bc;--line:#3e484b;--accent:#a5dec7;--stage:#252b2e;background:#1b2023;color:#eef3f0}
.presentation-editor[data-editor-theme="dark"] .app-header{background:#171c1f!important}
.presentation-editor[data-editor-theme="dark"] .app-header .wordmark,.presentation-editor[data-editor-theme="dark"] .app-header>.section-nav a{color:#e8eeeb}
.presentation-editor[data-editor-theme="dark"] .app-header>.section-nav a[aria-current="page"]{background:#33453f;color:#d9f1e5}
.presentation-editor[data-editor-theme="dark"] .app-header .brand-mark{background:#dcebe2;color:#18221c}
.presentation-editor[data-editor-theme="dark"] .app-header .header-actions>button,.presentation-editor[data-editor-theme="dark"] .app-header .header-actions>button.secondary{background:#293136!important;color:#eef3f0!important;border-color:#495456!important}
.presentation-editor[data-editor-theme="dark"] .app-header .header-actions>button.primary{background:#b5e1d0!important;color:#14251c!important;border-color:#b5e1d0!important}
.presentation-editor[data-editor-theme="dark"] .app-menu[open]>div,.presentation-editor[data-editor-theme="dark"] .library,.presentation-editor[data-editor-theme="dark"] .inspector,.presentation-editor[data-editor-theme="dark"] dialog{background:#1b2023;color:#eef3f0}
.presentation-editor[data-editor-theme="dark"] .app-menu summary,.presentation-editor[data-editor-theme="dark"] .section-nav a,.presentation-editor[data-editor-theme="dark"] .page-label{color:#e8eeeb}
.presentation-editor[data-editor-theme="dark"] .editor,.presentation-editor[data-editor-theme="dark"] .stage{background:#252b2e}
.presentation-editor[data-editor-theme="dark"] .editor-toolbar,.presentation-editor[data-editor-theme="dark"] .editor-footer{background:#202629;color:#eef3f0}
.presentation-editor[data-editor-theme="dark"] .document-page{background:#30383a;border-color:#4b5758}
.presentation-editor[data-editor-theme="dark"] .document-page.active{background:#364144;border-color:#a4d9c5;box-shadow:0 10px 28px #0008}
.presentation-editor[data-editor-theme="dark"] .secondary,.presentation-editor[data-editor-theme="dark"] .icon-button,.presentation-editor[data-editor-theme="dark"] .page-actions button,.presentation-editor[data-editor-theme="dark"] .page-actions button.page-layout-library{background:#30393c;color:#eef3f0;border-color:#526063}
.presentation-editor[data-editor-theme="dark"] .secondary:hover,.presentation-editor[data-editor-theme="dark"] .icon-button:hover,.presentation-editor[data-editor-theme="dark"] .page-actions button:hover{background:#40504d}
.presentation-editor[data-editor-theme="dark"] .primary{background:#b5e1d0;color:#14251c}
.presentation-editor[data-editor-theme="dark"] .text-button,.presentation-editor[data-editor-theme="dark"] .lock-button{color:#b5e1d0}
.presentation-editor[data-editor-theme="dark"] .view-switch{border-color:#526063}
.presentation-editor[data-editor-theme="dark"] .view-switch button.active,.presentation-editor[data-editor-theme="dark"] .inspector-tabs button.active{background:#415b50;color:#f0f8f3}
.presentation-editor[data-editor-theme="dark"] .inspector-tabs button:not(.active),.presentation-editor[data-editor-theme="dark"] .muted,.presentation-editor[data-editor-theme="dark"] .crop-note,.presentation-editor[data-editor-theme="dark"] label,.presentation-editor[data-editor-theme="dark"] small,.presentation-editor[data-editor-theme="dark"] .library-toolbar{color:#bec9c5}
.presentation-editor[data-editor-theme="dark"] .template-button,.presentation-editor[data-editor-theme="dark"] .layout-edit-panel,.presentation-editor[data-editor-theme="dark"] .drop-zone,.presentation-editor[data-editor-theme="dark"] .builder-batch-tools,.presentation-editor[data-editor-theme="dark"] .filter-row{background:#293135;color:#edf3ef;border-color:#4d5a5a}
.presentation-editor[data-editor-theme="dark"] .template-button strong,.presentation-editor[data-editor-theme="dark"] .template-button #template-name{color:#edf3ef}
.presentation-editor[data-editor-theme="dark"] input:not([type="color"]):not([type="checkbox"]):not([type="range"]),.presentation-editor[data-editor-theme="dark"] select,.presentation-editor[data-editor-theme="dark"] textarea{background:#30393d;color:#f2f6f3;border-color:#596568}
.presentation-editor[data-editor-theme="dark"] .document-style-panel,.presentation-editor[data-editor-theme="dark"] .auto-draft,.presentation-editor[data-editor-theme="dark"] .inspector-tabs,.presentation-editor[data-editor-theme="dark"] .editor-footer{border-color:#3e484b}
.presentation-editor[data-editor-theme="dark"] .count,.presentation-editor[data-editor-theme="dark"] .library-filters button,.presentation-editor[data-editor-theme="dark"] .photo-item button.photo-pick{background:#30393d;color:#e8f0eb}
.presentation-editor[data-editor-theme="dark"] .template-preview,.presentation-editor[data-editor-theme="dark"] .style-choice .style-cover,.presentation-editor[data-editor-theme="dark"] .design-preview{background:#30393d}
.presentation-editor[data-editor-theme="dark"] .editor-theme-switch{color:#eef3f0}
@media(max-width:760px){.presentation-editor[data-editor-theme="dark"].layout-editor-active .inspector{background:#1b2023}}

/* All presentation panels use the same dark control palette, including dialogs. */
.presentation-editor[data-editor-theme="dark"] button:disabled{opacity:.62}
.presentation-editor[data-editor-theme="dark"] .app-menu[open]>div button,
.presentation-editor[data-editor-theme="dark"] .filter-row button,
.presentation-editor[data-editor-theme="dark"] .palette-tabs button,
.presentation-editor[data-editor-theme="dark"] .reference-modes button,
.presentation-editor[data-editor-theme="dark"] .reference-block-list button,
.presentation-editor[data-editor-theme="dark"] #builder-blocks button,
.presentation-editor[data-editor-theme="dark"] .builder-variant-actions button{
  background:#30393d;color:#eef3f0;border:1px solid #596568;
}
.presentation-editor[data-editor-theme="dark"] .filter-row button:hover,
.presentation-editor[data-editor-theme="dark"] .palette-tabs button:hover,
.presentation-editor[data-editor-theme="dark"] .app-menu[open]>div button:hover,
.presentation-editor[data-editor-theme="dark"] .reference-modes button:hover,
.presentation-editor[data-editor-theme="dark"] .reference-block-list button:hover,
.presentation-editor[data-editor-theme="dark"] #builder-blocks button:hover{background:#40504d}
.presentation-editor[data-editor-theme="dark"] .filter-row button.active,
.presentation-editor[data-editor-theme="dark"] .palette-tabs button[aria-pressed="true"],
.presentation-editor[data-editor-theme="dark"] .reference-modes button.active,
.presentation-editor[data-editor-theme="dark"] .reference-block-list button.active,
.presentation-editor[data-editor-theme="dark"] #builder-blocks button.active{
  background:#415b50;color:#f0f8f3;border-color:#8bbca5;
}
.presentation-editor[data-editor-theme="dark"] #template-dialog>.dialog-head{background:#1b2023;border-color:#3e484b}
.presentation-editor[data-editor-theme="dark"] #template-dialog .library-close{background:#30393d;color:#eef3f0;border-color:#596568}
.presentation-editor[data-editor-theme="dark"] #template-dialog .library-close:hover{background:#40504d}
.presentation-editor[data-editor-theme="dark"] .template-choice,
.presentation-editor[data-editor-theme="dark"] .style-choice{color:#eef3f0}
.presentation-editor[data-editor-theme="dark"] .template-choice strong,
.presentation-editor[data-editor-theme="dark"] .style-choice strong{color:#eef3f0}
.presentation-editor[data-editor-theme="dark"] .template-choice small,
.presentation-editor[data-editor-theme="dark"] .style-choice small,
.presentation-editor[data-editor-theme="dark"] .template-origin,
.presentation-editor[data-editor-theme="dark"] .library-search-tools span,
.presentation-editor[data-editor-theme="dark"] .palette-note{color:#bac9c1}
.presentation-editor[data-editor-theme="dark"] .filter-row{border-color:#3e484b}
.presentation-editor[data-editor-theme="dark"] .builder-variant-card{background:#293135;border-color:#465450}
.presentation-editor[data-editor-theme="dark"] .builder-variant-card.active{background:#34463e;border-color:#a5dec7}
.presentation-editor[data-editor-theme="dark"] .builder-variant-card>label,
.presentation-editor[data-editor-theme="dark"] .builder-select-all,
.presentation-editor[data-editor-theme="dark"] .builder-batch-tools>span{color:#d3e1d9}
.presentation-editor[data-editor-theme="dark"] .builder-variant-edit{color:#eef3f0}
.presentation-editor[data-editor-theme="dark"] .builder-settings hr,
.presentation-editor[data-editor-theme="dark"] .builder-variants hr{border-color:#465450}
.presentation-editor[data-editor-theme="dark"] .builder-surface,
.presentation-editor[data-editor-theme="dark"] .reference-surface,
.presentation-editor[data-editor-theme="dark"] .social-preview{background:#30393d;border-color:#596568}
.presentation-editor[data-editor-theme="dark"] .reference-progress{background:#293135;color:#eef3f0;border-color:#596568}
.presentation-editor[data-editor-theme="dark"] .design-actions{background:#1b2023}
.presentation-editor[data-editor-theme="dark"] .design-preview small,
.presentation-editor[data-editor-theme="dark"] .text-layer{color:#d3e1d9}
.presentation-editor[data-editor-theme="dark"] .text-layer:hover,
.presentation-editor[data-editor-theme="dark"] .text-layer.selected{background:#34463e;color:#f0f8f3}
.presentation-editor[data-editor-theme="dark"] .library-filters button.active{background:#415b50;color:#f0f8f3;border-color:#8bbca5}
.presentation-editor[data-editor-theme="dark"] .insert-page{background:#30393d;color:#eef3f0;border-color:#72867b}
.presentation-editor[data-editor-theme="dark"] .insert-page:hover{background:#40504d}
.presentation-editor[data-editor-theme="dark"] .swap-hint{background:#34463e;color:#f0f8f3}
.presentation-editor[data-editor-theme="dark"] .palette-direct-row{background:#293135}
.presentation-editor[data-editor-theme="dark"] .inline-text-editor{background:#1b2023;color:#eef3f0;border:1px solid #596568}
.presentation-editor[data-editor-theme="dark"] .palette-choice small{color:inherit;opacity:.85}
.presentation-editor[data-editor-theme="dark"] .drop-zone span:not(.upload-symbol),
.presentation-editor[data-editor-theme="dark"] .drop-zone small,
.presentation-editor[data-editor-theme="dark"] .photo-item .photo-name,
.presentation-editor[data-editor-theme="dark"] .library-bottom,
.presentation-editor[data-editor-theme="dark"] .canvas-caption,
.presentation-editor[data-editor-theme="dark"] .eyebrow{color:#b6c7bc}
.presentation-editor[data-editor-theme="dark"] .drop-zone:hover,
.presentation-editor[data-editor-theme="dark"] .drop-zone.dragover,
.presentation-editor[data-editor-theme="dark"] .library.file-hover{background:#34463e}
.presentation-editor[data-editor-theme="dark"] .lock-button.is-locked{background:#34463e;color:#d6f2e1}
.presentation-editor[data-editor-theme="dark"] .range-label output,
.presentation-editor[data-editor-theme="dark"] .empty-state h2{color:#e2f2e8}
.presentation-editor[data-editor-theme="dark"] .tiny-badge{background:#34463e;color:#d6f2e1}
.presentation-editor[data-editor-theme="dark"] #design-status.error,
.presentation-editor[data-editor-theme="dark"] .delete-template{color:#f4b1a8}
.presentation-editor[data-editor-theme="dark"] input:not([type="color"]):not([type="checkbox"]):not([type="range"])::placeholder,
.presentation-editor[data-editor-theme="dark"] textarea::placeholder{color:#b7c5bd}
