.product-mockup-editor{width:min(1120px,96vw);max-width:none;max-height:94vh;padding:0;border:0;border-radius:18px;color:#172d46;background:#f7f9fc}.product-mockup-editor::backdrop{background:rgba(20,36,58,.62)}.pm-head,.pm-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;background:#fff;border-bottom:1px solid #dbe4ee}.pm-head h2{margin:0}.pm-head p,.pm-footer p{margin:4px 0 0;color:#64758b}.pm-layout{display:grid;grid-template-columns:300px 1fr;gap:22px;padding:24px;overflow:auto;max-height:calc(94vh - 150px)}.pm-controls{display:grid;align-content:start;gap:16px}.pm-controls label{display:grid;gap:7px;font-weight:650}.pm-controls select,.pm-controls input{width:100%;padding:12px;border:1px solid #cad7e5;border-radius:10px;background:#fff}.pm-stage{display:grid;place-items:center;min-height:560px;border-radius:14px;background:#e8eef5}.pm-stage canvas{display:block;width:auto;max-width:100%;height:min(62vh,680px);border-radius:10px}.pm-footer{border-top:1px solid #dbe4ee;border-bottom:0}.product-mockup-action{white-space:nowrap}@media(max-width:760px){.pm-layout{grid-template-columns:1fr}.pm-stage{min-height:420px}.pm-stage canvas{height:auto;width:100%}.pm-footer{flex-wrap:wrap}}
.pm-view-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pm-view-tabs button{padding:7px;border:2px solid #d5dfeb;border-radius:11px;background:#fff;color:#203957;font-weight:700}.pm-view-tabs button.active{border-color:#243d66;box-shadow:0 0 0 2px rgba(36,61,102,.12)}.pm-view-tabs canvas{display:block;width:100%;height:62px;object-fit:cover;border-radius:6px;background:#edf2f7}.pm-view-tabs span{display:block;margin-top:5px}.pm-adjustments{display:grid;gap:12px;padding-top:4px;border-top:1px solid #dbe4ee}.pm-adjustments input[type=range]{padding:0;border:0}.pm-adjustments input[type=color]{height:44px;padding:4px}.pm-check{grid-template-columns:auto 1fr!important;align-items:center}.pm-check input{width:auto!important}.pm-footer{justify-content:flex-end}.pm-footer p{margin-right:auto}
.pm-layout-creative{grid-template-columns:270px minmax(0,1fr);padding:18px}.pm-workspace{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:14px}.pm-creative,.pm-spec-panel{border:1px solid #dce4ed;border-radius:14px;background:#fff}.pm-toolbar{display:flex;align-items:center;gap:18px;padding:12px 16px;border-bottom:1px solid #e1e7ee}.pm-toolbar span{color:#243d66;border-bottom:2px solid #243d66;padding:10px 0}.pm-toolbar button{margin-left:auto;border:0;background:transparent;color:#243d66;font-weight:650}.pm-toolbar button+button{margin-left:0}.pm-toolbar label{display:flex;gap:6px;align-items:center}.pm-proof-pair{display:grid;grid-template-columns:1fr 1fr;gap:22px;padding:30px;background:#f6f2ea}.pm-proof-pair button{border:2px solid transparent;background:transparent;padding:8px;color:#203957;font-weight:750}.pm-proof-pair button.active{border-color:#243d66;border-radius:12px}.pm-proof-pair canvas{display:block;width:100%;height:auto;background:#fff;box-shadow:0 12px 30px rgba(20,37,59,.16)}.pm-proof-pair span{display:block;margin-top:8px}.pm-spec-panel{padding:18px}.pm-spec-panel h3{margin-top:0}.pm-spec-panel dl{display:grid;gap:0}.pm-spec-panel dl div{display:grid;grid-template-columns:70px 1fr;gap:8px;padding:10px 0;border-bottom:1px solid #e4e9ef}.pm-spec-panel dt{color:#6b7b90}.pm-spec-panel dd{margin:0;font-weight:650}.pm-preflight{display:grid;gap:6px;margin-top:20px;padding:14px;border-radius:10px;background:#f3f6f9}.pm-dpi{font-size:1.25rem;font-weight:800}.pm-dpi.good{color:#17833f}.pm-dpi.warn{color:#b76500}@media(max-width:1050px){.pm-workspace{grid-template-columns:1fr}.pm-spec-panel{display:none}}@media(max-width:760px){.pm-layout-creative{grid-template-columns:1fr}.pm-proof-pair{grid-template-columns:1fr}.pm-toolbar{flex-wrap:wrap}}
.pm-layout-tabs{display:flex;align-items:center;gap:2px;border-bottom:0}.pm-toolbar .pm-layout-tabs button{margin:0;padding:10px 12px;border-bottom:2px solid transparent}.pm-toolbar .pm-layout-tabs button.active{color:#243d66;border-bottom-color:#243d66}.pm-proof-pair[data-proof-layout-stage=front],.pm-proof-pair[data-proof-layout-stage=back]{grid-template-columns:minmax(0,1fr);padding:18px 36px}.pm-proof-pair[data-proof-layout-stage=front] [data-proof-side=back],.pm-proof-pair[data-proof-layout-stage=back] [data-proof-side=front]{display:none}.pm-proof-pair[data-proof-layout-stage=front] button,.pm-proof-pair[data-proof-layout-stage=back] button{width:min(100%,900px);justify-self:center}.pm-proof-pair[data-proof-layout-stage=front] canvas,.pm-proof-pair[data-proof-layout-stage=back] canvas{max-height:68vh;object-fit:contain}.pm-proof-pair[data-proof-layout-stage=front] span,.pm-proof-pair[data-proof-layout-stage=back] span{font-size:1.1rem}

/* Creative Studio: keep the proof large while every control lives in one scrollable sidebar. */
.product-mockup-editor{width:min(1440px,98vw)}
.pm-layout.pm-layout-creative{grid-template-columns:minmax(0,1fr) 340px;grid-template-rows:minmax(0,1fr);gap:0;padding:0;overflow:hidden;height:calc(94vh - 154px);max-height:none}
.pm-layout-creative .pm-workspace{grid-column:1;grid-row:1;display:block;min-width:0;min-height:0;padding:18px;background:#f7f9fc}
.pm-layout-creative .pm-creative{height:100%;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.pm-layout-creative .pm-toolbar{flex:0 0 auto}
.pm-layout-creative .pm-proof-pair{flex:1 1 auto;min-height:0;overflow:auto;align-content:center}
.pm-layout-creative .pm-controls{grid-column:2;grid-row:1;display:grid;align-content:start;gap:16px;min-width:0;min-height:0;height:100%;overflow-y:auto;overscroll-behavior:contain;padding:20px;border-left:1px solid #dbe4ee;background:#fff;scrollbar-gutter:stable}
.pm-layout-creative .pm-sidebar-specs{order:-1;padding:0 0 16px;border:0;border-bottom:1px solid #dbe4ee;border-radius:0;background:transparent}
.pm-layout-creative .pm-sidebar-specs dl{grid-template-columns:1fr 1fr;gap:0 14px}
.pm-layout-creative .pm-sidebar-specs dl div{grid-template-columns:62px minmax(0,1fr)}
.pm-layout-creative .pm-preflight{grid-column:1/-1;margin-top:10px}
.pm-layout-creative .pm-view-tabs{position:sticky;top:-20px;z-index:2;padding:10px 0;background:#fff}
@media(max-width:1050px){.pm-layout.pm-layout-creative{grid-template-columns:minmax(0,1fr) 310px}.pm-layout-creative .pm-spec-panel{display:block}.pm-layout-creative .pm-sidebar-specs dl{grid-template-columns:1fr}}
@media(max-width:760px){.pm-layout.pm-layout-creative{display:block;height:auto;max-height:calc(94vh - 150px);overflow:auto}.pm-layout-creative .pm-workspace{padding:12px}.pm-layout-creative .pm-controls{height:auto;overflow:visible;border-left:0;border-top:1px solid #dbe4ee}.pm-layout-creative .pm-view-tabs{position:static}.pm-layout-creative .pm-proof-pair{overflow:visible}}

/* Specifications become a compact, full-width status bar above the studio. */
.pm-layout.pm-layout-creative{grid-template-rows:auto minmax(0,1fr)}
.pm-layout-creative .pm-spec-strip{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:18px;padding:12px 20px;border:0;border-bottom:1px solid #dbe4ee;border-radius:0;background:#fff}
.pm-layout-creative .pm-spec-strip h3{margin:0;white-space:nowrap;font-size:1rem}
.pm-layout-creative .pm-spec-strip dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0}
.pm-layout-creative .pm-spec-strip dl div{display:flex;align-items:baseline;gap:8px;min-width:0;padding:2px 16px;border:0;border-left:1px solid #e4e9ef}
.pm-layout-creative .pm-spec-strip dt{flex:0 0 auto}
.pm-layout-creative .pm-spec-strip dd{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-layout-creative .pm-spec-strip .pm-preflight{display:grid;grid-template-columns:auto auto;column-gap:8px;align-items:center;margin:0;padding:7px 12px;white-space:nowrap}
.pm-layout-creative .pm-spec-strip .pm-preflight strong{grid-column:1/-1;font-size:.75rem;color:#6b7b90}
.pm-layout-creative .pm-spec-strip .pm-preflight small{font-size:.75rem}
.pm-layout-creative .pm-workspace{grid-row:2}
.pm-layout-creative .pm-controls{grid-row:2}
@media(max-width:1050px){.pm-layout-creative .pm-spec-strip{grid-template-columns:1fr}.pm-layout-creative .pm-spec-strip h3{display:none}.pm-layout-creative .pm-spec-strip dl{grid-template-columns:repeat(2,1fr)}.pm-layout-creative .pm-spec-strip .pm-preflight{grid-template-columns:auto 1fr}.pm-layout-creative .pm-spec-strip dl div{border-left:0;padding-left:0}}
@media(max-width:760px){.pm-layout-creative .pm-spec-strip{display:grid}.pm-layout-creative .pm-spec-strip dl{grid-template-columns:1fr 1fr}}

.pm-adjustment-group{border:1px solid #dbe4ee;border-radius:10px;background:#f7f9fc}
.pm-adjustment-group summary{position:relative;padding:13px 40px 13px 14px;cursor:pointer;list-style:none;color:#203957;font-weight:750;user-select:none}
.pm-adjustment-group summary::-webkit-details-marker{display:none}
.pm-adjustment-group summary::after{content:'+';position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:1.25rem;font-weight:500}
.pm-adjustment-group[open] summary::after{content:'−'}
.pm-adjustment-group[open] summary{border-bottom:1px solid #dbe4ee}
.pm-adjustment-group .pm-adjustments{padding:14px;border-top:0;background:#fff;border-radius:0 0 10px 10px}

/* Viewport-safe studio: one sidebar scroll, a responsive proof, and always-visible actions. */
.product-mockup-editor[open]{display:flex;flex-direction:column;height:94vh;overflow:hidden}
.product-mockup-editor:not([open]){display:none}
.product-mockup-editor .pm-head,.product-mockup-editor .pm-footer{flex:0 0 auto}
.product-mockup-editor .pm-layout.pm-layout-creative{flex:1 1 auto;height:auto;min-height:0;max-height:none}
.pm-layout-creative .pm-workspace{overflow:hidden}
.pm-layout-creative .pm-creative{overflow:hidden}
.pm-layout-creative .pm-proof-pair{overflow:hidden;padding:18px;align-items:center;justify-items:center}
.pm-layout-creative .pm-proof-pair button{display:grid;justify-items:center;align-content:center;min-width:0;max-height:100%}
.pm-layout-creative .pm-proof-pair canvas{width:auto;height:auto;max-width:100%;max-height:calc(94vh - 330px);object-fit:contain}
.pm-layout-creative .pm-proof-pair[data-proof-layout-stage=front] canvas,.pm-layout-creative .pm-proof-pair[data-proof-layout-stage=back] canvas{max-height:calc(94vh - 300px)}
.product-mockup-editor .pm-footer{position:relative;z-index:4;padding-block:14px;box-shadow:0 -8px 24px rgba(20,36,58,.08)}
@media(max-height:760px){.product-mockup-editor .pm-head{padding-block:12px}.pm-layout-creative .pm-spec-strip{padding-block:8px}.pm-layout-creative .pm-proof-pair canvas{max-height:calc(94vh - 270px)}.product-mockup-editor .pm-footer{padding-block:10px}}
@media(max-width:760px){.product-mockup-editor[open]{height:96vh}.product-mockup-editor .pm-layout.pm-layout-creative{overflow:auto}.pm-layout-creative .pm-workspace,.pm-layout-creative .pm-creative,.pm-layout-creative .pm-proof-pair{overflow:visible}.pm-layout-creative .pm-proof-pair canvas{width:100%;max-height:none}}
.pm-layout-creative .pm-spec-strip .pm-preflight{display:none}
