/* =============================================================================
   LoomPilot · Print Lab (x-lab.css): a master printer's workshop of the future.
   Walnut bench, pinned cloth tile, carved blocks in a tray, brass, ink, crisp UI.
   All classes/ids are prefixed pl-. Uses site.css tokens; both modes supported.
   ============================================================================= */

/* ---------------------------------------------------------------- page head */
.pl-head { isolation: isolate; }
.pl-head-deva { position: absolute; z-index: -1; right: -2vw; top: 50%; transform: translateY(-46%) rotate(-4deg); font: 400 clamp(7rem, 22vw, 19rem)/1 var(--f-deva); color: var(--accent); opacity: .07; pointer-events: none; white-space: nowrap; user-select: none; }
.pl-head .ph-note span { display: inline; }

/* ---------------------------------------------------------------- shop + presets */
.pl-shop { padding: clamp(22px, 3vw, 36px) 0 clamp(40px, 5vw, 64px); }
.pl-presets { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pl-presets > .lab { margin-right: 2px; }
.pl-preset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-pre { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); font: 700 12.5px/1.2 var(--f-ui); cursor: pointer; transition: border-color .2s, background-color .2s, transform .25s var(--ease); }
.pl-pre:hover { border-color: var(--accent); transform: translateY(-1px); }
.pl-pre[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pl-pre-sw { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--bg3); color: var(--muted); overflow: hidden; }
.pl-pre-sw svg { width: 100%; height: 100%; display: block; }
.pl-auto { margin-left: auto; }
.pl-shuffle:hover { color: var(--accent); }
.pl-seed { font: 800 11px/1 var(--f-ui); letter-spacing: .06em; color: var(--muted); padding: 3px 7px; border-radius: 999px; background: var(--surface2); }

.pl-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(16px, 2.4vw, 30px); align-items: start; }

/* ---------------------------------------------------------------- the walnut bench */
.pl-bench {
    --wood-a: #563620; --wood-b: #2d1a0e; --wood-hi: rgba(255, 206, 150, .16); --wood-line: rgba(255, 214, 160, .055); --wood-seam: rgba(0, 0, 0, .42);
    --text: #f6e7cc; --muted: rgba(246, 231, 204, .72); --line: rgba(255, 225, 180, .16); --line2: rgba(255, 225, 180, .3);
    --accent: #f0bf4c; --accent-ink: #1a1405; --accent-soft: rgba(240, 191, 76, .18);
    position: relative; color: var(--text); border-radius: 28px; padding: clamp(14px, 2.2vw, 26px); overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .35); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 230, 190, .18), inset 0 -10px 30px rgba(0, 0, 0, .35);
    background:
        radial-gradient(ellipse 70% 50% at 28% 6%, var(--wood-hi), transparent 70%),
        repeating-linear-gradient(180deg, transparent 0 172px, var(--wood-seam) 172px 174px, rgba(255, 220, 170, .07) 174px 175px),
        repeating-linear-gradient(178.5deg, var(--wood-line) 0 1px, transparent 1px 8px),
        repeating-linear-gradient(181.2deg, rgba(0, 0, 0, .09) 0 2px, transparent 2px 27px),
        repeating-radial-gradient(ellipse 340px 46px at 76% 62%, transparent 0 9px, rgba(0, 0, 0, .06) 9px 10px),
        linear-gradient(162deg, var(--wood-a), var(--wood-b));
}
html[data-mode="retail"] .pl-bench { --wood-a: #a06c3d; --wood-b: #66401f; --wood-hi: rgba(255, 236, 200, .3); --wood-seam: rgba(60, 30, 10, .4); --wood-line: rgba(255, 240, 210, .09); }
.pl-bench::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: var(--grain); opacity: .22; mix-blend-mode: overlay; border-radius: inherit; }
.pl-bench > * { position: relative; z-index: 1; }
.pl-bench-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 1.25rem; margin: 0 0 14px; }
.pl-bench-h span { font: 800 11px var(--f-ui); letter-spacing: .14em; color: var(--accent); }
.pl-bench-h small { font: 500 12.5px var(--f-ui); color: var(--muted); }
.pl-bench .pl-bench-h { text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }

