.target-trigger{position:absolute;right:var(--edge,24px);top:20px;z-index:5;border:1px solid #d9c9f8;border-radius:12px;background:#fff;color:#5d27d6;min-height:44px;padding:10px 18px;font:600 15px/1.3 system-ui;cursor:pointer}
.target-trigger:disabled{opacity:.55;cursor:wait}
.target-open .viewer-tools{display:none}.target-trigger[aria-expanded=true]{visibility:hidden}
.target-panel{position:fixed;z-index:18;right:20px;top:84px;width:340px;max-height:calc(100dvh - 280px);overflow-y:auto;padding:20px;border:1px solid #d9c9f8;border-radius:16px;background:#fff;color:#251b35;font:14px/1.5 system-ui;box-sizing:border-box}
.target-panel[hidden],.target-panel [hidden]{display:none!important}
.target-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.target-panel h2{font:650 21px/1.2 system-ui;margin:0}
.target-panel p{margin:0 0 16px}.target-panel .target-note{font-size:12px;color:#655570;margin:12px 0 18px}
.target-panel label{display:block;font-weight:600;margin-bottom:6px}
.target-panel select{width:100%;min-height:44px;border:1px solid #cbbdde;border-radius:8px;background:white;color:inherit;font:inherit;padding:8px}
.target-panel #target-style{margin-bottom:18px}
.target-panel button{min-height:44px;border:1px solid #d8caec;border-radius:8px;background:#fff;color:#5924ce;font:600 13px/1.3 system-ui;padding:8px 12px;cursor:pointer}
.target-panel .target-primary{background:#6932f5;color:#fff;border-color:#6932f5;width:100%}
.target-panel .target-close{padding:6px;border:0;min-width:44px}
.target-panel button:disabled{opacity:.45;cursor:default}
.target-panel :is(button,select),.target-trigger{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}
.target-panel :is(button,select):is(:focus,:focus-visible),.target-trigger:is(:focus,:focus-visible){outline:none;box-shadow:none}
.target-status{margin-top:16px!important;min-height:42px;color:#4d3c61}
.target-panel progress{width:100%;height:8px;accent-color:#7037ff;margin:0 0 18px}
.target-controls{display:flex;gap:8px}.target-controls button{flex:1}
/* Keep the editor row stable as playback controls appear; the panel scrolls below it. */
@media(max-width:800px){.target-trigger{top:12px;right:12px;font-size:13px;padding:8px 12px}body.target-open:not([data-mode=hero]) main:has(#stage){height:auto;min-height:100svh;grid-template-rows:auto clamp(300px,42svh,460px) auto;align-content:start}.target-panel{position:relative;grid-column:1;grid-row:3;align-self:start;min-height:0;top:auto;bottom:auto;left:auto;right:auto;width:auto;margin:8px 12px 12px;max-height:44svh;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;padding:16px}.target-panel h2{font-size:19px}.target-panel .target-intro{display:none}.target-panel .target-note{margin-bottom:10px}.target-panel .target-status{min-height:0;margin-bottom:10px}.target-top{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){.target-panel *{scroll-behavior:auto}}
