/* Prism 11.1 — complete restoration, layout hotfix. No third-party dependency. */
html, body {max-width:100%;}
body:has(>header .home-more){overflow-x:clip}
body>header:has(.home-more){width:100%;max-width:100%;box-sizing:border-box;
 display:flex;align-items:center;gap:clamp(6px,1vw,14px);
 padding-left:clamp(10px,2vw,24px);padding-right:clamp(10px,2vw,24px)}
body>header:has(.home-more) .brand{min-width:0;flex:0 0 auto;margin:0;max-width:180px}
body>header:has(.home-more) .nav{display:flex;gap:clamp(8px,1.5vw,17px);flex:0 1 auto;margin-left:auto}
body>header:has(.home-more) .nav a{white-space:nowrap}
body>header:has(.home-more) .home-more{position:relative;flex:0 0 auto;min-width:0}
body>header:has(.home-more) .home-more summary{list-style:none;display:flex;gap:6px;align-items:center;cursor:pointer;
 color:#ece4ff;background:#2a213e;border:1px solid #705891;padding:10px 12px;border-radius:12px;font-size:12px;font-weight:750}
.home-more summary::-webkit-details-marker{display:none}
.home-more[open] summary{background:#493266;border-color:#af8df5}
.home-more-panel{position:absolute;z-index:199;top:calc(100% + 12px);right:0;display:grid;gap:2px;
 width:min(280px,calc(100vw - 24px));max-height:min(70dvh,560px);overflow:auto;
 border:1px solid #8c6bb2;border-radius:16px;background:#1c162e;box-shadow:0 22px 55px #0009;padding:8px}
.home-more-panel a{display:block;color:#eee8ff;padding:11px;border-radius:10px;font-size:13px;overflow-wrap:anywhere}
.home-more-panel a:hover,.home-more-panel a:focus-visible{background:#45305d;outline:0}
body>header:has(.home-more) .home-open-editor{padding:10px 13px;flex:0 0 auto}
body>header:has(.home-more) .v11-navbar{flex:0 0 auto}
@media(max-width:1100px){body>header:has(.home-more) .nav{display:none!important}body>header:has(.home-more) .home-more{margin-left:auto}}
@media(max-width:600px){body>header:has(.home-more){height:64px;min-height:64px;gap:5px;padding:5px 8px}body>header:has(.home-more) .brand img{width:35px;height:35px}body>header:has(.home-more) .brand>div{display:none}body>header:has(.home-more) .home-more summary{padding:8px;font-size:11px}body>header:has(.home-more) .home-open-editor{padding:8px 9px;font-size:10px}}
@media(max-width:390px){body>header:has(.home-more) .home-open-editor{display:none}body>header:has(.home-more) .home-more-panel{right:-44px}}
@media(prefers-reduced-motion:no-preference){.home-more-panel{animation:prismMenuIn .2s ease both}}
@keyframes prismMenuIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
/* Additional compact layout for mobile creative screens */
@media(max-width:640px){
 .app{width:100%;height:100dvh;max-height:100dvh;overflow:hidden;grid-template-rows:auto minmax(0,1fr) 25px}
 .app .top{height:auto!important;min-height:48px!important;max-height:98px;overflow-x:auto;
   overflow-y:hidden;flex-wrap:nowrap!important;gap:5px;padding:6px 8px;scrollbar-width:none;min-width:0}
 .app .top::-webkit-scrollbar{display:none}
 .app .top .brand{flex:none;margin-right:3px}.app .top .brand img{width:30px;height:30px}
 .app .top .brand div{display:none}
 .app .top-center{order:0!important;width:auto!important;flex:none;margin:0}
 .app .top-center>button,.app .top-right>button{flex:none;min-height:35px}
 .app .top-right{flex:none}.app .top .v11-navbar{flex:none}
 .app .work{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 69px!important;position:relative;overflow:hidden}
 .app .work .stage{grid-column:1;grid-row:1;min-width:0;min-height:0}
 .app .work .tools{grid-column:1;grid-row:2;flex-direction:row;align-items:center;justify-content:flex-start;
  overflow-x:auto;overflow-y:hidden;width:100%;min-width:0;max-width:100%;height:69px;padding:6px;
  gap:5px;border-right:0;border-top:1px solid #594471;scrollbar-width:thin;touch-action:pan-x}
 .app .work .tools .tool{flex:0 0 54px;width:54px;height:55px;min-height:50px;padding:4px;font-size:17px}
 .app .work .tools .tool span{font-size:10px}
 .app .work .sidebar.left{display:block!important;position:fixed!important;left:0!important;top:50px!important;
   bottom:calc(91px + env(safe-area-inset-bottom))!important;max-height:none!important;height:auto;
   width:min(340px,calc(100vw - 30px));z-index:45;transform:translateX(-108%);visibility:hidden;
   box-shadow:18px 6px 42px #000b;overflow-y:auto}
 .app .work .sidebar.left.open{transform:translateX(0);visibility:visible}
 .app .work .sidebar.right{position:fixed!important;left:auto;right:0;top:50px!important;
   bottom:calc(91px + env(safe-area-inset-bottom))!important;width:min(340px,calc(100vw - 30px))!important;
   z-index:46;max-height:none!important;overflow-y:auto}
 .app .stagebar{padding:5px 8px;gap:4px}.app .stagebar .caps{display:none}
 .app .viewport{min-height:0;padding:6px}.app canvas#artboard{max-width:100%;max-height:100%}
 .app .foot{font-size:9px;padding:0 7px;white-space:nowrap;overflow:hidden}
 .app .help-fab{right:8px;bottom:105px;padding:9px 11px}
 .app .status{font-size:9px;padding:4px 7px}
}
@media(max-width:820px){
 .topbar{max-width:100vw;overflow-x:auto;overflow-y:visible;min-width:0}
 .topbar .tabs{display:flex;flex-wrap:nowrap!important;overflow-x:auto;width:100%;max-width:100vw;padding-bottom:6px}
 .body-wrap{flex-direction:column!important;min-width:0;width:100%}
 .side-panel{width:100%!important;max-width:100%;max-height:37dvh;min-height:135px;overflow:auto}
 .stage-wrap{width:100%;min-width:0;min-height:260px;padding:5px}
 .stage-area{min-height:260px}.tl-wrap{max-width:100vw;overflow-x:auto;min-height:150px}
 .topbar .v11-navbar{margin-left:auto}
}