/* ---------------------------------------------------------------- the tile (pinned cloth) */
.pl-table { display: grid; gap: 12px; }
.pl-tile-frame { position: relative; padding: 18px 0 0 18px; max-width: 560px; width: 100%; margin: 0 auto; }
.pl-ruler { position: absolute; background-color: #efe3c8; box-shadow: 0 2px 4px rgba(0, 0, 0, .35); }
.pl-ruler.h { left: 18px; right: 0; top: 0; height: 13px; border-radius: 2px 2px 0 0; background-image: repeating-linear-gradient(90deg, rgba(40, 25, 10, .55) 0 1px, transparent 1px 5%), repeating-linear-gradient(90deg, rgba(40, 25, 10, .35) 0 1px, transparent 1px 1%); background-size: 100% 9px, 100% 5px; background-repeat: no-repeat; }
.pl-ruler.v { top: 18px; bottom: 0; left: 0; width: 13px; border-radius: 2px 0 0 2px; background-image: repeating-linear-gradient(180deg, rgba(40, 25, 10, .55) 0 1px, transparent 1px 5%), repeating-linear-gradient(180deg, rgba(40, 25, 10, .35) 0 1px, transparent 1px 1%); background-size: 9px 100%, 5px 100%; background-repeat: no-repeat; }
.pl-tile { position: relative; aspect-ratio: 1 / 1; border-radius: 3px; touch-action: manipulation; cursor: default;
    box-shadow: 0 0 0 1px rgba(255, 240, 210, .38), 0 0 0 5px rgba(20, 10, 4, .28), 0 18px 34px -10px rgba(0, 0, 0, .65), 0 3px 6px rgba(0, 0, 0, .35); }
.pl-tile.pl-armed { cursor: crosshair; }
.pl-ink, .pl-ink svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 3px; }
.pl-ink::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 3px; background:
    linear-gradient(115deg, rgba(255, 255, 255, .1), transparent 35%, transparent 70%, rgba(0, 0, 0, .1)), var(--grain); opacity: .55; mix-blend-mode: multiply; }
.pl-guides { position: absolute; inset: 0; pointer-events: none; border-radius: 3px; outline: 1px dashed rgba(29, 31, 39, .28); outline-offset: -1px;
    background: linear-gradient(90deg, transparent calc(50% - .5px), rgba(29, 31, 39, .12) calc(50% - .5px) calc(50% + .5px), transparent 0), linear-gradient(180deg, transparent calc(50% - .5px), rgba(29, 31, 39, .12) calc(50% - .5px) calc(50% + .5px), transparent 0);
    opacity: 0; transition: opacity .3s; }
