@import url('https://fonts.googleapis.com/css2?family=Neucha&family=Pangolin&family=Amatic+SC&family=Shantell+Sans&family=Ruslan+Display&family=Yeseva+One&family=Gabriela&family=Kelly+Slab&family=Poiret+One&family=Kurale&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bad+Script&family=Caveat:wght@700&family=Comfortaa:wght@700&family=Lobster&family=Marck+Script&family=Pacifico&family=Playfair+Display:wght@700&display=swap');
.textDesignerOpen{border:1px solid #e9cbd7;background:#fff4f8;color:#683f50;border-radius:12px;padding:10px 15px;font:inherit;font-weight:700;cursor:pointer}.textDesignerModal[hidden]{display:none!important}.textDesignerModal{position:fixed;inset:0;z-index:12000;background:rgba(40,20,30,.67);display:flex;align-items:center;justify-content:center;padding:12px;overflow:auto}.textDesignerCard{width:min(940px,100%);max-height:calc(100dvh - 24px);overflow-y:auto;background:#fff;border-radius:22px;padding:22px;box-sizing:border-box;color:#4d303b}.textDesignerHead{display:flex;justify-content:space-between;gap:12px;align-items:center}.textDesignerHead h2{margin:0}.textDesignerGrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-top:18px}.textDesignerGrid label{display:flex;flex-direction:column;gap:5px;font-size:14px;font-weight:600;min-width:0}.textDesignerGrid input,.textDesignerGrid select,.textDesignerGrid textarea{width:100%;box-sizing:border-box;min-width:0;padding:10px;border:1px solid #e4d6dc;border-radius:10px;font:inherit}.textDesignerGrid textarea{min-height:85px}.textDesignerPreview{background:repeating-conic-gradient(#eee 0% 25%,white 0% 50%) 50%/20px 20px;border:1px solid #eee;border-radius:12px;overflow:hidden;margin:15px 0}.textDesignerPreview canvas{display:block;width:100%;height:auto;max-height:340px;object-fit:contain}.textDesignerActions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}.textDesignerActions button,.textDesignerHead button{padding:12px 16px;border-radius:11px;border:1px solid #e1cbd3;background:#fff;color:#593644;font:inherit;cursor:pointer}.textDesignerActions .textDesignerPrimary{background:#805060;color:white}.textDesignerNote{color:#856d77;font-size:13px;margin:6px 0 0}@media(max-width:650px){.textDesignerCard{padding:15px}.textDesignerGrid{grid-template-columns:1fr}.textDesignerModal{align-items:flex-start}.textDesignerActions button{flex:1}}
.textDesignerGrid [hidden]{display:none!important}

.textFramePicker{grid-column:1/-1;display:grid;gap:9px}.textFrameGallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.textFrameChoice{border:2px solid #e7d9dc;border-radius:11px;padding:7px 4px;background:#fff;cursor:pointer;display:grid;gap:5px;justify-items:center;font:inherit;color:#634650}
.textFrameChoice img{width:100%;height:70px;object-fit:contain}.textFrameChoice span{font-size:11px;text-align:center}
.textFrameChoice[aria-pressed="true"]{border-color:#cc6391;background:#fff2f8;box-shadow:0 0 0 1px #cc6391}
@media(max-width:650px){.textFrameGallery{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Larger frame thumbnails: keep the entire PNG within its own preview area. */
.textFrameGallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.textFrameChoice{padding:12px 9px;min-height:128px;grid-template-rows:95px auto;align-items:center}
.textFrameChoice img{display:block;width:100%;height:95px;max-width:100%;object-fit:contain;object-position:center}
.textFrameChoice span{font-size:12px}
@media(max-width:650px){.textFrameGallery{grid-template-columns:repeat(2,minmax(0,1fr))}.textFrameChoice{min-height:112px;grid-template-rows:80px auto}.textFrameChoice img{height:80px}}

/* Compact inscription editor: more controls visible without long scrolling. */
@media(min-width:651px){
 .textDesignerCard{width:min(800px,96vw);max-height:calc(100dvh - 36px);padding:16px 18px;border-radius:16px}
 .textDesignerHead h2{font-size:19px}
 .textDesignerHead button{padding:8px 12px}
 .textDesignerGrid{gap:8px 12px;margin-top:11px}
 .textDesignerGrid label{gap:3px;font-size:12px}
 .textDesignerGrid input,.textDesignerGrid select,.textDesignerGrid textarea{padding:6px 9px;border-radius:8px;font-size:13px}
 .textDesignerGrid textarea{min-height:48px;height:48px}
 .textDesignerGrid input[type=range]{padding:2px 0;height:25px}
 .textDesignerGrid input[type=color]{height:28px;padding:2px}
 .textDesignerGrid small{font-size:10px}
 .textFramePicker{gap:5px}
 .textFrameGallery{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
 .textFrameChoice{min-height:86px;grid-template-rows:62px auto;padding:5px 4px;gap:2px;border-radius:8px}
 .textFrameChoice img{height:62px}
 .textFrameChoice span{font-size:10px}
 .textDesignerPreview{margin:9px 0}.textDesignerPreview canvas{max-height:220px}
 .textDesignerActions button{padding:9px 12px}
}

/* Main colors as selectable squares instead of a long native color bar. */
.textDesignerGrid input.textColorNative{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none;padding:0!important;border:0!important}
.textColorSwatches{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin:2px 0 3px}
.textColorSquare{width:24px;height:24px;min-width:24px;border:1px solid #c7bfc3;border-radius:5px;cursor:pointer;padding:0;box-shadow:inset 0 0 0 1px #ffffff60}
.textColorSquare[aria-pressed=true]{outline:2px solid #8c3f69;outline-offset:2px;z-index:1}
.textColorSquare:focus-visible,.textColorCustom:focus-visible{outline:2px solid #8c3f69;outline-offset:2px}
.textColorCustom{font:inherit;font-size:11px;background:#fff;border:1px solid #d8c9d0;border-radius:6px;padding:4px 7px;cursor:pointer;color:#684453}
