/* Full Editor has one screen-design popup, with optional layout tools beside it. */
body.full-editor-popups.full-editor-popups .workspace,
body.full-editor-popups.full-editor-popups .workspace.settings-collapsed {
  --settings-width:0px;
  grid-template-columns:var(--screens-width,220px) minmax(0,1fr);
}
body.full-editor-popups #legacy-screen-controls { display:none !important; }
body.full-editor-popups #toggle-settings { display:none !important; }
.editor-selected-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); flex:none; gap:8px; padding:8px 16px; border-bottom:1px solid #343f39; background:#171e1d; }
.editor-selected-actions .button { display:flex; align-items:center; justify-content:center; min-height:44px; padding:8px; font-size:12px; text-align:center; line-height:1.35; }
.editor-selected-actions .primary { background:#d5ff5f; border-color:#d5ff5f; color:#223016; }
body.full-editor-popups.full-editor-popups #settings-panel:not([open]) { display:none !important; }
body.full-editor-popups.full-editor-popups #settings-panel[open] {
  position:fixed;
  inset:16px;
  z-index:50;
  display:flex !important;
  flex-direction:column;
  width:min(760px,calc(100vw - 32px));
  height:min(740px,calc(100dvh - 32px));
  max-width:none;
  max-height:calc(100dvh - 32px);
  min-height:0;
  margin:auto;
  padding:0;
  overflow:hidden;
  border:1px solid #61784b;
  border-radius:12px;
  background:#19211f;
  color:#edf3e7;
  box-shadow:0 24px 100px #000b;
}
body.full-editor-popups #settings-panel::backdrop { background:#080d11d9; backdrop-filter:blur(5px); }
body.full-editor-popups.full-editor-popups #settings-panel .panel-heading { position:static; display:flex; flex:none; align-items:center; gap:10px; width:100%; min-height:64px; height:auto; padding:10px 16px; border-bottom:1px solid #35433a; }
body.full-editor-popups.full-editor-popups #settings-panel .panel-heading > div { display:block; flex:1; min-width:0; }
body.full-editor-popups.full-editor-popups #settings-panel .panel-heading h2 { margin:3px 0; font-size:20px; line-height:1.3; white-space:normal; }
body.full-editor-popups.full-editor-popups #settings-panel .panel-heading .eyebrow { display:block; font-size:9px; letter-spacing:1.2px; color:#bdd395; }
body.full-editor-popups.full-editor-popups #settings-panel .selected-number { display:block; flex:none; font-size:21px; }
body.full-editor-popups.full-editor-popups #collapse-settings { flex:none; min-width:62px; min-height:44px; height:auto; padding:9px 12px; color:#edf3e7; background:#29362c; border:1px solid #596e4e; font-size:13px; }
body.full-editor-popups #settings-panel .layout-tools-description { flex:none; margin:0; padding:10px 16px; color:#b4c3b2; border-bottom:1px solid #35433a; font-size:12px; line-height:1.6; }
body.full-editor-popups.full-editor-popups #settings-panel .inspector-scroll { display:block; flex:1; min-height:0; height:auto; max-height:none; padding:14px 16px 20px; overflow:auto; overscroll-behavior:contain; scroll-padding-block:12px; }
body.full-editor-popups.full-editor-popups #settings-panel .inspector-scroll[hidden] { display:none !important; }
body.full-editor-popups #settings-panel #screen-settings { display:block; }
body.full-editor-popups #settings-panel .screen-actions { position:static; padding:0; gap:10px; margin:0 0 14px; }
body.full-editor-popups #settings-panel :is(button,summary) { min-height:44px; }
body.full-editor-popups #settings-panel :is(input:not([type='color']):not([type='checkbox']),select,textarea) { min-height:44px; font-size:16px; }
body.full-editor-popups #settings-panel :is(button,input,select,textarea,summary) { scroll-margin-block:12px; }
body.full-editor-popups #settings-panel .field > span { font-size:12px; }
body.full-editor-popups #settings-panel .field-row { gap:12px; }
body.full-editor-popups #settings-panel .settings-section > summary { min-height:52px; padding:12px; font-size:13px; }
body.full-editor-popups #settings-panel .settings-section-body { padding:14px 12px 2px; }
body.full-editor-popups #settings-panel #mapping-tools { margin:0 0 12px; border:1px solid #354146; border-radius:6px; background:#171e20; }
body.full-editor-popups #settings-panel #mapping-tools > summary { min-height:52px; padding:12px; font-size:13px; }
body.full-editor-popups #settings-panel .mapping-strip { display:flex; height:auto; flex-wrap:wrap; gap:10px; padding:12px; }
body.full-editor-popups #settings-panel .mapping-title { width:100%; }
body.full-editor-popups #settings-panel .mapping-strip .button { min-height:44px; font-size:12px; }
body.full-editor-popups #settings-panel .snap-control { margin-left:0; }
body.full-editor-popups #settings-panel .workspace-note { padding:0 12px 12px; font-size:11px; }
#screen-builder-dialog .builder-overlays { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0 0 16px; }
#screen-builder-dialog .builder-overlays > label { display:flex; align-items:center; justify-content:center; gap:6px; min-height:46px; padding:8px 6px; border:1px solid #52694b; border-radius:7px; color:#d8e8cf; background:#202d24; font-size:12px; cursor:pointer; }
#screen-builder-dialog .builder-overlays > label:has(input:checked) { border-color:#b9e56a; background:#d5ff5f0b; color:#effbdc; }
#screen-builder-dialog .builder-overlays input { accent-color:#d5ff5f; width:18px; height:18px; min-height:18px; flex:none; }
#screen-builder-dialog .builder-overlays [aria-hidden] { font-size:18px; line-height:1; }
#screen-builder-dialog .builder-check { display:flex; align-items:center; gap:10px; min-height:44px; margin:0 0 16px; color:#d1e1c7; font-size:13px; }
#screen-builder-dialog .builder-check input { width:20px; height:20px; min-height:20px; accent-color:#d5ff5f; }
#screen-builder-dialog .builder-tutorial-note { flex:none; margin:0; padding:10px 20px; border-bottom:1px solid #526948; background:#c4ee5b0b; color:#d9efb3; font-size:12px; line-height:1.6; }
#screen-builder-dialog .builder-color-fields { grid-template-columns:repeat(auto-fit,minmax(70px,1fr)); }
#builder-arrange-tools #builder-export { background:#d5ff5f; border-color:#d5ff5f; color:#223016; }
@media(max-width:800px),(max-width:1000px) and (max-height:600px) {
  .editor-selected-actions { padding:7px 12px; gap:6px; }
  .editor-selected-actions .button { font-size:11px; padding:6px; }
  body.full-editor-popups.full-editor-popups #settings-panel[open] { inset:8px; width:calc(100vw - 16px); height:min(740px,calc(100dvh - 16px)); max-height:calc(100dvh - 16px); }
  body.full-editor-popups.full-editor-popups #settings-panel .panel-heading { min-height:60px; padding:8px 12px; }
  body.full-editor-popups #settings-panel .layout-tools-description { padding:8px 12px; font-size:11px; }
  body.full-editor-popups.full-editor-popups #settings-panel .inspector-scroll { padding:12px; }
  #builder-arrange-tools { gap:5px; }
  #builder-arrange-tools .button { padding-inline:8px; font-size:10px; }
  #builder-arrange-tools #builder-done { min-width:44px; width:44px; padding-inline:0; font-size:0; }
  #builder-arrange-tools #builder-done::after { content:'×'; font-size:23px; line-height:1; }
}
@media(orientation:landscape) and (max-height:600px) {
  body.full-editor-popups.landscape-editor .editor-selected-actions { display:none; }
  body.full-editor-popups.full-editor-popups.landscape-editor.landscape-settings-open #viewport { right:8px; }
  body.full-editor-popups.full-editor-popups.landscape-editor.landscape-settings-open.landscape-has-selection #viewport { left:96px; }
  body.full-editor-popups.full-editor-popups.landscape-editor #settings-panel[open] { inset:8px; width:min(760px,calc(100vw - 16px)); height:calc(100dvh - 16px); max-height:calc(100dvh - 16px); }
  body.full-editor-popups.full-editor-popups.landscape-editor #settings-panel .panel-heading { min-height:52px; padding:4px 10px; }
  body.full-editor-popups.full-editor-popups.landscape-editor #settings-panel .panel-heading h2 { font-size:17px; }
  body.full-editor-popups.full-editor-popups.landscape-editor #settings-panel .panel-heading .eyebrow { display:none; }
  body.full-editor-popups.landscape-editor #settings-panel .layout-tools-description { display:none; }
  #screen-builder-dialog .builder-tutorial-note { padding:6px 12px; font-size:11px; }
}
@media(prefers-reduced-motion:reduce) {
  body.full-editor-popups :is(.editor-selected-actions,#settings-panel,#screen-builder-dialog) * { transition:none; }
}

.estimated-layout-note{flex:none;margin:0 16px 8px;padding:7px 10px;border-left:3px solid #d3a952;background:#d3a95210;color:#e9c991;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.estimated-layout-note[hidden]{display:none}
