/* Khorvuul Studio: design editor and launcher. Everything here takes colour, size and type from the --st-* tokens of studio.css
   (graphite panels, one amber accent for selection / active tool / primary action, 28 px rows, 6 px radius, 1 px lines). */
@font-face{font-family:'DejaVu Sans';src:url('/static/creative-fonts/DejaVuSans.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:'DejaVu Sans';src:url('/static/creative-fonts/DejaVuSans-Bold.ttf') format('truetype');font-weight:700;font-display:swap}

/* ---- Local tokens (not in studio.css): canvas overlay colours and the inspector width ---- */
.studio{--cs-guide:#ff4d6a;--cs-insp-w:296px;--cs-chk:repeating-conic-gradient(#c9c9ce 0 25%,#fff 0 50%) 0 0/8px 8px;
  /* names used by the older panel markup */
  --cs-bg:var(--st-panel);--cs-border:var(--st-line);--cs-text:var(--st-text);--cs-accent:var(--st-accent)}
.studio *,.studio *::before,.studio *::after{box-sizing:border-box}
.studio button,.studio input,.studio select,.studio textarea{font:inherit;color:inherit}
.studio svg{flex:none}
.creative-root{max-width:none!important;padding:20px 24px!important}
.cs-shell{color:var(--text)}
body.cs-focus{overflow:hidden}
.cs-glyph{width:var(--st-icon);height:var(--st-icon);flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* ---- Shared controls ---- */
.cs-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--st-row);padding:0 12px;border:1px solid var(--st-line-strong);background:var(--st-raised);color:var(--st-text);border-radius:var(--st-radius);cursor:pointer;font-size:var(--st-text-sm);font-weight:500;line-height:1.2;white-space:nowrap}
.cs-btn:hover{background:var(--st-hover)}.cs-btn:active{background:var(--st-pressed)}.cs-btn:disabled{opacity:.45;cursor:default}
.cs-btn:focus-visible,.cs-tool:focus-visible,.cs-toolbtn:focus-visible,.cs-menu-btn:focus-visible,.cs-ptab:focus-visible,.cs-rail-btn:focus-visible{outline:2px solid var(--st-focus);outline-offset:1px}
.cs-btn.cs-primary{background:var(--st-accent);border-color:var(--st-accent);color:var(--st-accent-ink);font-weight:600}.cs-btn.cs-primary:hover{background:var(--st-accent-hover)}
.cs-btn.cs-selected{background:var(--st-accent-soft);border-color:var(--st-accent);color:var(--st-text)}
.cs-btn-sm{min-height:24px;padding:0 8px;font-size:var(--st-text-xs)}.cs-wide{display:flex;width:100%;margin:6px 0}
.cs-btnrow{display:flex;gap:6px;flex-wrap:wrap}.cs-btnrow>.cs-btn{flex:1 1 auto}
.cs-help{font-size:var(--st-text-xs);line-height:1.55;color:var(--st-muted);margin:8px 0}
.cs-muted{color:var(--st-muted);font-size:var(--st-text-sm)}
.cs-empty{color:var(--st-muted);font-size:var(--st-text-sm);padding:16px;border:1px dashed var(--st-line-strong);border-radius:var(--st-radius);text-align:center}
.cs-field{display:flex;flex-direction:column;gap:4px;margin-bottom:10px;min-width:0;font-size:var(--st-text-xs);font-weight:500}.cs-field>span{color:var(--st-muted)}
.studio input.input,.studio select.input,.cs-in,.cs-field :is(input:not([type=color]):not([type=range]),select,textarea),.cs-panel-search{height:var(--st-row);width:100%;min-width:0;padding:0 8px;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:var(--st-raised);color:var(--st-text);font-size:var(--st-text-sm)}
.cs-field textarea{height:auto;min-height:72px;padding:8px;resize:vertical}
.cs-in:focus,.cs-hex:focus,.cs-panel-search:focus,.cs-num:focus-within,.cs-notes-input:focus,.cs-layer-edit:focus,.cs-field :is(input,select,textarea):focus,.cs-project-name:focus,.studio input.input:focus{outline:none;border-color:var(--st-accent);box-shadow:0 0 0 2px var(--st-focus)}
.cs-in-sel{width:auto;padding-right:4px}select.cs-in{cursor:pointer}
.cs-property-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 8px}.cs-property-grid>.cs-btn{margin:4px 0}
.cs-check{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:var(--st-text-sm);cursor:pointer;min-height:24px}.cs-check input{accent-color:var(--st-accent);width:14px;height:14px;margin:0}
.cs-h{margin:12px 0 6px;font-size:var(--st-text-xs);font-weight:600;color:var(--st-muted);text-transform:uppercase;letter-spacing:.04em}
.cs-seg,.cs-segment{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:2px;padding:2px;border-radius:var(--st-radius);background:var(--st-bg);border:1px solid var(--st-line)}
.cs-seg button,.cs-segment button{height:22px;min-width:0;padding:0 6px;border:0;border-radius:4px;background:transparent;color:var(--st-muted);font-size:var(--st-text-xs);font-weight:500;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cs-seg button:hover:not(:disabled),.cs-segment button:hover:not(:disabled){color:var(--st-text);background:var(--st-hover)}
.cs-seg button.cs-on,.cs-segment button.cs-on{background:var(--st-raised);color:var(--st-text);box-shadow:0 0 0 1px var(--st-line-strong),0 1px 2px rgba(0,0,0,.12)}
.cs-seg button:disabled,.cs-segment button:disabled{opacity:.4;cursor:default}
.cs-seg-wrap{grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr))}
.cs-seg-mini button{height:20px;padding:0 5px}
.cs-seg-tabs{margin-bottom:0}
.cs-slider{display:flex;flex-direction:column;gap:4px;margin:6px 0;font-size:var(--st-text-xs);color:var(--st-muted)}.cs-slider>span{display:flex;justify-content:space-between}.cs-slider output{color:var(--st-text);font-variant-numeric:tabular-nums}
.cs-slider input[type=range]{width:100%;margin:0;accent-color:var(--st-accent)}
.cs-chips{display:flex;flex-wrap:wrap;gap:4px;margin:8px 0}
.cs-chip{border:1px solid var(--st-line-strong);background:var(--st-raised);color:var(--st-text);font-size:var(--st-text-xs);font-weight:500;padding:0 10px;height:24px;border-radius:12px;cursor:pointer}.cs-chip:hover{background:var(--st-hover)}
.cs-chip-on{background:var(--st-accent-soft);border-color:var(--st-accent)}.cs-chip-muted{opacity:.7}
.cs-link{border:0;background:none;color:var(--st-text);text-decoration:underline;text-underline-offset:2px;font-size:var(--st-text-xs);font-weight:500;cursor:pointer;padding:4px 0}
body.cs-scrubbing,body.cs-scrubbing *{cursor:ew-resize!important;user-select:none!important}

