:root{font-family:Arial,sans-serif;color:#293444;background:#f3f4f6;--accent:#782f48;--line:#dce0e7}*{box-sizing:border-box}body{margin:0}button,select,input,textarea{font:inherit}button,.file{cursor:pointer;border:1px solid var(--line);background:#fff;border-radius:8px;padding:10px 12px;color:#293444;font-size:14px}button:hover,.file:hover{border-color:var(--accent)}button:disabled{opacity:.45;cursor:default}button.primary{background:var(--accent);color:white;border-color:var(--accent);font-weight:bold}button.danger{color:#a42338}a{color:var(--accent)}.top{background:#fff;border-bottom:1px solid var(--line);padding:16px 24px;display:flex;align-items:center;gap:25px;justify-content:space-between}.brand{font-family:Georgia,serif;font-size:24px;text-decoration:none;color:#293444;white-space:nowrap}.brand span{color:var(--accent)}.tag{font-size:10px;letter-spacing:2px;color:var(--accent);font-weight:bold}h1{font-size:20px;margin:5px 0}h2{font-size:14px;margin:16px 0 9px}.toolbar{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin-bottom:14px}main{max-width:1700px;margin:auto;padding:16px 24px}.workspace{display:grid;grid-template-columns:220px minmax(0,1fr) 240px;gap:14px;align-items:start}.panel{padding:14px;background:white;border:1px solid var(--line);border-radius:12px;min-width:0}.panel h2:first-child{margin-top:0}.tools>button,.tools>.file,.properties fieldset>button{display:block;width:100%;margin:6px 0;text-align:center}.templates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.template{padding:5px;font-size:11px}.thumb{display:grid;place-items:center;height:54px;margin-bottom:5px;font-family:Georgia,serif;font-size:12px;border:1px solid #d0c7c4}.thumb.blank{background:white}.thumb.classic{background:#faf5ec;border:3px double #b5a079;color:#776042}.thumb.modern{background:#e8eef0;color:#284c57}.file{position:relative;display:inline-block;overflow:hidden}.file input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.file:focus-within{outline:2px solid var(--accent)}label{display:block;font-size:12px;color:#455365}select,input:not([type=checkbox]):not([type=file]),textarea{display:block;width:100%;padding:8px;border:1px solid var(--line);border-radius:6px;color:#293444;background:white;min-width:0;margin:4px 0 9px}input[type=color]{height:34px;padding:3px!important}textarea{resize:vertical}.toolbar select{margin:4px 0 0}.toolbar label.file{font-size:14px}.stage{background:#e5e8ee;border:1px solid var(--line);border-radius:12px;min-width:0;padding:14px}.stage-head{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;color:#536171}#viewport{position:relative;min-height:240px;display:flex;justify-content:center;align-items:center;margin:18px 0;overflow:hidden}#paper{position:relative;flex:none;transform-origin:center;overflow:hidden;box-shadow:0 5px 24px #26364c33;touch-action:none}.object{position:absolute;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.2;user-select:none;cursor:move;touch-action:none}.object img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.object.selected{outline:2px solid #347ac0;outline-offset:1px}.handle{position:absolute;right:0;bottom:0;background:#347ac0;border:1px solid white;cursor:nwse-resize;touch-action:none;z-index:1}.layer{display:block;width:100%;text-align:left;margin:4px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer.active{border-color:#347ac0;background:#eef5ff}fieldset{border:0;margin:0;padding:0;min-width:0}.fields{display:grid;grid-template-columns:1fr 1fr;gap:6px}.hint,#status,#selection{font-size:13px;line-height:1.5;color:#546171}#print-paper{display:none} [hidden]{display:none!important} @media(max-width:900px){.workspace{grid-template-columns:175px minmax(0,1fr)}.properties{grid-column:1/-1}.top{gap:12px;padding:12px}.top h1{font-size:16px}main{padding:12px}}@media(max-width:580px){.workspace{display:flex;flex-direction:column}.stage{order:0;width:100%}.tools{order:1;width:100%}.properties{order:2;width:100%}.top{flex-wrap:wrap}.top .brand{font-size:20px}.top>div{order:3;width:100%}.toolbar>*{flex:1 1 120px}.templates{max-width:300px}.stage{padding:8px}}@media print{html,body{margin:0!important;padding:0!important;background:white!important}body>header,body>main{display:none!important}#print-paper{display:block;position:relative;overflow:hidden;margin:0;print-color-adjust:exact;-webkit-print-color-adjust:exact;break-inside:avoid}.object{outline:none!important;cursor:default;user-select:text}.handle{display:none!important}}

.guide-toggle{display:flex;align-items:center;gap:5px}.safe-guide{position:absolute;inset:5mm;border:0.35mm dashed #347ac0;pointer-events:none;z-index:1}.object.outside{outline:1px dashed #ad2940}.print-warning{color:#8b2437}button,.file{min-height:40px}@media(max-width:580px){.toolbar button,.toolbar .file{min-height:44px}input,select,textarea{font-size:16px}}
.thumb.botanical{background:#edf1e7;color:#385747;border:3px double #bdcfaa}.thumb.night{background:#17243b;color:#f0d6a1;border:3px double #b59665}.thumb.minimal{background:#fffefd;color:#333;border-block:2px solid #bbb4ac}.object{font-synthesis:none}.tools #font-info{font-size:11px;margin:8px 0}.toolbar button:focus-visible,.panel button:focus-visible{outline:2px solid #347ac0;outline-offset:2px}
.mobile-drawer{display:contents}.mobile-drawer>summary{display:none}
@media(max-width:580px){body{padding-bottom:76px}main{padding:8px 8px 84px}.workspace{display:block}.stage{min-height:calc(100dvh - 225px);margin-bottom:10px}.stage .hint{font-size:11px}.mobile-drawer{display:block;position:fixed;z-index:30;bottom:calc(10px + env(safe-area-inset-bottom));width:calc(50% - 14px);max-height:68dvh}.mobile-drawer>summary{display:block;list-style:none;background:#782f48;color:#fff;border-radius:14px;padding:14px;text-align:center;font-weight:700;box-shadow:0 4px 20px #19253333;min-height:48px}.mobile-drawer>summary::-webkit-details-marker{display:none}.mobile-drawer[open]{left:8px;right:8px;width:auto;height:min(62dvh,520px);max-height:62dvh;background:#fff;border-radius:18px 18px 0 0;box-shadow:0 -8px 30px #19253344;padding:8px}.mobile-drawer[open]>summary{background:#f3edf0;color:#293444;box-shadow:none}.mobile-drawer[open]>aside{height:calc(100% - 52px);overflow:auto;border:0}.tools-drawer:not([open]){left:8px}.properties-drawer:not([open]){right:8px}.toolbar{position:sticky;top:0;z-index:15;background:#f3f4f6;padding:6px 0}.top{position:sticky;top:0;z-index:20}.top>div{order:initial!important;width:auto!important}.top h1{font-size:14px}.toolbar button{flex:1 1 92px;padding:8px;font-size:12px}.toolbar label{flex:1 1 130px}.hint{font-size:12px}}

.studio-order{margin:0 0 14px}.studio-order h2{font-size:18px}.studio-order>p{max-width:900px}.studio-order label{max-width:480px}.studio-order .studio-approval{display:flex;align-items:flex-start;gap:8px;max-width:850px;margin:10px 0}.studio-order .studio-approval input{margin-top:3px;flex:0 0 auto}.studio-order #studio-submit{min-width:220px}@media(max-width:580px){.studio-order{padding:12px}.studio-order #studio-submit{width:100%}.studio-order label{max-width:none}}
.studio-envelope-option{display:flex;align-items:center;gap:9px}.studio-envelope-option input{width:18px;height:18px}.studio-price-summary{margin:10px 0;padding:12px;border-radius:10px;background:#f4f7f9;color:#20394d;font-weight:700}.studio-price-summary:empty{display:none}.studio-print-offer{width:min(440px,calc(100vw - 32px));padding:22px;border:1px solid #e1e5e9;border-radius:16px;box-shadow:0 24px 80px #12203344}.studio-print-offer::backdrop{background:#17243588;backdrop-filter:blur(3px)}.studio-print-offer h2{margin:0 0 8px;color:#20394d}.studio-print-offer p{color:#596879;line-height:1.5}.studio-offer-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:18px}.studio-offer-actions button{padding:11px 14px;border:1px solid #dce2e7;border-radius:9px;background:white;color:#26394d;font:inherit;font-weight:650;cursor:pointer}.studio-offer-actions button.primary{border-color:#782f48;background:#782f48;color:white}

/* Invitation studio: compact, visual, Canva-inspired workspace */
.top{position:sticky;top:0;z-index:25;box-shadow:0 4px 18px #1c31420d}.top>div{min-width:0}.top h1{color:#1e3447;font-family:Georgia,serif;font-weight:500;letter-spacing:-.02em}.toolbar{position:sticky;top:74px;z-index:18;padding:10px 12px;margin:0 0 12px;background:#fff;border:1px solid #e0e4e9;border-radius:13px;box-shadow:0 5px 18px #1c31420b}.toolbar button,.toolbar .file{background:#fff;box-shadow:0 1px 2px #1c314208}.toolbar button.primary{background:#782f48}.workspace{grid-template-columns:248px minmax(300px,1fr) 284px;gap:12px}.tools,.properties{border-color:#e5e7eb;box-shadow:0 7px 24px #182d4110}.tools h2,.properties h2{color:#20394d;font-size:13px;letter-spacing:.01em}.templates{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.template{min-height:81px;padding:8px 7px;border-radius:10px;background:#fbfaf8;color:#34445a;font-weight:650}.template:hover{background:#fff;border-color:#b58b72;transform:translateY(-1px)}.thumb{height:58px;border-radius:5px;box-shadow:0 2px 5px #24364c12}.tools>.file,.tools>button{border-radius:9px;text-align:left;padding:11px 12px}.tools>h2:not(:first-child){border-top:1px solid #edf0f2;padding-top:13px}.stage{min-height:650px;background-color:#eef0f3;background-image:radial-gradient(#c6cbd1 0.75px,transparent .75px);background-size:16px 16px;border-radius:14px}.stage-head{align-items:center;padding:2px 3px;color:#26394d;font-weight:700}.stage .hint{max-width:520px;margin:8px auto 0;padding:8px 11px;border-radius:8px;background:#ffffffcf;text-align:center}#viewport{overflow:auto}#paper{border:1px solid #fff;box-shadow:0 14px 42px #1c2d4050}.properties fieldset>label,.properties fieldset>.fields{margin-top:8px}.properties input,.properties textarea,.properties select{border-color:#d8dfe6}.properties textarea{min-height:88px}.layer{border-radius:8px}.layer.active{border-color:#5282a4;background:#edf5f9}.studio-finish{margin:24px 0 12px;border:1px solid #dfe3e8;border-radius:14px;background:#fff;box-shadow:0 7px 24px #182d410a}.studio-finish>summary{cursor:pointer;list-style:none;padding:16px 18px;color:#20394d;font-size:15px;font-weight:750}.studio-finish>summary::-webkit-details-marker{display:none}.studio-finish>summary::after{content:'＋';float:right;color:#782f48}.studio-finish[open]>summary::after{content:'−'}.studio-finish-body{padding:0 18px 18px}.studio-finish .studio-order{margin:0;border:0;box-shadow:none;padding:0}.studio-finish .studio-order h2{margin-top:8px}.design-preview{width:min(900px,96vw);height:min(92dvh,900px);max-width:none;max-height:none;padding:0;border:0;border-radius:16px;background:#f5f6f8;overflow:hidden;box-shadow:0 25px 90px #10182766}.design-preview::backdrop{background:#122033b8;backdrop-filter:blur(4px)}.design-preview-head{display:flex;align-items:center;justify-content:space-between;height:56px;padding:8px 14px;background:#fff;border-bottom:1px solid #dce0e7}.design-preview-head strong{color:#25394d}.design-preview-head button{width:38px;height:38px;border:0;border-radius:50%;background:#f0f2f4;font-size:25px}#preview-stage{height:calc(100% - 56px);display:flex;align-items:center;justify-content:center;overflow:hidden;padding:20px;background:radial-gradient(#c6cbd1 .75px,transparent .75px);background-size:16px 16px}#preview-paper{position:relative;flex:none;overflow:hidden;box-shadow:0 16px 48px #182d4144;border:1px solid white}#preview-paper .object{cursor:default;user-select:text}#preview-paper .object img{pointer-events:none}
@media(max-width:900px){.workspace{grid-template-columns:190px minmax(0,1fr)}.properties{grid-column:1/-1}.toolbar{top:66px}}
@media(max-width:580px){.top{position:sticky;top:0}.toolbar{top:58px;margin:0 -2px 9px;padding:7px;border-radius:10px;gap:6px}.workspace{display:block}.stage{min-height:calc(100dvh - 185px);padding:8px}.stage .hint{display:none}.tools-drawer,.properties-drawer{z-index:35}.tools-drawer>aside,.properties-drawer>aside{border-radius:16px 16px 0 0}.tools-drawer[open],.properties-drawer[open]{width:auto;left:6px;right:6px;bottom:calc(6px + env(safe-area-inset-bottom));max-height:72dvh}.templates{grid-template-columns:repeat(3,minmax(0,1fr));max-width:none}.template{min-height:76px}.thumb{height:49px}.studio-finish{margin:14px 0}.studio-finish>summary{padding:14px}.design-preview{position:fixed;inset:0;width:100vw;height:100dvh;margin:0;border-radius:0}.design-preview-head{height:50px}#preview-stage{height:calc(100% - 50px)} }
@media(max-width:580px){main{padding:8px 8px 84px}.toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px;border-radius:12px}.toolbar>*{width:100%;min-width:0;min-height:48px;margin:0;flex:none;text-align:center}.toolbar button{font-size:13px;line-height:1.2;padding:8px}.toolbar .file{display:flex;align-items:center;justify-content:center;font-size:13px;padding:8px}.stage{min-height:calc(100dvh - 245px);padding:8px}.stage-head{font-size:11px}#viewport{width:100%;margin:8px 0;min-height:220px}.studio-print-offer{width:calc(100vw - 28px);max-width:none;padding:18px}.studio-offer-actions{display:grid;grid-template-columns:1fr}.studio-offer-actions button{min-height:48px}}@media(max-width:580px){.mobile-drawer[open]{height:min(52dvh,430px);max-height:52dvh}.mobile-drawer[open]>aside{height:calc(100% - 48px);padding:10px}.mobile-drawer>summary{padding:12px 10px}.properties textarea{min-height:72px}.stage{scroll-margin-top:90px}}
#studio-finish[open]{display:flex;flex-direction:column;max-height:85dvh;padding:16px;overflow:hidden}#studio-finish>.studio-finish-body{min-height:0;overflow:auto;padding:12px 0}#studio-finish>.studio-print-footer{flex:none;padding-top:10px;border-top:1px solid #dce0e7}#studio-submit{width:100%;min-height:48px}#studio-print-close{align-self:flex-end}
#stage-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:8px 0}#stage-tools button{min-width:64px}#quick-delete{color:#a42338}@media(max-width:580px){#stage-tools button{min-height:44px;flex:1 1 64px}}
@media(pointer:coarse){#paper{touch-action:pan-y}#paper .object,#paper .handle{touch-action:none}#paper .handle{border:2px solid white;border-radius:5px}#stage-tools button{min-height:44px}}
@media(max-width:580px){#property-drawer[open]{left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));border:1px solid #dce0e7;border-radius:18px;height:auto;max-height:48dvh;padding:8px;background:#fff;box-shadow:0 10px 36px #19253355}#property-drawer[open]>aside{height:auto;max-height:calc(48dvh - 68px);overflow:auto}#property-drawer[open]>summary{background:#f4edf1;color:#782f48}#property-drawer[open]>summary::after{content:" \00d7";float:right}}
@media(max-width:580px){#property-drawer[open]{top:calc(8px + env(safe-area-inset-top));bottom:auto;z-index:40}}
#monogram-open img{vertical-align:middle;object-fit:contain}#monogram-dialog{max-height:82dvh}.monogram-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:8px;margin-top:12px}.monogram-grid img{width:100%;object-fit:contain}
@media(min-width:581px) and (max-width:900px){.workspace{grid-template-columns:minmax(125px,1fr) minmax(230px,2fr) minmax(132px,1fr);gap:7px}.workspace .properties{grid-column:auto}.workspace .panel{padding:8px}.workspace .templates{grid-template-columns:repeat(2,minmax(0,1fr))}}

.studio-more{position:relative}
.studio-more>summary{cursor:pointer;display:flex;align-items:center;min-height:40px;padding:0 12px;border:1px solid #dce3e9;border-radius:8px;background:#fff;color:#24364b}
.studio-more>div{position:absolute;top:100%;left:0;z-index:16;display:grid;gap:6px;min-width:170px;padding:8px;border:1px solid #dce3e9;border-radius:9px;background:white;box-shadow:0 8px 20px #182c4524}
@media(max-width:600px){.studio-more>summary{min-height:44px}.studio-more>div{max-width:calc(100vw - 24px)}}

.studio-format{display:inline-flex;align-items:center;gap:6px}.studio-format select{min-height:40px;border:1px solid #dce3e9;border-radius:8px;background:white;padding:0 8px;color:#24364b}

/* Focused first-run studio: template already opens on the canvas. */
.studio-app{background:#f4f3f1;color:#1e3447;min-height:100dvh}
.studio-app .top{height:62px;padding:8px 22px;background:#fff;border-bottom:1px solid #e4e6e8;box-shadow:0 2px 12px #182d4109}
.studio-app .top h1{font:600 16px Arial,sans-serif;letter-spacing:0;margin:3px 0;color:#24384a}
.studio-app .tag{letter-spacing:.12em;color:#8a4057;font-size:9px}
.studio-app .brand{font:bold 18px Georgia,serif;color:#1c4057}
.studio-shop-link{font-size:13px;color:#42576b;text-decoration:none}
.studio-main{max-width:1600px!important;padding:12px 18px 26px!important}
.studio-app .toolbar{top:62px;display:flex;align-items:center;gap:8px;margin-bottom:10px;padding:8px 10px;border:0;border-radius:12px;box-shadow:0 3px 16px #182d410c}
.studio-app .toolbar button{min-height:40px;border-radius:9px;font-weight:650}
.studio-app .toolbar #undo,.studio-app .toolbar #redo{width:40px;padding:7px;font-size:20px}
.studio-app .toolbar #save,.studio-app .toolbar .studio-preview-action{padding:8px 15px}
.studio-app .toolbar .studio-preview-action{margin-left:auto;background:#17364a;color:#fff;border-color:#17364a}
.studio-app .studio-format{min-width:148px;font-weight:700;color:#34495d}
.studio-app .workspace{grid-template-columns:220px minmax(350px,1fr) 260px;gap:12px;align-items:stretch}
.studio-app .tools,.studio-app .properties{border:1px solid #e4e7ea;border-radius:14px;background:#fff;box-shadow:0 5px 20px #172b4809}
.studio-app .tools h2,.studio-app .properties h2{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#788491}
.studio-app .templates{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.studio-app .template{min-height:75px;border-color:#e5e2de;background:#fbfaf8;border-radius:10px;color:#304458;font-size:12px}
.studio-app .template:hover{transform:translateY(-1px);border-color:#ae8d71;background:#fff}
.studio-app .thumb{height:45px;margin-bottom:4px}
.studio-app .tools>button,.studio-app .tools>.file{margin:5px 0;padding:9px 11px;border-radius:9px;text-align:left}
.studio-app .studio-bg-label{margin-top:12px}
.studio-app .layers-fold{margin-top:12px;border-top:1px solid #e9ecef;padding-top:9px}
.studio-app .layers-fold>summary{padding:7px 0;cursor:pointer;color:#637283;font-size:12px;font-weight:700}
.studio-app .layer{font-size:12px;padding:7px 8px;margin:3px 0}
.studio-app .stage{min-height:calc(100dvh - 168px);padding:14px 18px 12px;border:1px solid #e2e5e8;border-radius:16px;background-color:#eceff1;background-image:radial-gradient(#c4cbd0 .7px,transparent .7px);background-size:16px 16px;display:flex;flex-direction:column}
.studio-app .stage-head{min-height:32px}
.studio-app #stage-tools{display:flex;gap:6px;justify-content:center;min-height:0;margin:4px 0}
.studio-app #stage-tools button{min-height:34px;padding:6px 10px;border-radius:8px;font-size:12px}
.studio-app #stage-tools button:disabled{display:none}
.studio-app #viewport{flex:1;min-height:300px;margin:8px 0;overflow:auto}
.studio-app #paper{box-shadow:0 18px 52px #1c2d4040}
.studio-app .stage-hint{margin:5px auto 0!important;padding:5px 10px!important;background:#fff9!important;color:#637283!important;font-size:12px!important}
.studio-app .stage .print-warning:not([hidden]){background:#fff4e6;color:#784b1a}
.studio-app .mobile-drawer>summary{display:none}
.studio-app .properties>h2{margin-bottom:10px}
.studio-app .properties #selection{margin:0 0 8px;padding:8px 10px;border-radius:8px;background:#f6f7f8}
.studio-app .properties fieldset>label,.studio-app .properties fieldset>.fields{margin-top:7px}
.studio-app #status{min-height:20px;margin:6px 2px 0;color:#536273}
.studio-app .studio-footer-note{display:none}
@media(max-width:900px){.studio-app .workspace{grid-template-columns:190px minmax(0,1fr)}.studio-app .properties{grid-column:1/-1}.studio-app .stage{min-height:calc(100dvh - 168px)}}
@media(max-width:580px){
 .studio-app .top{height:50px;padding:6px 12px;gap:8px}.studio-app .top h1{font-size:14px}.studio-app .brand{font-size:16px}.studio-app .tag{display:none}.studio-shop-link{font-size:12px}
 .studio-main{padding:7px 8px calc(18px + env(safe-area-inset-bottom,0px))!important}
 .studio-app .toolbar{top:50px;gap:5px;padding:6px;border-radius:10px}.studio-app .toolbar>*{flex:0 0 auto}.studio-app .studio-format{flex:1 1 118px;min-width:0;font-size:11px}.studio-app .toolbar select{font-size:12px;padding:7px}.studio-app .toolbar #undo,.studio-app .toolbar #redo{width:36px;min-height:36px}.studio-app .toolbar #save,.studio-app .toolbar .studio-preview-action{min-height:36px;padding:7px 9px;font-size:12px}.studio-app .toolbar .studio-preview-action{margin-left:0}.studio-app .toolbar .studio-more>summary{min-height:36px;display:grid;place-items:center;padding:4px 10px;font-size:22px}
 .studio-app .studio-faces{position:sticky;top:101px;z-index:16;display:flex;gap:6px;padding:5px;margin-bottom:5px;border:1px solid #e4e7e9;border-radius:11px;background:#ffffffed;box-shadow:0 3px 12px #182d410a}.studio-app .studio-faces button{flex:1;min-height:38px;border-radius:8px;font-weight:700}.studio-app .studio-faces button[aria-pressed="true"]{background:#17364a;color:#fff;border-color:#17364a}
 .studio-app .workspace{display:flex;flex-direction:column;gap:7px}.studio-app .stage{order:0;width:100%;min-height:0;padding:8px 8px 6px;border-radius:13px}.studio-app .stage-head{font-size:11px;min-height:25px}.studio-app .guide-toggle{font-size:10px}.studio-app #stage-tools{margin:2px 0}.studio-app #stage-tools button{min-height:36px;flex:1}.studio-app #viewport{flex:none;min-height:0;margin:3px 0 2px;overflow:hidden}.studio-app .stage-hint{font-size:11px!important;margin:4px auto 0!important}
 .studio-app .mobile-drawer{order:1;width:100%;border:1px solid #e1e5e8;border-radius:12px;background:#fff;box-shadow:0 2px 10px #172b4808}.studio-app .mobile-drawer>summary{display:block;padding:12px 14px;color:#21394d;font-weight:700;cursor:pointer;list-style:none}.studio-app .mobile-drawer>summary::-webkit-details-marker{display:none}.studio-app .mobile-drawer>summary:after{content:'＋';float:right;color:#8a4057}.studio-app .mobile-drawer[open]>summary:after{content:'−'}.studio-app .mobile-drawer>.panel{width:100%;border:0;box-shadow:none;padding:10px 12px 14px}.studio-app .templates{grid-template-columns:repeat(3,minmax(0,1fr));max-width:none}.studio-app .template{min-height:68px;padding:5px;font-size:10px}.studio-app .thumb{height:38px}.studio-app .properties{order:2}.studio-app .properties textarea{min-height:62px}.studio-app .layers-fold{margin-bottom:4px}.studio-app #status{font-size:11px}
}
@media(prefers-reduced-motion:reduce){.studio-app .template:hover{transform:none}}
/* Start the mobile studio on the invitation canvas; reveal one tool drawer only on request. */
@media(min-width:581px){.studio-app .mobile-drawer>summary{display:none}.studio-app .mobile-drawer:not([open])>aside{display:block}}
.studio-tool-nav{display:flex;flex-direction:column;gap:5px;margin:0 0 14px}.studio-tool-nav button{display:flex;align-items:center;gap:10px;width:100%;min-height:42px;padding:8px 11px;border:1px solid transparent;border-radius:9px;background:transparent;color:#526274;text-align:left;font-size:13px;font-weight:650}.studio-tool-nav button:hover,.studio-tool-nav button.active{background:#edf3f6;border-color:#e3e9ed;color:#17364a}.studio-tool-nav svg{width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.studio-tool-pane{display:none}.studio-tool-pane.active{display:block}.studio-tool-pane h2{margin-top:8px}
@media(max-width:580px){.studio-app .mobile-drawer:not([open])>aside{display:none}.studio-app .mobile-drawer[open]>aside{display:block}.studio-app #stage-tools{display:none}.studio-app.has-selection #stage-tools{display:flex}.studio-app #stage-tools #quick-copy,.studio-app #stage-tools #quick-center,.studio-app #stage-tools #quick-delete{display:none}.studio-app .properties-drawer:not([open])>summary{display:none}.studio-app #viewport{min-height:min(64dvh,520px);height:auto!important;display:flex;align-items:center;justify-content:center}.studio-tool-nav{position:sticky;top:0;z-index:2;flex-direction:row;padding:4px;margin:-3px -4px 10px;border-bottom:1px solid #edf0f2;background:#fff}.studio-tool-nav button{flex:1;flex-direction:column;justify-content:center;gap:3px;min-height:54px;padding:5px 3px;font-size:10px}.studio-tool-nav svg{width:20px;height:20px}}
@media(max-width:580px){.studio-app .toolbar{display:grid;grid-template-columns:minmax(112px,1fr) 34px 34px 68px 58px 34px;gap:5px;align-items:center;padding:6px;margin:0 0 7px}.studio-app .toolbar>*{min-width:0;flex:none}.studio-app .studio-format{display:flex;align-items:center;gap:5px;min-width:0;font-size:10px}.studio-app .studio-format select{min-width:0;width:100%;padding:6px 4px;font-size:11px}.studio-app .toolbar #undo,.studio-app .toolbar #redo,.studio-app .toolbar .studio-more>summary{width:34px;min-height:34px;padding:4px}.studio-app .toolbar #preview,.studio-app .toolbar #save{width:100%;min-height:34px;padding:5px 4px;font-size:11px}.studio-app .studio-faces{top:104px;margin-bottom:5px;padding:4px}.studio-app .studio-faces button{min-height:34px}}
@media(max-width:360px){.studio-app .toolbar{grid-template-columns:minmax(110px,1fr) 32px 32px 32px}.studio-app .toolbar .studio-more{grid-column:4;grid-row:1}.studio-app .toolbar #preview{grid-column:1/3;grid-row:2}.studio-app .toolbar #save{grid-column:3/5;grid-row:2}.studio-app #viewport{min-height:0}}
@media(max-width:580px){.studio-app .mobile-drawer>summary{min-height:40px;padding:9px 12px}.studio-app .tools>button,.studio-app .tools>.file{min-height:38px;padding:8px 10px;margin:4px 0}.studio-app .template{min-height:60px}.studio-app .thumb{height:34px}}
#enter-studio { display:none; }
@media screen and (max-width:580px) {
  body.studio-app:not(.studio-editing) { padding:0; }
  .studio-app:not(.studio-editing) :is(.top,.toolbar,.studio-faces,.mobile-drawer,.stage-head,#stage-tools,.stage-hint,#status,#print-warning,.safe-guide) { display:none!important; }
  .studio-app:not(.studio-editing) main { padding:0!important; }
  .studio-app:not(.studio-editing) .stage { padding:12px; margin:0; border:0; }
  .studio-app:not(.studio-editing) #viewport { height:calc(100dvh - 24px)!important; margin:0; overflow:hidden; }
  .studio-app:not(.studio-editing) #enter-studio { display:block; position:absolute; inset:0; width:100%; height:100%; border:0; background:transparent; z-index:2; }
}
.phone-design-dock {display:none}
@media screen and (max-width:580px) {
  .studio-editing .phone-design-dock {display:flex;position:fixed;inset:auto 0 0;z-index:32;background:white;border-top:1px solid #dee2ec;justify-content:space-around;padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
  .phone-design-dock button {display:grid;justify-items:center;align-content:center;gap:3px;min-height:46px;min-width:56px;background:white;border:0;font-size:11px;color:#27334b}
  .phone-design-dock svg {width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6}
  .phone-design-dock b {font: bold 22px Georgia}
  .studio-editing .tools-drawer:not([open]),.studio-editing .properties-drawer:not([open]) {display:none}
  .studio-app.studio-editing .mobile-drawer[open] {bottom:62px}
  .studio-app.studio-editing .top {background:linear-gradient(110deg,#145d72,#323d81);color:white}
  .studio-app.studio-editing .top :is(a,h1) {color:white}
  .studio-app.studio-editing #paper {position:absolute}
  .studio-app.studio-editing #viewport {height:56dvh!important;min-height:0}
}
@media screen and (max-width:580px) {
  .studio-app .phone-design-dock {padding:2px 6px calc(2px + env(safe-area-inset-bottom));}
  .studio-app .phone-design-dock button {min-height:44px; gap:2px; padding:3px; font-size:10px;}
  .studio-app .phone-design-dock svg {width:16px;height:16px;}
  .studio-app .phone-design-dock b {font-size:17px;}
  .studio-app .stage {padding-inline:2px;}
  .studio-app.studio-editing #viewport {height:calc(100dvh - 252px)!important;min-height:190px;}
}
@media screen and (min-width:581px) {
  .studio-app .workspace {grid-template-columns:clamp(165px,22vw,230px) minmax(0,1fr);}
  .studio-app #property-drawer:not([open]) {display:none;}
  .studio-app #property-drawer[open] {position:fixed;z-index:40;bottom:12px;left:50%;transform:translateX(-50%);width:min(380px,90vw);max-height:52dvh;overflow:auto;background:white;border-radius:12px;box-shadow:0 5px 24px #172b4833;}
  .studio-app #property-drawer[open]>summary {display:block;padding:10px 16px;cursor:pointer;font-weight:bold;}
  .studio-app #property-drawer[open]>summary::after {content:'×';float:right;}
}

#layers {
  display: grid;
  grid-auto-rows: 44px;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
#layers > * { min-height: 0; margin-block: 0; overflow: hidden; }


@media (min-width:581px){.geometry-settings>summary{display:none}}
@media (max-width:580px){
  #property-drawer #selection{display:none}
  #property-drawer #text-props:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) 6rem;gap:4px 8px}
  #text-props>label:first-child{grid-column:1/-1}
  #property-drawer #text{height:3em;min-height:0}
  #property-drawer #text-props :is(input,select,textarea){margin:2px 0;padding:4px 6px;font-size:16px}
  #property-drawer .geometry-settings>summary{cursor:pointer;padding:8px 0}
}

@media(max-width:580px){
#props:has(#text-props:not([hidden])) .geometry-settings{display:none}
#property-drawer #text-props:not([hidden]){display:block}
#confirm-text{display:block;margin:5px 0 8px auto;min-height:38px;padding:4px 16px;background:#163548;color:white}
.text-style>summary{font-size:13px;cursor:pointer}
#props:has(.text-style:not([open])):has(#text-props:not([hidden])) #color-label{display:none}
.text-style[open]{display:grid;grid-template-columns:minmax(0,1fr) 6rem;gap:4px}
.text-style>summary{grid-column:1/-1}
}
@media(min-width:581px){.text-style>summary,#confirm-text{display:none}}

@media (max-width:580px),(pointer:coarse){
 #paper,#paper .object,#paper .object .handle{touch-action:pan-y}
 #paper .object.touch-armed,#paper .object.touch-armed .handle{touch-action:none}
}

@media(max-width:580px){
 .studio-app .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px}
 .studio-app .toolbar .studio-format{grid-area:1/1/2/2;display:flex;align-items:center;gap:5px}
 .studio-app .toolbar select{min-width:0;min-height:44px;font-size:14px}
 .studio-app .toolbar .studio-more{grid-area:1/2/2/3;justify-self:end}
 .studio-app .toolbar .studio-more>summary{width:auto;min-width:48px;min-height:44px;font-size:24px}
 .studio-app .toolbar #preview{grid-area:2/1/3/2}
 .studio-app .toolbar #save{grid-area:2/2/3/3}
 .studio-app .toolbar :is(#preview,#save),.studio-app .toolbar .studio-more>div :is(button,.file){min-height:44px;font-size:16px;padding:8px}
 .studio-app .toolbar .studio-more>div{left:auto;right:0;width:min(240px,85vw);max-height:55dvh;overflow:auto;gap:8px;z-index:30}
 .studio-app.has-selection #stage-tools #quick-delete{display:inline-block;min-height:44px}
}

.mobile-text-actions{display:none}
@media(max-width:580px){
 .mobile-text-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:6px 0}
 .mobile-text-actions #confirm-text,.mobile-text-actions #remove-text{width:auto;min-height:44px;margin:0;padding:6px 16px}
 .mobile-text-actions #remove-text{color:#942c38}
}

@media(max-width:580px){
 .studio-app [data-tool-pane="elements"] #add-text{display:none}
}

#stage-tools .phone-order{display:none}
@media(max-width:580px){
.studio-app.has-selection #stage-tools .phone-order{display:inline-block;min-height:44px}
.studio-app.has-selection #stage-tools .phone-order:disabled{opacity:.45}
}

@media(max-width:580px){
 .studio-app #stage-tools #quick-edit{display:none}
}

@media(max-width:580px){
 #paper .object.selected.tight-text{outline:none}
 #paper .tight-text::after{content:"";position:absolute;pointer-events:none;box-sizing:border-box;border:1px solid #347ac0;left:var(--ink-left);top:var(--ink-top);width:var(--ink-width);height:var(--ink-height)}
}

@media(min-width:581px){
 #paper .object.selected.tight-text{outline:none}
 #paper .tight-text::after{content:"";position:absolute;pointer-events:none;box-sizing:border-box;border:1px solid #347ac0;left:var(--ink-left);top:var(--ink-top);width:var(--ink-width);height:var(--ink-height)}
 .studio-app.has-selection #stage-tools :is(.phone-order,#quick-delete){display:inline-block}
 .studio-app #stage-tools :is(#quick-edit,#quick-copy,#quick-center){display:none}
 .mobile-text-actions{display:flex;gap:8px;justify-content:flex-end}
 .mobile-text-actions #confirm-text,.text-style>summary{display:block}
 .studio-app .geometry-settings{display:none}
 .studio-app #property-drawer[open]{display:block}
 .studio-app #props:has(.text-style:not([open])):has(#text-props:not([hidden])) #color-label{display:none}
}

.phone-asset-bar{display:none}
@media all{
.studio-app .phone-asset-bar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.studio-app .phone-asset-bar button{margin:0;min-width:0;min-height:44px;padding:4px;font:inherit;font-size:14px}
.studio-app [data-tool-pane="elements"]>:is(#monogram-open,.file),.studio-app .shape-library>summary{display:none}
}

.studio-app #add-shape{display:none}

#template-confirm{position:fixed;inset:0;margin:auto;width:min(310px,calc(100% - 32px));height:fit-content;padding:20px;border:0;border-radius:14px;color:#193347}
#template-confirm::backdrop{background:#17263566}
#template-confirm form>div{display:flex;justify-content:flex-end;gap:8px}
#template-confirm button{min-height:44px;padding:6px 14px}

.page-palette{display:none}
@media all{
.studio-app .page-palette{display:grid;gap:8px;margin:4px 0 10px}
:is(#page-tone,#ink-tone){position:relative;overflow:hidden;height:96px;border-radius:8px;touch-action:none;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(var(--h,0) 100% 50%))}
:is(#page-tone,#ink-tone) i{position:absolute;width:14px;height:14px;border:2px solid white;border-radius:50%;box-shadow:0 0 2px 1px #444;transform:translate(-50%,-50%);pointer-events:none}
.studio-app :is(#page-hue,#ink-hue){appearance:none;height:24px;width:100%;padding:0;margin:0;border-radius:12px;background:linear-gradient(to right,red,#ff0,lime,cyan,blue,magenta,red)}
:is(#page-hue,#ink-hue)::-webkit-slider-thumb{appearance:none;width:20px;height:24px;border:2px solid white;border-radius:10px;box-shadow:0 0 2px #333;background:transparent}
}

@media all{
.studio-app .page-palette{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 10px}
:is(#page-tone,#ink-tone){grid-column:1/-1;height:68px}
.studio-app #confirm-page-color{width:auto;min-height:40px;margin:0;padding:4px 12px;font-size:14px}
}

.studio-app .studio-tool-nav [data-tool-tab="layers"],.studio-app [data-tool-pane="elements"] #add-text{display:none}
@media(max-width:580px){.studio-app .studio-tool-nav .desktop-text-tool{display:none}}
@media(min-width:581px){.studio-app .desktop-text-tool{display:flex;align-items:center;gap:8px}}


@media(max-width:580px),(pointer:coarse){#paper .object.selected .handle{touch-action:none;cursor:move}#paper .object{touch-action:pan-y}}
@media(max-width:580px){.studio-app #tools-drawer[open]{max-height:34dvh;overflow:auto}.studio-app #tools-drawer[open] .studio-tool-nav{display:none}}

#paper .move-grip{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;border-radius:50%;color:white;background:#bd2636;cursor:move;touch-action:none;z-index:2;font-family:Arial,sans-serif;line-height:1}
#paper .object.selected .handle{cursor:nwse-resize}

@media(max-width:580px){
.studio-app #property-drawer[open]{position:relative;inset:auto;transform:none;width:100%;box-sizing:border-box;margin:4px 0;max-height:34dvh;overflow:auto}
.studio-app #property-drawer[open]>aside{max-height:none}
}

.mobile-action-strip{display:none}
@media(max-width:580px){
.studio-app.studio-editing .mobile-action-strip{display:flex;align-items:center;gap:2px;flex-wrap:nowrap;overflow-x:auto;padding:2px 0}
.mobile-action-strip button{flex:none;width:auto;min-width:26px;min-height:34px;padding:3px 5px;margin:0;font-size:12px;white-space:nowrap;border-radius:6px}
.mobile-action-strip [aria-pressed=true]{background:#17364a;color:white}
.studio-app:not(.has-selection) .mobile-action-strip :is(#quick-lower,#quick-raise,#quick-delete){display:none}
.studio-app .studio-faces,.studio-app #stage-tools{display:none!important}
.studio-app .toolbar{margin-bottom:2px;padding:2px 4px}
}

@media(max-width:580px){.studio-app.studio-editing .toolbar .studio-format{display:none}.mobile-action-strip #format{width:auto;max-width:90px;margin:0;padding:3px;font-size:12px}.mobile-action-strip [aria-pressed=true]{background:#1768a4}.mobile-action-strip #preview{font-size:0;width:30px}.mobile-action-strip #preview::before{font-size:16px;content:"◉"}.mobile-action-strip #save{font-size:0;width:30px}.mobile-action-strip #save::before{font-size:16px;content:"💾"}.mobile-action-strip #quick-lower{font-size:0;width:30px}.mobile-action-strip #quick-lower::before{font-size:16px;content:"↓"}.mobile-action-strip #quick-raise{font-size:0;width:30px}.mobile-action-strip #quick-raise::before{font-size:16px;content:"↑"}.mobile-action-strip #quick-delete{font-size:0;width:30px}.mobile-action-strip #quick-delete::before{font-size:16px;content:"🗑"}}

@media (max-width:580px){
  .studio-app .studio-main > .toolbar,
  .studio-app .stage .stage-head,
  .studio-app #paper .safe-guide{display:none!important}
}

@media (max-width:580px){
 .studio-app.studio-editing .mobile-action-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;overflow:visible}
 .studio-app .mobile-action-strip > :is(button,#format){width:100%;min-width:0;max-width:none;min-height:34px}
 .mobile-action-strip #undo{grid-column:1;grid-row:2}
 .mobile-action-strip :is(#undo,#redo)::after{display:block;font-size:10px;line-height:11px}
 .mobile-action-strip #undo::after{content:"Geri al"}
 .mobile-action-strip #redo::after{content:"İleri al"}
}

@media(max-width:580px){
 .studio-app #property-drawer[open]:has(#text-props:not([hidden])){padding:3px 5px;height:auto;max-height:35dvh}
 .studio-app #property-drawer[open]>summary,.studio-app #property-drawer .properties::before{display:none}
 .studio-app #property-drawer[open]>aside{margin:0;padding:0;height:auto;overflow:visible}
 .studio-app #property-drawer #props{margin:0;padding:0;border:0}
 .studio-app #property-drawer #text-props:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:3px;align-items:center}
 .studio-app #property-drawer #text-props>label{grid-column:1/3;font-size:0;margin:0}
 .studio-app #property-drawer #text{box-sizing:border-box;width:100%;height:34px;min-height:34px;margin:0;padding:5px 7px;resize:none;font-size:16px}
 .studio-app #property-drawer .mobile-text-actions{grid-column:3;display:flex;gap:3px;margin:0}
 .studio-app #property-drawer .mobile-text-actions button{min-height:34px;padding:3px 6px}
 .studio-app #property-drawer :is(.text-style,.color-tab){grid-row:2;align-self:start;margin:0}
 .studio-app #property-drawer :is(.text-style,.color-tab)>summary{display:list-item;font-size:12px;padding:3px 6px;cursor:pointer}
 .studio-app #property-drawer .color-tab #color-label:not([hidden]){display:block}
}@media(max-width:580px){.studio-app .stage > #property-drawer{order:-1}}

.phone-history{display:none}
@media(max-width:580px){
 .studio-app.studio-editing .phone-history{display:flex;justify-content:flex-end;gap:4px;margin:0 0 2px;order:0}
 .phone-history button{display:inline-flex;align-items:center;gap:3px;font-size:15px;min-height:32px;padding:2px 6px}
 .phone-history button::after{content:attr(aria-label);font-size:11px}
}

@media(max-width:580px){
 .studio-app.studio-editing .phone-history{justify-content:flex-start;align-items:center}
 .phone-history #quick-lower{margin-left:auto}
 .phone-history :is(#quick-lower,#quick-raise){font-size:11px}
 .phone-history :is(#quick-lower,#quick-raise)::after{content:none}
 .phone-history #quick-lower::before{content:'↓'}
 .phone-history #quick-raise::before{content:'↑'}
 .studio-app:not(.has-selection) .phone-history :is(#quick-lower,#quick-raise){display:none}
 .studio-app #property-drawer #text-props>label{grid-column:1/-1}
 .studio-app #property-drawer #text{height:4.6em;line-height:1.35;padding:6px 8px;overflow-y:auto}
 .studio-app #property-drawer .mobile-text-actions{grid-row:2}
}

@media(max-width:580px){
 .studio-app .phone-history button{background:transparent;border:0;box-shadow:none;border-radius:0;color:#31485a;min-width:36px;min-height:36px;padding:3px 5px;font-size:18px;justify-content:center}
 .studio-app .phone-history button::after{content:none}
 .studio-app .phone-history :is(#quick-lower,#quick-raise){font-size:0}
 .studio-app .phone-history :is(#quick-lower,#quick-raise)::before{font-size:18px}
 .studio-app .phone-history button:focus-visible{outline:2px solid #1768a4}
}

@media(max-width:580px){
 .studio-app.studio-editing .stage{position:relative}
 .studio-app.studio-editing .phone-history{position:absolute;transform:translateY(-100%);z-index:3;margin:0;pointer-events:none}
 .studio-app.studio-editing .phone-history button{pointer-events:auto}
 .studio-app.studio-editing .stage #viewport{margin-top:36px}
}
@media(max-width:580px){.studio-app #property-drawer .geometry-settings,.studio-app #property-drawer:has(#text-props[hidden]){display:none!important}}

@media(max-width:580px){.studio-app .phone-history :is(#quick-lower,#quick-raise){font-size:12px;gap:3px}}

.zelal-envelope :is(#paper,#preview-paper){background-image:url("media/studio-envelope/zelal.png")!important;background-size:100% 100%!important}
.zelal-envelope :is(#paper,#preview-paper,#print-paper) .object img{filter:brightness(0)}
.zelal-envelope :is(.phone-design-dock button:first-child,[data-tool-tab="designs"],[data-tool-pane="designs"],.color-tab,#color-label,.shape-library,.studio-flowers,.studio-bg-label,.page-palette,[data-tool-pane="elements"] .file,.phone-asset-bar button:not(:first-child)){display:none!important}

.square-envelope :is(#paper,#preview-paper){background-image:none!important}
.square-envelope :is(#monogram-open,.phone-asset-bar,.phone-design-dock button:nth-child(2),[data-tool-tab="elements"]){display:none!important}

#envelope-presets-open{display:none}.zelal-envelope:not(.square-envelope) #envelope-presets-open{display:block}

@media(max-width:580px){.studio-app.studio-editing .mobile-action-strip{grid-template-columns:76px repeat(4,minmax(0,1fr))}}

#envelope-method .envelope-choice{display:flex;align-items:center;gap:8px;min-height:42px}#envelope-method input{width:auto;margin:0}#envelope-method strong{margin-left:auto}

@media(min-width:581px){
 .studio-app .stage{position:relative}
 .studio-app :is(.stage-head,#stage-tools,#paper .safe-guide){display:none}
 .studio-app .stage #viewport{margin-top:38px}
 .studio-app .phone-history{display:flex;align-items:center;gap:5px;position:absolute;transform:translateY(-100%);z-index:3;pointer-events:none}
 .phone-history button{pointer-events:auto;min-height:32px;background:transparent;border:none;padding:4px;cursor:pointer}
 .phone-history #quick-lower{margin-left:auto}
 .studio-app:not(.has-selection) .phone-history :is(#quick-lower,#quick-raise,#quick-delete){display:none}
 .stage #property-drawer:not([open]),.stage #property-drawer:has(#text-props[hidden]),.stage #property-drawer>summary,.stage #selection{display:none}
 .studio-app .stage #property-drawer[open]{display:block;position:static;transform:none;width:100%;margin:0;max-height:none}
 .stage #property-drawer .properties{padding:5px}
 .stage #text-props:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;align-items:center}
 .stage #text-props>label{font-size:0}
 .stage #text{height:3.5em;min-height:0;margin:0;font-size:16px}
 .stage .mobile-text-actions{display:flex;align-items:center}
 .stage .mobile-text-actions button{margin:0}
 .studio-app .stage #props .color-tab[open] #color-label:not([hidden]){display:block}
}
@media screen{.studio-app :is(.templates,.monogram-grid,.shape-library[open] .studio-flowers,#envelope-presets[open]){max-height:min(42dvh,340px);overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}}

.desktop-settings{display:none}
@media(min-width:581px){
 .studio-app .workspace{display:grid;grid-template-columns:minmax(130px,0.8fr) minmax(220px,2fr) minmax(175px,1fr);gap:8px}
 .desktop-settings{display:block;min-width:0;background:white;border:1px solid #dce0e7;border-radius:12px;padding:10px;position:sticky;top:8px;max-height:90dvh;overflow:auto}
 .desktop-settings h2{margin:0 0 8px}
 .studio-app .desktop-settings .phone-history{position:static;transform:none;width:auto!important;flex-wrap:wrap}
 .studio-app .desktop-settings #property-drawer[open]{position:static;transform:none;width:100%;max-height:none}
 .desktop-settings #property-drawer>summary,.desktop-settings #selection,.desktop-settings .properties::before,.desktop-settings #property-drawer:not([open]),.desktop-settings #property-drawer:has(#text-props[hidden]){display:none}
 .desktop-settings .properties{padding:4px;border:0}
 .desktop-settings .mobile-text-actions{display:flex;gap:4px}
 .desktop-settings .mobile-text-actions button{margin:0}
 .studio-app .desktop-settings #props .color-tab[open] #color-label:not([hidden]){display:block}
}

@media screen{
 .studio-app .studio-controls{position:sticky;top:74px;z-index:20;background:#f3f4f6}
 .studio-app .studio-controls :is(.toolbar,.studio-faces){position:static}
}
@media(max-width:580px){
 .studio-app .studio-controls{top:57px}
 .studio-app .studio-controls>.toolbar{display:none}
}

@media(min-width:581px){
 .tools>[data-tool-pane="elements"]{display:block;margin-bottom:12px}
 .tools .phone-asset-bar{display:flex;flex-wrap:wrap}
 .tools .phone-asset-bar button{flex:1 1 auto;padding:4px 6px;font-size:13px}
 .studio-app .studio-tool-nav [data-tool-tab="elements"]{display:none}
 .tools [data-tool-pane="elements"]>#add-text{display:none}
}

@media screen{
 .studio-app:not(.has-selection) .stage .phone-history :is(#quick-lower,#quick-raise,#quick-delete),
 .studio-app .stage .phone-history button{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}
 .stage .phone-history{flex-wrap:nowrap}
 .stage .phone-history #quick-lower{margin-left:auto}
 .stage .phone-history #quick-delete{font-size:12px;color:#942c38}
}

.studio-app .color-tab[open]>button,.studio-app #confirm-page-color{display:inline-flex;align-items:center;justify-content:center;background:#17364a;color:white;min-height:36px;padding:4px 12px}


.studio-app .page-palette{display:grid}
.studio-app.zelal-envelope .page-palette{display:none!important}

.studio-app .phone-asset-bar{grid-template-columns:repeat(4,minmax(0,1fr))}.studio-app .phone-asset-bar button:nth-child(3){font-size:12px;padding:3px}.studio-textures button{margin:4px;padding:8px 14px;color:#212121}.zelal-envelope .studio-textures{display:none}

@media(min-width:581px){
 .studio-app .workspace{align-items:start}
 .studio-app .stage,.studio-app .desktop-settings{position:sticky;top:var(--studio-work-top,176px);align-self:start}
 .studio-app .stage{min-height:0;padding-top:2px}
 .studio-app .stage #viewport{flex:none;min-height:0;margin-top:34px;overflow:hidden}
 .studio-app .desktop-settings{max-height:calc(100dvh - var(--studio-work-top,176px) - 8px)}
}

@media(min-width:581px){
 .studio-app .toolbar .studio-more{display:none}
 .studio-app .toolbar{flex-wrap:wrap}
 .studio-app .toolbar>.studio-file-actions{display:contents}
 .studio-file-actions>button,.studio-file-actions>.file{flex:0 0 auto;width:auto;white-space:nowrap;margin:0}
}

@media(min-width:581px){
 .desktop-settings #text-props:not([hidden])>.text-style,.desktop-settings .color-tab{margin-top:8px;grid-column:1/-1}
 .studio-app .desktop-settings :is(.text-style,.color-tab)>summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;padding:8px 14px;border:1px solid #bdcbd2;border-radius:8px;background:#f4f7f8;color:#17364a;font-size:14px;font-weight:650;cursor:pointer;list-style:none}
 .desktop-settings :is(.text-style,.color-tab)>summary::-webkit-details-marker{display:none}
 .desktop-settings :is(.text-style,.color-tab)>summary::after{content:"";width:7px;height:7px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg)}
 .desktop-settings :is(.text-style,.color-tab)[open]>summary::after{transform:rotate(225deg)}
 .desktop-settings :is(.text-style,.color-tab)>summary:is(:hover,:focus-visible){background:#e6eff3;outline:2px solid #527c93;outline-offset:1px}
}

.ink-palette{display:grid;gap:8px;margin:8px 0}
#props:has(#text-props:not([hidden])) .color-tab #color-label{display:none!important}
#props:has(#text-props[hidden]) .ink-palette{display:none}
@media(max-width:580px){
 .studio-app #property-drawer .color-tab[open]{grid-row:3;grid-column:1/-1;width:100%;min-width:0}
 .studio-app #property-drawer .color-tab>summary{min-height:36px;align-content:center}
 .studio-app #property-drawer .color-tab[open] .ink-palette{display:grid;grid-template-columns:minmax(0,1fr);margin:4px 0;gap:4px}
 .studio-app #property-drawer .ink-palette #ink-tone{height:56px}
 .studio-app #property-drawer .color-tab[open]>button{min-height:40px;width:100%}
 .studio-app #property-drawer[open]:has(.color-tab[open]){max-height:none}
}

.studio-context-menu{position:fixed;z-index:10000;min-width:155px;padding:4px;background:white;color:#17364a;border:1px solid #cdd6df;border-radius:8px;box-shadow:0 4px 20px #10283b28}.studio-context-menu button{display:block;width:100%;text-align:left;padding:7px 10px;background:transparent;color:inherit;border:0;font:inherit;cursor:pointer}.studio-context-menu button:is(:hover,:focus-visible){background:#eef4f7}.studio-context-menu button:disabled{opacity:.45}
.product-template-studio :is(.shape-library,.studio-flowers,#add-shape,.file:has(#upload),.phone-asset-bar button:has(+ .file)){display:none!important}.product-template-studio .object:has(img[src*="9132-face-"]){pointer-events:none}
.studio-app.product-template-studio :is(.studio-bg-label,.page-palette,.color-tab,#color-label){display:none!important}
.studio-app.product-template-studio [data-tool-pane="elements"]{display:none!important}

.product-template-studio :is([data-tool-pane="designs"],[data-tool-tab="designs"],[data-dock-tool="designs"]){display:none!important}

.product-template-studio #text-props .text-style{grid-column:1/-1;width:100%}.product-template-studio #text-props .text-style>summary{display:none!important}
.studio-app.product-template-studio :is(.studio-format,#format,#dimensions){display:none!important}

@media(max-width:580px){.studio-app.product-template-studio:not(.studio-editing) #enter-studio{pointer-events:none}.studio-app.product-template-studio .stage #property-drawer[open]{position:relative;z-index:12}.studio-app.product-template-studio #property-drawer:not([open]){display:none!important}}
.product-template-studio #text-props .text-style[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(68px,.48fr);align-items:end;gap:4px 8px;margin:4px 0 0;padding:6px 8px;background:#f4f7f8;border:1px solid #dde5e9;border-radius:8px}
.product-template-studio #text-props .text-style>label{display:block;grid-column:auto;margin:0;min-width:0;font:500 11px/1.3 Arial,sans-serif;color:#435969}
.product-template-studio #text-props .text-style :is(select,input[type=number]){width:100%;min-width:0;height:34px;margin:3px 0 0;padding:3px 6px;font:14px/1.2 Arial,sans-serif;background:white;color:#17364a;border:1px solid #b7c8d2;border-radius:6px}
.product-template-studio #text-props .text-style label:has(#bold){display:flex;gap:4px;align-items:center;min-height:34px}
.product-template-studio #confirm-text{background:#17364a;color:white;border-radius:6px;font-weight:600}

.studio-app.product-template-studio #property-drawer #text-props>label{grid-column:1/-1}.studio-app.product-template-studio #property-drawer #text-props .mobile-text-actions{grid-column:1/-1;grid-row:3;justify-content:flex-end;margin-top:4px}.studio-app.product-template-studio #property-drawer #text-props .text-style{grid-column:1/-1;grid-row:2}.product-template-studio #text-props:not([hidden]){display:grid}

.studio-phrase-tools{display:grid;gap:7px;margin:0 0 14px;padding:12px;border:1px solid #e6d9df;border-radius:12px;background:#fffafb}
.studio-phrase-tools h2{margin:0 0 2px;color:#782f48;font-size:13px;text-transform:none;letter-spacing:0}
.studio-phrase-tools label{font-size:12px;font-weight:600}
.studio-phrase-tools select,.studio-phrase-tools button{width:100%;min-height:42px}
#studio-phrase-picker{width:min(620px,calc(100vw - 28px));max-height:min(78vh,720px)}
#studio-phrase-picker>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#studio-phrase-picker>header h2{margin:0;font-size:20px;text-transform:none;letter-spacing:0}
#studio-phrase-picker ol{padding-left:28px;max-height:54vh;overflow:auto}
#studio-phrase-picker li{padding:5px 0}
#studio-phrase-picker .phrase-choice{width:100%;text-align:left;white-space:normal;line-height:1.5}
