/* Studio Pro – compact professional catalog and touch-first starter designs. */
.cw-smart-controls{display:grid;gap:10px;margin:10px 0 12px;min-width:0}
.cw-saved-view{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;min-width:0}
.cw-saved-view button{padding:9px 3px!important;border:1px solid #e1dce9!important;border-radius:8px;background:#fff;color:#565164;font-size:10px!important;line-height:1.35;min-width:0}
.cw-saved-view button[aria-pressed="true"]{border-color:#8368d2!important;background:#f3effd;color:#38286f;font-weight:750}
.cw-element-entry{position:relative;min-width:0}
.cw-element-entry .cw-element-tile{width:100%;height:100%;padding-bottom:20px!important}
.cw-favourite-button{position:absolute;top:5px;right:5px;width:28px;height:28px;border:1px solid #ddd6e6!important;border-radius:100%;font-size:20px!important;line-height:1!important;background:#fff!important;color:#6a5878!important;display:grid;place-items:center;cursor:pointer}
.cw-favourite-button[aria-pressed="true"]{color:#b23c6d!important;border-color:#dca0b9!important;background:#fff3f8!important}
.cw-favourite-button[aria-pressed="true"]::after{content:"";position:absolute;inset:6px;background:#b23c6d;clip-path:polygon(50% 88%,8% 47%,8% 23%,25% 12%,50% 27%,75% 12%,92% 23%,92% 47%)}
.cw-original-layouts{padding:18px 0;border-top:1px solid #e9e5ef;margin-top:18px}
.cw-original-layouts h5{font-size:13px;margin:0 0 5px}
.cw-original-layout-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}
.cw-original-layout{border:1px solid #e6e0eb!important;background:white!important;border-radius:12px;display:flex;flex-direction:column;align-items:start;padding:8px!important;gap:6px;min-width:0;text-align:start}
.cw-original-layout:hover,.cw-original-layout:focus-visible{border-color:#856bd0!important;background:#f8f5fd!important}
.cw-original-layout-art{height:96px;width:100%;display:grid;place-items:center;background:#f9f7fa;border-radius:8px}
.cw-original-layout-art svg{height:80px;width:80px;max-width:100%}
.cw-original-layout strong{font-size:11px;line-height:1.3}
.cw-original-layout small{font-size:9px;color:#7a7383;line-height:1.5}
.cw-studio-print-note{font-size:11px;line-height:1.6;padding:10px 12px;border-radius:9px;border:1px solid #e6d8ca;background:#fdf9f2;color:#6a5140}
@media(max-width:700px){
 .cw-saved-view button{min-height:42px;font-size:10px!important}
 .cw-favourite-button{width:32px;height:32px}
 .cw-elements-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .cw-element-entry .cw-element-tile{min-height:100px}
 .cw-original-layout-art{height:84px}.cw-original-layout-art svg{height:75px;width:75px}
 .cw-original-layout{min-height:135px}
 .cw-inspector input[type="color"]{min-height:42px}
}
@media(max-width:375px){.cw-original-layout-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.cw-element-entry .cw-element-tile{min-height:91px}}
@media(prefers-reduced-motion:reduce){.cw-element-entry *, .cw-original-layout *{transition:none!important}}

/* Studio precision tools: touch targets, keyboard focus and mobile-safe spacing. */
.cw-pro-arrange{border-top:1px solid #e8e3ec;margin-top:20px;padding-top:18px}
.cw-pro-arrange h5{font-size:13px;font-weight:750;margin:0 0 5px;color:#302939}
.cw-pro-arrange p{font-size:11px;color:#77717e;line-height:1.55;margin:0 0 12px}
.cw-pro-arrange-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.cw-pro-arrange-grid button{min-height:42px;padding:9px 7px!important;line-height:1.35;font-size:11px!important;font-weight:600;border:1px solid #ded8e5!important;background:white!important;border-radius:8px;color:#393044;text-align:center;white-space:normal}
.cw-pro-arrange-grid button:hover{background:#f5f2fa!important;border-color:#aa94cf!important}
.cw-pro-arrange-grid button:focus-visible{outline:3px solid #8561c7;outline-offset:2px}
@media(max-width:700px){.cw-pro-arrange{margin-top:16px}.cw-pro-arrange-grid{gap:9px}.cw-pro-arrange-grid button{min-height:46px;font-size:12px!important}}

/* Gallery redesign: short balanced cards, no duplicated whitespace and the
   favourite action owns its own row instead of covering flag/landmark art. */
.cw-elements-grid{align-items:start;grid-auto-rows:auto}
.cw-element-entry{
 display:flex;flex-direction:column;align-items:stretch;gap:4px;
 min-height:0;padding:7px;border:1px solid #e4e1e9;
 border-radius:13px;background:#fff;box-shadow:0 2px 5px #312b4110;
 transition:border-color .14s ease,box-shadow .14s ease;
}
.cw-element-entry:hover,.cw-element-entry:focus-within{
 border-color:#ab99cd;box-shadow:0 3px 12px #4c36621b
}
.cw-element-entry .cw-element-tile{
 flex:0 0 auto;width:100%;height:auto;min-height:0;
 padding:0!important;border:0!important;background:transparent!important;
 border-radius:8px;gap:5px;
}
.cw-element-entry .cw-element-tile:hover{background:transparent!important}
.cw-element-entry .cw-element-tile:focus-visible{outline:2px solid #7656b2;outline-offset:3px}
.cw-element-entry .cw-element-visual{
 width:100%;max-width:90px;aspect-ratio:1;max-height:none;
 border-radius:9px;background:#f7f7fa
}
.cw-element-entry .cw-element-visual svg{
 display:block;width:100%;height:100%;max-height:none;overflow:visible
}
.cw-element-entry .cw-element-tile small{
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
 min-height:2.7em;max-height:2.7em;overflow:hidden;
 margin:0;font-size:10.5px;line-height:1.35;font-weight:550;
 color:#322d38;overflow-wrap:anywhere;
}
.cw-element-entry .cw-favourite-button{
 position:static;inset:auto;align-self:flex-end;
 flex:0 0 29px;width:29px;height:29px;margin:0;
 border-color:#e2dce8!important;box-shadow:none;
 background:#fff!important
}
.cw-element-entry .cw-favourite-button:focus-visible{outline:3px solid #7656b2;outline-offset:2px}
@media(max-width:700px){
 .cw-elements-grid{gap:9px}
 .cw-element-entry{padding:6px;gap:3px;border-radius:11px}
 .cw-element-entry .cw-element-tile{min-height:0}
 .cw-element-entry .cw-element-visual{max-width:none}
 .cw-element-entry .cw-element-tile small{font-size:10px;min-height:2.6em;max-height:2.6em}
 .cw-element-entry .cw-favourite-button{flex-basis:30px;width:30px;height:30px}
}
@media(max-width:375px){
 .cw-elements-grid{gap:6px}
 .cw-element-entry{padding:5px}
 .cw-element-entry .cw-element-tile small{font-size:9.5px}
}
/* Interactive garment preview. All handles control the saved flat scene; the
   garment image is still rendered by the production-matching projection. */
.cw-preview-pane .design-mockup{position:relative!important;overflow:visible}
.cw-preview-overlay{position:absolute;z-index:12;touch-action:none;cursor:crosshair;outline:none;user-select:none;-webkit-user-select:none}
.cw-preview-overlay[hidden]{display:none!important}
.cw-preview-overlay:focus-visible{outline:2px solid #7250cf;outline-offset:3px}
.cw-preview-outline{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.cw-preview-outline polygon{fill:#8754ce13;stroke:#7551cd;stroke-width:4;stroke-dasharray:13 7;vector-effect:non-scaling-stroke;pointer-events:none}
.cw-preview-outline polygon[points=""]{display:none}
.cw-preview-overlay [data-ws-preview-handle]{position:absolute!important;z-index:14;width:17px;height:17px;min-width:17px!important;min-height:17px!important;padding:0!important;border:2px solid #7650c6!important;border-radius:5px;background:#fff!important;transform:translate(-50%,-50%);touch-action:none;cursor:nwse-resize;box-shadow:0 1px 5px #37245955}
.cw-preview-overlay [data-ws-preview-handle="ne"],.cw-preview-overlay [data-ws-preview-handle="sw"]{cursor:nesw-resize}
.cw-preview-overlay [data-ws-preview-handle="rotate"]{width:27px;height:27px;border-radius:50%;cursor:grab;background:#7753c7!important;border:3px solid #fff!important;box-shadow:0 0 0 2px #7753c7,0 2px 6px #37245955}
.cw-preview-overlay [data-ws-preview-handle="rotate"]::after{content:"↻";position:absolute;inset:0;color:#fff;font-size:19px;display:grid;place-items:center;line-height:1}
.cw-preview-overlay [data-ws-preview-handle]:focus-visible{outline:3px solid #b9a0ef;outline-offset:3px}
.cw-preview-overlay [data-ws-preview-handle][hidden]{display:none!important}
.cw-preview-edit-hint{margin:6px 8px!important;padding:8px!important;text-align:center;font-size:11px!important;color:#584c66;background:#f6f0ff;border:1px solid #e4d8f4;border-radius:8px;line-height:1.5}
@media(max-width:700px){
 .cw-preview-overlay [data-ws-preview-handle]{width:22px;height:22px;min-width:22px!important;min-height:22px!important}
 .cw-preview-overlay [data-ws-preview-handle="rotate"]{width:31px;height:31px}
 .cw-preview-edit-hint{font-size:11px!important}
}


/* Projected magnetic alignment lines, like the Design canvas. No toolbar. */
.cw-preview-guides{pointer-events:none}
.cw-preview-guides path{fill:none;stroke:#a24bda;stroke-width:2;stroke-dasharray:7 5;vector-effect:non-scaling-stroke;pointer-events:none;filter:drop-shadow(0 0 1px #fff)}
.cw-preview-guides path[d=""]{display:none}
.cw-preview-overlay.cw-preview-drop-active{outline:2px dashed #9163db;outline-offset:2px;background:#8e69d917}
.cw-preview-overlay{cursor:grab}
.cw-preview-overlay:active{cursor:grabbing}
.cw-element-tile[draggable="true"],[data-ws-reuse][draggable="true"]{cursor:grab}
.cw-element-tile[draggable="true"]:active,[data-ws-reuse][draggable="true"]:active{cursor:grabbing}

/* Botanical Atelier: delicate pastel matting, not reused skyline icons.
   Art stays true transparent SVG; paper tones are thumbnail-only. */
.cw-element-entry .cw-element-tile[data-ws-element^="botanical-"] .cw-element-visual{
 background:radial-gradient(circle at 24% 13%,#fff 0,#fff8f2 52%,#f8e9e3 100%);
 box-shadow:inset 0 0 0 1px #f2e8e4;
 border-radius:13px;overflow:hidden;padding:5px;
}
.cw-element-entry:nth-child(3n+2) .cw-element-tile[data-ws-element^="botanical-"] .cw-element-visual{
 background:radial-gradient(circle at 20% 10%,#fff 0,#f3faf5 58%,#e4f1e9 100%);
 box-shadow:inset 0 0 0 1px #e7f0e8;
}
.cw-element-entry:nth-child(3n) .cw-element-tile[data-ws-element^="botanical-"] .cw-element-visual{
 background:radial-gradient(circle at 20% 10%,#fff 0,#faf6ff 53%,#eee4f8 100%);
 box-shadow:inset 0 0 0 1px #efe6f5;
}
.cw-element-entry .cw-element-tile[data-ws-element^="botanical-"] small{
 font-size:11px;font-weight:650;letter-spacing:-.01em;
}
.cw-element-entry .cw-element-tile[data-ws-element^="botanical-"]:hover .cw-element-visual svg{
 transform:scale(1.06);transition:transform .19s ease;
}
@media(prefers-reduced-motion:reduce){.cw-element-entry .cw-element-tile[data-ws-element^="botanical-"]:hover .cw-element-visual svg{transform:none;transition:none}}

/* Professional z-order panel: one motion, no extra confirmation toolbar. */
.cw-layer-row[draggable="true"]{cursor:grab;transition:border-color .12s ease,background .12s ease}
.cw-layer-row[draggable="true"]:active{cursor:grabbing}
.cw-layer-row[data-dragging="true"]{opacity:.55}
.cw-layer-row[data-drop-edge="before"]{border-top:3px solid #895ad4!important}
.cw-layer-row[data-drop-edge="after"]{border-bottom:3px solid #895ad4!important}
.cw-layer-row:focus-within{outline:2px solid #a48bdf;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.cw-layer-row[draggable="true"]{transition:none}}

/* Curated palette swatches remain confined to the inspector; garment preview
   intentionally remains drag-and-snap, without an alignment toolbar. */
.cw-palette-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:12px 0}
.cw-palette-presets>button{display:flex;min-width:0;flex-direction:column;align-items:center;gap:6px;padding:8px!important;min-height:58px;border:1px solid #e5dfed!important;background:#fff!important;border-radius:10px;cursor:pointer;color:#53465f!important}
.cw-palette-presets>button:hover{background:#f8f4fe!important;border-color:#a891d5!important}
.cw-palette-chips{display:flex;width:100%;height:20px;border-radius:6px;overflow:hidden;border:1px solid #ebe6f2}
.cw-palette-chips i{flex:1;min-width:0}
.cw-palette-presets small{font-size:10px;line-height:1.3;font-weight:650;text-align:center}
.cw-palette-actions{display:grid;grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.cw-palette-actions button{min-height:42px;border-radius:8px;border:1px solid #cbb9e4;background:#f3edf9;color:#553a79;font-size:11px;font-weight:650;padding:6px}
.cw-palette-presets button:focus-visible{outline:3px solid #9575cb;outline-offset:2px}
@media(max-width:600px){.cw-palette-actions{grid-template-columns:1fr}.cw-palette-actions button{min-height:46px}}

/* Keep the illustration's click/touch target distinct from its favourite
   action. Without a real-sized tile, the action can cover the hit centre. */
.cw-element-entry .cw-element-tile{min-height:112px!important;position:relative}
@media(max-width:700px){.cw-element-entry .cw-element-tile{min-height:98px!important}}
/* The storefront's fixed shopping navigation must not cover interactive
   design controls or artwork drag/drop targets on the Create page. */
body:has(.customer-workspace) .mobile-shopping-nav{display:none!important}

/* Illustration activation wins over the favourite control in the artwork area;
   the separate favourite row remains independently clickable below it. */
.cw-element-entry .cw-element-tile{z-index:2}
.cw-element-entry .cw-favourite-button{position:relative!important;z-index:1}