/* ---- Dialogs ---- */
.cs-dialog{width:min(560px,calc(100vw - 24px));max-height:88vh;border:1px solid var(--st-line-strong);background:var(--st-panel);color:var(--st-text);border-radius:10px;padding:0;box-shadow:var(--st-shadow)}.cs-dialog::backdrop{background:rgba(8,8,10,.55)}
.cs-dialog-wide{width:min(820px,calc(100vw - 24px))}
.cs-dialog-body{padding:18px 20px}.cs-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.cs-dialog-head h2{margin:0;font-size:var(--st-text-lg);font-weight:600}
.cs-dialog-head .cs-btn{min-width:28px;padding:0 8px}
.cs-keys{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:4px 28px}.cs-keys h3{margin:10px 0 4px;font-size:var(--st-text-xs);font-weight:600;color:var(--st-muted);text-transform:uppercase;letter-spacing:.05em}
.cs-keys div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:5px 0;border-bottom:1px solid var(--st-line);font-size:var(--st-text-sm)}
.cs-keys kbd,.cs-menu kbd{font:inherit;font-size:var(--st-text-xs);color:var(--st-muted);font-family:var(--st-mono);white-space:nowrap}
.cs-keys kbd{background:var(--st-raised);border:1px solid var(--st-line-strong);border-radius:4px;padding:1px 6px;color:var(--st-text)}
.cs-format-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:6px}
.cs-format{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 10px;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:var(--st-raised);color:var(--st-text);cursor:pointer;text-align:left}
.cs-format:hover{background:var(--st-hover)}.cs-format strong{font-size:var(--st-text-md)}.cs-format small{color:var(--st-muted);font-size:var(--st-text-xs)}
.cs-format-on{border-color:var(--st-accent);background:var(--st-accent-soft)}
.cs-export-options{display:grid;gap:6px;margin:14px 0}.cs-export-options h5{margin:6px 0 0;font-size:var(--st-text-xs);color:var(--st-muted);text-transform:uppercase;letter-spacing:.05em}
.cs-export-progress{margin:6px 0 0;font-size:var(--st-text-xs);color:var(--st-muted);min-height:1em}
.cs-versions{display:grid;gap:8px;max-height:60vh;overflow:auto}.cs-version{display:grid;grid-template-columns:120px 1fr auto;gap:12px;align-items:center;padding:8px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-raised)}
.cs-version strong{display:block;font-size:var(--st-text-sm)}.cs-version small{color:var(--st-muted);font-size:var(--st-text-xs)}
.cs-find-results{display:grid;gap:4px;max-height:40vh;overflow:auto;margin-top:10px}.cs-find-hit{display:grid;gap:2px;text-align:left;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-raised);padding:6px 8px;cursor:pointer}
.cs-spell{display:grid;gap:6px;max-height:60vh;overflow:auto;min-width:min(520px,80vw)}.cs-spell-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--st-line)}.cs-spell-row s{color:var(--st-danger);text-decoration-thickness:2px;font-size:14px}.cs-spell-fixes{display:flex;flex-wrap:wrap;gap:4px}
.cs-qr-preview{display:grid;place-items:center;min-height:170px;margin:10px 0;border-radius:var(--st-radius);background:var(--cs-chk)}
.cs-crop-stage{position:relative;margin:12px auto 6px;overflow:hidden;user-select:none;touch-action:none;background:var(--cs-chk)}.cs-crop-stage img{display:block;width:100%;height:100%;pointer-events:none}
.cs-crop-frame{position:absolute;box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(10,10,12,.6);cursor:move}
.cs-crop-handle{position:absolute;width:14px;height:14px;border-radius:3px;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.4)}.cs-crop-nw{left:-7px;top:-7px;cursor:nw-resize}.cs-crop-ne{right:-7px;top:-7px;cursor:ne-resize}.cs-crop-sw{left:-7px;bottom:-7px;cursor:sw-resize}.cs-crop-se{right:-7px;bottom:-7px;cursor:se-resize}
.cs-restricted{max-width:520px;margin:60px auto;text-align:center}

/* ---- Media pages (background removal, video): the slim bar above them ---- */
.cs-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 16px;padding:10px 14px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-panel)}
.cs-header[hidden]{display:none}
.cs-header-title{display:flex;flex-direction:column;gap:1px}.cs-header-title strong{font-size:var(--st-text-lg);font-weight:600}.cs-header-title span{font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-header-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}

/* ---- Launcher ---- */
.cs-home{max-width:1280px;margin:0 auto;padding:22px 24px 28px;border:1px solid var(--st-line);border-radius:10px;background:var(--st-bg);color:var(--st-text)}
.cs-home h1,.cs-home h2,.cs-home h3,.cs-home p{font-family:inherit;letter-spacing:0}
.cs-home-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-bottom:16px;border-bottom:1px solid var(--st-line)}
.cs-home-title h1{margin:0;font-size:20px;font-weight:600;line-height:1.2;color:var(--st-text)}.cs-home-title p{margin:2px 0 0;font-size:var(--st-text-sm);color:var(--st-muted)}
.cs-home-actions{display:flex;gap:6px;flex-wrap:wrap}
.cs-home-sec{margin-top:24px}
.cs-section-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.cs-section-head h2{margin:0;font-size:var(--st-text-md);font-weight:600;color:var(--st-text)}.cs-section-head .cs-muted{flex:1;min-width:120px}
.cs-section-head .cs-search{width:200px}.cs-section-head .cs-in-sel{width:auto}
.cs-home-new{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}
.cs-groups{display:grid;gap:14px}.cs-group-title{margin:0 0 6px;font-size:var(--st-text-xs);font-weight:600;color:var(--st-muted);text-transform:uppercase;letter-spacing:.06em}
.cs-size-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(176px,1fr));gap:5px}
.cs-size{display:flex;align-items:center;gap:10px;min-width:0;padding:6px 10px 6px 6px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-panel);color:var(--st-text);cursor:pointer;text-align:left}
.cs-size:hover{border-color:var(--st-accent);background:var(--st-raised)}.cs-size:focus-visible{outline:2px solid var(--st-focus);outline-offset:1px}
.cs-size-icon{display:grid;place-items:center;width:46px;height:46px;flex:none;border-radius:4px;background:var(--st-bg)}
.cs-size-icon i{display:block;border:1.5px solid var(--st-muted);background:var(--st-raised);border-radius:2px}.cs-size:hover .cs-size-icon i{border-color:var(--st-accent)}
.cs-size-text{display:flex;flex-direction:column;gap:1px;min-width:0}.cs-size-text strong{font-size:var(--st-text-sm);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cs-size-text small{font-size:var(--st-text-xs);color:var(--st-muted);font-variant-numeric:tabular-nums}
.cs-custom{padding:12px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-panel)}
.cs-custom-row{display:flex;align-items:flex-end;gap:6px;flex-wrap:wrap}.cs-lab{display:flex;flex-direction:column;gap:3px;font-size:var(--st-text-xs);color:var(--st-muted);flex:1 1 70px;min-width:0}.cs-x{padding-bottom:6px;color:var(--st-faint)}
.cs-custom .cs-in-sel{width:60px}.cs-custom-info{display:block;min-height:16px;margin-top:6px;font-size:var(--st-text-xs);color:var(--st-muted)}.cs-custom-info.cs-bad{color:var(--st-danger)}
.cs-home .cs-seg{display:inline-grid;width:64px}.cs-home .cs-seg button{height:24px;display:grid;place-items:center}
.cs-r-box{min-height:40px}
.cs-r-box.cs-r-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.cs-r-card{position:relative;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-panel);overflow:hidden}.cs-r-card:hover{border-color:var(--st-accent)}
.cs-recent-open{display:flex;flex-direction:column;gap:2px;width:100%;padding:0 0 8px;border:0;background:none;color:inherit;text-align:left;cursor:pointer}
.cs-recent-open strong{padding:6px 10px 0;font-size:var(--st-text-sm);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cs-recent-open small{padding:0 10px;font-size:var(--st-text-xs);color:var(--st-muted);font-variant-numeric:tabular-nums}
.cs-r-prev,.cs-template-preview{display:grid;place-items:center;aspect-ratio:16/10;padding:10px;background:var(--st-bg);overflow:hidden}
.cs-r-prev svg,.cs-template-preview svg{max-width:100%;max-height:100%;height:auto;width:auto;box-shadow:0 1px 6px rgba(0,0,0,.25)}
.cs-recent-delete{display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:var(--st-radius-sm);background:var(--st-raised);color:var(--st-muted);cursor:pointer;opacity:0}
.cs-r-card .cs-recent-delete{position:absolute;top:6px;right:6px;box-shadow:0 0 0 1px var(--st-line-strong)}
.cs-r-card:hover .cs-recent-delete,.cs-r-row:hover .cs-recent-delete,.cs-recent-delete:focus-visible{opacity:1}.cs-recent-delete:hover{color:var(--st-danger)}
.cs-r-list{border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-panel);overflow:hidden}
.cs-r-head,.cs-r-row{display:grid;grid-template-columns:44px minmax(0,1fr) 110px 70px 120px 32px;gap:12px;align-items:center;padding:6px 12px}
.cs-r-head{height:28px;font-size:var(--st-text-xs);font-weight:600;color:var(--st-muted);border-bottom:1px solid var(--st-line);text-transform:uppercase;letter-spacing:.04em}
.cs-r-row{min-height:44px;border-bottom:1px solid var(--st-line);cursor:pointer;font-size:var(--st-text-sm);font-variant-numeric:tabular-nums}.cs-r-row:last-child{border-bottom:0}.cs-r-row:hover{background:var(--st-hover)}
.cs-r-thumb{display:grid;place-items:center;width:40px;height:30px;background:var(--st-bg);border-radius:3px;overflow:hidden}.cs-r-thumb svg{max-width:100%;max-height:100%;height:auto;width:auto}
.cs-r-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.cs-t-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.cs-template{display:block;padding:0 0 8px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-panel);color:inherit;text-align:left;cursor:pointer;overflow:hidden}.cs-template:hover{border-color:var(--st-accent)}
.cs-template strong{display:block;padding:6px 10px 0;font-size:var(--st-text-sm);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cs-template small{display:block;padding:0 10px;font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-format-note{margin:24px 0 0;font-size:var(--st-text-xs);color:var(--st-faint)}

/* ---- Editor frame ---- */
.cs-app{position:fixed;inset:0;z-index:70;display:grid;grid-template-columns:44px var(--st-panel-w) minmax(0,1fr) var(--cs-insp-w);grid-template-rows:var(--st-bar) minmax(0,1fr);background:var(--st-bg);color:var(--st-text);font-size:var(--st-text-sm)}
.cs-app[hidden]{display:none}
.cs-app.cs-left-closed{grid-template-columns:44px 0 minmax(0,1fr) var(--cs-insp-w)}.cs-app.cs-insp-closed{grid-template-columns:44px var(--st-panel-w) minmax(0,1fr) 0}.cs-app.cs-left-closed.cs-insp-closed{grid-template-columns:44px 0 minmax(0,1fr) 0}
.cs-app.cs-left-closed .cs-panel,.cs-app.cs-insp-closed .cs-inspector{border:0;overflow:hidden}
.cs-tool{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:var(--st-row);min-width:var(--st-row);padding:0 6px;border:0;border-radius:var(--st-radius);background:transparent;color:var(--st-muted);font-size:var(--st-text-sm);font-weight:500;cursor:pointer;white-space:nowrap;flex:0 0 auto}
.cs-tool:hover:not(:disabled){background:var(--st-hover);color:var(--st-text)}.cs-tool:disabled{opacity:.35;cursor:default}.cs-tool.cs-on{background:var(--st-accent-soft);color:var(--st-accent)}
.cs-tool-wide{padding:0 10px}.cs-ibtn{min-width:26px;height:26px;padding:0}

/* ---- Top bar ---- */
.cs-top{grid-column:1/-1;grid-row:1;display:flex;align-items:center;gap:8px;padding:0 10px;background:var(--st-panel);border-bottom:1px solid var(--st-line);z-index:3;min-width:0}
.cs-top-group{display:flex;align-items:center;gap:2px;min-width:0}.cs-top-doc{gap:8px;flex:1 1 140px}.cs-top-center{flex:0 0 auto}.cs-top-end{gap:6px;margin-left:auto}
.cs-top-divider{width:1px;height:18px;background:var(--st-line-strong);margin:0 6px}
.cs-menubar{display:flex;align-items:center;gap:0;margin-left:4px}
.cs-menu-btn{height:var(--st-row);padding:0 9px;border:0;border-radius:var(--st-radius);background:transparent;color:var(--st-text);font-size:var(--st-text-md);cursor:pointer}.cs-menu-btn:hover,.cs-menu-btn.cs-on{background:var(--st-hover)}
.cs-menu-all{display:none;padding:0 6px}
.cs-project-name{flex:0 1 220px;min-width:60px;height:var(--st-row);padding:0 8px;border:1px solid transparent;border-radius:var(--st-radius);background:transparent;color:var(--st-text);font-size:var(--st-text-md);font-weight:600;text-overflow:ellipsis}
.cs-project-name:hover{border-color:var(--st-line-strong)}
.cs-save-status{display:inline-flex;align-items:center;gap:6px;font-size:var(--st-text-xs);color:var(--st-muted);white-space:nowrap}
.cs-save-status::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--st-success)}.cs-save-status[data-state=dirty]::before{background:var(--st-accent)}.cs-save-status[data-state=busy]::before{background:var(--st-faint)}.cs-save-status:empty::before{display:none}
.cs-zoom-btn{display:inline-flex;align-items:center;gap:4px;height:var(--st-row);padding:0 6px;border:0;border-radius:var(--st-radius);background:transparent;color:var(--st-text);cursor:pointer;font-variant-numeric:tabular-nums}.cs-zoom-btn:hover{background:var(--st-hover)}.cs-zoom-label{min-width:38px;text-align:right}
.cs-zoom-btn .cs-glyph{width:12px;height:12px;color:var(--st-muted)}
.cs-top-btn{display:inline-flex;align-items:center;gap:6px;height:var(--st-row);padding:0 12px;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:transparent;color:var(--st-text);font-size:var(--st-text-sm);font-weight:500;cursor:pointer;white-space:nowrap}
.cs-top-btn:hover{background:var(--st-hover)}.cs-top-primary{background:var(--st-accent);border-color:var(--st-accent);color:var(--st-accent-ink);font-weight:600}.cs-top-primary:hover{background:var(--st-accent-hover)}
.cs-top-ghost{border-color:transparent}