.pl-tile:hover .pl-guides, .pl-tile.pl-dragging .pl-guides, .pl-tile.pl-over .pl-guides, .pl-tile.pl-empty-tile .pl-guides { opacity: 1; }
.pl-tile.pl-over { outline: 3px solid var(--accent); outline-offset: 4px; }
.pl-tile.pl-empty-tile::before { content: "Drop a block here"; position: absolute; inset: 0; display: grid; place-items: center; font: italic 500 clamp(1rem, 2.4vw, 1.4rem) var(--f-display); color: rgba(29, 31, 39, .38); pointer-events: none; z-index: 1; }
.pl-pin { position: absolute; z-index: 5; width: 13px; height: 13px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle at 35% 30%, #fff6cf 0 12%, #f0cf73 22%, #b8862a 58%, #6e4c12 100%); box-shadow: 1px 3px 4px rgba(0, 0, 0, .5); }
.pl-pin.a { left: -4px; top: -4px; } .pl-pin.b { right: -4px; top: -4px; } .pl-pin.c { left: -4px; bottom: -4px; } .pl-pin.d { right: -4px; bottom: -4px; }

/* motif hit targets (the ink itself is the SVG beneath) */
.pl-hits { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pl-hit { position: absolute; width: max(30px, var(--sz)); aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: grab; pointer-events: auto; touch-action: none;
    transform: translate(-50%, -50%) rotate(var(--r, 0deg)); -webkit-tap-highlight-color: transparent; }
.pl-hit::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px dashed transparent; transition: border-color .2s, box-shadow .2s; }
.pl-tile:not(.pl-armed) .pl-hit:hover::before { border-color: rgba(29, 31, 39, .35); }
.pl-hit.on::before { border-color: #1d1f27; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85), 0 0 0 5px rgba(240, 191, 76, .35); }
.pl-hit:focus-visible { outline: none; }
.pl-hit:focus-visible::before { border-color: #1d1f27; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--accent); }
.pl-tile.pl-dragging .pl-hit.on { cursor: grabbing; }
.pl-knob { position: absolute; display: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #1d1f27; box-shadow: 0 2px 5px rgba(0, 0, 0, .4); touch-action: none; }
.pl-knob::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.pl-knob.rot { left: 50%; top: -22px; transform: translateX(-50%); cursor: alias; }
.pl-knob.rot::before { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 8px; background: #1d1f27; transform: translateX(-50%); }
.pl-knob.sca { right: -6px; bottom: -6px; cursor: nwse-resize; background: var(--accent); }
.pl-hit.on .pl-knob { display: block; }

/* stamping effects */
.pl-fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.pl-press { position: absolute; will-change: transform, opacity; }
.pl-press svg { width: 100%; height: 100%; display: block; }
.pl-bleed { position: absolute; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--ink) 55%, transparent) 0 28%, color-mix(in srgb, var(--ink) 18%, transparent) 50%, transparent 70%); mix-blend-mode: multiply; }
.pl-speck { position: absolute; border-radius: 50%; }
.pl-ghost { position: absolute; z-index: 3; aspect-ratio: 1 / 1; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity .15s; }
.pl-ghost.show { opacity: .42; }
.pl-ghost svg { width: 100%; height: 100%; display: block; }
.pl-float { position: fixed; left: 0; top: 0; z-index: 700; width: 80px; height: 80px; pointer-events: none; filter: drop-shadow(0 18px 14px rgba(0, 0, 0, .45)); }
.pl-float svg { width: 100%; height: 100%; display: block; }

.pl-hint { font-size: 13px; color: var(--muted); margin: 2px 0 0; text-align: center; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.pl-hint i { color: var(--accent); margin-right: 3px; }
.pl-hint b { color: var(--text); }
.pl-count { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line2); font: 800 11px/1.5 var(--f-ui); letter-spacing: .06em; color: var(--text); white-space: nowrap; }

/* ---------------------------------------------------------------- the tray of carved blocks */
.pl-tray-wrap { display: flex; gap: 12px; align-items: stretch; }
.pl-tray { flex: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 10px 10px 8px; border-radius: 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, .18)); box-shadow: inset 0 6px 14px rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(255, 220, 170, .14), 0 1px 0 rgba(255, 220, 170, .12); }
.pl-blk { display: grid; justify-items: center; gap: 2px; padding: 2px 0 4px; border: 0; border-radius: 12px; background: none; color: var(--text); cursor: grab; touch-action: none; font: 800 10.5px/1.1 var(--f-ui); letter-spacing: .04em; -webkit-tap-highlight-color: transparent; transition: transform .3s var(--ease), background-color .2s; }
.pl-blk-g { display: block; width: min(64px, 100%); aspect-ratio: 1 / 1; transition: transform .3s var(--ease), filter .3s; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .45)); }
.pl-blk-g svg { width: 100%; height: 100%; display: block; }
.pl-blk:hover .pl-blk-g { transform: translateY(-3px) rotate(-3deg); }
.pl-blk[aria-pressed="true"] { background: var(--accent-soft); }
.pl-blk[aria-pressed="true"] .pl-blk-g { transform: translateY(-7px) rotate(-5deg) scale(1.06); filter: drop-shadow(0 12px 8px rgba(0, 0, 0, .55)); }
.pl-blk[aria-pressed="true"] .pl-blk-n { color: var(--accent); }
.pl-blk-n { text-shadow: 0 1px 1px rgba(0, 0, 0, .5); white-space: nowrap; }
.pl-pots { display: grid; gap: 6px; align-content: center; padding: 8px; border-radius: 16px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 4px 10px rgba(0, 0, 0, .4); }
.pl-npot { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--text); font: 800 11.5px/1.1 var(--f-ui); cursor: pointer; text-align: left; }
.pl-npot i { width: 26px; height: 26px; flex: none; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .55), transparent 40%), var(--dye); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .3), 0 0 0 2px rgba(0, 0, 0, .35); }
.pl-npot small { display: block; font-weight: 600; color: var(--muted); font-size: 10.5px; }
.pl-npot[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }

