.ae-root[hidden], .ae-root [hidden] { display: none !important; }
.ae-root { color: var(--text); font: 13px/1.45 var(--sans); }
.ae-toolbar { position: fixed; inset: 0 0 auto; z-index: 1100; padding: calc(8px + env(safe-area-inset-top)) max(14px, calc((100vw - 1000px)/2)) 8px; background: var(--elev); border-bottom: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.ae-heading, .ae-versions, .ae-actions, .ae-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ae-heading strong { font-size: 15px; }
.ae-heading > span { color: var(--muted); }
.ae-heading > button { margin-left: auto; font-size: 24px; width: 36px; height: 36px; }
.ae-versions label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 180px; }
.ae-versions select { min-width: 120px; max-width: 270px; width: 100%; }
.ae-root button, .ae-root select, .ae-root input { font: inherit; color: inherit; }
.ae-toolbar button, .ae-inspector button, .ae-toolbar summary { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--bg); cursor: pointer; }
.ae-toolbar select, .ae-inspector input { background: var(--bg); border: 1px solid var(--border-strong); padding: 9px; border-radius: 9px; }
.ae-actions { margin-top: 8px; }
.ae-actions .ae-primary { background: var(--s-cta-bg, var(--text)); color: var(--s-cta-text, var(--bg)); border-color: transparent; margin-left: auto; }
.ae-status { color: var(--muted); font-size: 11px; margin-top: 7px; gap: 6px 14px; }
.ae-status .error { color: var(--danger); }
.ae-toolbar details { position: relative; }
.ae-toolbar details > div { position: absolute; z-index: 1; right: 0; top: 100%; display: grid; gap: 6px; background: var(--elev); box-shadow: var(--shadow); padding: 8px; border-radius: 10px; min-width: 180px; }
body.ae-active[data-skin="sora"] #sora { top: var(--ae-toolbar-height, 180px); height: calc(100% - var(--ae-toolbar-height, 180px)); }
.ae-layer { position: fixed; inset: 0; z-index: 1050; pointer-events: none; overflow: hidden; }
.ae-target { position: absolute; border: 1px dashed var(--s-gold2, #b8964f); border-radius: 7px; pointer-events: none; }
.ae-target.selected { border: 2px solid var(--s-text, #17304f); }
.ae-handle { position: absolute; right: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; pointer-events: auto; color: var(--s-cta-text, #faf7f0) !important; background: var(--s-cta-bg, #17304f); border: 2px solid var(--elev); border-radius: 50%; box-shadow: 0 2px 8px #0002; cursor: pointer; }
.ae-handle svg { width: 17px; height: 17px; }
.ae-inspector { position: fixed; z-index: 1120; bottom: calc(78px + env(safe-area-inset-bottom)); left: max(12px, calc((100vw - 520px)/2)); right: max(12px, calc((100vw - 520px)/2)); max-height: 45dvh; overflow: auto; padding: 14px; background: var(--elev); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow); }
.ae-inspector-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ae-inspector label { display: grid; gap: 8px; }
.ae-inspector input { width: 100%; min-width: 0; }
.ae-inspector [data-ae-text-save] { margin-top: 10px; }
.ae-image-actions { display: flex; gap: 8px; margin: 12px 0 8px; }
.ae-inspector small { color: var(--muted); }
.ae-root button:disabled { opacity: .45; cursor: default; }
.ae-root :focus-visible { outline: 3px solid var(--s-gold2, #b8964f); outline-offset: 2px; }
@media (max-width: 600px) {
  .ae-toolbar { padding-left: 10px; padding-right: 10px; }
  .ae-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .ae-actions .ae-primary { margin: 0; }
  .ae-toolbar button, .ae-toolbar summary { min-height: 38px; padding: 7px 9px; font-size: 12px; }
  .ae-heading > button { min-height: 32px; padding: 0; font-size: 24px; }
  .ae-versions label { min-width: 140px; }
  .ae-versions select { padding: 8px; }
  .ae-status { max-height: 34px; overflow: auto; }
}
