.mug-template-library{min-width:0}
body[data-editor-mode="manual"] #uploadCard.photo-upload-entry{grid-template-columns:repeat(3,minmax(0,1fr))}
body[data-editor-mode="quick"] #uploadCard.photo-upload-entry{grid-template-columns:repeat(2,minmax(0,1fr))}
#uploadCard.photo-upload-entry>#openMugTemplates{grid-column:auto;grid-row:1;min-width:0}
body[data-editor-mode="quick"] #uploadCard.photo-upload-entry>#uploadButton{grid-column:auto;grid-row:1}
#uploadCard.photo-upload-entry>#uploadNote,#uploadCard.photo-upload-entry>#photoPickerNote{grid-column:1/-1}
.mug-template-library>label{display:block;margin:12px 0 6px;font-weight:700}
.mug-template-library>select{width:100%;max-width:100%;margin-bottom:12px}
.mug-template-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:560px;max-height:min(58vh,560px);overflow-y:auto;overscroll-behavior:contain;padding:3px;align-content:start}
.mug-template-gallery>button{display:flex;flex-direction:column;align-items:stretch;min-width:0;height:100%;padding:9px;border:1px solid #d8dedf;border-radius:12px;background:#fff;color:#183439;text-align:left;cursor:pointer}
.mug-template-gallery>button:hover{border-color:#df790b;box-shadow:0 0 0 1px #df790b}
.mug-template-gallery>button:focus-visible,.mug-template-choice button:focus-visible{outline:3px solid #e28422;outline-offset:3px}
.mug-template-gallery>button[hidden],.mug-template-choice[hidden],.mug-template-choice button[hidden]{display:none!important}
.mug-template-gallery canvas{display:block;width:100%;height:auto;aspect-ratio:11/12;object-fit:contain;background:#fff;border-radius:6px}
.mug-template-gallery strong{margin-top:6px;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.mug-template-gallery small{margin-top:4px;font-size:11px;line-height:1.35;color:#5d6c6f;font-weight:400}
.mug-template-gallery>button:disabled,.mug-template-choice button:disabled{cursor:wait;opacity:.65}
.mug-template-choice{display:flex;flex-direction:column;gap:8px;margin:0 0 14px;padding:12px;border:1px solid #e3bb8c;border-radius:12px;background:#fff8ee}
.mug-template-choice>p{margin:0;font-size:13px;line-height:1.5}
.mug-template-choice>div{display:flex;flex-direction:column;gap:7px}
.mug-template-choice label{font-size:12px;font-weight:700}
.mug-template-choice input,.mug-template-choice select,.mug-template-choice textarea{box-sizing:border-box;width:100%;min-width:0;padding:10px;border:1px solid #bcc8ca;border-radius:7px;background:#fff;color:#183439;font:inherit}
.mug-template-choice textarea{min-height:75px;resize:vertical}
.mug-template-choice button{width:100%;padding:10px;border:1px solid #bd660c;border-radius:9px;background:#e27b12;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.mug-template-choice button+button{background:#fff;color:#734110}
.mug-template-error{display:grid;place-items:center;min-height:110px;padding:8px;color:#795028;font-size:12px;line-height:1.5;text-align:center}
#mugTemplateStatus{min-height:1.5em;margin:12px 0 0}
@media(max-width:940px){#settingsTemplates{order:-1;scroll-margin-top:16px}}
@media(min-width:850px){.mug-template-gallery{gap:9px}}
