.listing-photos{padding:20px;border:1px solid #dbe4f1;border-radius:12px;margin-bottom:22px}.photo-heading{display:flex;align-items:start;gap:14px;justify-content:space-between}.photo-heading h3{font-size:17px;margin:0 0 8px}.photo-heading p,.photo-help,#photo-progress{font-size:12px;line-height:1.6;color:#607490}.photo-heading>span{white-space:nowrap;font-size:13px;color:#1d4ed8;font-weight:700}.photo-picker{position:relative;display:grid;gap:7px;text-align:center;padding:24px 16px;margin:18px 0 12px;border:2px dashed #b3c8ed;border-radius:12px;background:#f5f8ff;cursor:pointer;color:#1d4ed8}.photo-picker input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.photo-picker:focus-within{outline:3px solid #60a5fa;outline-offset:3px}.photo-picker span{font-size:12px;color:#607490}.photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}.photo-tile{position:relative;min-width:0;border:2px solid #e0e7f2;border-radius:11px;overflow:hidden;background:#f5f8fd}.photo-tile.is-cover{border-color:#1d4ed8}.photo-tile>img{width:100%;height:120px;object-fit:cover;display:block}.photo-remove{position:absolute;right:4px;top:4px;width:36px;height:36px;border-radius:50%;background:#ffffffed;color:#102746;font-size:25px;box-shadow:0 2px 8px #10274620}.photo-cover{display:block;width:100%;min-height:44px;font-size:11px;font-weight:700;background:white;padding:8px 4px;color:#526781}.photo-cover[aria-pressed=true]{background:#1d4ed8;color:white}.photo-uploading{display:block;padding:12px 5px;font-size:11px;text-align:center}.photo-failed{padding:8px;font-size:11px;color:#ae2525}.photo-failed button{display:block;background:#fff;border:1px solid #dbe4f1;border-radius:6px;min-height:40px;padding:6px;margin-top:6px;color:#1d4ed8}.product-gallery{display:block!important;min-width:0;padding:12px}.gallery-large{display:flex;align-items:center;justify-content:center;width:100%;background:#f5f8fd;border-radius:10px;overflow:hidden}.gallery-large img{width:100%;height:300px;max-height:300px!important;object-fit:contain}.gallery-navigation{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#607490}.gallery-navigation button{width:44px;height:44px;font-size:22px}.gallery-thumbs{display:flex;gap:8px;overflow:auto;padding:4px}.gallery-thumbs button{border:2px solid transparent;flex:0 0 60px;padding:0;border-radius:8px;overflow:hidden}.gallery-thumbs button[aria-pressed=true]{border-color:#1d4ed8}.gallery-thumbs img{height:52px;width:56px;object-fit:cover;display:block}
@media(max-width:760px){.listing-photos{padding:15px}.photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.photo-tile>img{height:125px}.photo-cover{font-size:12px;min-height:46px}.photo-remove{width:40px;height:40px}.photo-picker{padding:22px 10px}.photo-heading p{font-size:11px}.gallery-large img{height:230px;max-height:230px!important}}

/* Listing editor: shared field rhythm and a footer outside the scrolling body. */
#modal.post-dialog[open]{display:flex;flex-direction:column;width:min(800px,calc(100% - 32px));height:92dvh;max-height:92dvh;overflow:hidden}
body:has(dialog.post-dialog[open]){overflow:hidden}
.post-dialog .modal-header{flex-shrink:0;position:static;padding:18px 24px;gap:16px}
.post-dialog .modal-header h2{font-size:20px;line-height:1.4}
.post-dialog .modal-header .icon-button{width:44px;height:44px}
.post-dialog #modal-content{padding:0;min-height:0;display:flex;flex:1}
#publish-form{display:flex;flex-direction:column;min-width:0;width:100%;min-height:0;font-size:14px;line-height:1.5}
.post-body{overflow-y:auto;overscroll-behavior:contain;scroll-padding:24px;padding:24px;flex:1;min-height:0}
.post-quota{font-size:13px;line-height:1.6;padding:14px 16px;background:#edf4ff;border-radius:10px;color:#35527d;margin:0 0 24px}
.post-section{margin:0 0 28px;padding:0 0 28px;border-bottom:1px solid #e5eaf1;min-width:0}
.post-section:last-of-type{margin-bottom:0;border-bottom:0;padding-bottom:12px}
.post-section-heading{display:flex;align-items:center;gap:10px;margin-bottom:20px}
.post-section-heading>span{display:grid;place-items:center;width:28px;height:28px;background:#eaf1ff;color:#1d4ed8;border-radius:50%;font-size:13px;font-weight:700;flex-shrink:0}
.post-section-heading h3{font-size:16px;line-height:1.5;margin:0}
#publish-form .form-grid{gap:22px 18px;min-width:0}
#publish-form .form-field,#publish-form .field-label{position:relative;display:flex;flex-direction:column;gap:8px;margin:0;min-width:0;font-size:14px;font-weight:600;line-height:1.5;color:#102746}
#publish-form input:not([type=checkbox]):not([type=file]),#publish-form select,#publish-form textarea{width:100%;min-width:0;margin:0;border:1px solid #cfdbea;border-radius:9px;background:#fff;color:#102746;padding:12px;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;min-height:48px;outline-offset:0;scroll-margin:24px}
#publish-form select{padding-right:28px}
#publish-form textarea{min-height:150px;resize:vertical}
#publish-form input::placeholder,#publish-form textarea::placeholder{color:#7b899b;opacity:1}
#publish-form input:focus,#publish-form select:focus,#publish-form textarea:focus{outline:2px solid #3b82f6;outline-offset:-1px;border-color:#3b82f6}
#publish-form [aria-invalid=true]{border-color:#c43434}
#publish-form .post-help{display:block;font-size:12px;line-height:1.6;font-weight:400;color:#607490;margin:0}
#post-category-help{margin:10px 0 22px!important;overflow-wrap:anywhere}
#post-attribute-help{margin-bottom:16px!important}
#publish-form .post-optional{position:absolute;right:0;top:2px;font-size:11px;font-weight:400;color:#71819a}
.post-description{margin-top:22px!important}
.post-checks{display:flex;gap:12px 24px;flex-wrap:wrap;margin-top:14px}
#publish-form .check{display:flex;align-items:center;gap:10px;min-height:44px;margin:0;font-size:14px;font-weight:400;color:#102746}
#publish-form input[type=checkbox]{width:20px;height:20px;accent-color:#1d4ed8;flex-shrink:0}
.post-price-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,.6fr);gap:18px}
.post-submit-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;background:white;border-top:1px solid #dfe7f3;flex-shrink:0}
.post-submit-bar>span{font-size:12px;color:#607490}
.post-submit-bar .primary{min-height:48px;font-size:14px;white-space:normal;line-height:1.5}
.post-submit-bar .primary:disabled{opacity:.55;cursor:wait}
#publish-form .listing-photos{border:0;border-radius:0;padding:0;margin:0}
#publish-form .photo-heading h3{display:none}
#publish-form .photo-heading p,#publish-form .photo-help,#publish-form #photo-progress{font-size:12px;line-height:1.6}
#publish-form .photo-heading>span{font-size:13px}
#publish-form .photo-picker{margin:16px 0 12px;padding:24px 16px;gap:8px}
#publish-form .photo-picker strong{font-size:14px}
#publish-form .photo-picker span{font-size:12px}
#publish-form .photo-picker:has(input:disabled){opacity:.55;cursor:default}
#publish-form .photo-picker:focus-within{outline:2px solid #3b82f6;outline-offset:1px}
#publish-form .photo-grid:empty{display:none}
#publish-form .photo-cover{min-height:48px;font-size:13px;line-height:1.4}
#publish-form .photo-remove{width:44px;height:44px}
#publish-form .photo-failed,#publish-form .photo-uploading{font-size:12px;line-height:1.5}
#publish-form .form-error:not(:empty){padding:12px;background:#fff1f1;border-radius:8px;margin-top:16px;font-size:13px;line-height:1.6}
@media(max-width:760px){
 #modal.post-dialog[open]{inset:var(--modal-viewport-top,0px) 0 auto;margin:0;width:100%;max-width:100%;height:var(--modal-viewport-height,100dvh);max-height:var(--modal-viewport-height,100dvh);border:0;border-radius:0}
 .post-dialog .modal-header{padding:12px 18px}
 .post-dialog .modal-header h2{font-size:18px}
 .post-body{padding:20px 18px;scroll-padding:20px}
 #publish-form .form-grid{grid-template-columns:1fr;gap:22px}
 #publish-form .form-field,#publish-form .field-label,#publish-form .check{font-size:16px}
 #publish-form input:not([type=checkbox]):not([type=file]),#publish-form select,#publish-form textarea{font-size:16px;min-height:50px}
 .post-section-heading h3{font-size:17px}
 .post-section{margin-bottom:24px;padding-bottom:24px}
 .post-submit-bar{display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;gap:8px;padding:12px 18px max(12px,env(safe-area-inset-bottom));text-align:center}
 .post-submit-bar .primary{font-size:16px;min-height:50px;grid-row:1}
 .post-submit-bar>span{font-size:11px}
 .post-price-grid{gap:12px;grid-template-columns:minmax(0,1fr) 138px}
 #publish-form .photo-picker strong{font-size:16px}
 #publish-form .photo-tile>img{height:140px;object-fit:contain;background:#f5f8fd}
 #publish-form .photo-cover{font-size:13px}
}
