/* Shared, additive Studio improvements. No global resets or existing feature overrides. */
:root{--ys-ink:#594668;--ys-border:#e9d8f0;--ys-pink:#fff0f7;--ys-violet:#a685c9}
.ys-tools{margin:14px 0 18px;padding:15px;border-radius:20px;background:linear-gradient(128deg,#fffafd,#f4edff);border:1px solid var(--ys-border);color:var(--ys-ink);box-shadow:0 5px 17px #8975a01a;contain:layout style}
.ys-tools-heading,.ys-search-row,.ys-tools-row,.ys-extra,.ys-zoom-buttons,.ys-two{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.ys-tools-heading{justify-content:space-between;font-weight:850}.ys-tools-heading small,.ys-privacy{font-size:11px;opacity:.83;line-height:1.55}.ys-search-row{margin:12px 0}.ys-search-row label:first-child{flex:1;min-width:140px}.ys-search-row input,.ys-search-row select,.ys-two select,.ys-quote textarea{width:100%;font:inherit;color:#614c73;background:white;border:1px solid #d9c5ea;border-radius:12px;padding:11px;min-height:42px;box-sizing:border-box}
.ys-search-row input:focus-visible,.ys-search-row select:focus-visible,.ys-tools button:focus-visible,.ys-extra :focus-visible{outline:3px solid #b693e1;outline-offset:2px}
.ys-tools button,.ys-extra button,.ys-extra [role=button],.ys-zoom-buttons button,.ys-main-action,.ys-admin-body>button,.ys-theme-choices button{background:#fff;color:#704f90;border:1px solid #dbc9e8;border-radius:12px;min-height:38px;padding:8px 11px;font-weight:750;font-size:12px;cursor:pointer;touch-action:manipulation;white-space:normal}
.ys-tools button[aria-pressed=true],.ys-favorite[aria-pressed=true]{background:#f9deec!important;border-color:#db9cc4!important;color:#9a3c78!important}
.ys-extra{padding:8px 10px;justify-content:center}.ys-extra>*{flex:1;min-width:70px}.work-card .ys-extra{border-top:1px solid #f0e4f7}.ys-mini-extra{display:flex;gap:5px;flex-wrap:wrap;padding:8px}.ys-mini-extra span[role=button]{min-height:34px;display:inline-flex;align-items:center;justify-content:center;flex:1;cursor:pointer;background:#fffbff;border:1px solid #e8d4ef;border-radius:9px;font-size:11px;color:#795d93;font-weight:750;padding:5px}
/* 1. Adaptive card bounds and preserve original aspect ratio, even with 160% scale.
   Height is capped by viewport but zoom remains user controlled in the existing --yume-image-zoom variable. */
#home-works .art-preview,#signature-items .art-preview,#gallery-items .art-preview{max-height:clamp(185px,48vh,470px);overflow:hidden;display:grid;place-items:center}
#home-works .art-preview img,#signature-items .art-preview img,#gallery-items .art-preview img{max-height:clamp(185px,44vh,450px)!important;max-width:100%!important;object-fit:contain!important;object-position:center}
#view .product-image{max-height:clamp(165px,38vh,420px);overflow:hidden;display:grid;place-items:center}
#view .product-image img{object-fit:contain!important;object-position:center;max-width:100%!important;max-height:100%!important}
#view .full-bleed-photo{object-fit:contain!important;max-height:min(62vh,640px);max-width:100%;height:auto}
/* 3. Offscreen card content can skip paint; native lazy/async decoding is set in markup. */
#gallery-items .work-card,#signature-items .work-card,#view .product{content-visibility:auto;contain-intrinsic-size:auto 320px}
.yume-studio-dialog{border:0;padding:0;border-radius:22px;width:min(920px,calc(100vw - 20px));max-height:min(94dvh,950px);overflow:auto;background:#fffbff;color:#53416a;box-shadow:0 25px 80px #3b245d77}
.yume-studio-dialog::backdrop{background:#1c102ccc;backdrop-filter:blur(5px)}
.ys-dialog-body{padding:clamp(13px,2.5vw,26px)}.ys-dialog-body>header{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid var(--ys-border);padding-bottom:12px;margin-bottom:14px}.ys-dialog-body h2{margin:3px 0;font-size:clamp(19px,3vw,25px)}.ys-dialog-body small{color:#89739d}.ys-dialog-body header>button{height:40px;width:40px;border:1px solid #e6d2f0;border-radius:50%;background:white;cursor:pointer;font-size:20px}.ys-dialog-content p{line-height:1.6;font-size:13px}
.ys-viewer-stage{height:clamp(230px,58dvh,640px);background:repeating-conic-gradient(#f2ebf8 0 25%,#fff 0 50%) 50%/26px 26px;display:grid;place-items:center;border-radius:16px;overflow:hidden;touch-action:none;user-select:none;cursor:grab}
.ys-viewer-stage:active{cursor:grabbing}.ys-viewer-stage img{max-width:100%;max-height:100%;object-fit:contain;transition:none;transform-origin:center;pointer-events:none;will-change:transform}
.ys-zoom-buttons{justify-content:center;margin-top:10px}.ys-zoom-buttons output{min-width:48px;text-align:center;font-weight:850}
.ys-two{justify-content:space-between;margin:12px 0}.ys-two label{flex:1;min-width:160px;font-weight:700;font-size:13px}
.ys-compare{position:relative;width:100%;height:clamp(210px,48vh,540px);overflow:hidden;background:#f3edfb;border-radius:15px}.ys-compare img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.ys-compare .ys-divider{position:absolute;inset:0 auto 0 50%;width:3px;background:#e771ae;box-shadow:0 0 0 1px white;pointer-events:none}.ys-range-label{display:flex;align-items:center;gap:10px;margin:12px 0;font-weight:750}.ys-range-label input{flex:1;accent-color:#a67fc8}
.ys-quote{display:grid;grid-template-columns:minmax(90px,28%) 1fr;gap:15px;align-items:center;background:#f9f1ff;border-radius:14px;padding:12px;margin-bottom:12px}.ys-quote img{width:100%;max-height:160px;object-fit:contain}.ys-quote label,.ys-quote textarea{display:block}.ys-quote textarea{margin:12px 0}.ys-main-action{background:#8f69b3;color:white;display:block;margin-top:15px;width:100%;font-size:14px}.ys-dialog-content>label{display:block;font-size:13px;font-weight:700}.ys-dialog-content>label textarea{display:block;margin:8px 0 12px}
.ys-timeline{padding:15px;margin:12px 0;background:#f8f0ff;border:1px solid #e9d5f5;border-radius:15px}.ys-timeline strong,.ys-timeline small{display:block;margin-bottom:5px}.ys-stages{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0}.ys-stages span{flex:1;min-width:67px;text-align:center;padding:7px 5px;border-radius:8px;background:#eee4f3;color:#857390;font-size:11px}.ys-stages .done{background:#d8c1ed;color:#51356f;font-weight:850}.ys-timeline a{font-size:12px}
.ys-admin-panel{margin:12px 0}.ys-admin-body{padding:14px}.ys-admin-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.ys-admin-kpis>div{padding:13px;background:#f6edfc;border-radius:13px}.ys-admin-kpis small{display:block;font-size:11px}.ys-admin-kpis b{font-size:23px;color:#70498e}.ys-bars>div{display:grid;grid-template-columns:40px 1fr 55px;gap:9px;align-items:center;margin:4px 0;font-size:11px}.ys-bars span{background:#eee4f5;border-radius:12px;height:9px;overflow:hidden}.ys-bars i{display:block;height:100%;background:#9c7ac4;border-radius:12px}.ys-error-table{max-height:280px;overflow:auto}.ys-error-table>div{display:grid;grid-template-columns:135px 1fr 60px;gap:8px;font-size:12px;border-bottom:1px solid #e9dcf1;padding:6px}.ys-error-table small{text-align:right}.ys-theme-choices{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:12px 0}.ys-theme-choices button{background:var(--ys-sample)!important;min-height:65px}.ys-theme-sample{padding:22px;background:#eee2ff;color:#59446f;border-radius:14px;text-align:center;font-weight:850}.ys-theme-sample[data-theme=rose]{background:#ffe0ed;color:#98577b}.ys-theme-sample[data-theme=silver]{background:#e5edf6;color:#566b89}.ys-theme-sample[data-theme=midnight]{background:#302542;color:#e2d9fc}.ys-draft-work{text-align:center}.ys-draft-work img{max-height:65vh;max-width:100%;object-fit:contain}
@media(max-width:700px){#home-works .art-preview,#signature-items .art-preview,#gallery-items .art-preview{max-height:min(43vh,340px)}#view .product-image{max-height:30vh}.ys-search-row label:last-child{flex:0 0 120px}.ys-tools button{min-height:40px}.ys-admin-kpis{grid-template-columns:1fr 1fr}.ys-dialog-body{padding:12px}.ys-error-table>div{grid-template-columns:1fr auto;gap:3px}.ys-error-table span{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){.ys-tools,.ys-viewer-stage img{transition:none!important;animation:none!important}}