/* ---------------------------------------------------------------- inspector */
.pl-insp { margin-top: 14px; padding: 14px; border-radius: 18px; background: rgba(12, 7, 3, .5); border: 1px solid var(--line); backdrop-filter: blur(4px); }
.pl-insp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pl-insp-t { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--muted); min-height: 34px; }
.pl-insp-t b { color: var(--text); font: 600 1.05rem var(--f-display); }
.pl-insp-t small { color: var(--muted); }
.pl-sel-blk { width: 32px; height: 32px; flex: none; }
.pl-sel-blk svg { width: 100%; height: 100%; display: block; }
.pl-insp-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pl-insp .icon-btn:hover:not(:disabled) { color: var(--accent); }
.pl-insp .icon-btn.pl-del:hover:not(:disabled) { color: #ff8a80; }
.pl-insp button:disabled { opacity: .35; cursor: default; }
.pl-insp-ctl { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px 16px; align-items: end; }
.pl-insp.none .pl-insp-ctl { opacity: .55; }
.pl-range { display: grid; gap: 4px; font: 700 11.5px/1.2 var(--f-ui); letter-spacing: .04em; color: var(--muted); }
.pl-range span { display: flex; justify-content: space-between; gap: 8px; }
.pl-range b { color: var(--text); font-variant-numeric: tabular-nums; }
.pl-range input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: pointer; }
.pl-range input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--line2); }
.pl-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--accent); border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.pl-range input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line2); }
.pl-range input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid rgba(255, 255, 255, .9); }
.pl-range input[type="range"]:disabled { cursor: default; }
.pl-range input[type="range"]:disabled::-webkit-slider-thumb { background: var(--muted); }
.pl-range input[type="range"]:focus { box-shadow: none; }
.pl-range input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-cseg { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; padding: 3px; gap: 2px; }
.pl-cseg button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 0; border-radius: 999px; background: none; color: var(--text); font: 800 12px/1 var(--f-ui); cursor: pointer; }
.pl-cseg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.pl-dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .6); }
.pl-keys { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.pl-keys i { color: var(--accent); margin-right: 4px; }
.pl-keys kbd { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line2); border-bottom-width: 2px; font: 700 11px/1.5 var(--f-ui); text-align: center; color: var(--text); }

/* ---------------------------------------------------------------- side: repeat + dyes */
.pl-side { display: grid; gap: 14px; }
.pl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(14px, 2vw, 22px); }
.pl-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line2); margin-bottom: 12px; }
.pl-seg button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 6px; border: 0; border-radius: 12px; background: none; color: var(--text); font: 800 12.5px/1 var(--f-ui); cursor: pointer; transition: background-color .25s, color .25s; }
.pl-seg button svg { width: 24px; height: 16px; flex: none; opacity: .8; }
.pl-seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.pl-cloth { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line); background: var(--bg3); }
.pl-cloth svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pl-cloth::before { content: ""; position: absolute; inset: 7px; z-index: 2; border: 1px dashed rgba(255, 255, 255, .4); border-radius: 6px; pointer-events: none; mix-blend-mode: overlay; }
.pl-cloth::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: multiply;
    background: linear-gradient(97deg, rgba(0, 0, 0, .2), transparent 9%, rgba(255, 255, 255, .1) 24%, transparent 36%, rgba(0, 0, 0, .1) 55%, transparent 66%, rgba(255, 255, 255, .06) 78%, rgba(0, 0, 0, .22)); }
.pl-cloth.pl-redye svg { animation: plDye .9s var(--ease) both; }
@keyframes plDye { from { clip-path: inset(0 0 100% 0); filter: saturate(1.5) brightness(1.1); } to { clip-path: inset(0 0 0 0); filter: none; } }
.pl-cloth-empty { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; margin: 0; font: italic 500 1.15rem var(--f-display); color: rgba(29, 31, 39, .5); }
.pl-cloth-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 12px; font-size: 12.5px; color: var(--muted); }
.pl-cloth-meta b { color: var(--text); }
.pl-chk { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--text); cursor: pointer; }
.pl-chk input { width: 17px; height: 17px; padding: 0; accent-color: var(--accent); }
.pl-sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.pl-dyes .pots { margin-bottom: 10px; }

/* ---------------------------------------------------------------- actions */
.pl-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 20px; padding: 16px; border-radius: 22px; border: 1px dashed var(--line2); background: var(--surface); }
.pl-name { flex: 1 1 220px; margin: 0; }
.pl-status { min-height: 1.6em; margin: 10px 2px 0; font-size: 13.5px; color: var(--muted); }
.pl-status b { color: var(--text); }
.pl-status i { color: var(--accent); }

