/* ==========================================================================
   zzzzzzzzzzz_editor_categories.css — the shared post editor's category chrome
   (owner decision 2026-10-17, docs/design/post_editor_control_map.md; metrics in
   docs/design/post_editor_spec.md; Explore posts get bottom bar B in zzzzzzzzzzzzzz_editor_bar_mode.css).

   Owns: the category bar, the category sheet (#editor-tools) with its header,
   subtabs, body, shared single-instance blocks, the keyboard composer and the
   desktop rail. State comes from attributes the session JS mirrors:
     #editor-workspace-root[data-tool]      open category ("home" = sheet closed)
     #editor-workspace-root[data-keyboard]  a sheet field has focus under the keyboard
     #editor-workspace-root[data-sheet-tall] the sheet was pulled up
   The canvas never reflows: studio_preview_scale.js reads the height reserve
   below and scales the finished render uniformly. Loads last on purpose
   (eleven z): it overrides the retired inspector rules of zz_shared_editor.css
   and zzzz_explore_quick_controls.css at equal specificity.
   ========================================================================== */

/* Structure identical on every width ---------------------------------------- */
.sp-editor-subtab-body[hidden],
.sp-editor-panel-slot[hidden],
.sp-editor-shared[hidden] { display: none; }
#editor-tools.sp-editor-sheet { box-sizing: border-box; color: var(--sp-text); font: 400 13px/17px var(--sp-font-ui); }
.is-placed #editor-tool-content { overflow: visible; flex: none; padding: 0; }
/* Explore's page header owns Save and Export; the editor's inputs stay mounted. */
#editor-workspace-root[data-chrome="explore"] .sp-editor-sheet-head :is(#editor-save, #editor-open-export) { display: none; }
/* The element dragging switch leaves with stage 3; until then it keeps its toolbar look. */

