/* Runn3r Clarity v2: menu economy and maximum usable canvas.
   No styling of canvas pixels, page shapes, thumbnails, or export surfaces. */
html[data-runn3r-clarity="v2"] .runn3r-mode-line{
 gap:5px!important;flex-wrap:nowrap!important;min-width:0;
}
html[data-runn3r-clarity="v2"] .runn3r-mode-label,
html[data-runn3r-clarity="v2"] .runn3r-mode-detail{display:none!important}
html[data-runn3r-clarity="v2"] [data-run-mode="adaptive"]{display:none!important}
html[data-runn3r-clarity="v2"] .runn3r-mode-switch{flex:0 0 auto;min-width:0}
html[data-runn3r-clarity="v2"] .runn3r-mode-switch [data-run-mode]{
 font:750 11px/1.2 system-ui,sans-serif!important;
 letter-spacing:.01em!important;min-width:61px;min-height:34px;
}
html[data-runn3r-clarity="v2"] .runn3r-focus-actions{
 display:flex;align-items:center;gap:5px;min-width:0;
 scrollbar-width:none;overflow-x:auto;overscroll-behavior-x:contain;
}
html[data-runn3r-clarity="v2"] .runn3r-focus-actions[hidden],
html[data-runn3r-clarity="v2"] .runn3r-focus-actions [hidden]{display:none!important}
html[data-runn3r-clarity="v2"] .runn3r-focus-actions::-webkit-scrollbar{display:none}
html[data-runn3r-clarity="v2"] .runn3r-focus-actions button{
 display:inline-flex;justify-content:center;align-items:center;
 flex:1 0 auto;min-width:46px;min-height:38px;
 padding:7px 10px!important;white-space:nowrap;
 font:750 11px/1.2 system-ui,sans-serif!important;letter-spacing:.005em!important;
}
html[data-runn3r-clarity="v2"] .runn3r-focus-actions .runn3r-clarity-primary{
 background:linear-gradient(145deg,#22667b,#113849)!important;
 border-color:#65cce8!important;color:#f4feff!important;
}
html[data-runn3r-clarity="v2"] .runn3r-focus-actions .runn3r-clarity-more{
 margin-left:auto;background:#142e3d!important;border-color:#4a8299!important;
}
html[data-runn3r-clarity="v2"][data-runn3r-effective="focus"] .atelier-flow{
 display:none!important
}
html[data-runn3r-clarity="v2"][data-runn3r-effective="focus"] .runn3r-mode-shell{
 gap:4px!important;min-width:0
}
html[data-runn3r-clarity="v2"] .atelier-command{
 flex:0 0 auto!important;min-height:34px!important;
}
html[data-runn3r-clarity="v2"][data-runn3r-app="sprite"][data-runn3r-effective="focus"] .tool-rail{
 display:flex!important;align-items:center!important;gap:4px!important;
 overflow-x:auto!important;scrollbar-width:none;padding:3px 5px!important;
}
html[data-runn3r-clarity="v2"][data-runn3r-app="sprite"][data-runn3r-effective="focus"] .tool-rail::-webkit-scrollbar{display:none}
html[data-runn3r-clarity="v2"][data-runn3r-app="sprite"][data-runn3r-effective="focus"][data-runn3r-tools-expanded="false"]
 .tool-rail [data-tool]:not([data-tool="pencil"]):not([data-tool="brush"]):not([data-tool="fill"]):not([data-tool="select"]):not([data-tool="erase"]){
 display:none!important
}
html[data-runn3r-clarity="v2"][data-runn3r-app="sprite"][data-runn3r-effective="focus"][data-runn3r-tools-expanded="false"] .tool-rail>i{display:none!important}
html[data-runn3r-clarity="v2"] .runn3r-clarity-tool-expand{
 flex:0 0 auto;min-height:38px;min-width:84px;border:1px solid #41879d;
 border-radius:9px;padding:6px 8px;cursor:pointer;
 font:750 11px/1.2 system-ui,sans-serif;color:#ddf9ff;
 background:linear-gradient(145deg,#173b4d,#0c2534);
}
html[data-runn3r-clarity="v2"] .runn3r-clarity-tool-expand:focus-visible,
html[data-runn3r-clarity="v2"] .runn3r-focus-actions button:focus-visible{
 outline:2px solid #9df0fc!important;outline-offset:2px
}
html[data-runn3r-clarity="v2"][data-runn3r-app="panel"][data-runn3r-effective="focus"] .stageWrap{
 padding:6px!important
}
html[data-runn3r-clarity="v2"][data-runn3r-app="sprite"][data-runn3r-effective="focus"] .console{
 gap:4px!important
}
html[data-runn3r-clarity="v2"][data-runn3r-app="sprite"][data-runn3r-effective="focus"] .console-header{
 gap:5px!important;padding:5px 8px!important
}
html[data-runn3r-clarity="v2"] .runn3r-clarity-menu{
 position:fixed;inset:0;margin:auto;
 width:min(540px,calc(100vw - 20px));max-width:calc(100vw - 20px);
 max-height:min(78dvh,730px);padding:0;overflow:auto;
 border:1px solid #4a91aa;border-radius:18px;
 background:#081927;color:#ebfbff;
 box-shadow:0 26px 100px rgba(0,0,0,.74);
 font-family:system-ui,-apple-system,sans-serif;overscroll-behavior:contain;
}
.runn3r-clarity-menu::backdrop{background:rgba(0,5,12,.75)}
.runn3r-clarity-panel{padding:16px;display:grid;gap:12px}
.runn3r-clarity-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.runn3r-clarity-head h2{font-size:20px;font-weight:770;margin:0;letter-spacing:-.03em}
.runn3r-clarity-head button{
 min-width:44px;min-height:44px;border-radius:10px;background:#142e40;
 color:#effdff;border:1px solid #478ca2;font-size:22px;cursor:pointer;
}
.runn3r-clarity-commands{display:grid;gap:14px;min-height:0}
.runn3r-clarity-group{display:grid;gap:6px}
.runn3r-clarity-group h3{
 color:#91dff0;font-size:10px;font-weight:850;letter-spacing:.14em;
 margin:2px 0 3px;padding:4px 3px;
}
.runn3r-clarity-group button{
 display:grid;text-align:left;gap:4px;padding:11px 13px;min-height:54px;
 border-radius:11px;border:1px solid rgba(130,206,231,.27);
 color:#f1fcff;background:#102b3a;cursor:pointer;
}
.runn3r-clarity-group button strong{font-size:13px;font-weight:750}
.runn3r-clarity-group button small{font-size:11px;color:#b2cfdc;line-height:1.3}
.runn3r-clarity-group button:hover,.runn3r-clarity-group button:focus-visible{
 border-color:#7addf4;outline:2px solid transparent;background:#1a4155;
}
@media(max-width:650px){
 html[data-runn3r-clarity="v2"] .runn3r-focus-actions button{
  min-height:44px;padding:8px 9px!important;font-size:10px!important
 }
 html[data-runn3r-clarity="v2"] .runn3r-mode-switch [data-run-mode]{
  min-height:38px;font-size:11px!important;min-width:60px
 }
 html[data-runn3r-clarity="v2"] .runn3r-mode-line{gap:4px!important}
 html[data-runn3r-clarity="v2"] .runn3r-clarity-menu{max-height:85dvh}
 html[data-runn3r-clarity="v2"][data-runn3r-app="sprite"][data-runn3r-effective="focus"] .tool-rail .tool{
  min-width:49px!important;min-height:40px!important;font-size:9px!important
 }
}
@media(prefers-reduced-motion:reduce){
 .runn3r-clarity-menu,.runn3r-clarity-menu *{transition:none!important;animation:none!important}
}

/* Expanded tool inventory starts with a permanent discoverable control. */
html[data-runn3r-clarity="v2"] .runn3r-clarity-tool-expand{order:-100;position:sticky;left:0;z-index:3;box-shadow:5px 0 12px #04101bb5;white-space:nowrap}

/* Browsers without HTMLDialogElement.showModal need an actual blocking overlay. */
.runn3r-clarity-fallback[hidden]{display:none!important}
.runn3r-clarity-fallback{
 position:fixed;inset:0;z-index:2147482998;
 background:rgba(0,5,12,.76);
 overscroll-behavior:contain;
}
html[data-runn3r-menu-open="true"] .runn3r-clarity-menu[open]{
 z-index:2147482999!important;
 pointer-events:auto!important;
 isolation:isolate;
}
html[data-runn3r-menu-open="true"] body>.runn3r-clarity-fallback{
 display:block;
}

/* Canvas compositor isolation for legacy-dialog fallback only.
   The artwork and scene are retained and restored immediately on close. */
html[data-runn3r-menu-open="true"][data-runn3r-app="panel"] .stageWrap,
html[data-runn3r-menu-open="true"][data-runn3r-app="sprite"] #sourceStage{
 visibility:hidden!important;
}