/* ---- Tool bar ---- */
.cs-tools{grid-row:2;grid-column:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 0;background:var(--st-panel);border-right:1px solid var(--st-line);overflow-y:auto}
.cs-toolbtn{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:var(--st-radius);background:transparent;color:var(--st-muted);cursor:pointer;flex:none}
.cs-toolbtn:hover{background:var(--st-hover);color:var(--st-text)}.cs-toolbtn.cs-on{background:var(--st-accent);color:var(--st-accent-ink)}
.cs-tools-sep{width:20px;margin:6px 0;border:0;border-top:1px solid var(--st-line-strong)}

/* ---- Left panel ---- */
.cs-panel{grid-row:2;grid-column:2;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--st-panel);border-right:1px solid var(--st-line);overflow:hidden}
.cs-ptabs{display:flex;flex:none;height:36px;border-bottom:1px solid var(--st-line)}
.cs-ptab{flex:1;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--st-muted);font-size:var(--st-text-sm);font-weight:500;cursor:pointer}.cs-ptab:hover{color:var(--st-text)}.cs-ptab.cs-on{color:var(--st-text);border-bottom-color:var(--st-accent)}
.cs-panel-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:8px}
.cs-panel-body.cs-tab-assets{padding:0}.cs-sub{padding:10px 12px 24px}
.cs-sub h4,.cs-panel-body h4{margin:14px 0 6px;font-size:var(--st-text-xs);font-weight:600;color:var(--st-muted);text-transform:uppercase;letter-spacing:.04em}.cs-sub>h4:first-child{margin-top:2px}
.cs-rail{display:flex;flex-wrap:wrap;gap:4px;padding:8px;border-bottom:1px solid var(--st-line);position:sticky;top:0;background:var(--st-panel);z-index:2}
.cs-rail-btn{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 8px;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--st-muted);font-size:var(--st-text-xs);font-weight:500;cursor:pointer}
.cs-rail-btn .cs-glyph{width:13px;height:13px}.cs-rail-btn:hover{background:var(--st-hover);color:var(--st-text)}.cs-rail-btn.cs-on{background:var(--st-accent-soft);color:var(--st-text);border-color:var(--st-accent)}
.cs-panel-note{display:flex;justify-content:space-between;padding:2px 6px 6px;font-size:var(--st-text-xs);color:var(--st-faint)}
.cs-layers{display:flex;flex-direction:column;gap:1px}
.cs-layer{display:flex;align-items:center;gap:6px;height:var(--st-row);padding:0 4px 0 calc(6px + var(--depth,0) * 16px);border-radius:var(--st-radius);cursor:pointer;color:var(--st-text);position:relative}
.cs-layer:hover{background:var(--st-hover)}.cs-layer-selected{background:var(--st-accent-soft)!important}.cs-layer-selected .cs-layer-ico{color:var(--st-accent)}
.cs-layer-partial{box-shadow:inset 2px 0 0 var(--st-accent)}
.cs-layer-ico{display:grid;place-items:center;width:16px;color:var(--st-muted)}
.cs-layer-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:none}.cs-layer-group .cs-layer-name{font-weight:600}
.cs-layer-off .cs-layer-name,.cs-layer-off .cs-layer-ico{opacity:.4}.cs-layer-locked .cs-layer-name{color:var(--st-muted)}
.cs-layer-edit{flex:1;min-width:0;height:22px;padding:0 6px;border:1px solid var(--st-accent);border-radius:4px;background:var(--st-raised);color:var(--st-text);font-size:var(--st-text-sm)}
.cs-lbtn{display:grid;place-items:center;width:22px;height:22px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--st-muted);cursor:pointer;opacity:0;flex:none}
.cs-lbtn .cs-glyph{width:14px;height:14px}.cs-layer:hover .cs-lbtn,.cs-lbtn:focus-visible,.cs-lbtn-on,.cs-layer-selected .cs-lbtn{opacity:1}.cs-lbtn-on{color:var(--st-text)}.cs-lbtn:hover{background:var(--st-pressed);color:var(--st-text)}
.cs-chev{opacity:1;width:16px}.cs-chev .cs-glyph{transition:transform .12s}.cs-chev-open .cs-glyph{transform:rotate(90deg)}
.cs-layer-badge{display:grid;place-items:center;color:var(--st-muted)}.cs-layer-badge .cs-glyph{width:12px;height:12px}
.cs-dragging{opacity:.4}.cs-drop-above{box-shadow:inset 0 2px 0 var(--st-accent)}.cs-drop-below{box-shadow:inset 0 -2px 0 var(--st-accent)}
.cs-page-actions{display:flex;gap:2px;margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid var(--st-line)}.cs-page-actions .cs-tool{flex:1}
.cs-pages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cs-page-thumb{display:flex;flex-direction:column;gap:4px;min-width:0;cursor:grab}
.cs-page-open{display:grid;place-items:center;padding:6px;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:var(--st-bg);cursor:pointer;aspect-ratio:4/3;overflow:hidden}
.cs-page-open svg{max-width:100%;max-height:100%;height:auto;width:auto;box-shadow:0 1px 4px rgba(0,0,0,.3)}
.cs-page-active .cs-page-open{border-color:var(--st-accent);box-shadow:0 0 0 1px var(--st-accent)}
.cs-page-meta{display:flex;align-items:center;gap:6px;min-width:0;font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-page-no{display:inline-grid;place-items:center;min-width:16px;height:16px;padding:0 3px;border-radius:3px;background:var(--st-hover);color:var(--st-text);font-weight:600}.cs-page-active .cs-page-no{background:var(--st-accent);color:var(--st-accent-ink)}
.cs-page-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.cs-notes-input{display:block;width:100%;min-height:84px;max-height:30vh;resize:vertical;padding:8px;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:var(--st-raised);color:var(--st-text);font-size:var(--st-text-sm);line-height:1.5}
/* Asset drawers */
.cs-panel-search{margin:2px 0 8px}
.cs-panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.cs-panel-template{display:flex;flex-direction:column;gap:4px;padding:0;border:0;background:none;color:inherit;font-size:var(--st-text-xs);text-align:left;cursor:pointer}
.cs-panel-template svg{width:100%;height:auto;border-radius:4px;box-shadow:0 0 0 1px var(--st-line-strong);background:#fff}.cs-panel-template:hover svg{box-shadow:0 0 0 2px var(--st-accent)}
.cs-panel-template span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--st-muted)}
.cs-tile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.cs-tile-wide{grid-template-columns:repeat(3,minmax(0,1fr))}
.cs-tile{display:grid;place-items:center;aspect-ratio:1;padding:9px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-raised);color:var(--st-muted);cursor:grab}
.cs-tile-wide .cs-tile{aspect-ratio:2.2}.cs-tile svg{width:100%;height:100%}.cs-tile:hover{border-color:var(--st-accent);color:var(--st-text)}.cs-stickers .cs-tile{padding:5px}
.cs-tile-img{padding:6px}.cs-tile-img img{width:100%;height:100%;object-fit:contain;pointer-events:none}.cs-tile-icon{padding:11px}
.cs-sec{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.cs-text-preset{display:block;width:100%;margin:6px 0;padding:10px 12px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-raised);color:var(--st-text);text-align:left;cursor:grab;line-height:1.25}.cs-text-preset:hover{border-color:var(--st-accent)}
.cs-preset-h1{font-size:24px;font-weight:800}.cs-preset-h2{font-size:17px;font-weight:700}.cs-preset-body{font-size:13px}
.cs-combo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.cs-combo{padding:0;border:1px solid var(--st-line);border-radius:var(--st-radius);overflow:hidden;background:var(--st-raised);cursor:grab}.cs-combo:hover{border-color:var(--st-accent)}
.cs-dropzone{display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 12px;border:1px dashed var(--st-line-strong);border-radius:var(--st-radius);text-align:center;cursor:pointer;color:var(--st-muted)}.cs-dropzone strong{color:var(--st-text);font-size:var(--st-text-md)}.cs-dropzone small{font-size:var(--st-text-xs)}
.cs-dropzone:hover,.cs-dropzone.cs-dropping{border-color:var(--st-accent);background:var(--st-accent-soft)}
.cs-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.cs-upload{padding:0;border:1px solid var(--st-line);border-radius:var(--st-radius);overflow:hidden;aspect-ratio:1;background:var(--cs-chk);cursor:grab;width:100%}.cs-upload img{width:100%;height:100%;object-fit:contain}
.cs-gfx{min-height:60px}.cs-credit{font-size:10px;color:var(--st-faint);margin-top:14px}
.cs-icon-options{display:grid;gap:6px;margin:8px 0}
.cs-color-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0;font-size:var(--st-text-sm)}
.cs-brand-swatch,.cs-brand-logo{position:relative;display:block}.cs-brand-swatch .cs-swatch{width:100%}
.cs-brand-x{position:absolute;top:-5px;right:-5px;display:none;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:var(--st-text);color:var(--st-panel);font-size:11px;line-height:16px;cursor:pointer}
.cs-brand-swatch:hover .cs-brand-x,.cs-brand-logo:hover .cs-brand-x,.cs-brand-x:focus-visible{display:block}
.cs-gradient-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.cs-gradient{aspect-ratio:1;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);cursor:pointer;padding:0}.cs-gradient:hover{outline:2px solid var(--st-accent)}
.cs-swatches{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:4px}
.cs-swatch{position:relative;aspect-ratio:1;border:1px solid rgba(0,0,0,.18);border-radius:4px;cursor:pointer;padding:0}.cs-swatch:hover{transform:scale(1.1)}.cs-swatch-on{outline:2px solid var(--st-accent);outline-offset:1px}
.cs-swatch-custom{background:conic-gradient(#ff3131,#ffde59,#7ed957,#5ce1e6,#5271ff,#cb6ce6,#ff3131)}.cs-swatch-custom input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.cs-sub .cs-swatches{grid-template-columns:repeat(8,minmax(0,1fr))}
.cs-effect-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.cs-effect{display:flex;flex-direction:column;gap:3px;align-items:center;padding:0;border:0;background:none;color:inherit;font-size:10px;cursor:pointer}
.cs-effect svg{width:100%;height:auto;border-radius:4px;border:1px solid var(--st-line-strong)}.cs-effect:hover svg{border-color:var(--st-accent)}
.cs-look-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-bottom:6px}.cs-look{display:flex;flex-direction:column;align-items:center;gap:2px;padding:0;border:0;background:none;color:inherit;cursor:pointer}
.cs-look img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:4px;background:var(--st-bg);border:1px solid var(--st-line)}.cs-look span{font-size:10px;line-height:1.2;text-align:center;color:var(--st-muted)}.cs-look-on img{outline:2px solid var(--st-accent)}
.cs-font-list{display:flex;flex-direction:column;gap:1px;max-height:300px;overflow:auto;margin-top:6px}.cs-font-item{display:flex;flex-direction:column;align-items:flex-start;gap:0;padding:6px 8px;border:0;border-radius:var(--st-radius);background:none;color:inherit;font-size:15px;text-align:left;cursor:pointer}
.cs-font-item small{font-size:10px;color:var(--st-muted);font-family:var(--st-font)}.cs-font-item:hover{background:var(--st-hover)}.cs-font-item.cs-on{background:var(--st-accent-soft)}

