/* Focused editor layout. Loaded after style.css so the visual type owns its tools. */
body.editor-page{--editor-rail:104px;--editor-tools:272px;--editor-chrome:66px;--editor-ticker:0px}
body.editor-page.has-running-header{--editor-chrome:97px}
body.editor-page.has-running-footer{--editor-ticker:31px}
body.editor-page .editor-shell{height:calc(100dvh - var(--editor-chrome) - var(--editor-ticker))!important;grid-template-columns:var(--editor-rail) minmax(0,1fr) var(--editor-tools)!important;min-height:0}
body.editor-page .editor-shell[data-visual="turtle"]{--editor-tools:clamp(320px,29vw,420px)}
body.editor-page .editor-sidebar{height:100%;min-height:0;overflow:hidden!important;gap:3px;padding:10px 6px!important}
body.editor-page .editor-sidebar button{flex:0 0 auto;width:100%;min-height:39px!important;padding:8px 7px!important;font-size:10px}
body.editor-page .editor-sidebar .side-title{padding:3px 7px 8px}
body.editor-page .editor-main{grid-template-rows:58px minmax(0,1fr) 28px!important;min-height:0}
body.editor-page .editor-main.guest-main{grid-template-rows:58px auto minmax(0,1fr) 28px!important}
body.editor-page .editor-main .canvas-wrap{min-height:0;overflow:auto!important;padding:12px!important}
body.editor-page .editor-main .canvas-card{width:min(100%,960px)!important;max-height:100%;min-height:0;padding:clamp(12px,2.5vw,34px)}
body.editor-page .editor-shell[data-visual="turtle"] .canvas-card{width:min(100%,calc(100dvh - 188px),740px)!important;aspect-ratio:1;max-height:100%}
body.editor-page .editor-status{display:flex;gap:16px;align-items:center;height:28px;overflow:hidden}
body.editor-page .editor-status span:nth-child(n+3):nth-child(-n+5){display:none}
body.editor-page .inspector{height:100%;min-height:0;overflow:auto;display:grid!important;align-content:start;padding:12px!important}
body.editor-page .inspector .inspector-panel:not(.active){display:none!important}
body.editor-page .inspector-mobile-head,body.editor-page .editor-tools-toggle{display:none}
body.editor-page .inspector .turtle-workspace-head{display:grid;gap:4px;border-bottom:1px solid #dbe4ef;padding:3px 0 10px}
body.editor-page .inspector .turtle-workspace-head.hidden{display:none!important}
.turtle-workspace-head b{font-size:14px}.turtle-workspace-head small{font-size:10px;line-height:1.4;color:#64748b}
body.editor-page .editor-shell[data-visual="turtle"] .inspector{display:flex!important;flex-direction:column;gap:8px}
body.editor-page .editor-shell[data-visual="turtle"] .inspector-tabs{display:none}
body.editor-page .editor-shell[data-visual="turtle"] .inspector-panel[data-inspector-panel="data"].active{display:flex;flex:1;min-height:0;flex-direction:column}
body.editor-page .editor-shell[data-visual="turtle"] .turtle-code-panel{display:flex!important;flex:1;min-height:0;flex-direction:column;gap:8px!important}
body.editor-page .editor-shell[data-visual="turtle"] .turtle-code-panel textarea{flex:1;min-height:120px!important;height:auto!important;resize:none!important;font-size:12px;line-height:1.55}
.turtle-pen-tools{display:grid;grid-template-columns:1fr 1.4fr .8fr;gap:9px;align-items:end}
.turtle-pen-tools label{display:grid;gap:3px!important;font-size:10px!important}
.turtle-pen-tools input[type="color"]{width:100%;height:30px;padding:2px!important}
.turtle-pen-tools input[type="range"]{width:100%;padding:0!important;margin:5px 0 0}
.turtle-pen-tools output{font-size:10px;color:#64748b}
.turtle-help{font-size:10px;line-height:1.35;color:#64748b}
body.editor-page .editor-shell[data-visual="turtle"] .inspector-bottom-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding-top:8px}
body.editor-page .editor-shell[data-visual="turtle"] .inspector-bottom-actions .btn{padding:8px 4px;font-size:10px}
body.editor-page .editor-tool-flyout{left:var(--editor-rail)!important;width:min(254px,calc(100vw - var(--editor-rail) - 16px))!important;max-height:min(370px,calc(100% - 16px))!important}
body.editor-page .editor-tool-flyout .compact-tool-list{gap:2px}
body.editor-page .editor-tool-flyout .compact-tool-list button{padding:7px 9px!important}
body.editor-page .data-drawer{left:var(--editor-rail)!important;right:var(--editor-tools)!important}
body.editor-page .data-drawer.open{overflow-y:auto}
body.editor-page .visual-picker-menu{max-height:min(300px,50vh);overscroll-behavior:contain}
.app-modal>.modal-x{position:absolute!important;top:12px!important;right:12px!important;left:auto!important}
.pricing-cards-compact{width:min(970px,94vw)!important;grid-template-columns:repeat(3,minmax(0,300px))!important;gap:14px!important}
.pricing-cards-compact .price{width:100%;min-width:0;padding:18px!important}
.pricing-cards-compact .price ul{margin:10px 0 18px;line-height:1.55!important}
.footer-credit a[href^="mailto:"]{color:#cde7ff!important;text-decoration:underline;text-underline-offset:3px}
@media(max-width:1100px){body.editor-page{--editor-rail:76px;--editor-tools:260px}body.editor-page .editor-shell[data-visual="turtle"]{--editor-tools:340px}body.editor-page .editor-sidebar button span{display:none}body.editor-page .editor-sidebar button{font-size:15px;justify-content:center}}
@media(max-width:900px){
  body.editor-page{--editor-rail:62px;--editor-tools:0px}
  body.editor-page .editor-shell,body.editor-page .editor-shell[data-visual="turtle"]{grid-template-columns:var(--editor-rail) minmax(0,1fr)!important}
  body.editor-page .editor-tools-toggle{display:inline-flex!important;padding:8px!important;font-size:11px}
  body.editor-page .inspector{position:absolute!important;left:auto;right:0;top:0;bottom:0;width:min(340px,calc(100% - var(--editor-rail)));height:100%;z-index:31;display:grid!important;visibility:hidden;pointer-events:none;transform:translateX(104%);transition:transform .22s ease,visibility .22s ease}
  body.editor-page .editor-shell.inspector-open .inspector{visibility:visible;pointer-events:auto;transform:translateX(0)}
  body.editor-page .inspector-mobile-head{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;background:inherit;z-index:8;border-bottom:1px solid #dbe4ef;padding:0 0 7px}
  body.editor-page .inspector-mobile-head button{font-size:22px;border:0;background:transparent;cursor:pointer}
  body.editor-page .editor-shell[data-visual="turtle"]{grid-template-rows:minmax(0,1.1fr) minmax(0,1fr)}
  body.editor-page .editor-shell[data-visual="turtle"] .editor-sidebar{grid-row:1/3}
  body.editor-page .editor-shell[data-visual="turtle"] .editor-main{grid-column:2;grid-row:1;min-height:0}
  body.editor-page .editor-shell[data-visual="turtle"] .inspector{position:relative!important;grid-column:2;grid-row:2;left:auto;right:auto;top:auto;bottom:auto;width:100%;height:100%;transform:none;visibility:visible;pointer-events:auto;box-shadow:none;border-top:1px solid #d5dfec;border-left:0;z-index:4}
  body.editor-page .editor-shell[data-visual="turtle"] .inspector-mobile-head,body.editor-page .editor-shell[data-visual="turtle"] .editor-tools-toggle{display:none!important}
  body.editor-page .editor-shell[data-visual="turtle"] .canvas-card{width:min(100%,calc((100dvh - var(--editor-chrome) - var(--editor-ticker))*0.55 - 80px))!important;padding:10px}
  body.editor-page .editor-tool-flyout{position:absolute!important;left:var(--editor-rail)!important;right:auto!important;top:45px!important;bottom:auto!important;width:min(270px,calc(100vw - var(--editor-rail) - 10px))!important;max-height:50%!important}
  body.editor-page .data-drawer{left:var(--editor-rail)!important;right:0!important}
}
@media(max-width:600px){
  body.editor-page .editor-shell:not([data-visual="turtle"]) .editor-top .btn.ghost.editor-tools-toggle{display:inline-flex!important}
  body.editor-page .editor-title-wrap{gap:5px;flex:1;min-width:0}
  body.editor-page .editor-title-wrap input{min-width:0;max-width:none!important;width:100%;font-size:12px}
  body.editor-page .editor-title-wrap #saveState{display:none}
  body.editor-page .editor-actions .btn{padding:6px!important;font-size:10px!important}
  body.editor-page .editor-top{padding:4px 6px;gap:5px}
  body.editor-page .editor-main.guest-main .guest-editor-strip{padding:4px 7px;font-size:9px;flex-wrap:wrap}
  body.editor-page .guest-editor-strip span{display:none}
  .pricing-cards-compact{width:min(94vw,380px)!important;grid-template-columns:1fr!important}
}
@media(min-width:601px) and (max-width:1000px){.pricing-cards-compact{grid-template-columns:repeat(2,minmax(0,300px))!important;justify-content:center}}
@media(prefers-reduced-motion:reduce){body.editor-page .inspector,body.editor-page .editor-tool-flyout,.inspector-panel{transition:none!important;animation:none!important}}

@media(max-width:600px){.compact-page-head h1{font-size:32px;line-height:1.17}.compact-page-head p{font-size:14px;line-height:1.5}}
@media(max-width:900px){
  body.editor-page .editor-shell[data-visual="turtle"] .inspector-panel[data-inspector-panel="data"].active{flex:none;min-height:max-content}
  body.editor-page .editor-shell[data-visual="turtle"] .turtle-code-panel{flex:none!important;min-height:max-content}
  body.editor-page .editor-shell[data-visual="turtle"] .turtle-code-panel textarea{flex:none;height:150px!important}
  body.editor-page .editor-shell[data-visual="turtle"] .inspector-bottom-actions{flex:none}
}
