/* NUMVERSE IMAGE STUDIO PRO — scoped UI enhancements */
.studio-pro{width:min(1500px,calc(100% - 30px));max-height:96vh;border-radius:20px;background:#fffcf8;overflow:hidden}
.studio-pro .studio-head{padding:14px 22px;background:#fffefc;min-height:70px}
.studio-head h2{font-size:20px;margin:2px 0 0;color:#3b291b}
.studio-toolbar{display:flex;align-items:center;gap:7px;padding:10px 18px;overflow-x:auto;border-bottom:1px solid #eaded0;background:#fff8ee;scrollbar-width:thin}
.studio-toolbar button{flex:none;border:1px solid #e2d0b6;border-radius:8px;background:white;color:#745032;font:500 12px/1.1 'Prompt',Tahoma,sans-serif;padding:9px 11px;min-height:35px;white-space:nowrap}
.studio-toolbar button:hover:not(:disabled){border-color:#c39458;background:#f7ead5}
.studio-toolbar button:disabled{opacity:.38;cursor:not-allowed}
.studio-toolbar-line{height:24px;width:1px;background:#ddc7a8;flex:none;margin:0 3px}
.studio-layout{grid-template-columns:minmax(0,1.3fr) minmax(350px,.7fr);height:min(820px,calc(96vh - 125px));min-height:500px}
.studio-stage{justify-content:flex-start;min-height:0;background:radial-gradient(circle at 30% 0,#f7f0e5,#ece7e1);overflow:auto;padding:16px 22px 22px}
.studio-stage .editor-hint{margin:5px 0 12px;color:#8c7d6c}
.studio-stage-scroller{width:100%;min-height:260px;flex:1;overflow:auto;display:flex;align-items:center;justify-content:center;padding:22px 12px;overscroll-behavior:contain;background-image:linear-gradient(45deg,rgba(255,255,255,.27) 25%,transparent 25%),linear-gradient(-45deg,rgba(255,255,255,.27) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(255,255,255,.27) 75%),linear-gradient(-45deg,transparent 75%,rgba(255,255,255,.27) 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}
.studio-stage #partnerCanvas{max-height:min(52vh,620px);max-width:100%;object-fit:contain;box-shadow:0 16px 38px rgba(44,23,6,.2);transition:none;transform-origin:center center;border:1px solid rgba(0,0,0,.08)}
.studio-stage-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px;margin:11px 0 3px}
.studio-stage-actions button,.studio-edit-actions button,.studio-edit-actions select{min-height:36px;border:1px solid #d9c6aa;border-radius:9px;background:white;color:#745332;padding:6px 11px;font-size:12px}
.studio-stage-actions span{color:#806548;font-size:12px;min-width:44px;text-align:center;font-weight:600}
.studio-edit-actions{display:flex;gap:7px;align-items:center;justify-content:center;flex-wrap:wrap}
.studio-edit-actions select{max-width:145px}
.studio-edit-actions #peAddText{background:#b18a57;color:white;border-color:#b18a57}
.studio-keyhint{font-size:10px;color:#a18c70;text-align:center;margin-top:9px;line-height:1.7}
.studio-controls{max-height:none;height:100%;min-height:0;padding:0 0 18px;background:#fffdf9;overflow-y:auto}
.studio-controls .studio-section{padding:17px 20px 18px;border-bottom:1px solid #f0e7dc}
.studio-controls .studio-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.studio-controls .studio-section-heading h3{font-size:14px;color:#56391f;margin:0;font-weight:700}
.studio-controls .studio-section-heading small{color:#a1825a;font-size:11px;white-space:nowrap}
.studio-controls .studio-help{margin:9px 0;color:#938370;font-size:11px;line-height:1.7}
.pe-layer-list{display:grid;gap:7px;max-height:175px;overflow-y:auto}
.pe-layer-row{display:flex;gap:4px;align-items:center;background:#fff;border:1px solid #e9ddcb;padding:5px;border-radius:9px}
.pe-layer-row.active{border-color:#bd9257;background:#fff8ee}
.pe-layer-row button{font-family:'Prompt',Tahoma,sans-serif;border:0;background:none;color:#836646;min-width:28px;min-height:30px;border-radius:6px;padding:3px;line-height:1.3}
.pe-layer-row button:hover{background:#f5e9d8}
.pe-layer-row .pe-layer-select{min-width:0;flex:1;text-align:left;padding:6px 7px;color:#4c3724;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.studio-controls .studio-full{display:block;margin:10px 0 7px}
.studio-controls .studio-full textarea{min-height:64px;resize:vertical;font-size:12px}
.studio-quick-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 8px}
.studio-quick-actions button{flex:1 1 120px;border:1px solid #dbc9ae;border-radius:10px;background:#fff6ea;color:#815935;padding:9px 12px;font-weight:600;font-size:11px}
.studio-quick-actions button:hover{background:#f7ead5;border-color:#c89a63}
.studio-preset-groups{display:grid;gap:12px;margin:13px 0 16px}.studio-preset-group{border:1px solid #eadac4;border-radius:14px;background:#fffaf4;overflow:hidden}.studio-preset-group summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px 14px;color:#6d5032;font-weight:700}.studio-preset-group summary::-webkit-details-marker{display:none}.studio-preset-group summary span{display:block;font-size:12px}.studio-preset-group summary small{display:block;font-size:10px;color:#977d61;font-weight:600;margin-top:3px}.studio-preset-group[open] summary{border-bottom:1px solid #efe3d4;background:#fffdf9}.studio-preset-group .studio-presets{padding:12px}.studio-controls .studio-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.studio-presets button{border:1px solid #e4d6c5;border-radius:12px;background:#fdf9f4;color:#705334;padding:11px 10px 10px;font-size:11px;min-height:88px;line-height:1.35;box-shadow:0 2px 7px rgba(96,58,25,.04);display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;gap:3px;transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease}
.studio-presets button strong{display:block;font-size:11px;color:inherit}
.studio-presets button span{display:block;font-size:10px;color:rgba(70,50,34,.72)}
.studio-presets button em{display:block;margin-top:auto;font-style:normal;font:800 14px/1.1 'Manrope',Tahoma,sans-serif;letter-spacing:.2px;color:inherit}
.studio-presets button:hover{border-color:#c0965c;transform:translateY(-1px);box-shadow:0 5px 14px rgba(96,58,25,.08)}
.studio-presets button.is-active{border-color:#b37b34;box-shadow:0 0 0 2px rgba(201,146,76,.18),0 8px 16px rgba(96,58,25,.09)}
.studio-presets .preset-luxury-gold{background:linear-gradient(135deg,#fff5d3,#e4bf71 42%,#fff3d7);color:#60380c;border-color:#d7b06d}
.studio-presets .preset-luxury-gold span{color:#7b5a30}
.studio-presets .preset-champagne{background:linear-gradient(180deg,#fffefc,#f6efe4);color:#7d5d3d}
.studio-presets .preset-silver{background:linear-gradient(135deg,#ffffff,#d9e3eb 48%,#f6fbff);color:#3e5666;border-color:#becdd8}
.studio-presets .preset-outline{background:linear-gradient(180deg,#fff,#f3efe9);color:#1b1b1b}
.studio-presets .preset-neon{background:linear-gradient(160deg,#191a29,#2f2140);color:#8ff5ff;border-color:#5f5db0}
.studio-presets .preset-neon span{color:#c8f9ff}
.studio-presets .preset-rose{background:linear-gradient(135deg,#fff1ea,#efc0b0,#fde8db);color:#85464e;border-color:#e2af9d}
.studio-presets .preset-emerald{background:linear-gradient(135deg,#fdf6d9,#dcebcf,#f7ffe9);color:#2d594c;border-color:#bdd6b7}
.studio-presets .preset-modern-black{background:linear-gradient(180deg,#fbfaf8,#efebe7);color:#191919}
.studio-presets .preset-pearl{background:linear-gradient(135deg,#ffffff,#f1ede9);color:#6d5b46}
.studio-presets .preset-ruby{background:linear-gradient(135deg,#fff0f2,#ffb2bd,#ffe4e8);color:#8f1835;border-color:#f1a3b1}
.studio-presets .preset-sapphire{background:linear-gradient(135deg,#eef6ff,#bedbff,#f2f8ff);color:#194886;border-color:#a8cfff}
.studio-presets .preset-soft{background:linear-gradient(180deg,#fffdf8,#f4efe8);color:#543c29}
.studio-presets .preset-badge{background:linear-gradient(135deg,#4f2f16,#8f6337);color:#fff0d2;border-color:#8d663c}
.studio-presets .preset-badge span{color:#f8dfb9}
.studio-presets .preset-mono{background:linear-gradient(180deg,#ffffff,#f5f6f8);color:#454c55;border-color:#d9e0e8}
.studio-controls .editor-two{gap:12px;margin:10px 0}
.studio-controls label{font-size:11px;color:#725640;line-height:1.6}
.studio-controls input[type=range]{accent-color:#b6884c;cursor:pointer}
.studio-controls input[type=number]{min-width:0}
.studio-controls .studio-toggles{margin:13px 0 8px;padding:11px 0;grid-template-columns:repeat(2,minmax(0,1fr))}
.studio-advanced{padding:7px 11px;margin:10px 0;border:1px solid #e8d8c2;border-radius:9px;background:#fff9f2}
.studio-advanced summary{cursor:pointer;font-size:11px;color:#8c6233;font-weight:600;padding:4px 0}
.studio-nudge{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-top:13px}
.studio-nudge button{background:white;border:1px solid #e8dbc8;border-radius:7px;min-width:33px;min-height:30px;color:#7d603d}
.studio-nudge span{font-size:10px;color:#a5927d;margin-left:auto}
.studio-controls .studio-subtle{border:1px solid #d9c8b0;background:white;color:#855f36;padding:9px 14px;border-radius:8px;font-weight:600;font-size:11px}
.studio-controls .studio-subtle:hover{background:#fbf0e1}
.studio-batch textarea{width:100%;padding:10px;border:1px solid #ded0bd;border-radius:9px;background:#fff;font-size:12px;min-height:100px;resize:vertical;margin-bottom:8px}
.studio-batch .studio-file{display:block;margin-bottom:10px;font-size:11px}
.studio-batch .studio-file input{max-width:100%;font-size:11px}
.studio-controls .editor-download{width:calc(100% - 40px);margin:18px 20px 10px;border-radius:10px;min-height:45px;background:linear-gradient(120deg,#c9a26d,#9b6c39)}
.studio-controls .editor-footnote{padding:0 20px;margin:0;color:#97836d;font-size:11px}
.studio-controls #partnerEditorMessage{margin:12px 20px 20px;background:#f7efe4;border:1px solid #e8dbc8;border-radius:8px;padding:10px 12px;overflow-wrap:anywhere;color:#765535}
.studio-controls #partnerEditorMessage[data-kind='error']{background:#fff2f0;color:#a3442c;border-color:#f0d1c8}
.studio-controls #partnerEditorMessage[data-kind='ok']{background:#eef7ee;color:#40693f;border-color:#d4e6d1}
.studio-stage button:disabled,.studio-controls button:disabled{opacity:.45;cursor:not-allowed}
@media (max-width:1000px){.studio-layout{grid-template-columns:minmax(0,1fr) minmax(320px,.8fr)}}
@media (max-width:850px){
 .studio-pro{width:min(760px,calc(100% - 12px));max-height:98vh;overflow-y:auto}
 .studio-layout{grid-template-columns:1fr;height:auto;min-height:0}
 .studio-stage{min-height:350px;overflow:visible;padding:12px}
 .studio-stage-scroller{height:300px;min-height:250px;flex:0 0 auto;overflow:auto}
 .studio-stage #partnerCanvas{max-height:285px}
 .studio-controls{height:auto;max-height:none;border-left:0;border-top:1px solid #eadbca}
 .studio-controls .studio-section{padding:14px 16px}
 .studio-controls .editor-download{width:calc(100% - 32px);margin:16px}
}

@media (max-width:640px){
 .studio-controls .studio-presets{grid-template-columns:1fr}
 .studio-quick-actions button{flex:1 1 100%}
}
@media (max-width:520px){
 .studio-pro{width:calc(100% - 8px);border-radius:12px}
 .studio-pro .studio-head{padding:10px 13px;min-height:60px}
 .studio-pro .studio-head h2{font-size:15px;line-height:1.5}
 .studio-toolbar{padding:7px;gap:5px}
 .studio-toolbar button{font-size:11px;padding:8px 9px}
 .studio-stage{padding:8px}
 .studio-stage .editor-hint{font-size:10px}
 .studio-stage-scroller{height:275px;min-height:230px;padding:12px 4px}
 .studio-stage #partnerCanvas{max-height:245px}
 .studio-keyhint{font-size:9px}
 .studio-edit-actions button,.studio-edit-actions select{min-height:34px;font-size:11px}
 .studio-controls .studio-presets{grid-template-columns:1fr;gap:7px}
 .studio-presets button{min-height:74px;padding:10px 9px}
 .studio-presets button em{font-size:13px}
}

/* V25.7 — bounded template library: search/category above an independent scroller */
.studio-preset-library{margin:14px 0 17px;border:1px solid #e8dac6;background:#fffaf4;border-radius:14px;overflow:hidden}
.studio-preset-search{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;padding:12px 12px 8px}
.studio-preset-search label{display:block;min-width:0;font-size:11px;font-weight:600;color:#765b3f}
.studio-preset-search input,.studio-preset-search select{display:block;width:100%;min-width:0;min-height:39px;margin:4px 0 0;padding:8px 10px;font:500 12px 'Prompt',sans-serif;border:1px solid #dfcdb6;border-radius:9px;background:#fffdf9;color:#563c26}
.studio-preset-result{display:flex;justify-content:space-between;gap:9px;align-items:center;padding:0 12px 10px;color:#9b825f;font-size:10px}
.studio-preset-result span:first-child{font-weight:700;color:#855e2d}
.studio-preset-scroll{height:292px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d0ae7e #faf4ec;border-top:1px solid #eee1cf;background:#fffdf9;padding:10px}
.studio-preset-scroll:focus-visible{outline:2px solid #b98542;outline-offset:-2px}
.studio-preset-scroll .studio-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0;padding:0}
.studio-preset-scroll .studio-presets button[hidden]{display:none!important}
.studio-preset-empty{margin:14px 0;padding:15px;text-align:center;color:#9a8268;font-size:11px}
@media (max-width:640px){.studio-preset-scroll{height:272px}.studio-preset-search{grid-template-columns:1fr 1fr}.studio-preset-scroll .studio-presets{grid-template-columns:1fr}}
@media (max-width:380px){.studio-preset-search{grid-template-columns:1fr}}

/* V25.8 — LPM Collections 01–04. Previews are reference images; live text is rendered in Canvas. */
.studio-preset-scroll .studio-presets button.studio-lpm-card{gap:4px;padding:8px;min-height:126px;background:#fbf7f1;color:#53371f;overflow:hidden}
.studio-lpm-card .studio-lpm-thumb{display:block;width:100%;height:auto;aspect-ratio:1800/660;object-fit:contain;overflow:hidden;border-radius:7px;background:#15131b}
.studio-presets button.studio-lpm-card strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.studio-presets button.studio-lpm-card span{font-size:10px;line-height:1.4;min-height:1.4em}
.studio-lpm-card .studio-lpm-code{font:600 9px/1.2 'Manrope',Tahoma,sans-serif;color:#94714a;letter-spacing:.3px}
.studio-lpm-hint{padding:8px 12px;margin:0;border-top:1px solid #eee1cf;color:#8a7258;font-size:10px;line-height:1.5;background:#fffbf5}
@media(max-width:640px){.studio-preset-scroll .studio-presets button.studio-lpm-card{min-height:140px}}

/* V25.9 — editable watermark layers. Inherits existing responsive Image Studio layout. */
.studio-edit-actions #peAddWatermark{background:#fff4dc;color:#74532b;border-color:#d9b986;font-weight:650}
.studio-edit-actions #peAddWatermark:hover{background:#f8e7c4;border-color:#b98f55}
.studio-watermark-settings{min-width:0;margin:12px 0 17px;padding:8px 13px 12px;border:1px solid #dfc39c;border-radius:12px;background:#fffaf0}
.studio-watermark-settings[hidden]{display:none!important}
.studio-watermark-settings legend{padding:0 7px;font-size:12px;font-weight:700;color:#8b6130}
.studio-watermark-settings .editor-two{margin:7px 0;gap:10px}
.studio-watermark-settings label{display:block;font-size:11px}
.studio-watermark-settings select{width:100%;margin-top:4px;padding:7px;min-height:36px;border:1px solid #ddc9ae;border-radius:7px;background:#fffdf9;color:#634728;font:500 11px 'Prompt',Tahoma,sans-serif}
.studio-watermark-settings input[type=range]{display:block;width:100%;margin:11px 0 5px}
.studio-watermark-settings .studio-help{margin:5px 0}
@media(max-width:520px){.studio-watermark-settings .editor-two{grid-template-columns:minmax(0,1fr)}}

/* V25.10: member-starred editable text templates */
.studio-preset-scroll .studio-presets .studio-preset-tile{position:relative;min-width:0}
.studio-preset-scroll .studio-presets .studio-preset-tile[hidden]{display:none!important}
.studio-preset-scroll .studio-presets .studio-preset-tile>button[data-studio-preset]{width:100%;height:100%;padding-right:30px}
.studio-preset-scroll .studio-presets .studio-preset-tile>.studio-preset-star{position:absolute;top:5px;right:5px;width:28px;height:28px;min-height:28px;padding:0;display:grid;place-items:center;font-size:19px;font-weight:800;line-height:1;background:#fffbf4;border:1px solid #dfc8a6;border-radius:8px;color:#97816a;z-index:2}
.studio-preset-scroll .studio-presets .studio-preset-star.is-favorite{color:#ba8224;background:#fff0c9}

#pePresetPicker>summary{cursor:pointer;padding:12px 14px;color:#694c2c;font-weight:700}
#pePresetPicker .studio-preset-scroll{
  --tile-height:142px;
  box-sizing:content-box;height:calc(2 * var(--tile-height) + 9px);
  padding:0 8px;scroll-snap-type:y proximity;
}
#pePresetPicker .studio-presets{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:var(--tile-height);gap:9px}
#pePresetPicker .studio-preset-tile{scroll-snap-align:start}
#pePresetPicker .studio-lpm-thumb{flex:1;min-height:0;object-fit:contain}
