/* Mobile r5 chrome around the original shared export controls and actions. */
#editor-export .sp-export-body, #editor-export .sp-export-footer { display: contents; }
#editor-export .sp-export-body > details { order: 1; }
@media (max-width: 599px), (max-width: 767px) and (max-aspect-ratio: 10/13) {
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #cmp-workspace-export { border-radius: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) .cmp-workspace-actions::after { content: ''; position: absolute; left: -5px; right: -5px; bottom: 0; height: 1px; background: #202127; pointer-events: none; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export { padding: 0; border: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%; background: transparent; color: #f2efe9; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .cmp-export-scrim { background: transparent; backdrop-filter: brightness(.4666666667); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .cmp-export-card { bottom: 0; top: auto; left: 0; right: 0; transform: none; width: 100%; max-width: none; max-height: 82dvh; padding: 0; gap: 0; border: 0; border-radius: 20px 20px 0 0; overflow: hidden; background: #17191f; animation: none; box-shadow: 0 -8px 30px #0003; font: 400 14px/1.4 var(--sp-font-ui); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .cmp-export-card::before { content: ''; display: block; flex: 0 1 auto; width: 30px; height: 3px; border-radius: 3px; margin: 7px auto 2px; background: #7c818b; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .cmp-export-head { flex: none; height: 56px; min-height: 56px; padding: 10px 18px 2px; gap: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .cmp-export-title { margin: 0; color: #f2efe9; font: 700 22px/1.4 var(--sp-font-display); letter-spacing: -.025em; outline: none; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-export-close { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 1px 6px; border: 0; border-radius: 0; background: transparent; color: #cac7c0; font: 400 12px/1.4 var(--sp-font-ui); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export :is(#editor-export-content,#editor-panel-export,#editor-save-card) { display: contents; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-body { display: block; flex: 0 1 auto; min-height: 0; padding: 10px 18px 8px; overflow-y: auto; overscroll-behavior: contain; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-footer { display: block; flex: none; padding: 12px 18px calc(14px + env(safe-area-inset-bottom,0px)); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-output-summary,
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-body > .sp-export-help:not(.sp-export-publish-note),
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-frame-rate-field > .sp-export-help { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export :is(.mantine-RadioGroup-label,.sp-export-frame-rate-field > .sp-export-field-label) { display: block; margin: 0 0 8px; padding: 0; font: 600 14px/1.4 var(--sp-font-ui) !important; color: #f2efe9; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-body > .mantine-RadioGroup-root > .mantine-RadioGroup-label { margin-top: 4px; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-quality-options { display: flex; gap: 6px; margin: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-quality-options .mantine-Radio-root { position: relative; padding: 0; border: 0; border-radius: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-quality-options .mantine-Radio-inner { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-quality-options .mantine-Radio-radio { width: 100%; height: 100%; cursor: pointer; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-quality-options .mantine-Radio-labelWrapper { padding: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-quality-options .mantine-Radio-description { display: none; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-quality-options .mantine-Radio-label,
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-video-export-fps .mantine-SegmentedControl-label { display: flex; align-items: center; justify-content: center; height: 44px; min-height: 44px; padding: 8px 11px; border: 1px solid #3a3c45; border-radius: 6px; background: transparent; color: #f2efe9 !important; font: 400 12px/1.4 var(--sp-font-ui) !important; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-quality-options .mantine-Radio-root:has(input:checked) .mantine-Radio-label,
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-video-export-fps .mantine-SegmentedControl-control:has(input:checked) .mantine-SegmentedControl-label { background: #f2efe9; color: #0d0e12 !important; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-quality-options .mantine-Radio-root:has(input:focus-visible) .mantine-Radio-label { outline: 2px solid var(--sp-accent); outline-offset: 3px; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-disclosure { border: 0; border-top: 1px solid #353840; border-radius: 0; margin: 14px 0 0; padding: 0; font: 400 14px/1.4 var(--sp-font-ui); color: #f2efe9; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-disclosure > summary { display: list-item; padding: 14px 0; min-height: 0; font: 400 13px/1.4 var(--sp-font-ui); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-frame-rate-field { display: block; margin-top: 14px; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-video-export-fps { display: flex; width: 100%; gap: 6px; padding: 0 !important; border: 0 !important; background: transparent !important; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-video-export-fps .mantine-SegmentedControl-control { flex: none; border: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-video-export-fps .mantine-SegmentedControl-control::before,
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-video-export-fps .mantine-SegmentedControl-indicator { display: none; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-video-export-fps .mantine-SegmentedControl-innerLabel { font: inherit !important; color: inherit !important; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-publish-note { margin: 16px 0 0; color: #b8b4ac; font: 400 13px/1.4 var(--sp-font-ui); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-submit { width: 100%; height: 44px; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 7px; background: var(--sp-accent); color: #0d0e12; font: 600 14px/1.4 var(--sp-font-ui); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-submit .mantine-Button-label { font: 600 14px/1.4 var(--sp-font-ui) !important; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-submit { border: 0 !important; border-radius: 7px !important; overflow: hidden; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-extra-quality { display: block; padding: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-extra-quality .mantine-Radio-body { display: flex; align-items: center; gap: 8px; min-height: 44px; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-extra-quality .mantine-Radio-inner { position: static; flex: none; width: 21px; height: 16px; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-extra-quality .mantine-Radio-radio { position: static; appearance: auto; width: 13px; height: 13px; min-height: 0; padding: 0; margin: 3px 3px 0 5px; border: initial; border-radius: initial; background: initial; accent-color: var(--sp-accent); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-extra-quality .mantine-Radio-icon { display: none; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-extra-quality .mantine-Radio-labelWrapper { padding: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-extra-quality .mantine-Radio-label { padding: 0; font: 400 13px/1.4 var(--sp-font-ui) !important; color: #f2efe9; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .sp-export-disclosure > .mantine-CheckboxGroup-root { margin-bottom: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .mantine-CheckboxGroup-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .mantine-Checkbox-body { display: flex; align-items: center; gap: 8px; min-height: 44px; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .mantine-Checkbox-inner { position: static; flex: none; width: 20px; height: 19px; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .mantine-Checkbox-input { position: static; appearance: auto; width: 13px; height: 13px; min-height: 0; padding: 0; margin: 3px 3px 3px 4px; border: initial; border-radius: initial; background: initial; accent-color: var(--sp-accent); }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .mantine-Checkbox-icon { display: none; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .mantine-Checkbox-labelWrapper { padding: 0; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export .mantine-Checkbox-label { padding: 0; font: 400 13px/1.4 var(--sp-font-ui) !important; color: #f2efe9; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-btn-save-selection { margin: 0 !important; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; min-height: 40px; padding: 8px 10px; border: 1px solid #2a2c33; border-radius: 7px; background: #101117; color: #f2efe9; font: 500 14px/1.4 var(--sp-font-ui) !important; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-btn-save-selection .mantine-Button-label { color: #f2efe9 !important; font: 500 14px/1.4 var(--sp-font-ui) !important; }
  body.sp-explore-final:where([data-sp-has~="app"]):not(#sp-s) #editor-export #editor-btn-save-selection .mantine-Button-section { display: none; }
}

/* Gate: a signed-out visitor sees every export setting; the submit is replaced by a sign-in link (data-authenticated is server-set). */
#editor-export .sp-export-signin { display:none; }
#editor-export[data-authenticated='false'] #editor-btn-export-video { display:none; }
#editor-export[data-authenticated='false'] .sp-export-footer .sp-export-signin { display:flex; align-items:center; justify-content:center; box-sizing:border-box; width:100%; min-height:46px; padding:10px 16px; border-radius:7px; background:var(--sp-accent); color:#0d0e12; font:600 14px/1.4 var(--sp-font-ui); text-decoration:none; }
#editor-export .sp-export-signin:focus-visible { outline:2px solid var(--sp-accent); outline-offset:2px; }
