.app-header{height:auto;min-height:68px;flex-wrap:wrap;gap:12px}.actions{margin-left:auto;gap:6px}.actions button{font-size:12px}.project-heading{min-width:150px}.editor-layout{height:calc(100dvh - var(--header-height,68px))}#output-status{width:100%;font-size:12px;padding:8px 12px;background:var(--accent-soft);border-radius:6px}#output-status a{color:inherit;text-decoration:underline;margin-left:8px}
.inspector{display:flex;flex-direction:column;overflow-y:auto}.inspector>.canvas-settings{flex:none;padding:14px 16px}.inspector-split{display:grid;grid-template-rows:minmax(180px,1fr) 10px minmax(180px,1fr);min-height:640px;flex:1}.inspector-split>section{padding:16px;min-width:0}.layers-section{display:flex;flex-direction:column;min-height:0;overflow:hidden}.layers-section .panel-heading{flex:none}#layers{max-height:none;overflow-y:auto;align-content:start;flex:1;min-height:0}.properties-section{overflow:visible;min-height:0;border-top:0}#inspector-divider{height:10px;cursor:row-resize;touch-action:none;background:#f1f2f2;border-top:1px solid var(--border);border-bottom:1px solid var(--border);display:grid;place-items:center}#inspector-divider:after{content:'';width:38px;height:3px;border-radius:3px;background:#9da4a0}#inspector-divider:hover,#inspector-divider:focus-visible{background:var(--accent-soft);outline:2px solid var(--green);outline-offset:-2px}.properties-section .field{margin:8px 0}.properties-section .row .field{margin:3px 0}.properties-section .field input,.properties-section .field select{padding:7px;min-width:0;font-size:12px}.properties-section textarea{min-height:56px}.properties-section .eyebrow{margin-bottom:8px}
#output-dialog{width:min(460px,calc(100vw - 32px));max-height:90dvh;overflow:auto;padding:24px;border:1px solid var(--border);border-radius:14px;color:#303030;box-shadow:0 20px 70px #0003}#output-dialog::backdrop{background:#0005}#output-dialog h2{font-size:17px}#output-close{border:0;font-size:22px;padding:0;min-width:32px}#output-dialog label{display:flex;align-items:center;justify-content:space-between}#output-dialog input[type=range]{padding:0;accent-color:var(--green)}#output-validation{color:#a23030;font-size:12px}#output-dialog .field{margin:16px 0}#output-dialog .row .field{margin:0}#output-dialog output{color:#666}
@media(max-width:1050px){.app-header{gap:8px}.actions button{font-size:11px;padding:8px}.project-heading{max-width:200px}.inspector-split>section{padding:12px}}
@media(max-width:800px){.editor-layout{height:auto}.inspector{display:flex}.inspector-split{min-height:650px;flex:none}.actions{flex-wrap:wrap}.actions button{flex:1}.properties-section{min-height:250px}}

