.pvds-nav,.pvds-toolbar,.pvds-layer-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.pvds-nav{border-bottom:1px solid #e1e8e2;padding-bottom:12px;margin-bottom:16px}
.pvds-nav .primary{margin-left:auto}
.pv26-theme button.pvds-tab,.pv26-theme button.pvds-layer{
  color:#26473b;background:#edf2ee;border:1px solid transparent;box-shadow:none
}
.pv26-theme :is(.pvds-tab,.pvds-layer)[aria-pressed=true]{background:#e0eee6;border-color:#84ad99;color:#134433}
.pvds-filters{display:grid;grid-template-columns:minmax(190px,2fr) repeat(4,minmax(100px,1fr));gap:10px}
.pvds-field{display:grid;gap:4px;color:#2d493c;min-width:0;font-size:12px}
.pv26-theme .pvds-field :is(input,select,textarea){width:100%;min-width:0;margin:0;font-size:13px}
.pv26-theme .pvds-field input[type=color]{padding:4px;cursor:pointer}
.pvds-count{margin:11px 0}
.pvds-catalog,.pvds-projects{display:grid;grid-template-columns:repeat(auto-fill,minmax(195px,1fr));gap:14px}
.pv26-theme button.pvds-template{
  display:grid;gap:0;min-width:0;background:#fff;color:#243d32;border:1px solid #e2e8e3;
  border-radius:13px;padding:0;text-align:left;justify-content:stretch;overflow:hidden
}
.pv26-theme button.pvds-template:hover{border-color:#6b9b84;filter:none;box-shadow:0 3px 12px #243d321b}
.pvds-template-art{height:174px;display:grid;place-items:center;overflow:hidden}
.pvds-template-art img{width:100%;height:100%;object-fit:contain}
.pvds-template-label{display:grid;gap:2px;padding:10px 12px}
.pvds-template-label small,.pvds-status{color:#52675b}
.pvds-project h2{overflow-wrap:anywhere}
.pvds-toolbar{align-items:end;border:1px solid #e2e8e3;border-radius:12px;background:white;padding:10px}
.pvds-toolbar .pvds-field:first-of-type{flex:1 1 160px}
.pvds-status{min-height:21px;margin:6px 0;font-size:13px}
.pvds-workspace{
  display:grid;grid-template-columns:minmax(157px,.65fr) minmax(0,2.4fr) minmax(175px,.85fr);
  grid-template-areas:'tools canvas inspector';gap:10px;align-items:start
}
.pv26-theme .pvds-workspace .card{min-width:0;padding:12px;margin:0;border-radius:12px}
.pvds-tools{grid-area:tools}
.pvds-inspector{grid-area:inspector}
.pvds-canvas{
  grid-area:canvas;min-height:340px;min-width:0;display:grid;place-items:center;padding:12px;
  border-radius:12px;background:#e5ebe6;border:1px solid #d7e1d8;overflow:hidden
}
.pvds-canvas .konvajs-content{box-shadow:0 5px 18px #23392b26}
.pvds-tools,.pvds-inspector{display:grid;gap:8px}
.pvds-tools h2,.pvds-inspector h2{margin:3px 0}
.pvds-layers{display:grid;gap:5px;max-height:214px;overflow:auto;padding:2px}
.pv26-theme button.pvds-layer{justify-content:flex-start;text-align:left;overflow-wrap:anywhere;min-width:0}
.pv26-theme .pvds-layer-actions button{padding-inline:8px;font-size:12px}
@media(max-width:1120px){
  .pvds-filters{grid-template-columns:repeat(4,minmax(0,1fr))}
  .pvds-filters>.pvds-field:first-child{grid-column:1/-1}
}
@media(max-width:1000px){
  .pvds-workspace{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:'canvas canvas' 'tools inspector'}
  .pvds-canvas{min-height:240px}
}
@media(max-width:550px){
  .pvds-catalog,.pvds-projects{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .pvds-template-art{height:122px}
  .pvds-template-label{padding:8px;overflow-wrap:anywhere}
  .pvds-workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:'canvas' 'tools' 'inspector'}
  .pvds-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pvds-toolbar button{min-height:38px}
}

/* The studio keeps the tool rail, context, canvas, and catalog in view together. */
.pv26-theme #app:has(>main.pvds-main)>aside{display:none}
.pv26-theme main.pvds-main{margin-left:0;max-width:none;padding:12px 16px 22px}
.pv26-theme .pvds-main>header{margin-bottom:10px}
.pv26-theme .pvds-main>header h1{margin:0}
.pv26-theme .pvds-main header .header-actions>button{display:inline-flex}
.pvds-workspace{
  grid-template-columns:64px minmax(160px,216px) minmax(0,1fr) minmax(210px,280px);
  grid-template-areas:'rail tools pages gallery' 'rail tools canvas gallery';
  grid-template-rows:auto minmax(440px,1fr);gap:8px;
}
.pvds-workspace [hidden]{display:none!important}
.pvds-rail{grid-area:rail;display:grid;grid-template-columns:minmax(0,1fr);gap:4px;align-self:start;background:#fff;border:1px solid #e2e8e3;border-radius:10px;padding:4px}
.pv26-theme button.pvds-tool{display:grid;place-content:center;gap:2px;width:100%;min-width:0;height:51px;margin:0;padding:2px;white-space:normal;border-radius:6px;background:#fff;color:#365046;line-height:1.05;text-align:center}
.pvds-tool strong{font-size:19px}.pv26-theme .pvds-rail .pvds-tool small{font-size:9px;padding:0;letter-spacing:0;color:inherit;overflow-wrap:anywhere}
.pv26-theme .pvds-tool[aria-pressed=true]{background:#deefe4;color:#113c2e}
.pvds-tools>section{display:grid;gap:8px}
.pvds-tools{max-height:710px;overflow:auto}
.pvds-right{grid-area:gallery;min-width:0;max-height:710px;overflow:auto;background:#fff;border:1px solid #e2e8e3;border-radius:10px;padding:10px}
.pvds-right h2{margin:0 0 8px}
.pvds-right .pvds-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.pvds-right .pvds-filters>.pvds-field:first-child{grid-column:1/-1}
.pvds-right .pvds-catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.pvds-right .pvds-template-art{height:92px}
.pvds-right .pvds-template-label{padding:6px;font-size:12px;overflow-wrap:anywhere}
.pvds-modal-art{display:block;width:min(100%,320px);max-height:420px;object-fit:contain;margin:auto}
.pvds-pages{grid-area:pages;min-width:0;padding:8px;background:#fff;border:1px solid #e2e8e3;border-radius:9px}
.pvds-pages h2{margin:0 0 4px}
.pvds-pages .pvds-field{width:min(100%,190px);margin-bottom:6px}
.pvds-viewport{grid-area:canvas;min-width:0;min-height:440px;max-height:680px;overflow:auto;background:#e3e5e6;border:1px solid #d6dada;border-radius:9px;padding:20px}
.pvds-board{position:relative;width:max-content;margin:0 auto;padding:18px 0 0 18px}
.pvds-canvas{display:block;min-height:0;min-width:0;background:white;border:0;border-radius:0;padding:0;overflow:visible}
.pvds-ruler{position:absolute;background:#f6f7f7;color:#344540;font:9px system-ui;overflow:hidden}
.pvds-ruler span{position:absolute;white-space:nowrap}
.pvds-horizontal{top:0;left:18px;right:0;height:18px;border-bottom:1px solid #c8cecb}
.pvds-horizontal span{top:3px;padding-left:2px;border-left:1px solid #8e9a92}
.pvds-vertical{top:18px;left:0;bottom:0;width:18px;border-right:1px solid #c8cecb}
.pvds-vertical span{left:1px;writing-mode:vertical-rl;padding-top:2px;border-top:1px solid #8e9a92}
.pvds-layer-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px}
.pvds-layer-row .check-row span{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.pvds-file-menu,.pvds-export-options{position:relative;background:#f7faf7;border:1px solid #dce7df;border-radius:7px;padding:7px}
.pvds-file-menu summary,.pvds-export-options summary{cursor:pointer}
.pvds-file-menu[open],.pvds-export-options[open]{display:grid;gap:6px;max-width:250px}
.pvds-canvas{position:relative}
.pv26-theme textarea.pvds-inline-text{position:absolute;z-index:3;background:#fff;color:#173b32;margin:0}
.pvds-decor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.pvds-decor button{min-width:0;overflow-wrap:anywhere;font-size:12px;padding-inline:4px}
@media(max-width:1200px){
  .pvds-workspace{grid-template-columns:57px minmax(142px,175px) minmax(0,1fr) minmax(175px,220px)}
}
@media(max-width:1000px){
  .pvds-workspace{grid-template-columns:57px minmax(0,1fr);grid-template-areas:'rail pages' 'rail canvas' 'rail tools' 'rail gallery';grid-template-rows:auto}
  .pvds-viewport{min-height:280px;padding:10px}
  .pvds-right,.pvds-tools{max-height:none}
  .pvds-rail{position:sticky;top:6px;z-index:4;max-height:calc(100dvh - 12px);overflow:auto}
}
@media(max-width:480px){
  .pv26-theme main.pvds-main{padding:10px 8px 18px}
  .pv26-theme .pvds-main .header-actions{flex-wrap:wrap;justify-content:flex-end}
}
