/* Shared Prime Creation floating edge pill. Native editor remains authoritative. */
.rd-root[hidden],.rd-tab[hidden],.rd-capsule[hidden]{display:none!important}
.rd-root{position:fixed!important;z-index:2147481700!important;width:0;height:0;pointer-events:none;contain:layout style;box-sizing:border-box;color:#edfbff;font-family:system-ui,-apple-system,sans-serif}
.rd-tab,.rd-capsule{position:absolute;pointer-events:auto;box-sizing:border-box;
 border:1px solid rgba(153,229,249,.54);background:linear-gradient(135deg,rgba(20,53,73,.97),rgba(3,14,25,.985) 65%,rgba(14,44,60,.97));
 color:#eefcff;box-shadow:inset 0 1px rgba(255,255,255,.19),inset 0 -2px rgba(64,168,206,.08),0 9px 30px #0009;
 -webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}
.rd-tab{display:flex;align-items:center;justify-content:center;gap:4px;
 min-width:57px;min-height:51px;padding:8px 10px;border-radius:18px;
 font-weight:850;font-size:10px;letter-spacing:.11em;touch-action:none;cursor:grab;user-select:none}
.rd-tab>span:first-child{font-size:22px;line-height:1}
.rd-tab>span:last-child{font-size:9px;letter-spacing:.1em}
.rd-tab:active,.rd-grip:active{cursor:grabbing}
.rd-capsule{min-width:184px;max-width:min(91vw,480px);max-height:min(72dvh,590px);
 border-radius:23px;padding:8px;display:grid;gap:6px;overflow:hidden}
.rd-root[data-edge="top"] :is(.rd-tab,.rd-capsule){transform:translate(-50%,8px)}
.rd-root[data-edge="bottom"] :is(.rd-tab,.rd-capsule){transform:translate(-50%,calc(-100% - 9px))}
.rd-root[data-edge="left"] :is(.rd-tab,.rd-capsule){transform:translate(8px,-50%)}
.rd-root[data-edge="right"] :is(.rd-tab,.rd-capsule){transform:translate(calc(-100% - 8px),-50%)}
.rd-root[data-edge="right"] .rd-tab,.rd-root[data-edge="left"] .rd-tab{writing-mode:vertical-rl;min-width:29px;min-height:75px;border-radius:12px}
.rd-root[data-edge="right"] .rd-tab>span:first-child,.rd-root[data-edge="left"] .rd-tab>span:first-child{font-size:18px}
.rd-root[data-edge="left"] .rd-tab{transform:translate(8px,-50%) rotate(180deg)}
.rd-root[data-view="compact"] .rd-capsule{max-width:min(92vw,365px)}
.rd-root[data-view="expanded"] .rd-capsule{width:min(91vw,420px)}
.rd-head{display:flex;align-items:center;gap:6px;min-height:30px}
.rd-grip,.rd-control,.rd-nav button,.rd-action,.rd-foot button{touch-action:manipulation;font:750 11px/1.2 system-ui,sans-serif;color:#e4f9ff;background:#122d40;border:1px solid rgba(120,204,235,.26);cursor:pointer}
.rd-grip{cursor:grab;touch-action:none;letter-spacing:1px;border-radius:12px;min-width:38px;min-height:32px;color:#92eafa;background:#174359}
.rd-heading{font:850 10px/1.1 system-ui,sans-serif;letter-spacing:.16em;margin-right:auto;padding:0 4px;color:#b8def0}
.rd-control{min-width:33px;min-height:33px;border-radius:12px;font-size:16px}
.rd-nav{display:flex;gap:5px;min-width:0;overflow-x:auto;scrollbar-width:none}
.rd-nav::-webkit-scrollbar,.rd-actions::-webkit-scrollbar{display:none}
.rd-nav button{flex:1 0 auto;min-width:48px;min-height:36px;padding:7px 10px;border-radius:999px}
.rd-nav button.selected{color:#f8ffff;background:linear-gradient(150deg,#215d75,#153647);border-color:#7cddf3}
.rd-actions{display:flex;align-items:stretch;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;min-width:0}
.rd-action{flex:1 0 auto;display:flex;gap:5px;align-items:center;justify-content:center;
 padding:8px 9px;min-height:43px;min-width:54px;border-radius:15px;white-space:nowrap}
.rd-action span:first-child{font-size:16px;color:#9de9f7}
.rd-action span:last-child{font-size:11px}
.rd-foot{display:flex;gap:6px}
.rd-foot button{flex:1;padding:8px;min-height:38px;border-radius:12px}
.rd-root[data-view="compact"] .rd-nav,.rd-root[data-view="compact"] .rd-foot{display:none!important}
.rd-root[data-view="expanded"] .rd-actions{flex-wrap:wrap;align-content:start;overflow-y:auto;max-height:min(38dvh,310px)}
.rd-root[data-view="expanded"] .rd-action{flex:1 0 calc(33.333% - 5px);min-width:82px;white-space:normal;flex-direction:column;gap:4px;text-align:center}
.rd-root[data-edge="right"] .rd-capsule,.rd-root[data-edge="left"] .rd-capsule{max-width:min(82vw,350px)}
.rd-root[data-edge="right"][data-view="compact"] .rd-capsule,.rd-root[data-edge="left"][data-view="compact"] .rd-capsule{max-width:min(72vw,195px)}
.rd-root[data-edge="right"][data-view="compact"] .rd-actions,.rd-root[data-edge="left"][data-view="compact"] .rd-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:min(57dvh,460px);overflow-y:auto}
.rd-root[data-edge="right"][data-view="compact"] .rd-action,.rd-root[data-edge="left"][data-view="compact"] .rd-action{min-width:0;flex-direction:column;font-size:10px;white-space:normal;padding:6px}
.rd-root button:focus-visible{outline:2px solid #b2f7ff!important;outline-offset:2px!important}
@media(max-width:600px){
 .rd-capsule{padding:7px;max-height:min(75dvh,520px)}
 .rd-root[data-view="expanded"] .rd-capsule{width:min(88vw,350px)}
 .rd-root[data-view="expanded"] .rd-action{min-height:48px}
 .rd-action,.rd-control,.rd-nav button{min-height:44px}
}
/* Focus ownership. Remove the legacy header/footer rows; the native controls
   stay mounted and callable by the dock. Studio mode retains the original UI. */
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] #app{
 grid-template-columns:minmax(0,1fr)!important;
 grid-template-rows:0 minmax(0,1fr)!important;
 padding-top:0!important;padding-bottom:0!important;
 min-height:0!important;height:100dvh!important;overflow:hidden!important;
}
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] #app:has(>.sheet.open){grid-template-columns:minmax(0,1fr)!important}
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .topbar{
 display:block!important;grid-row:1!important;grid-column:1!important;
 height:0!important;min-height:0!important;padding:0!important;border:0!important;
 margin:0!important;overflow:visible!important;visibility:hidden!important;background:none!important;
}
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .topbar:has(.sheet.open) .controlPanel,
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .topbar:has(.sheet.open) .sheet{
 display:block!important;visibility:visible!important;
}
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .topbar:has(.sheet.open) .controlPanel>:not(.sheet){visibility:hidden!important}
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .bottomNav,
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .canvasBar,
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .studioFooter,
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .workflowBar,
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .workspaceCue{
 display:none!important;
}
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] #app .workspace{
 grid-column:1!important;grid-row:2!important;
 grid-template-columns:minmax(0,1fr)!important;
 grid-template-rows:minmax(0,1fr)!important;
 min-height:0!important;height:100%!important;overflow:hidden!important;
}
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] #app .stageWrap{
 grid-row:1!important;grid-column:1!important;
 padding:4px!important;margin:0!important;min-height:0!important;height:100%!important;
 overflow:auto!important;overscroll-behavior:contain;
}
/* Native sheet must remain above the page even when relocated under topbar. */
html[data-runn3r-dock-max="true"][data-runn3r-app="panel"] .sheet.open{
 visibility:visible!important;z-index:2147481600!important;
}
/* Sprit: full frame stage and one GPU canvas. Native inspectors stay available
   through their existing portal and tabs. */
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .console{
 height:100dvh!important;min-height:0!important;max-height:100dvh!important;
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;
 grid-template-rows:minmax(0,1fr)!important;
 gap:0!important;padding:0!important;overflow:hidden!important;
}
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .console>.console-header,
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .console>.tool-rail,
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .console>.statusbar,
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .console>.timeline{
 display:none!important;
}
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .console>.workspace{
 grid-column:1!important;grid-row:1!important;
 grid-template-columns:minmax(0,1fr)!important;
 height:100%!important;min-height:0!important;min-width:0!important;overflow:hidden!important;
 padding:0!important;margin:0!important;
}
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .workspace>.source-screen{
 grid-column:1!important;grid-row:1!important;
 height:100%!important;min-height:0!important;min-width:0!important;
 grid-template-rows:0 minmax(0,1fr) 0!important;
 margin:0!important;padding:0!important;
}
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .source-screen>.stage-header,
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .source-screen>.screen-footer{display:none!important}
html[data-runn3r-dock-max="true"][data-runn3r-app="sprite"] .source-screen>.canvas-wrap{
 grid-row:2!important;height:100%!important;min-height:0!important;max-height:none!important;
}
/* Preserve content visibility while an editor-native popover is open. */
@media(prefers-reduced-motion:reduce){.rd-root *{transition:none!important;animation:none!important}}


/* Retracted edge grip is intentionally narrow so no artwork is sacrificed. */
.rd-root[data-edge="right"] .rd-tab,.rd-root[data-edge="left"] .rd-tab{
 width:34px!important;min-width:34px!important;max-width:34px!important;
 padding:6px 4px!important;flex-direction:column!important;writing-mode:vertical-rl!important;
}
.rd-root[data-edge="right"] .rd-tab>span:first-child,
.rd-root[data-edge="left"] .rd-tab>span:first-child{font-size:16px!important}