:root{--studio-green:#343434;--green:var(--studio-green);--accent-contrast:#fff}.app-header{min-height:56px;padding:10px 16px}.upload-tile{color:var(--studio-green);border:1px dashed #75b49a;background:#f3faf6;text-align:center}.upload-tile .asset-image{background:transparent}.upload-tile strong{min-height:0}.upload-tile:hover{color:var(--studio-green);border-color:var(--studio-green);background:#e9f5ee}.history-tools button:hover{background:#fff;border-color:transparent}#refresh-colors:hover{background:none;border-color:transparent}.layer{position:relative;flex-shrink:0;cursor:grab}.layer.layer-dragging{opacity:.4}.layer[data-drop-before]:before,.layer[data-drop-after]:after{content:'';position:absolute;left:0;right:0;height:2px;background:var(--studio-green);z-index:2;pointer-events:none}.layer[data-drop-before]:before{top:0}.layer[data-drop-after]:after{bottom:0}.layer-grip{cursor:grab}#layers{padding-block:2px}
:root{--studio-green:#343434}
[hidden]{display:none!important}
.studio-navigation{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.studio-navigation input{width:190px;min-width:80px;border-color:transparent;font-weight:600;background:transparent}
#draft-status{font-size:12px;color:#64706b;max-width:210px}
#draft-status.error{color:#b42318}
.studio-navigation .info-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;min-width:28px;max-width:28px;height:28px;min-height:28px;max-height:28px;aspect-ratio:1;border:1px solid #e1e5e3;border-radius:50%;padding:0;gap:0;background:transparent;color:#78827c;line-height:1}.studio-navigation .info-button svg{display:block;flex:none;pointer-events:none}.studio-navigation .info-button:hover{color:#47564e;background:#f4f6f5;border-color:#cbd3ce}
.app-header{flex-wrap:wrap;gap:10px}.app-header .actions{flex-wrap:wrap}
#studio-home{max-width:1280px;margin:auto;padding:32px 28px;height:100dvh;overflow:auto}
.home-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.home-heading h1{font-size:24px;margin:0}#studio-search{max-width:340px;margin-bottom:24px}
.studio-home-view .app-header,.studio-home-view .editor-layout{display:none!important}
#studio-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px}
.project-card{display:flex;flex-direction:column;gap:9px;padding:0 0 18px;text-align:left;overflow:hidden;background:white;border:1px solid #dfe3e0;border-radius:12px}
.project-card canvas{width:100%;height:200px;background:#f5f6f5;border-bottom:1px solid #eceeec;object-fit:contain}
.project-card strong,.project-card span,.project-card small{padding:0 16px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.project-card span{font-size:12px;color:var(--studio-green)}.project-card small{font-size:12px;color:#69736e;white-space:nowrap}
#studio-popover{position:fixed;inset:auto;margin:0;padding:6px;border:1px solid #d9dfdb;border-radius:10px;box-shadow:0 6px 24px #15251c20;background:white;min-width:180px;max-width:300px;z-index:100}
#studio-popover>button{display:block;border:0;text-align:left;width:100%;padding:9px 12px;font-weight:400}#studio-popover>button:hover{background:#f0f5f2}
#studio-popover p{margin:8px;font-size:13px;line-height:1.5}#studio-popover form{display:grid;gap:10px;padding:6px}
#media-picker{width:min(720px,calc(100vw - 32px));max-height:85vh;padding:20px;border:1px solid #dce2dd;border-radius:14px;box-shadow:0 20px 80px #183b2620}
#media-picker::backdrop{background:#14271e28}#media-picker .panel-heading{margin-bottom:18px}#media-picker h2{font-size:17px;margin:0}
#picker-body{max-height:60vh;overflow:auto;overscroll-behavior:contain}#picker-search-form{display:flex;gap:8px;margin-bottom:18px}#picker-search{flex:1}
.media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.media-choice{position:relative;display:flex;flex-direction:column;gap:8px;border:1px solid #dfe4df;border-radius:10px;padding:10px;cursor:pointer;min-width:0;color:#28352e;background:white;font-size:12px}
.media-choice:has(input:checked){border-color:var(--studio-green);background:#f0f8f4}.media-choice input{position:absolute;top:10px;left:10px;width:18px;height:18px;accent-color:var(--studio-green);z-index:1}
.media-choice img{height:130px;width:100%;object-fit:contain}.media-choice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-list{grid-template-columns:1fr}.product-list .media-choice{flex-direction:row;align-items:center;min-height:68px;padding-left:40px}.product-list .media-choice img{width:50px;height:50px}.product-list .media-choice input{top:26px}
#picker-footer{padding-top:16px;margin-top:16px;border-top:1px solid #eef0ee}#picker-more{display:block;margin:18px auto}
@media(max-width:900px){#draft-status{display:none}.studio-navigation input{width:160px}.media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

:root{--accent-ink:#343434;--accent-soft:color-mix(in srgb,var(--studio-green) 10%,white);--accent-border:color-mix(in srgb,var(--studio-green) 45%,white)}
.upload-tile{color:var(--accent-ink);border-color:var(--accent-border);background:var(--accent-soft)}.upload-tile svg{color:var(--studio-green)}.upload-tile:hover{color:var(--accent-ink);background:color-mix(in srgb,var(--studio-green) 16%,white)}.project-card span{color:var(--accent-ink)}.media-choice:has(input:checked){background:var(--accent-soft)}#studio-popover>button:hover{background:var(--accent-soft)}
.asset[data-asset]{padding:5px}.asset[data-asset] .asset-image{width:100%;border-radius:6px}.asset-context-name{padding:8px 12px 10px;margin-bottom:4px;border-bottom:1px solid #e7ece7;font-size:12px;font-weight:600;overflow-wrap:anywhere;max-width:270px}
#asset-context-shade{position:fixed;pointer-events:none;background:rgba(255,255,255,.72);z-index:60}.asset.context-selected{outline:1px solid var(--studio-green);outline-offset:1px}

.category-name{width:150px;min-width:0;padding:7px 9px;font-size:11px;border-radius:6px;border-color:var(--green)}
/* Fixed shell: only panel contents and the central page stack scroll. */
html,body{height:100%;overflow:hidden}
body:not(.studio-home-view) .editor-layout{display:grid;grid-template-columns:240px minmax(240px,1fr) 260px;height:calc(100dvh - var(--header-height,68px));min-height:0;overflow:hidden}
body .workspace{height:100%;min-height:0;position:relative;order:initial}
body .library{max-height:none;height:100%;overflow:hidden;min-height:0}
.library>.panel-heading,.library>#asset-search,.library>.templates{flex:none}
#categories{min-height:0;overflow:auto;flex:1}
body .inspector{height:100%;min-height:0;overflow:hidden;display:flex;grid-column:auto}
body .inspector-split{min-height:0;grid-template-rows:minmax(80px,1fr) 10px minmax(110px,1fr);overflow:hidden}
body .properties-section{overflow:auto;min-height:0}
body .layers-section{min-height:0}
#collection-pages{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 20px 28px}
.workspacebar,.canvasfooter{flex:none}
.page-card{margin:0 0 24px;min-width:0}
.page-toolbar{display:flex;align-items:center;gap:12px;margin:0 0 8px;min-height:30px}
.page-name{flex:1;min-width:60px;width:100%;background:transparent!important;border:0!important;border-radius:0;padding:4px 0;font-size:12px;box-shadow:none;outline:none!important;text-overflow:ellipsis;cursor:text}
.page-name:focus{text-overflow:clip}.page-name:disabled{opacity:.6;cursor:default}
.page-actions{display:flex;gap:2px;flex:none}
.page-actions button{width:25px;min-width:25px;height:25px;min-height:25px;border:0;padding:4px;background:transparent;color:#6f7772;border-radius:5px}
.page-actions button:hover,.page-actions button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-ink)}
.page-surface{background:#fff;box-shadow:0 2px 10px #17231b09}
.page-hidden .page-surface{opacity:.4}
.page-card .stage{height:min(62vh,680px);flex:none;padding:16px;overflow:hidden}
.page-card .stage canvas{box-shadow:none}
.page-activate{display:flex;align-items:center;justify-content:center;height:min(62vh,680px);width:100%;border:0;border-radius:0;padding:16px;background:#fff}
.page-activate canvas{max-width:100%;max-height:100%;object-fit:contain;height:100%;width:auto}
.page-active .page-surface{outline:1px solid var(--accent-border)}
.page-locked{cursor:default}
.home-actions{display:flex;gap:8px}
#collection-name{background:transparent;border-color:transparent;max-width:240px;font-weight:600}
body .inspector>.canvas-settings{flex:none;padding:12px}
*{scrollbar-width:none}*::-webkit-scrollbar{display:none}
@media(max-width:1000px){body:not(.studio-home-view) .editor-layout{grid-template-columns:190px minmax(180px,1fr) 210px}#collection-pages{padding:12px}.page-toolbar{gap:6px}.page-actions{gap:0}.page-actions button{width:23px;min-width:23px}}