/* ---- Canvas ---- */
.cs-main{grid-row:2;grid-column:3;display:grid;grid-template-rows:minmax(0,1fr) 26px;min-width:0;min-height:0}
.cs-workspace{position:relative;min-width:0;min-height:0;overflow:hidden;background:var(--st-pasteboard)}
.cs-stage-wrap{position:absolute;inset:0;overflow:auto;display:flex;padding:56px;overscroll-behavior:contain}
.cs-stage-wrap.cs-dropping{outline:2px dashed var(--st-accent);outline-offset:-6px}
.cs-stage{position:relative;flex:none;margin:auto;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.14),0 8px 28px rgba(0,0,0,.28);touch-action:none}
.cs-drawing{display:block;width:100%;height:100%;overflow:visible;user-select:none}.cs-selection{pointer-events:auto}.cs-handle{filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.35))}
.cs-stage-wrap[data-mode=hand] .cs-drawing,.cs-stage-wrap[data-mode=hand] .cs-drawing *{cursor:grab!important}.cs-stage-wrap.cs-panning,.cs-stage-wrap.cs-panning *{cursor:grabbing!important}
.cs-stage-wrap:not([data-mode=move]):not([data-mode=hand]) .cs-drawing,.cs-stage-wrap:not([data-mode=move]):not([data-mode=hand]) .cs-drawing *{cursor:crosshair!important}
.cs-inline-text{position:absolute;z-index:7;margin:0;padding:0;border:0;outline:2px solid var(--st-accent);background:rgba(255,255,255,.85);resize:none;overflow:hidden;transform-origin:center}
.cs-ruler{position:absolute;z-index:3;background:var(--st-panel);box-shadow:0 0 0 1px var(--st-line-strong);cursor:copy;overflow:visible}.cs-ruler-h{left:0;top:-24px}.cs-ruler-v{top:0;left:-24px}
.cs-ruler line{stroke:var(--st-faint);stroke-width:1}.cs-ruler text{font-size:9px;fill:var(--st-muted);font-family:var(--st-font);user-select:none}
.cs-bottom{grid-row:2;display:flex;align-items:stretch;height:26px;background:var(--st-panel);border-top:1px solid var(--st-line);font-size:var(--st-text-xs);color:var(--st-muted);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden}
.cs-st-item{display:inline-flex;align-items:center;gap:4px;padding:0 10px;border:0;background:transparent;color:inherit}.cs-st-btn{cursor:pointer}.cs-st-btn:hover{background:var(--st-hover);color:var(--st-text)}
.cs-st-cursor{min-width:116px;font-family:var(--st-mono)}.cs-spacer{flex:1}

