.editor-icon-button{width:40px;height:40px;padding:7px;display:inline-flex;align-items:center;justify-content:center;flex:none}
.editor-icon-button img,.presentation-slide-sketch-select-field-tool img,.presentation-slide-sketch-fill-tool img{width:28px;height:28px;object-fit:contain}
.editor-workspace-modal{position:fixed;inset:0;z-index:18000;background:rgba(0,0,0,.48);display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}
.editor-workspace-card{width:min(460px,100%);max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:18px;background:#14191f;border:1px solid #52606d;border-radius:8px;color:#f2f4f6;box-shadow:0 16px 48px #0008}
.editor-workspace-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;font-size:19px}
.editor-dialog-close{width:36px;height:36px;padding:4px;flex:none}
.editor-settings-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:50px;border-bottom:1px solid #ffffff1a;margin:0}
.editor-settings-row input[type=checkbox]{width:20px;height:20px;accent-color:#46bbcb;flex:none}
.editor-settings-row input[type=number]{width:80px}
.editor-settings .presentation-slide-maker-hold-click{justify-content:space-between;width:100%;margin:12px 0}
.editor-settings .presentation-slide-maker-mode-toggle{margin:12px 0;justify-content:center}
.editor-settings .presentation-slide-keybind-modal{z-index:1}
.editor-settings .btn,.editor-settings label,.editor-settings input,.editor-settings .presentation-slide-maker-mode-toggle{font-size:14px}
.editor-selector-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.editor-selector-grid button{width:100%;height:58px;padding:12px}
.editor-selector-grid svg{width:30px;height:30px}
.editor-gradient-actions{display:flex;align-items:center;gap:8px;grid-column:1/-1;margin-top:8px}
.editor-gradient-save-row{display:flex;gap:8px;margin-bottom:10px}
.editor-gradient-save-row input{min-width:0;flex:1}
.editor-gradient-list{display:grid;gap:8px;margin-top:12px}
.editor-gradient-row{display:flex;gap:8px;align-items:center}
.editor-gradient-use{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:8px;border:1px solid #ffffff30;border-radius:6px;color:inherit;background:#ffffff08;text-align:left}
.editor-gradient-use span:last-child{overflow-wrap:anywhere}
.editor-gradient-swatch{flex:none;width:100px;height:40px;background-image:var(--gradient),repeating-conic-gradient(#777 0% 25%,#bbb 0% 50%);background-size:auto,12px 12px;border:1px solid #ffffff50;border-radius:3px}
.editor-tool-tooltip{position:fixed;z-index:19000;pointer-events:none;display:flex;align-items:center;gap:12px;max-width:min(360px,calc(100vw - 16px));padding:12px 16px;border:1px solid #69cad7;background:#111820;color:#84e1ec;border-radius:6px;font-size:16px;font-weight:650;line-height:1.4;box-shadow:0 8px 24px #0008;box-sizing:border-box;overflow-wrap:anywhere}
.editor-tool-tooltip img,.editor-tool-tooltip svg{width:42px;height:42px;flex:none;object-fit:contain}
.presentation-slide-maker-overlay.scalers-hidden .presentation-slide-element-resize,
.presentation-slide-maker-overlay.scalers-hidden .presentation-slide-shape-frame-resize,
.presentation-slide-maker-overlay.scalers-hidden .presentation-slide-sketch-selection-resize,
.presentation-slide-maker-overlay.scalers-hidden .presentation-slide-reveal-target-resize{display:none!important;pointer-events:none!important}
.editor-clear-sketches:not(:disabled){background:#16669a!important;border-color:#6fcaff!important;color:white!important}
.editor-scalers-toggle{display:inline-flex;align-items:center;gap:7px;font-size:13px;margin:0;padding:5px}
.editor-scalers-toggle input{width:18px;height:18px;accent-color:#45bfcc}
.editor-selector-button svg{width:26px;height:26px}
@media(max-width:520px){.editor-gradient-save-row{flex-wrap:wrap}.editor-gradient-save-row input{flex-basis:100%}.editor-workspace-card{padding:12px}.editor-selector-grid{gap:6px}}
.presentation-text-color-pair,
.presentation-text-color-control{
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
}
.presentation-text-color-control.is-transparent input{
  background:repeating-conic-gradient(#58606d 0% 25%, #d8dde5 0% 50%) 0 / 12px 12px;
}
.presentation-text-color-control.is-transparent input::-webkit-color-swatch{ opacity:0; }
.presentation-text-color-control.is-transparent input::-moz-color-swatch{ opacity:0; }

/* Keep the gradient strip usable inside narrow sketch sidebars. */
.presentation-slide-sketch-gradient-editor{min-width:0;box-sizing:border-box;gap:6px}
.presentation-slide-sketch-gradient-editor .presentation-slide-sketch-gradient-stopbar{min-width:48px;flex:1 1 80px;margin-inline:7px}
.presentation-slide-sketch-gradient-editor select{flex:0 0 92px;min-width:0;width:92px}
.presentation-slide-sketch-gradient-editor .editor-gradient-actions{flex:0 0 auto;gap:4px;margin:0;min-width:0}
.presentation-slide-sketch-gradient-editor .editor-gradient-actions .btn{display:grid;place-items:center;width:30px;min-width:30px;height:30px;padding:5px;border-radius:8px}
.presentation-slide-sketch-gradient-editor .editor-gradient-actions img,
.presentation-slide-sketch-gradient-editor .editor-gradient-actions svg{width:20px;height:20px;object-fit:contain}

/* Native top-layer dialog stays centered above canvas and detached panels. */
.event-naming-notifier{box-sizing:border-box;width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:24px;border:1px solid var(--panel-header-text,#ea9657);border-radius:16px;background:var(--window-color-1,#495e74);color:var(--panel-header-text,#ea9657);box-shadow:0 16px 60px #0008;}
.event-naming-notifier::backdrop{background:#0007;}
.event-naming-notifier h2{margin:0 0 12px;font-size:1.25rem;}
.event-naming-notifier .input{box-sizing:border-box;width:100%;}
.event-naming-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:20px;}
.slide-voice-panel audio{display:block;max-width:100%;width:100%;margin:10px 0;}
.slide-voice-recording{display:grid;gap:8px;border:1px solid #ffffff30;border-radius:10px;padding:12px;margin-top:12px;}
.slide-voice-recording input,.slide-voice-recording select{max-width:100%;}
.slide-voice-actions{display:flex;gap:8px;flex-wrap:wrap;}
.slide-voice-play-retry{position:absolute;z-index:60;left:50%;top:50%;transform:translate(-50%,-50%);}
/* Keep the familiar controls compact: title/pop-out, one Show row, then tools. */
.presentation-slide-maker-controls > .editor-sidebar-header{display:grid;grid-template-columns:minmax(0,1fr) 28px;align-items:center;gap:4px 6px;min-width:0;}
.presentation-slide-maker-controls > .editor-sidebar-header > .editor-panel-popout{grid-column:2;grid-row:1;justify-self:end;margin:0;}
.editor-sidebar-header .presentation-guide-visibility{grid-column:1/-1;grid-row:2;display:flex;align-items:center;flex-wrap:nowrap;gap:2px;min-width:0;padding:0;border:0;border-radius:0;font-size:12px;line-height:1.2;white-space:nowrap;}
.editor-sidebar-header .presentation-guide-visibility-toggle{flex:0 0 auto;min-height:24px;padding:3px 4px;white-space:nowrap;}
.presentation-slide-maker-controls:has(> .editor-sidebar-header){gap:6px;}
.presentation-slide-maker-controls > .presentation-slide-tool-detail:empty{display:none;}
.presentation-slide-maker-controls > .presentation-slide-compact-tool-group{gap:3px;min-height:30px;margin:0;}
/* The sidebar can be dragged down to 280px. Condense labels, not whole buttons. */
.presentation-slide-maker-controls{container-type:inline-size;}
@container (max-width:340px){
 .editor-sidebar-header .presentation-guide-visibility{gap:2px;font-size:11px;}
 .editor-sidebar-header .presentation-guide-visibility-separator{display:none;}
 .editor-sidebar-header .presentation-guide-visibility-toggle{padding:3px 1px;}
}

/* Reuse the live indicators beside the title rather than duplicating tool state. */
.editor-sidebar-title{display:flex;align-items:center;gap:5px;min-width:0;font-size:12px;white-space:nowrap;}
.editor-sidebar-title-text{flex:none;}
.editor-sidebar-title .presentation-slide-tool-status-group,.editor-detached-header .presentation-slide-tool-status-group{flex:1;flex-wrap:nowrap;gap:4px;overflow:hidden;}
.editor-sidebar-title .presentation-slide-tool-status-label,.editor-detached-header .presentation-slide-tool-status-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.editor-sidebar-title .presentation-slide-tool-status,.editor-sidebar-title .presentation-slide-secondary-tool-status,
.editor-detached-header .presentation-slide-tool-status,.editor-detached-header .presentation-slide-secondary-tool-status{display:block;min-width:0;max-width:none;padding:2px 0;border:0;border-radius:0;background:transparent;font-size:11px;line-height:1.3;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.editor-sidebar-title .presentation-slide-secondary-tool-status::before,.editor-detached-header .presentation-slide-secondary-tool-status::before{content:'|';margin-right:4px;color:var(--panel-header-text);}
.editor-sidebar-title .presentation-slide-tool-status strong,.editor-sidebar-title .presentation-slide-secondary-tool-status strong,
.editor-detached-header .presentation-slide-tool-status strong,.editor-detached-header .presentation-slide-secondary-tool-status strong{color:var(--panel-header-text);overflow-wrap:normal;}

.editor-sidebar-title .presentation-slide-animation-status,.editor-detached-header .presentation-slide-animation-status{color:var(--text);}
@container (max-width:280px){
 .editor-sidebar-header .presentation-guide-visibility{gap:2px;font-size:10px;}
 .editor-sidebar-header .presentation-guide-visibility-toggle{padding:3px 0;}
}

/* Preserve the wide-field anchors, then close gaps before moving overflow
   buttons beside the field. Container queries also follow in-progress scaling. */
.presentation-slide-field-controls{position:absolute;inset:0;container:field-chrome / size;pointer-events:none;z-index:30;}
.presentation-slide-field-controls > .presentation-slide-element-tool{pointer-events:auto;}
.presentation-slide-field-tool-row{position:absolute;top:calc(100% - 10px);left:calc(50% + 7px);width:274px;height:24px;transform:translateX(-50%);display:flex;gap:12px;align-items:center;pointer-events:none;z-index:30;}
.presentation-slide-field-tool-row > .presentation-slide-element-tool:is(.motion,.worksheet-edit,.interactable,.conditionals,.shape,.submit-trigger){position:relative;left:auto;right:auto;top:auto;bottom:auto;transform:none;flex:0 0 24px;pointer-events:auto;}
.presentation-slide-field-tool-row > .presentation-slide-element-tool.worksheet-edit{width:24px;height:24px;padding:0;font-size:20px;line-height:1;display:grid;place-items:center;}
.presentation-slide-field-tool-row > .presentation-slide-element-tool.shape{margin-left:auto;}
.presentation-slide-field-tool-row > .presentation-slide-element-tool.submit-trigger{flex-basis:90px;margin-left:10px;}
@container field-chrome (width < 288px){
 .presentation-slide-field-tool-row{left:0;width:100%;transform:none;gap:clamp(0px,calc((100cqw - 96px)/3),12px);}
 .presentation-slide-field-tool-row:has(> .submit-trigger){gap:clamp(0px,calc((100cqw - 186px)/4),12px);}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.submit-trigger{margin-left:0;}
}
@container field-chrome (width < 186px){
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.submit-trigger{position:absolute;left:calc(100% + 12px);top:calc(10px - 100cqh + var(--field-event-side-y,0px));margin:0;}
 .presentation-slide-field-tool-row:has(> .submit-trigger){gap:clamp(0px,calc((100cqw - 96px)/3),12px);}
}
@container field-chrome (width < 96px){
 .presentation-slide-field-tool-row:has(> .interactable) > .presentation-slide-element-tool.shape{position:absolute;left:calc(100% + 12px);top:calc(10px - 100cqh + var(--field-shape-side-y,0px));margin:0;}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.submit-trigger{--field-event-side-y:28px;}
 .presentation-slide-field-tool-row,.presentation-slide-field-tool-row:has(> .submit-trigger){gap:clamp(0px,calc((100cqw - 72px)/2),12px);}
}
@container field-chrome (width < 72px){
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.conditionals{position:absolute;left:calc(100% + 12px);top:calc(10px - 100cqh + var(--field-conditional-side-y,0px));}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.shape{--field-shape-side-y:28px;}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.submit-trigger{--field-event-side-y:56px;}
 .presentation-slide-field-tool-row,.presentation-slide-field-tool-row:has(> .submit-trigger){gap:clamp(0px,calc(100cqw - 48px),12px);}
}
@container field-chrome (width < 48px){
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.interactable{position:absolute;left:calc(100% + 12px);top:calc(10px - 100cqh);}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.conditionals{--field-conditional-side-y:28px;}
 .presentation-slide-field-tool-row:has(> :is(.motion,.worksheet-edit)) > .presentation-slide-element-tool.shape{position:absolute;left:calc(100% + 12px);top:calc(10px - 100cqh + var(--field-shape-side-y,0px));margin:0;}
 .presentation-slide-field-tool-row:has(> .interactable) > .presentation-slide-element-tool.shape{--field-shape-side-y:56px;}
 .presentation-slide-field-tool-row:not(:has(> .interactable)) > .presentation-slide-element-tool.shape{--field-shape-side-y:0px;}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.submit-trigger{--field-event-side-y:84px;}
}
@container field-chrome (width < 24px){
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.shape{position:absolute;left:calc(100% + 12px);top:calc(10px - 100cqh + var(--field-shape-side-y,0px));margin:0;}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool:is(.motion,.worksheet-edit){position:absolute;left:calc(100% + 12px);top:calc(10px - 100cqh);}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.interactable{top:calc(38px - 100cqh);}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.conditionals{--field-conditional-side-y:56px;}
 .presentation-slide-field-tool-row:has(> .interactable) > .presentation-slide-element-tool.shape{--field-shape-side-y:84px;}
 .presentation-slide-field-tool-row:not(:has(> .interactable)):has(> :is(.motion,.worksheet-edit)) > .presentation-slide-element-tool.shape{--field-shape-side-y:28px;}
 .presentation-slide-field-tool-row > .presentation-slide-element-tool.submit-trigger{--field-event-side-y:112px;}
}
/* Crowded corner controls use a compact top row; action tools stay beside it. */
@container field-chrome (width < 24px) or ((width < 288px) and (height < 34px)){
 .presentation-slide-field-controls > .presentation-slide-element-tool:is(.danger,.color,.layer-up,.layer-down){left:calc(50% - 54px + var(--field-meta-index)*28px);right:auto;top:-38px;bottom:auto;transform:none;}
 .presentation-slide-field-controls > .danger{--field-meta-index:0;}
 .presentation-slide-field-controls > .color{--field-meta-index:1;}
 .presentation-slide-field-controls > .layer-up{--field-meta-index:2;}
 .presentation-slide-field-controls > .layer-down{--field-meta-index:3;}
}
@container field-chrome (width < 186px){.presentation-slide-field-controls:has(> .presentation-slide-field-tool-row > .submit-trigger) > .presentation-slide-element-tool{--field-side-extra:1;}}
@container field-chrome (96px <= width < 186px){.presentation-slide-field-controls > .presentation-slide-element-tool{--field-side-count:var(--field-side-extra,0);}}
@container field-chrome (72px <= width < 96px){.presentation-slide-field-controls > .presentation-slide-element-tool{--field-side-count:calc(1 + var(--field-side-extra,0));}}
@container field-chrome (48px <= width < 72px){.presentation-slide-field-controls > .presentation-slide-element-tool{--field-side-count:calc(2 + var(--field-side-extra,0));}}
@container field-chrome (24px <= width < 48px){.presentation-slide-field-controls > .presentation-slide-element-tool{--field-side-count:calc(3 + var(--field-side-extra,0));}}
@container field-chrome (width < 24px){.presentation-slide-field-controls > .presentation-slide-element-tool{--field-side-count:calc(4 + var(--field-side-extra,0));}}

/* Reordering events must not chain edge scrolling into the editor or app. */
.presentation-slide-events-list,.presentation-slide-events-panel{overscroll-behavior-y:contain;}

.authoring-naming-row{display:grid;gap:5px;margin-top:14px;}
.authoring-naming-row label{display:grid;gap:5px;}
.authoring-naming-row small{opacity:.85;line-height:1.35;}

/* Keep the collider tools centered together at every field size. */
.collider-zone-field .presentation-slide-field-tool-row.collider-zone-tools{
  left:50%;top:calc(100% - 10px);width:max-content;height:24px;
  transform:translateX(-50%);gap:8px;
}
.collider-zone-field .collider-zone-tools > .presentation-slide-element-tool:is(.conditionals,.shape,.collider-link){
  position:relative;left:auto;right:auto;top:auto;bottom:auto;transform:none;
  flex:0 0 24px;width:24px;min-width:24px;height:24px;margin:0;padding:3px;
  pointer-events:auto;align-items:center;justify-content:center;
}
.collider-zone-field .presentation-slide-field-controls > .presentation-slide-element-tool.danger{
  left:-6px;right:auto;top:50%;bottom:auto;transform:translateY(-50%);
}