/* ---------------------------------------------------------------- on the kurta */
.pl-wear { padding-top: clamp(30px, 4vw, 56px); }
.pl-wear-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 52px); align-items: center; }
.pl-wear-copy h2 { font-size: clamp(2rem, 4vw, 3.3rem); margin: 0 0 12px; }
.pl-wctl { margin-top: 18px; }
.pl-wctl .lab { margin-bottom: 8px; }
.pl-mannequin { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 14px; align-items: stretch; }
.pl-mq-stage { position: relative; border-radius: 26px; border: 1px solid var(--line2); box-shadow: var(--shadow); padding: 4% 8%; overflow: hidden;
    background: linear-gradient(var(--mat-line) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--mat-line) 1px, transparent 1px) 0 0 / 24px 24px, radial-gradient(ellipse at 45% 35%, var(--mat-a), var(--mat-b)); }
.pl-mq-stage::before { content: ""; position: absolute; left: 50%; bottom: 3%; width: 60%; height: 16px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .35), transparent 70%); }
.pl-mq-g { position: relative; aspect-ratio: 300 / 420; max-height: 560px; margin: 0 auto; }
.pl-mq-g svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 18px 20px rgba(0, 0, 0, .3)); }
.pl-cwrail { display: grid; align-content: start; gap: 8px; }
.pl-cw-row { display: grid; gap: 8px; }
.pl-cwv { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 16px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); font: 700 12px/1.25 var(--f-ui); text-align: left; cursor: pointer; transition: border-color .2s, transform .25s var(--ease); }
.pl-cwv:hover { border-color: var(--accent); transform: translateX(-3px); }
.pl-cwv-g { display: block; aspect-ratio: 300 / 420; }
.pl-cwv-g svg { width: 100%; height: 100%; display: block; }
.pl-cwv-n { display: grid; gap: 5px; }

/* ---------------------------------------------------------------- saved prints */
.pl-saved { padding-top: 0; }
.pl-saved-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; margin-bottom: 14px; }
.pl-sv { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.pl-sv.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pl-sv-sw { grid-row: span 2; width: 74px; height: 74px; }
.pl-sv-sw svg { width: 100%; height: 100%; display: block; }
.pl-sv-t { display: grid; gap: 4px; min-width: 0; }
.pl-sv-t b { font: 600 1.05rem/1.2 var(--f-display); overflow-wrap: anywhere; }
.pl-sv-t small { color: var(--muted); font-size: 12px; }
.pl-sv-a { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pl-empty { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1020px) {
    .pl-grid { grid-template-columns: minmax(0, 1fr); }
    .pl-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
    .pl-wear-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .pl-side { grid-template-columns: minmax(0, 1fr); }
    .pl-insp-ctl { grid-template-columns: 1fr 1fr; }
    .pl-cseg { grid-column: 1 / -1; justify-self: start; }
    .pl-tray-wrap { flex-direction: column; }
    .pl-pots { grid-template-columns: 1fr 1fr; }
    .pl-auto { margin-left: 0; }
    .pl-mannequin { grid-template-columns: minmax(0, 1fr); }
    .pl-cw-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pl-cwv { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 8px 4px; }
    .pl-cwv-g { width: 60px; }
    .pl-cwv-n { justify-items: center; font-size: 11px; }
}
@media (max-width: 520px) {
    .pl-bench { border-radius: 22px; padding: 12px; }
    .pl-tile-frame { padding: 14px 0 0 14px; }
    .pl-ruler.h { left: 14px; height: 10px; } .pl-ruler.v { top: 14px; width: 10px; }
    .pl-tray { gap: 2px; padding: 8px 6px 6px; }
    .pl-blk { font-size: 9.5px; letter-spacing: 0; }
    .pl-sliders { grid-template-columns: minmax(0, 1fr); }
    .pl-seg button { flex-direction: column; gap: 4px; font-size: 11.5px; }
    .pl-actions { padding: 12px; }
    .pl-actions .btn { flex: 1 1 100%; }
    .pl-presets > .lab { flex-basis: 100%; }
    .pl-preset-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: thin; flex: 1 1 100%; }
    .pl-pre { flex: none; }
    .pl-sv { grid-template-columns: 64px minmax(0, 1fr); }
    .pl-sv-sw { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
    .pl-blk, .pl-blk-g, .pl-pre, .pl-cwv, .pl-guides { transition: none; }
    .pl-cloth.pl-redye svg { animation: none; }
}