/* ---- Inspector ---- */
.cs-inspector{grid-row:2;grid-column:4;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--st-panel);border-left:1px solid var(--st-line);overflow:hidden}
.cs-insp-head{display:flex;align-items:center;gap:8px;flex:none;height:44px;padding:0 6px 0 12px;border-bottom:1px solid var(--st-line)}
.cs-insp-title{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.25}.cs-insp-title strong{font-size:var(--st-text-md);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cs-insp-title span{font-size:var(--st-text-xs);color:var(--st-muted);font-variant-numeric:tabular-nums}
.cs-insp-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.cs-sect{border-bottom:1px solid var(--st-line)}
.cs-sect-head{display:flex;align-items:center;height:32px;padding:0 6px 0 8px}
.cs-sect-toggle{display:flex;align-items:center;gap:4px;flex:1;height:100%;border:0;background:none;color:var(--st-text);font-size:var(--st-text-xs);font-weight:600;text-transform:uppercase;letter-spacing:.05em;cursor:pointer;text-align:left}
.cs-sect-chev{display:inline-block;width:12px;font-size:9px;color:var(--st-muted);transition:transform .12s;transform:rotate(90deg)}.cs-sect-closed .cs-sect-chev{transform:none}
.cs-sect-body{display:grid;gap:8px;padding:2px 12px 12px}
.cs-sect-body>*{min-width:0}
.cs-row{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px;align-items:center}
.cs-row-lock{grid-auto-flow:row;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 26px}
.cs-row-dial{grid-auto-flow:row;grid-template-columns:44px minmax(0,1fr);gap:10px}.cs-row-stop{grid-auto-flow:row;grid-template-columns:84px 1fr 1fr}
.cs-iconpair{display:flex;gap:2px}
.cs-iconrow{display:flex;gap:1px;flex-wrap:wrap}.cs-iconrow .cs-tool{flex:1 1 0}
.cs-vsep{width:1px;background:var(--st-line-strong);margin:4px 3px}
.cs-textrow{flex-wrap:nowrap}
.cs-tbtn{flex:1 1 0;min-width:0;height:26px;border:0;border-radius:var(--st-radius);background:transparent;color:var(--st-muted);cursor:pointer;font-size:var(--st-text-md)}.cs-tbtn:hover:not(:disabled){background:var(--st-hover);color:var(--st-text)}.cs-tbtn.cs-on{background:var(--st-accent-soft);color:var(--st-accent)}.cs-tbtn:disabled{opacity:.35}
.cs-num{position:relative;display:flex;align-items:center;min-width:0;height:var(--st-row);border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:var(--st-raised);padding:0 2px 0 0}
.cs-num-l{display:grid;place-items:center;flex:none;min-width:22px;height:100%;padding:0 2px;font-size:var(--st-text-xs);font-weight:600;color:var(--st-muted);cursor:ew-resize;user-select:none;touch-action:none}.cs-num-l:hover{color:var(--st-accent)}
.cs-num-input{flex:1;min-width:0;width:100%;height:100%;border:0;background:transparent;outline:none;padding:0 4px 0 0;font-size:var(--st-text-sm);font-variant-numeric:tabular-nums;color:var(--st-text)}
.cs-num-u{flex:none;padding-right:5px;font-style:normal;font-size:var(--st-text-xs);color:var(--st-faint)}
.cs-num-off{opacity:.45}.cs-num-off .cs-num-l{cursor:default}.cs-num-off .cs-num-l:hover{color:var(--st-muted)}
.cs-fieldrow{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px;align-items:center;font-size:var(--st-text-xs);color:var(--st-muted)}.cs-fieldrow>.cs-in{min-width:0}
.cs-colorfield{display:flex;align-items:center;gap:6px;min-width:0}.cs-cf-l{flex:0 0 64px;font-size:var(--st-text-xs);color:var(--st-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cs-fillfield{display:grid;gap:8px}.cs-fillfield .cs-colorfield .cs-cf-l{display:none}
.cs-swatch-btn{width:var(--st-row);height:var(--st-row);flex:0 0 auto;padding:0;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);cursor:pointer;box-shadow:inset 0 0 0 2px var(--st-raised)}.cs-swatch-btn:hover{border-color:var(--st-accent)}
.cs-fillchip{width:44px}
.cs-gradname{flex:1;min-width:0;height:var(--st-row);padding:0 8px;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:var(--st-raised);color:var(--st-text);text-align:left;cursor:pointer;font-size:var(--st-text-sm)}.cs-gradname:hover{background:var(--st-hover)}
.cs-hex{flex:1;min-width:0;height:var(--st-row);padding:0 8px;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:var(--st-raised);color:var(--st-text);font-family:var(--st-mono);font-size:var(--st-text-sm);text-transform:uppercase}
.cs-swatchrow{display:flex;flex-wrap:wrap;gap:4px}.cs-swatchrow .cs-swatch{width:18px;height:18px;aspect-ratio:auto}
.cs-gradients{display:grid;grid-template-columns:repeat(6,1fr);gap:4px}.cs-gradients .cs-gradient{aspect-ratio:auto;height:26px}
.cs-fontbtn{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;height:var(--st-row);padding:0 8px;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:var(--st-raised);color:var(--st-text);font-size:var(--st-text-md);cursor:pointer}.cs-fontbtn:hover{background:var(--st-hover)}.cs-fontbtn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cs-casing .cs-tbtn{font-size:var(--st-text-sm)}

/* ---- Popovers, menus, colour editor ---- */
.cs-pop{position:fixed;z-index:95;min-width:200px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);overflow:auto;background:var(--st-raised);color:var(--st-text);border:1px solid var(--st-line-strong);border-radius:8px;box-shadow:var(--st-shadow);font-size:var(--st-text-sm);animation:cs-pop .08s ease-out}
@keyframes cs-pop{from{opacity:0;transform:translateY(-3px)}}@media(prefers-reduced-motion:reduce){.cs-pop{animation:none}}
.cs-pop-body{padding:10px}.cs-pop-body h5{margin:8px 0 4px;font-size:var(--st-text-xs);color:var(--st-muted);text-transform:uppercase;letter-spacing:.05em}
.cs-pop-fonts{width:260px}
.cs-menu{display:flex;flex-direction:column;padding:4px;min-width:250px}
.cs-menu button{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:6px;min-height:26px;padding:0 10px 0 4px;border:0;border-radius:var(--st-radius-sm);background:none;color:var(--st-text);font-size:var(--st-text-md);text-align:left;cursor:pointer}
.cs-menu button:hover:not(:disabled){background:var(--st-accent-soft)}.cs-menu button:disabled{color:var(--st-faint);cursor:default}.cs-menu-tick{color:var(--st-accent);text-align:center;font-size:11px}
.cs-menu hr{border:0;border-top:1px solid var(--st-line);margin:4px 2px}.cs-menu-head{padding:6px 8px 2px;font-size:var(--st-text-xs);font-weight:600;color:var(--st-muted);text-transform:uppercase;letter-spacing:.05em}
.cs-pop-color{width:288px}
.cs-ce{display:grid;gap:10px;padding:12px}.cs-ce>*{min-width:0}.cs-color-title{margin:0;font-size:var(--st-text-xs);font-weight:600;color:var(--st-muted);text-transform:uppercase;letter-spacing:.05em}
.cs-sv{position:relative;height:124px;border-radius:var(--st-radius);cursor:crosshair;touch-action:none;outline:none}.cs-sv:focus-visible{box-shadow:0 0 0 2px var(--st-focus)}
.cs-sv-knob,.cs-slide-knob{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.5),0 1px 3px rgba(0,0,0,.4);pointer-events:none}
.cs-sliders{display:grid;gap:8px}
.cs-hue,.cs-alpha{position:relative;height:12px;border-radius:6px;touch-action:none;cursor:pointer;outline:none}.cs-hue:focus-visible,.cs-alpha:focus-visible{box-shadow:0 0 0 2px var(--st-focus)}
.cs-hue{background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)}.cs-alpha{background:var(--cs-chk)}.cs-alpha-fill{position:absolute;inset:0;border-radius:inherit}
.cs-hue .cs-slide-knob,.cs-alpha .cs-slide-knob{top:50%}
.cs-hexrow{display:flex;align-items:center;gap:6px}.cs-hexrow .cs-seg{flex:none;width:80px}.cs-hex-lg{flex:1}
.cs-nativecolor{position:relative;display:block;width:var(--st-row);height:var(--st-row);flex:none;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);cursor:pointer;overflow:hidden}.cs-nativecolor input{position:absolute;inset:-6px;width:calc(100% + 12px);height:calc(100% + 12px);opacity:0;cursor:pointer}
.cs-sw-title{margin:2px 0 -4px;font-size:var(--st-text-xs);font-weight:600;color:var(--st-muted)}
.cs-alpha[hidden],.cs-alpha-num[hidden]{display:none}
.cs-gsec{display:grid;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--st-line)}.cs-gsec-solid{padding-bottom:8px}
.cs-gbar{position:relative;height:24px;margin:2px 7px 14px;border-radius:4px;background:var(--cs-chk);cursor:copy;box-shadow:0 0 0 1px var(--st-line-strong)}
.cs-gbar-fill{position:absolute;inset:0;border-radius:4px;pointer-events:none}
.cs-gstop{position:absolute;top:calc(100% - 3px);width:14px;height:20px;margin-left:-7px;padding:0;border:2px solid #fff;border-radius:3px;background:linear-gradient(var(--c),var(--c)),var(--cs-chk);box-shadow:0 0 0 1px rgba(0,0,0,.5);cursor:grab;touch-action:none}
.cs-gstop-on{box-shadow:0 0 0 2px var(--st-accent);z-index:1}.cs-gstop-drop{opacity:.3}.cs-gstop:active{cursor:grabbing}
.cs-dial{position:relative;width:40px;height:40px;border:1px solid var(--st-line-strong);border-radius:50%;background:var(--st-bg);cursor:pointer;touch-action:none;outline:none}.cs-dial:focus-visible{box-shadow:0 0 0 2px var(--st-focus)}
.cs-dial-needle{position:absolute;left:50%;top:50%;width:50%;height:2px;margin-top:-1px;background:var(--st-accent);transform-origin:0 50%;pointer-events:none}.cs-dial-needle::after{content:'';position:absolute;right:-1px;top:-3px;width:8px;height:8px;border-radius:50%;background:var(--st-accent)}
.cs-quick{display:grid;grid-template-columns:repeat(8,1fr);gap:2px}.cs-quick button{height:22px;border:1px solid var(--st-line);border-radius:4px;background:var(--st-bg);color:var(--st-muted);cursor:pointer;font-size:12px;padding:0}.cs-quick button:hover{color:var(--st-text);background:var(--st-hover)}.cs-quick button.cs-on{border-color:var(--st-accent);color:var(--st-text);background:var(--st-accent-soft)}
.cs-presets{display:grid;grid-template-columns:repeat(8,1fr);gap:4px}.cs-preset{height:20px;border:1px solid var(--st-line-strong);border-radius:4px;cursor:pointer;padding:0}.cs-preset:hover{outline:2px solid var(--st-accent);outline-offset:1px}
.cs-dirbox{display:grid;gap:8px}

/* ---- Present ---- */
.cs-present{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:#000;outline:none;cursor:pointer}.cs-present>svg{max-width:100vw;max-height:100vh;width:auto;height:auto}
.cs-present-count{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);padding:4px 12px;border-radius:20px;background:rgba(255,255,255,.12);color:#fff;font-size:12px}
.cs-present-close{position:fixed;top:14px;right:14px;display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;cursor:pointer}
.cs-present-notes{position:fixed;left:50%;bottom:52px;transform:translateX(-50%);width:min(860px,90vw);max-height:30vh;overflow:auto;padding:12px 16px;border-radius:8px;background:rgba(0,0,0,.78);color:#fff;font-size:15px;line-height:1.6;white-space:pre-wrap;cursor:default}

/* ---- Window sizes ---- */
@media(max-width:1180px){.cs-app{--cs-insp-w:248px;--st-panel-w:236px}.cs-top-ghost span{display:none}.cs-top-ghost{padding:0 8px}}
@media(max-width:1020px){.cs-menubar{display:none}.cs-menu-all{display:inline-flex}.cs-project-name{flex-basis:140px}.cs-home-new{grid-template-columns:minmax(0,1fr)}}
@media(max-width:900px){.cs-save-status{display:none}}
@media(max-width:760px){
  .creative-root{padding:12px!important}
  .cs-home{padding:14px}.cs-r-head,.cs-r-row{grid-template-columns:36px minmax(0,1fr) 84px 32px}.cs-r-head>:nth-child(4),.cs-r-head>:nth-child(5),.cs-r-row>:nth-child(4),.cs-r-row>:nth-child(5){display:none}
  .cs-section-head .cs-search{width:100%;flex:1 1 100%}
  .cs-app,.cs-app.cs-left-closed,.cs-app.cs-insp-closed,.cs-app.cs-left-closed.cs-insp-closed{grid-template-columns:minmax(0,1fr);grid-template-rows:var(--st-bar) minmax(0,1fr) 44px}
  .cs-top{gap:2px;padding:0 6px}.cs-top-doc{flex:1 1 60px}.cs-project-name{flex-basis:60px;font-size:var(--st-text-sm)}.cs-top-divider,.cs-hide-sm,.cs-top-ghost{display:none}.cs-top-btn span{display:none}.cs-top-btn{padding:0 8px}.cs-top-end{gap:2px}
  .cs-top-group:first-child>.cs-tool:first-child{display:none}
  .cs-main{grid-column:1;grid-row:2}
  .cs-tools{grid-column:1;grid-row:3;flex-direction:row;justify-content:space-around;padding:0 4px;border-right:0;border-top:1px solid var(--st-line);overflow-x:auto;overflow-y:hidden}.cs-tools-sep{display:none}
  .cs-toolbtn{width:36px;height:36px}
  .cs-panel,.cs-inspector{position:fixed;left:0;right:0;bottom:44px;top:auto;width:auto;grid-column:auto;grid-row:auto;z-index:8;border:0;border-top:1px solid var(--st-line-strong);box-shadow:0 -10px 30px rgba(0,0,0,.25)}
  .cs-panel{height:62vh}.cs-inspector{max-height:62vh}
  .cs-app.cs-left-closed .cs-panel,.cs-app.cs-insp-closed .cs-inspector{display:none}
  .cs-stage-wrap{padding:20px 14px}
  .cs-st-cursor{display:none}.cs-pop-color{width:min(288px,calc(100vw - 16px))}
  .cs-menu{min-width:min(250px,calc(100vw - 16px))}
  .cs-pages{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cs-dialog-body{padding:14px}.cs-version{grid-template-columns:80px 1fr}
}

/* ---- Polish ---- */
.cs-sect-body .cs-check{margin:0}.cs-sect-body .cs-help{margin:0}.cs-sect-body .cs-wide{margin:0}.cs-sect-body .cs-slider{margin:0}.cs-sect-body .cs-h{margin:6px 0 0}
.cs-sect-chev{width:12px;height:12px;font-size:0;position:relative;transform:none}.cs-sect-chev::before{content:'';position:absolute;left:3px;top:3px;width:5px;height:5px;border-right:1.5px solid var(--st-muted);border-bottom:1.5px solid var(--st-muted);transform:rotate(45deg) translate(-1px,-1px);transition:transform .12s}
.cs-sect-closed .cs-sect-chev::before{transform:rotate(-45deg) translate(-1px,-1px)}
.cs-ibtn{min-width:24px}.cs-iconrow .cs-tool{flex:1 1 24px;min-width:24px;padding:0}.cs-btn-sm{white-space:normal;text-align:center;line-height:1.25;padding-top:3px;padding-bottom:3px}
@media(max-width:760px){.cs-stage{margin:0 auto auto}.cs-stage-wrap{padding:12px}.cs-panel{height:48vh}.cs-inspector{max-height:48vh}}

/* ===== Simplified layout: labelled rail, panel only on selection, words on every button ===== */
.cs-app{--cs-rail-w:76px;grid-template-columns:var(--cs-rail-w) var(--st-panel-w) minmax(0,1fr) var(--cs-insp-w)}
.cs-app.cs-left-closed{grid-template-columns:var(--cs-rail-w) 0 minmax(0,1fr) var(--cs-insp-w)}
.cs-app.cs-insp-closed{grid-template-columns:var(--cs-rail-w) var(--st-panel-w) minmax(0,1fr) 0}
.cs-app.cs-left-closed.cs-insp-closed{grid-template-columns:var(--cs-rail-w) 0 minmax(0,1fr) 0}
.cs-tools{padding:8px 6px;gap:3px;align-items:stretch}
.cs-tools .cs-rail-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;height:56px;padding:4px 2px;border:0;border-radius:var(--st-radius);background:transparent;color:var(--st-muted);font-size:11px;font-weight:500;cursor:pointer;flex:none;position:relative}
.cs-tools .cs-rail-btn .cs-glyph{width:20px;height:20px;stroke-width:1.5}
.cs-tools .cs-rail-btn span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.1}
.cs-tools .cs-rail-btn:hover{background:var(--st-hover);color:var(--st-text)}
.cs-tools .cs-rail-btn.cs-on{background:var(--st-accent-soft);color:var(--st-text);border-color:transparent}.cs-tools .cs-rail-btn.cs-on .cs-glyph{color:var(--st-accent)}
.cs-tools .cs-rail-btn.cs-on::before{content:'';position:absolute;left:-6px;top:10px;bottom:10px;width:3px;border-radius:0 3px 3px 0;background:var(--st-accent)}
.cs-panel-head{display:flex;align-items:center;gap:8px;flex:none;padding:8px 8px 8px 14px;border-bottom:1px solid var(--st-line)}
.cs-panel-title{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.25}.cs-panel-title strong{font-size:var(--st-text-md);font-weight:600}.cs-panel-title span{font-size:var(--st-text-xs);color:var(--st-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cs-panel-body{padding:10px 12px 24px}
.cs-drawrow{margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid var(--st-line)}.cs-drawrow h4{margin:0 0 6px!important}
.cs-drawbtns{display:grid;grid-template-columns:1fr 1fr;gap:6px}.cs-drawbtns .cs-btn{justify-content:flex-start;white-space:nowrap}
.cs-drawrow .cs-help{margin:6px 0 0}
/* top bar */
.cs-top-home{border-color:transparent;padding:0 10px 0 6px}.cs-top-home:hover{background:var(--st-hover)}
.cs-top-save .cs-glyph{color:var(--st-muted)}
.cs-menu-all span{margin-left:4px;font-size:var(--st-text-sm)}
@media(max-width:1180px){.cs-top-ghost span{display:inline}.cs-hide-md{display:none}}
/* bottom bar */
.cs-st-page{color:var(--st-text);border-right:1px solid var(--st-line)}.cs-st-page .cs-glyph{width:14px;height:14px}
.cs-st-word{margin-left:2px}
/* banner, selection bar, first-use hint */
.cs-banner{position:absolute;top:12px;left:50%;transform:translateX(-50%);z-index:7;display:flex;align-items:center;gap:10px;padding:5px 6px 5px 16px;background:var(--st-accent);color:var(--st-accent-ink);border-radius:20px;font-size:var(--st-text-md);font-weight:600;box-shadow:var(--st-shadow);white-space:nowrap;max-width:calc(100% - 16px)}
.cs-banner[hidden],.cs-float[hidden],.cs-empty-hint[hidden]{display:none}
.cs-banner button{height:24px;padding:0 10px;border:0;border-radius:12px;background:rgba(0,0,0,.14);color:inherit;font-weight:600;cursor:pointer}.cs-banner button:hover{background:rgba(0,0,0,.24)}
.cs-float{position:absolute;z-index:6;display:flex;gap:2px;padding:3px;background:var(--st-raised);border:1px solid var(--st-line-strong);border-radius:8px;box-shadow:var(--st-shadow)}
.cs-fbtn{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 9px;border:0;border-radius:6px;background:transparent;color:var(--st-text);font-size:var(--st-text-sm);font-weight:500;cursor:pointer;white-space:nowrap}
.cs-fbtn:hover{background:var(--st-hover)}.cs-fbtn .cs-glyph{width:14px;height:14px;color:var(--st-muted)}
.cs-fcolor i{display:block;width:14px;height:14px;border-radius:3px;border:1px solid rgba(0,0,0,.35)}
.cs-empty-hint{position:absolute;z-index:2;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:4px;max-width:270px;padding:16px 18px;text-align:center;color:#6b6e75;pointer-events:none;border:1px dashed #c3c5cb;border-radius:10px;background:rgba(255,255,255,.75)}
.cs-empty-hint strong{font-size:var(--st-text-md);font-weight:600;color:#44474d}.cs-empty-hint span{font-size:var(--st-text-sm);line-height:1.5}
/* inspector: words, not letters */
.cs-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:10px 12px;border-bottom:1px solid var(--st-line)}
.cs-act{display:flex;align-items:center;justify-content:center;gap:4px;height:28px;padding:0 4px;border:1px solid var(--st-line-strong);border-radius:var(--st-radius);background:var(--st-raised);color:var(--st-text);font-size:11px;font-weight:500;white-space:nowrap;cursor:pointer;min-width:0}
.cs-act .cs-glyph{width:13px;height:13px;color:var(--st-muted)}.cs-act:hover:not(:disabled){background:var(--st-hover)}.cs-act:disabled{opacity:.4;cursor:default}.cs-act.cs-on{background:var(--st-accent-soft);border-color:var(--st-accent)}
.cs-insp-open{display:none;font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-sect-toggle{text-transform:none;letter-spacing:0;font-size:var(--st-text-sm)}
.cs-num-w .cs-num-l{min-width:0;padding:0 8px;white-space:nowrap;justify-content:flex-start;font-weight:500}
.cs-num-w .cs-num-input{text-align:right;padding-right:6px}
.cs-fieldrow-wide{grid-template-columns:84px minmax(0,1fr)}
.cs-cf-l{flex-basis:96px}.cs-fillfield .cs-colorfield .cs-cf-l{display:none}
.cs-aligngrid{display:grid;grid-template-columns:1fr 1fr;gap:4px}.cs-aligngrid .cs-btn-sm,.cs-sect-body .cs-btnrow .cs-btn-sm{justify-content:flex-start}
.cs-sect-body .cs-btn-sm .cs-glyph{width:13px;height:13px}
.cs-textrow .cs-tbtn{font-size:var(--st-text-sm)}
.cs-pop-page{width:min(340px,calc(100vw - 16px))}.cs-page-pop{display:block;padding:0}.cs-page-pop .cs-color-title{padding:10px 12px 0}
/* colour editor */
.cs-ce-hint{margin:0;padding:8px 10px;border-radius:var(--st-radius);background:var(--st-accent-soft);font-size:var(--st-text-xs);line-height:1.45;color:var(--st-text)}
.cs-ce-cap{font-size:var(--st-text-xs);color:var(--st-muted)}.cs-posbox{display:grid;gap:6px}.cs-more{justify-self:start;padding:0}
.cs-ce{gap:8px}.cs-gsec{gap:8px}
.cs-pop-color{width:296px}
/* phone */
@media(max-width:760px){
  .cs-app,.cs-app.cs-left-closed,.cs-app.cs-insp-closed,.cs-app.cs-left-closed.cs-insp-closed{grid-template-columns:minmax(0,1fr);grid-template-rows:var(--st-bar) minmax(0,1fr) 54px}
  .cs-tools{flex-direction:row;padding:0 2px;gap:0;overflow:hidden;align-items:stretch}.cs-tools .cs-rail-btn{height:100%;border-radius:0;flex:1 1 0;min-width:0;font-size:9.5px;gap:3px}.cs-tools .cs-rail-btn::before{left:20%;right:20%;top:0;bottom:auto;width:auto;height:3px;border-radius:0 0 3px 3px}
  .cs-tools .cs-rail-btn .cs-glyph{width:18px;height:18px}
  .cs-panel,.cs-inspector{bottom:54px}
  .cs-panel{height:46vh}.cs-inspector{max-height:50vh}
  .cs-top-present,.cs-top-home span,.cs-menu-all span{display:none}.cs-top-btn span{display:inline}.cs-top-ghost{display:none}.cs-top-home{padding:0 6px}
  .cs-top-save{padding:0 8px}.cs-top-btn{padding:0 8px}
  .cs-inspector:not(.cs-expanded) .cs-insp-body{display:none}.cs-insp-head{cursor:pointer}.cs-insp-open{display:inline}.cs-insp-title span{display:none}
  .cs-app:not(.cs-left-closed) .cs-inspector{display:none}
  .cs-st-word{display:none}.cs-st-item{padding:0 8px}
  .cs-banner{top:6px;font-size:var(--st-text-sm);padding-left:12px}
  .cs-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
}

.cs-ce-grad{gap:6px}.cs-ce-grad .cs-sv{height:96px}.cs-ce-grad .cs-gbar{margin-bottom:12px}
.cs-posbox{grid-template-columns:minmax(0,1.25fr) auto auto;align-items:center;gap:6px}.cs-posbox .cs-btnrow{display:contents}.cs-posbox .cs-btn-sm{padding:0 6px}

/* «Миний загварууд»: saved PowerPoint templates (creative-library.js) */
.cs-lib{display:grid;gap:6px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--st-line)}
.cs-lib-upload{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.cs-lib-list{display:grid;gap:6px}.cs-lib-panel{max-height:280px;overflow:auto}
.cs-lib-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:8px}
.cs-lib-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:2px;padding:4px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-raised)}
.cs-lib-card:hover{border-color:var(--st-accent)}
.cs-lib-open{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px;align-items:center;min-width:0;padding:0;border:0;background:none;color:inherit;text-align:left;cursor:pointer}
.cs-lib-thumb{display:grid;place-items:center;width:64px;height:40px;overflow:hidden;border-radius:var(--st-radius-sm);background:var(--st-bg);color:var(--st-faint)}.cs-lib-thumb img{width:100%;height:100%;object-fit:contain}
.cs-lib-meta{display:grid;min-width:0;gap:1px}.cs-lib-meta strong,.cs-lib-meta small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cs-lib-meta strong{font-size:var(--st-text-sm);font-weight:600}.cs-lib-meta small{font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-lib-tools{display:flex;gap:1px}.cs-lib-tools .cs-ibtn{width:24px;height:24px;color:var(--st-muted)}
.cs-lib-warn{grid-column:1/-1;margin-top:4px;font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-lib-warn summary{cursor:pointer;color:var(--st-accent-hover);font-weight:600}.cs-lib-warn ul{margin:4px 0 0;padding-left:16px;display:grid;gap:2px}
.cs-lib-actions{display:flex;flex-wrap:wrap;gap:6px}
.cs-lib-back{display:inline-flex;align-items:center;gap:4px;margin-bottom:6px;padding:0;border:0;background:none;cursor:pointer}
.cs-panel-body .cs-lib-title{margin:0 0 2px;font-size:var(--st-text-md);font-weight:600;letter-spacing:0;text-transform:none;color:var(--st-text);overflow-wrap:anywhere}
.cs-lib-slides{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.cs-lib-slide{display:grid;gap:4px;align-content:start;min-width:0}
.cs-lib-slide-open{display:grid;gap:3px;min-width:0;padding:0;border:0;background:none;color:inherit;text-align:left;cursor:pointer}
.cs-lib-slide-open small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-lib-frame{display:block;width:100%;overflow:hidden;border-radius:var(--st-radius-sm);background:var(--st-bg);box-shadow:0 0 0 1px var(--st-line-strong)}
.cs-lib-frame svg{display:block;width:100%;height:auto}.cs-lib-slide-open:hover .cs-lib-frame{box-shadow:0 0 0 2px var(--st-accent)}
.cs-lib-add{white-space:normal;height:auto;min-height:var(--st-row);line-height:1.2}
.cs-lib-slide .cs-lib-add{padding:3px 4px;font-size:var(--st-text-xs)}
.cs-lib-frame+.cs-lib-add{margin:8px 0 2px}
.cs-lib-elements{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.cs-lib-element{display:grid;gap:3px;min-width:0;padding:3px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-raised);color:inherit;text-align:left;cursor:pointer}.cs-lib-element:hover{border-color:var(--st-accent)}
.cs-lib-element small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-lib-elframe{display:block;aspect-ratio:4/3;overflow:hidden;border-radius:var(--st-radius-sm);background:var(--st-bg)}.cs-lib-elframe svg{display:block;width:100%;height:100%}
.cs-lib-uplist{display:grid;gap:8px;max-height:50vh;margin:8px 0;padding:0;overflow:auto;list-style:none}
.cs-lib-up{display:grid;gap:3px;padding:8px;border:1px solid var(--st-line);border-radius:var(--st-radius);background:var(--st-raised)}
.cs-lib-up strong{overflow-wrap:anywhere;font-size:var(--st-text-sm)}.cs-lib-up small{font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-lib-up progress{width:100%;height:4px;accent-color:var(--st-accent)}
.cs-lib-ok small{color:var(--st-success)}.cs-lib-bad small{color:var(--st-danger)}
.cs-lib-rename{display:grid;gap:10px;min-width:min(340px,80vw)}.cs-lib-rename .cs-in{width:100%}
.cs-lib-home .cs-lib-upload{margin-left:auto}
/* Generated library: chips in one scrolling row, square cells, thumbnails drawn near the screen only. */
.cs-lz-count{margin:2px 0 6px;font-size:var(--st-text-xs);color:var(--st-muted)}
.cs-lz-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:4px 0;-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent);padding-right:24px}.cs-lz-chips::-webkit-scrollbar{display:none}.cs-lz-chips .cs-chip{flex:none}
.cs-lz-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:6px}.cs-home .cs-lz-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.cs-lz-end{grid-column:1/-1;height:1px}
.cs-lz-thumb{display:grid;place-items:center;aspect-ratio:1;min-width:0;overflow:hidden;background:var(--st-pressed);border-radius:6px;transition:box-shadow .12s;box-shadow:0 0 0 1px var(--st-line)}
.cs-panel-grid .cs-lz-thumb{aspect-ratio:4/3}
.cs-lz-thumb svg,.cs-panel-template .cs-lz-thumb svg{display:block;width:auto;height:auto;max-width:100%;max-height:100%;border-radius:0;box-shadow:0 1px 4px rgba(0,0,0,.28)}
.cs-panel-template:hover .cs-lz-thumb,.cs-template:hover .cs-lz-thumb{box-shadow:0 0 0 2px var(--st-accent)}.cs-panel-template:hover .cs-lz-thumb svg{box-shadow:0 1px 4px rgba(0,0,0,.28)}
.cs-lz-combo{display:block;aspect-ratio:2/1;background:#f5f4fa}.cs-lz-combo.cs-lz-dark{background:#14121f}.cs-lz-combo svg{display:block;width:100%;height:auto}
.cs-lz-grid-text{margin-top:6px}
.cs-lz-deco{display:grid;place-items:center;width:100%;aspect-ratio:1;border-radius:4px;background:transparent;overflow:hidden}.cs-lz-deco.cs-lz-dark{background:#2b2d36}.cs-lz-deco img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.cs-lz-grid-deco{margin-top:6px}
.cs-lz-head{margin:10px 0 6px;font-size:var(--st-text-sm);font-weight:600;color:var(--st-muted)}
.cs-combo svg{display:block;width:100%;height:auto}
/* Studio polish: library shortcuts and stats, calmer depth; layout and steps stay as they were. */
.cs-jump{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 4px}
.cs-home-stats{display:flex;flex-wrap:wrap;gap:4px 14px;margin:8px 0 0;padding:0;list-style:none;font-size:var(--st-text-xs);color:var(--st-muted)}.cs-home-stats b{font-weight:700;color:var(--st-text)}
.cs-size,.cs-template{transition:border-color .12s,background .12s,transform .12s,box-shadow .12s}
.cs-size:hover,.cs-template:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,.14)}
.cs-size:hover .cs-size-icon{background:var(--st-accent-soft)}.cs-size-icon{transition:background .12s}
.cs-tile{transition:box-shadow .12s,color .12s}
.cs-panel-template{transition:transform .12s}.cs-panel-template:hover{transform:translateY(-1px)}
.cs-stage{box-shadow:0 0 0 1px rgba(0,0,0,.12),0 18px 50px rgba(0,0,0,.3),0 3px 10px rgba(0,0,0,.18)}
@media (prefers-reduced-motion:reduce){.cs-size,.cs-template,.cs-tile,.cs-panel-template{transition:none}.cs-size:hover,.cs-template:hover,.cs-tile:hover,.cs-panel-template:hover{transform:none}}