/* Icons: lucide outlines as CSS masks — no icon network requests. ---------- */
.sp-editor-icon {
  display: inline-block; width: 22px; height: 22px; flex: none; background: currentColor;
  -webkit-mask: var(--sp-editor-icon) center / contain no-repeat; mask: var(--sp-editor-icon) center / contain no-repeat;
}
.sp-editor-subtab .sp-editor-icon { width: 20px; height: 20px; }
.sp-editor-icon--title, .sp-editor-icon--text { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 7V4h16v3M9 20h6M12 4v16'/></svg>"); }
.sp-editor-icon--subtitle { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17 6.1H3M21 12.1H3M15.1 18H3'/></svg>"); }
.sp-editor-icon--chart { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 3v18h18'/><path d='m19 9-5 5-4-4-3 3'/></svg>"); }
.sp-editor-icon--background { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='18' height='18' x='3' y='3' rx='2'/><circle cx='9' cy='9' r='2'/><path d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/></svg>"); }
.sp-editor-icon--canvas { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 6H2M22 18H2M6 2v20M18 2v20'/></svg>"); }
.sp-editor-icon--time { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>"); }
.sp-editor-icon--annotations { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/><circle cx='12' cy='10' r='3'/></svg>"); }
.sp-editor-icon--data { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 4h-7M10 4H3M21 12h-9M8 12H3M21 20h-5M12 20H3M14 2v4M8 10v4M16 18v4'/></svg>"); }
.sp-editor-icon--panel { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='18' height='18' x='3' y='3' rx='2'/><path d='M15 3v18'/></svg>"); }
.sp-editor-icon--more { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='none'><circle cx='12' cy='12' r='2'/><circle cx='19' cy='12' r='2'/><circle cx='5' cy='12' r='2'/></svg>"); }
.sp-editor-icon--style { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 15 4-8 4 8M4 13h6'/><circle cx='18' cy='12' r='3'/><path d='M21 9v6'/></svg>"); }
.sp-editor-icon--color { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><circle cx='9' cy='9.5' r='1' fill='black'/><circle cx='14' cy='8' r='1' fill='black'/><circle cx='16' cy='13' r='1' fill='black'/></svg>"); }
.sp-editor-icon--position { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='5 9 2 12 5 15'/><polyline points='9 5 12 2 15 5'/><polyline points='15 19 12 22 9 19'/><polyline points='19 9 22 12 19 15'/><path d='M2 12h20M12 2v20'/></svg>"); }
.sp-editor-icon--axes { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 4v16h16M5 9H3.5M5 14H3.5M10 20v1.5M15 20v1.5'/></svg>"); }
.sp-editor-icon--labels { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='9' y='4' width='11' height='7' rx='3.5'/><circle cx='6' cy='16' r='2'/><path d='M8 16h3'/></svg>"); }
.sp-editor-icon--bars { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 5h16M4 12h10M4 19h13'/></svg>"); }
.sp-editor-icon--lines { --sp-editor-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 17c4 0 5-9 9-9s5 6 9 6'/><circle cx='12' cy='8' r='2.5' fill='black'/></svg>"); }

/* Category bar (spec: 68 high, items 66×60, r 12, 11/13) ------------------- */
.sp-editor-category-bar {
  box-sizing: border-box; display: flex; gap: 2px; height: 68px; padding: 4px 6px 0; margin: 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  background: var(--sp-chrome); border-top: 1px solid var(--sp-border);
}
.sp-editor-category-bar::-webkit-scrollbar { display: none; }
#editor-workspace-root .sp-editor-category-bar .sp-editor-category,
#editor-workspace-root .sp-editor-category-bar :is(#editor-open-filters, #editor-open-data) {
  box-sizing: border-box; flex: none; position: static; width: 66px; height: 60px; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--sp-text-2); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  font: 500 11px/13px var(--sp-font-ui); white-space: nowrap;
}
#editor-workspace-root .sp-editor-category-bar :is(#editor-open-filters, #editor-open-data)::before { content: none; }
#editor-workspace-root .sp-editor-category-bar .sp-editor-category:hover { color: var(--sp-text); }
#editor-workspace-root .sp-editor-category-bar .sp-editor-category.is-active { background: var(--sp-surface); color: var(--sp-text); }

/* Sheet header (44 high, pad 2 8 0 16, name 14/20 600, Done pill 32) ------- */
#editor-workspace-root .sp-editor-sheet-grip { box-sizing: border-box; display: block; width: 40px; min-width: 0; height: 4px; min-height: 0; margin: 8px auto 0; border: 0; padding: 0; border-radius: 2px; background: var(--sp-border-strong); flex: none; cursor: ns-resize; font-size: 0; }
.sp-editor-sheet-head { box-sizing: border-box; display: flex; align-items: center; gap: 4px; height: 44px; min-height: 44px; padding: 2px 8px 0 16px; flex: none; }
.sp-editor-sheet-name { flex: 1; min-width: 0; font: 600 14px/20px var(--sp-font-ui); color: var(--sp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#editor-workspace-root .sp-editor-sheet-head .sp-editor-edit-tools { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; order: 0; }
#editor-workspace-root .sp-editor-sheet-head :is(#editor-undo, #editor-redo) { width: 44px; height: 44px; min-height: 44px; flex: 0 0 44px; border-radius: 12px; color: var(--sp-text-3); }
#editor-workspace-root .sp-editor-sheet-head :is(#editor-undo, #editor-redo):not(:disabled) { color: var(--sp-text); }
#editor-workspace-root .sp-editor-pill {
  box-sizing: border-box; height: 32px; min-height: 32px; padding: 0 14px; margin: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--sp-text); color: var(--sp-bg); font: 600 13px/32px var(--sp-font-ui);
}
#editor-workspace-root .sp-editor-pill:hover { background: var(--sp-accent-hover); }

/* Subtabs (row 48, pad 0 10, items ikona 20 + 10/12, active underline 2) ---- */
.sp-editor-subtabs { box-sizing: border-box; display: flex; gap: 2px; height: 48px; padding: 0 10px; border-bottom: 1px solid var(--sp-border); }
#editor-workspace-root .sp-editor-subtab {
  box-sizing: border-box; flex: 1; height: 48px; min-height: 48px; margin: 0 0 -1px; padding: 0;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--sp-text-2); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: 500 10px/12px var(--sp-font-ui); white-space: nowrap;
}
#editor-workspace-root .sp-editor-subtab.is-active { color: var(--sp-text); border-bottom-color: var(--sp-text); }
#editor-workspace-root .sp-editor-subtab[hidden] { display: none; }

/* Body, rows, sections, disclosures ---------------------------------------- */
.sp-editor-sheet-body { box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; padding: 6px 14px 14px; min-height: 0; }
.sp-editor-category-panel, .sp-editor-subtab-body, .sp-editor-shared { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#editor-workspace-root .sp-editor-category-panel.sp-editor-tool-group { display: flex; gap: 4px; }
#editor-workspace-root .sp-editor-row { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin: 0; padding: 0; border: 0; background: transparent; }
#editor-workspace-root .sp-editor-row > :last-child { flex: none; max-width: 60%; }
#editor-workspace-root .sp-editor-row-label { font: 500 13px/17px var(--sp-font-ui); color: var(--sp-text); }
.sp-editor-hint { font: 400 11px/15px var(--sp-font-ui); color: var(--sp-text-3); }
.sp-editor-section-title { margin: 6px 0 0; font: 600 11px/15px var(--sp-font-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--sp-text-2); }
.sp-editor-caption { margin: 2px 0 0; font: 400 11px/15px var(--sp-font-ui); color: var(--sp-text-3); }
.sp-editor-more-block { margin: 0; }
.sp-editor-more {
  box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; height: 40px; min-height: 40px; list-style: none; cursor: pointer;
  margin-top: 4px; border-top: 1px solid var(--sp-border); font: 500 13px/17px var(--sp-font-ui); color: var(--sp-text-2);
}
.sp-editor-more::-webkit-details-marker { display: none; }
.sp-editor-more-chevron { transition: transform .15s; }
.sp-editor-more-block[open] > .sp-editor-more { color: var(--sp-text); }
.sp-editor-more-block[open] > .sp-editor-more .sp-editor-more-chevron { transform: rotate(90deg); }
.sp-editor-sub { display: flex; flex-direction: column; gap: 4px; padding: 0 0 4px 12px; margin-left: 2px; border-left: 2px solid var(--sp-border-strong); }
.sp-editor-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sp-editor-grid2 .sp-editor-row > :last-child { max-width: none; }
.sp-quick-axis h3 { margin: 6px 0 0; font: 600 11px/15px var(--sp-font-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--sp-text-2); }

/* Controls inside categories (spec table "Ovládací prvky"), measured on the
   Mantine element that draws them. The legacy studio skins (zz_studio_look,
   zz_studio_output) pin heights and radii with !important, so the spec values
   must carry !important as well; this is the only block that uses it. ------- */
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Switch-track { width: 48px !important; min-width: 48px !important; height: 28px !important; border-radius: 14px !important; background: var(--sp-border-strong) !important; border-color: var(--sp-border-strong) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Switch-thumb { width: 22px !important; height: 22px !important; inset-inline-start: 3px !important; border: 0 !important; background: var(--sp-text) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Switch-input:checked + .mantine-Switch-track { background: var(--sp-accent) !important; border-color: var(--sp-accent) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Switch-input:checked + .mantine-Switch-track .mantine-Switch-thumb { inset-inline-start: calc(100% - 25px) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Switch-label { font: 500 13px/17px var(--sp-font-ui) !important; color: var(--sp-text) !important; padding-inline-start: 10px !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-SegmentedControl-root { box-sizing: border-box !important; padding: 3px !important; gap: 2px !important; border-radius: 10px !important; border: 1px solid var(--sp-border-strong) !important; background: var(--sp-surface) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-SegmentedControl-label { box-sizing: border-box !important; height: 32px !important; padding: 0 6px !important; border-radius: 7px !important; font: 500 12px/32px var(--sp-font-ui) !important; color: var(--sp-text-2) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-SegmentedControl-indicator { border-radius: 7px !important; background: var(--sp-border-strong) !important; box-shadow: none !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-SegmentedControl-control[data-active] .mantine-SegmentedControl-label { color: var(--sp-text) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body :is(.mantine-NumberInput-input, .mantine-TextInput-input, .mantine-Select-input, .mantine-ColorInput-input) {
  box-sizing: border-box !important; height: 36px !important; min-height: 36px !important; border-radius: 10px !important; border: 1px solid var(--sp-border-strong) !important; background: var(--sp-surface) !important; color: var(--sp-text) !important;
  font: 400 13px/18px var(--sp-font-ui) !important; padding: 0 10px !important;
}
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Select-input { padding: 0 10px 0 12px !important; font-weight: 500 !important; min-width: 170px !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Textarea-input { box-sizing: border-box !important; min-height: 64px !important; border-radius: 12px !important; border: 1px solid var(--sp-border-strong) !important; background: var(--sp-surface) !important; color: var(--sp-text) !important; padding: 9px 12px !important; font: 400 14px/19px var(--sp-font-ui) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body :is(.mantine-InputWrapper-label, .mantine-Input-label) { font: 500 13px/17px var(--sp-font-ui) !important; color: var(--sp-text) !important; margin-bottom: 4px !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body :is(.mantine-InputWrapper-description, .mantine-Switch-description) { font: 400 11px/15px var(--sp-font-ui) !important; color: var(--sp-text-3) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Accordion-control { min-height: 40px !important; padding: 0 !important; font: 500 13px/17px var(--sp-font-ui) !important; color: var(--sp-text-2) !important; border-top: 1px solid var(--sp-border) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Accordion-item { border: 0 !important; background: transparent !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Accordion-content { padding: 0 0 4px 12px !important; margin-left: 2px !important; border-left: 2px solid var(--sp-border-strong) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-sheet-body .mantine-Paper-root { background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-studio-card { border: 0 !important; background: transparent !important; padding: 0 !important; margin: 0 !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-studio-card-head { display: none !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-studio-row, #editor-workspace-root #editor-tools.sp-editor-sheet .sp-ft-row { margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-studio-row-label { font: 500 13px/17px var(--sp-font-ui) !important; color: var(--sp-text) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-inspector-subsection-title { font: 600 11px/15px var(--sp-font-ui) !important; letter-spacing: .05em !important; text-transform: uppercase !important; color: var(--sp-text-2) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-inspector-option-title { font: 500 13px/17px var(--sp-font-ui) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-inspector-option-desc { font: 400 11px/15px var(--sp-font-ui) !important; color: var(--sp-text-3) !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet #editor-btn-apply-filters { display: none !important; }
#editor-workspace-root #editor-tools.sp-editor-sheet #editor-btn-apply-filters:not(:disabled) { display: block !important; margin: 8px 14px !important; }
#editor-shared-presets #editor-open-presets { width: 100% !important; min-height: 40px !important; border-radius: 10px !important; background: var(--sp-surface) !important; border: 1px solid var(--sp-border-strong) !important; color: var(--sp-text) !important; font: 500 13px/17px var(--sp-font-ui) !important; }

/* ==========================================================================
   PHONE (< 768): closed = bar above the bottom navigation; open = sheet
   anchored to the screen bottom; the canvas is scaled to what remains.
   ========================================================================== */
@media (max-width: 599px), (max-width: 767px) and (max-aspect-ratio: 10/13) {
  /* The host is a stacking context below the site navigation, so the navigation paints
     over whatever the bar leaves under it; on phones with a bottom safe area (gesture bar)
     the navigation is that much taller, and the bar must clear it too. */
  #editor-workspace-root[data-mode="design"] #editor-tools.sp-editor-sheet {
    position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); z-index: 1300; width: auto; max-width: none;
    display: flex; flex-direction: column; height: 68px; padding: 0; margin: 0; border: 0; overflow: visible;
    background: var(--sp-chrome); animation: none;
  }
  /* Closed: only the bar. */
  #editor-workspace-root[data-tool="home"] :is(.sp-editor-sheet-grip, .sp-editor-sheet-head, .sp-editor-sheet-body, #editor-btn-apply-filters) { display: none; }
  /* Open: the sheet replaces the bar and covers the bottom navigation. */
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]) #editor-tools.sp-editor-sheet {
    bottom: 0; height: 340px; border-top: 1px solid var(--sp-border-strong); border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .5); overflow: hidden;
  }
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]) .sp-editor-category-bar { display: none; }
  /* The host is its own stacking context (z-index 5), so the sheet cannot out-stack
     the site navigation (z-index 1200); the navigation steps aside while a sheet is open. */
  body:where([data-sp-has~="editor-design-tool-open"]):not(#sp-s):not(.sp-s):not(.sp-s) .sp-bottom-nav { display: none; }
  #editor-workspace-root[data-sheet-tall="true"]:not([data-tool="home"]) #editor-tools.sp-editor-sheet { height: 640px; }
  /* The grip and head are the comfortable pull-down area (assets/explore_final_panels.js); body scrolling stays native. */
  #editor-workspace-root[data-mode="design"] :is(.sp-editor-sheet-grip, .sp-editor-sheet-head) { -webkit-user-select: none; user-select: none; }
  #editor-workspace-root:not([data-tool="home"]) .sp-editor-sheet-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  /* The canvas column keeps the transport in the first screen above the bar/sheet. */
  #editor-workspace-root[data-mode="design"] .sp-editor-columns { display: block; }
  #editor-workspace-root[data-mode="design"] #editor-canvas-column { padding-bottom: 0; gap: 0; }
  #editor-workspace-root[data-mode="design"] .sp-editor-workspace .sp-preview-stage-wrap { --sp-preview-height-reserve: 180px; }
  /* Closed bar: it sits the safe area higher, so the first screen reserves that much more
     (studio_preview_scale.js reads this next to the reserve; calc() cannot go into the reserve). */
  #editor-workspace-root[data-mode="design"][data-tool="home"] .sp-editor-workspace .sp-preview-stage-wrap { --sp-preview-safe-bottom: env(safe-area-inset-bottom, 0px); }
  #editor-workspace-root[data-mode="design"] #editor-canvas-column .sp-transport-bar { height: 48px; min-height: 48px; box-sizing: border-box; padding: 0 14px; margin: 0; gap: 12px; border: 0; border-radius: 0; background: transparent; }
  #editor-workspace-root[data-mode="design"] .sp-editor-workspace-anchor { min-height: 0; }
  /* Open sheet (layout C, owner decision 2026-10-20): the canvas owns everything above
     the sheet. The page header and the transport hide, the sheet keeps only its grip,
     subtabs and body, and the head's actions float over the canvas as pills (Undo · Redo
     · Done, top right). Reserve = the 340 px sheet + 8 px breathing room. */
  body:where([data-sp-has~="editor-explore-design-tool-open"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head.sp-editor-topbar { display: none; }
  /* Direct Studio keeps the site header in Design (Explore hides it below); with the
     host at top 0 it would cover the canvas and the floating pills, so it hides too. */
  body:where([data-sp-has~="editor-design-tool-open-visible"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) { --sp-header-h: 0px; }
  body:where([data-sp-has~="editor-design-tool-open-visible"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) .sp-top-header { display: none; }
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]).is-placed { top: 0; }
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]) #editor-canvas-column .sp-transport-bar { display: none; }
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]) .sp-editor-workspace .sp-preview-stage-wrap { --sp-preview-height-reserve: 348px; }
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]) .sp-editor-sheet-head {
    position: fixed; top: 8px; right: 8px; left: auto; bottom: auto; z-index: 1310; height: 44px; min-height: 44px; padding: 0; gap: 6px; background: transparent;
  }
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]) .sp-editor-sheet-name { display: none; }
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]) .sp-editor-sheet-head :is(#editor-undo, #editor-redo) {
    width: 40px; height: 40px; min-height: 40px; flex: 0 0 40px; border-radius: 50%; background: rgba(17, 17, 19, .72); color: var(--sp-text-3);
  }
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]) .sp-editor-sheet-head :is(#editor-undo, #editor-redo):not(:disabled) { color: var(--sp-text); }
  #editor-workspace-root[data-mode="design"]:not([data-tool="home"]) .sp-editor-sheet-head #editor-sheet-done { background: rgba(242, 239, 233, .92); color: var(--sp-bg); }
  /* Keyboard (layout C, owner decision 2026-10-20): while a sheet field has focus the
     sheet collapses to a 96 px composer above the keyboard — a 40 px subtab row (Text ·
     Style · Color · Position, the same buttons) and the focused field (56 px). The page
     header, sheet grip and head, Undo/Redo and the transport are hidden; Done becomes a
     pill over the canvas (top right) and finishes typing; the canvas takes the whole room
     above the composer at full width. assets/editor_quick_controls.js owns --sp-keyboard-h
     (the sheet's offset above the keyboard) and --sp-keyboard-reserve (keyboard + composer,
     the stage's height reserve); it keeps the page unscrolled. */
  #editor-workspace-root[data-keyboard="true"]:not([data-tool="home"]) #editor-tools.sp-editor-sheet {
    height: 102px; bottom: var(--sp-keyboard-h, 0px); border-radius: 0; box-shadow: none; border-top: 1px solid var(--sp-border-strong);
  }
  #editor-workspace-root[data-keyboard="true"] :is(.sp-editor-sheet-grip, #editor-undo, #editor-redo, .sp-editor-sheet-name, .sp-editor-edit-tools, .sp-preview-boxes-toggle) { display: none; }
  /* 102 = 1 border + 40 subtab row + 6 gap + 44 field + 11 bottom padding. The padding keeps
     the field's focus ring (border + ~4 px outline) clear of the keyboard's edge even when the
     browser rounds the keyboard inset by a few px (round 2 on the owner's phone, 2026-10-27). */
  #editor-workspace-root[data-keyboard="true"] .sp-editor-sheet-body { padding: 0 12px 11px; gap: 0; overflow: hidden; }
  /* `:not(#editor-panel-text)` in zzzz_explore_quick_controls.css counts as an id: match it. */
  #editor-workspace-root[data-keyboard="true"] #editor-tool-content, #editor-workspace-root[data-keyboard="true"] #editor-tool-content > :not(#editor-panel-text) { padding: 0; }
  #editor-workspace-root[data-keyboard="true"] .sp-editor-subtabs { height: 40px; padding: 0; gap: 0; }
  #editor-workspace-root[data-keyboard="true"] .sp-editor-subtab { flex: 1 1 0; min-width: 0; height: 40px; min-height: 40px; padding: 0; gap: 0; border-bottom-width: 2px; font: 500 12px/40px var(--sp-font-ui); }
  #editor-workspace-root[data-keyboard="true"] .sp-editor-subtab .sp-editor-icon { display: none; }
  #editor-workspace-root[data-keyboard="true"] .sp-editor-subtab-body { margin-top: 6px; gap: 0; }
  #editor-workspace-root[data-keyboard="true"] .sp-editor-sheet-body :is(.sp-editor-row, .sp-editor-caption, .sp-editor-section-title, .sp-editor-more-block, .sp-editor-shared, .mantine-Accordion-root):not(:focus-within) { display: none; }
  /* Autosized textareas carry an inline height: the composer's field is always one 44 px line. */
  #editor-workspace-root[data-keyboard="true"] #editor-tools.sp-editor-sheet .sp-editor-sheet-body :is(.mantine-Textarea-input, .mantine-TextInput-input, .mantine-Input-input):focus { height: 44px !important; min-height: 44px !important; max-height: 44px !important; padding: 12px !important; border-color: var(--sp-accent) !important; overflow: hidden; }
  #editor-workspace-root[data-keyboard="true"] .sp-editor-sheet-body :is(.mantine-InputWrapper-label, .mantine-InputWrapper-description, .mantine-InputWrapper-error) { display: none; }
  /* The canvas owns everything above the composer: no header, no transport, full width. */
  body:where([data-sp-has~="editor-keyboard"]):not(#sp-s):not(.sp-s) { overflow: hidden; }
  #editor-workspace-root[data-mode="design"][data-keyboard="true"]:not([data-tool="home"]) .sp-editor-workspace .sp-preview-stage-wrap { --sp-preview-height-reserve: var(--sp-keyboard-reserve, 402px); }
}

/* ==========================================================================
   DESKTOP (>= 768): the same categories as a vertical rail in the right
   column; one category's content at a time, no sheet.
   ========================================================================== */
@media (min-width: 768px), (min-width: 600px) and (min-aspect-ratio: 10/13) {
  /* The one owner of the inspector width. `data-panel-dock` (full | rail) is set by
     assets/editor_quick_controls.js: `rail` keeps only the category rail (icons, no
     labels), so the chart column takes the rest (collapsible like a chat app's sidebar). */
  #editor-workspace-root[data-mode="design"] { --editor-rail-width: 88px; --editor-panel-width: clamp(340px, 34vw, 400px); }
  #editor-workspace-root[data-mode="design"][data-panel-dock="rail"] { --editor-rail-width: 56px; --editor-panel-width: var(--editor-rail-width); }
  #editor-workspace-root[data-mode="design"] .sp-editor-workspace .sp-editor-columns { grid-template-columns: minmax(0, 1fr) var(--editor-panel-width); }
  #editor-workspace-root #editor-tools.sp-editor-sheet { width: var(--editor-panel-width); max-width: var(--editor-panel-width); box-sizing: border-box; }
  #editor-workspace-root[data-panel-dock="rail"] #editor-tools.sp-editor-sheet > :not(#editor-category-bar):not(.sp-editor-sheet-head) { display: none !important; }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet {
    display: grid; grid-template-columns: var(--editor-rail-width) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto;
    padding: 0; border-left: 1px solid var(--sp-border); background: var(--sp-chrome); overflow: hidden; animation: none;
  }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet .sp-editor-category-bar {
    grid-column: 1; grid-row: 1 / -1; flex-direction: column; height: auto; padding: 12px 8px; overflow-y: auto; overflow-x: hidden;
    border-top: 0; border-right: 1px solid var(--sp-border); background: transparent;
  }
  #editor-workspace-root .sp-editor-category-bar .sp-editor-category,
  #editor-workspace-root .sp-editor-category-bar :is(#editor-open-filters, #editor-open-data) { width: 72px; height: 62px; }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet .sp-editor-sheet-grip { display: none; }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet .sp-editor-sheet-head { grid-column: 2; grid-row: 1; height: 48px; min-height: 48px; padding: 12px 8px 0 20px; }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet .sp-editor-sheet-name { font: 600 16px/20px var(--sp-font-ui); }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet #editor-sheet-done { display: none; }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet .sp-editor-subtabs { padding: 4px 12px 0; }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet .sp-editor-sheet-body { grid-column: 2; grid-row: 3; overflow: auto; overscroll-behavior: contain; padding: 12px 20px 20px; gap: 6px; }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet #editor-btn-apply-filters { grid-column: 2; grid-row: 4; }
  #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet #editor-tool { grid-column: 2; grid-row: 2; }
  /* The dock toggle is the rail's first item, so nothing can cover it or scroll it away. */
  #editor-workspace-root .sp-editor-category-bar .sp-editor-dock-toggle {
    box-sizing: border-box; display: flex; flex: none; order: -1; align-items: center; justify-content: center; width: 72px; height: 40px;
    margin: 0 0 4px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--sp-text-2); cursor: pointer;
  }
  #editor-workspace-root .sp-editor-category-bar .sp-editor-dock-toggle:hover { color: var(--sp-text); background: var(--sp-surface); }
  /* Mirror of the left Filters dock glyph: the chevron follows `aria-expanded` (zzz_editor_data_panel.css). */
  #editor-workspace-root .sp-editor-dock-toggle > .sp-data-panel-icon { display: block; width: 20px; height: 20px; background: currentColor; transform: scaleX(-1); }
  /* Short windows: the rail must fit without scrolling, so the items tighten. */
  @media (max-height: 860px) {
    #editor-workspace-root.is-placed #editor-tools.sp-editor-sheet .sp-editor-category-bar { padding: 8px; gap: 0; }
    #editor-workspace-root .sp-editor-category-bar .sp-editor-category,
    #editor-workspace-root .sp-editor-category-bar :is(#editor-open-filters, #editor-open-data) { height: 52px; }
  }
  /* Collapsed rail: icons only, 56 px wide; Undo and Redo sit at its foot (the rest of the header goes with the panel). */
  #editor-workspace-root[data-panel-dock="rail"].is-placed #editor-tools.sp-editor-sheet .sp-editor-category-bar { grid-row: 1 / 4; padding: 8px 6px; align-items: center; }
  #editor-workspace-root[data-panel-dock="rail"] .sp-editor-category-bar .sp-editor-category,
  #editor-workspace-root[data-panel-dock="rail"] .sp-editor-category-bar :is(#editor-open-filters, #editor-open-data),
  #editor-workspace-root[data-panel-dock="rail"] .sp-editor-category-bar .sp-editor-dock-toggle { width: 44px; height: 44px; }
  #editor-workspace-root[data-panel-dock="rail"] .sp-editor-category-bar .sp-editor-category > span:not(.sp-editor-icon) { display: none; }
  #editor-workspace-root[data-panel-dock="rail"].is-placed #editor-tools.sp-editor-sheet .sp-editor-sheet-head {
    grid-column: 1; grid-row: 4; height: auto; min-height: 0; padding: 4px 2px 8px; justify-content: center; border-right: 1px solid var(--sp-border);
  }
  #editor-workspace-root[data-panel-dock="rail"] .sp-editor-sheet-head > :not(.sp-editor-edit-tools),
  #editor-workspace-root[data-panel-dock="rail"] .sp-editor-sheet-head :is(#editor-save, #editor-open-export) { display: none !important; }
  #editor-workspace-root[data-panel-dock="rail"] .sp-editor-sheet-head :is(#editor-undo, #editor-redo) { width: 26px; height: 32px; min-height: 32px; flex: 0 0 26px; }
}
/* Create post on desktop (layout 2 "Lišta u kraje", owner 2026-11-24): the inspector is a column from the header
   band to the bottom edge, flush right, and the category rail is its outer edge (80 px, the mirror of the main bar
   on the left). The panel opens between the canvas and the rail, so the rail never moves, never changes size and
   keeps its labels when the panel docks. Colours under the Home look: zzzzzzzzzzzzzzzzzzzz_explore_home_look.css. */
@media (min-width: 1100px) {
  #editor-workspace-root[data-mode="design"][data-chrome="explore"] { --editor-rail-width: 80px; --editor-panel-width: 400px; }
  #editor-workspace-root[data-mode="design"][data-chrome="explore"][data-panel-dock="rail"] { --editor-rail-width: 80px; --editor-panel-width: 80px; }
  #editor-workspace-root[data-mode="design"][data-chrome="explore"].is-placed #editor-tools.sp-editor-sheet {
    grid-template-columns: minmax(0, 1fr) var(--editor-rail-width); height: 100%;
    border: 0; border-left: 1px solid var(--hl-rim, var(--sp-border)); border-radius: 0;
  }
  #editor-workspace-root[data-mode="design"][data-chrome="explore"].is-placed #editor-tools.sp-editor-sheet .sp-editor-category-bar {
    grid-column: 2; grid-row: 1 / -1; padding: 8px 4px; align-items: center;
    border-right: 0; border-left: 1px solid var(--hl-rim, var(--sp-border));
  }
  #editor-workspace-root[data-mode="design"][data-chrome="explore"].is-placed #editor-tools.sp-editor-sheet :is(.sp-editor-sheet-head, .sp-editor-sheet-body, #editor-tool, #editor-btn-apply-filters) { grid-column: 1; }
  /* Docked: the same rail, its labels and sizes kept; the panel's header goes with the panel. */
  #editor-workspace-root[data-mode="design"][data-chrome="explore"][data-panel-dock="rail"] .sp-editor-category-bar .sp-editor-category,
  #editor-workspace-root[data-mode="design"][data-chrome="explore"][data-panel-dock="rail"] .sp-editor-category-bar :is(#editor-open-filters, #editor-open-data) { width: 72px; height: 62px; }
  #editor-workspace-root[data-mode="design"][data-chrome="explore"][data-panel-dock="rail"] .sp-editor-category-bar .sp-editor-category > span:not(.sp-editor-icon) { display: block; }
  #editor-workspace-root[data-mode="design"][data-chrome="explore"][data-panel-dock="rail"] .sp-editor-category-bar .sp-editor-dock-toggle { width: 72px; height: 40px; }
  #editor-workspace-root[data-mode="design"][data-chrome="explore"][data-panel-dock="rail"].is-placed #editor-tools.sp-editor-sheet .sp-editor-sheet-head { display: none; }
}
@media (min-width: 1100px) and (max-height: 860px) {
  #editor-workspace-root[data-mode="design"][data-chrome="explore"][data-panel-dock="rail"] .sp-editor-category-bar .sp-editor-category,
  #editor-workspace-root[data-mode="design"][data-chrome="explore"][data-panel-dock="rail"] .sp-editor-category-bar :is(#editor-open-filters, #editor-open-data) { height: 52px; }
}
/* Phone: the sheet has no dock (a bottom bar, not a rail). */
.sp-editor-dock-toggle { display: none; }

/* ==========================================================================
   SELECTION FROM THE CATEGORY (stage 3): Title / Subtitle / Chart / Time label
   select their section; only that box is shown, with the spec outline and a
   round corner handle (44 px on touch). Other tools keep every box hidden.
   ========================================================================== */
#editor-workspace-root .sp-section-layout-editor .sp-section-layout-box:not(.is-selected) { visibility: hidden; pointer-events: none; }
/* The overlay is inside the uniformly scaled stage: screen sizes divide by --sp-preview-scale. */
#editor-workspace-root .sp-section-layout-editor { --sp-handle: 28px; --sp-outline: 1.5px; --sp-outline-gap: 2px; }
#editor-workspace-root .sp-section-layout-editor .sp-section-layout-box.is-selected {
  outline: calc(var(--sp-outline) / var(--sp-preview-scale, 1)) solid var(--sp-accent);
  outline-offset: calc(var(--sp-outline-gap) / var(--sp-preview-scale, 1));
  border-color: transparent; background: transparent; box-shadow: none;
}
#editor-workspace-root .sp-section-layout-editor .sp-section-layout-selection-ring { visibility: hidden; }
#editor-workspace-root .sp-section-layout-editor .sp-section-layout-box.is-selected .sp-section-layout-handle,
#editor-workspace-root .sp-section-layout-editor .sp-section-layout-box.is-interacting .sp-section-layout-handle {
  display: block; box-sizing: border-box;
  width: calc(var(--sp-handle) / var(--sp-preview-scale, 1)); height: calc(var(--sp-handle) / var(--sp-preview-scale, 1));
  right: calc(var(--sp-handle) / var(--sp-preview-scale, 1) / -2); bottom: calc(var(--sp-handle) / var(--sp-preview-scale, 1) / -2);
  border-radius: 50%; background: var(--sp-accent); border: calc(2px / var(--sp-preview-scale, 1)) solid var(--sp-bg); box-shadow: none;
}
@media (pointer: coarse) {
  /* Owner 2026-10-20: a 44 px dot is too much on the phone. The dot is 24 px; the 44 px
     touch target lives in an invisible ::before (the runtime resolves the handle through
     closest('[data-resize-handle]'), so a touch on the halo still starts a resize). */
  #editor-workspace-root .sp-section-layout-editor { --sp-handle: 24px; }
  #editor-workspace-root .sp-section-layout-editor .sp-section-layout-handle::before {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: calc(44px / var(--sp-preview-scale, 1)); height: calc(44px / var(--sp-preview-scale, 1));
    transform: translate(-50%, -50%); border-radius: 50%;
  }
}
#editor-workspace-root[data-tool="annotations"] .sp-section-layout-editor .sp-section-layout-box.is-selected { visibility: hidden; pointer-events: none; }
#editor-workspace-root .sp-section-layout-editor[data-chrome-visible="false"] .sp-section-layout-box.is-selected { outline-color: transparent; }
#editor-workspace-root .sp-section-layout-editor[data-chrome-visible="false"] .sp-section-layout-box.is-selected .sp-section-layout-handle { display: none; }

/* ==========================================================================
   CREATE POST HEADER ON PHONES (stage 4, D-2): Back · name · Save · Export in
   one 48 px row. Chart kind, Total, Format, Filters and Players leave the
   header for Chart › Type, Canvas › Format and the Data item of the bar.
   Desktop keeps the Explore header as it is.
   ========================================================================== */
@media (max-width: 599px), (max-width: 767px) and (max-aspect-ratio: 10/13) {
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell :is(.cmp-workbench-slot, #cmp-summary-row, #cmp-title, #cmp-filter-summary) { display: none; }
  /* The site header (brand, account) is not part of the Create post screen; the
     48 px actions row is the whole header on phones. */
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) { --sp-header-h: 0px; }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) .sp-top-header { display: none; }
  /* Stage 6 wraps Back and the actions for Browse; here the wrapper is transparent and
     the flex order keeps Back · name · Save · Export. */
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-head-actions { display: contents; }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-back.sp-editor-icon-button { order: 0; }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-workspace-heading { order: 1; }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-workspace-actions { order: 2; }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head.sp-editor-topbar {
    display: flex; align-items: center; gap: 8px; box-sizing: border-box; height: 48px; min-height: 48px;
    margin: -16px -16px 0; padding: 0 10px 0 4px; background: var(--sp-chrome); border-bottom: 1px solid var(--sp-border);
  }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-back.sp-editor-icon-button {
    position: static; display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--sp-text);
  }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-workspace-heading { flex: 1 1 auto; min-width: 0; margin: 0 0 0 2px; padding: 0; }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-workspace-title.sp-editor-topbar-name {
    display: block; margin: 0; font: 600 14px/20px var(--sp-font-ui); letter-spacing: 0; color: var(--sp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-workspace-actions { display: flex; align-items: center; gap: 0; margin: 0; flex: none; }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-workspace-actions button {
    display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: auto; min-width: 0; height: 32px; min-height: 32px;
    margin: 0; border: 0; border-radius: 999px; font: 600 14px/32px var(--sp-font-ui); white-space: nowrap;
  }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head .cmp-workspace-actions button::before { display: none; }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head #cmp-workspace-save.sp-editor-ghost { padding: 0 12px; background: transparent; color: var(--sp-text); }
  body:where([data-sp-has~="editor-explore-design"]):not(#sp-s):not(.sp-s):not(.sp-s):not(.sp-s) #compare-shell.sp-data-shell .cmp-head #cmp-workspace-export.sp-editor-pill { padding: 0 15px; font-weight: 700; background: var(--sp-text); color: var(--sp-bg); }
}

/* Background pill section of Chart > Data labels: one block with its own rule above, rows indented like "More" ---- */
.sp-editor-pill-section { margin-top: 2px; border-top: 1px solid var(--sp-border); padding-top: 2px; }
.sp-editor-pill-section > .sp-editor-row:first-child .sp-editor-row-label { font-weight: 600; }
.sp-editor-pill-section .sp-editor-sub { margin-top: 2px; }
/* Four options need the room the generic 60 % cap would take away. */
#editor-workspace-root .sp-editor-row.sp-editor-row--corners > :last-child { flex: 1 1 auto; max-width: none; min-width: 0; }
#editor-workspace-root #editor-tools.sp-editor-sheet .sp-editor-row--corners .mantine-SegmentedControl-label { padding: 0 4px !important; }

/* Rows stay label-left / control-right whatever the factory's row class says. */
#editor-workspace-root .sp-editor-row, #editor-workspace-root .sp-editor-row.sp-ft-row--toggle,
#editor-workspace-root .sp-editor-row.sp-ft-row--number, #editor-workspace-root .sp-editor-row.sp-ft-row--input {
  display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; text-align: left;
}
#editor-workspace-root .sp-editor-row > .sp-editor-row-label { flex: 1 1 auto; min-width: 0; margin: 0; }
#editor-workspace-root .sp-editor-row > :last-child { margin: 0; }
#editor-workspace-root .sp-editor-row .mantine-Switch-root, #editor-workspace-root .sp-editor-row .mantine-Switch-body { margin: 0; }
@media (max-width: 599px), (max-width: 767px) and (max-aspect-ratio: 10/13) {
  /* The transport spans the column; it does not shrink with the scaled canvas. */
  #editor-workspace-root[data-mode="design"] #editor-canvas-column .sp-transport-bar { width: auto !important; max-width: none !important; margin-inline: 0 !important; }
}
