.customer-comfort{margin:16px 0 22px;font:14px/1.5 Arial,sans-serif}.comfort-filters{display:flex;gap:8px;flex-wrap:wrap}.comfort-filters button[aria-pressed=true]{background:var(--accent,#142d4e);color:white}.comfort-status{margin:10px 0;color:#5b6879}.customer-comfort>button{margin-top:8px}.image-actions .photo-select{width:auto!important;min-width:44px;gap:5px;padding:8px!important;display:inline-flex;align-items:center}.photo-select span{font:12px Arial,sans-serif}.photo-navigation{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);display:flex;gap:16px;align-items:center;background:#15283de8;color:white;border-radius:30px;padding:4px 8px;z-index:5}.photo-navigation button{width:44px;height:44px;padding:0;font-size:30px;background:transparent;color:white;border:0}.photo-navigation button:disabled{opacity:.3}.photo-navigation span{font:14px Arial,sans-serif;white-space:nowrap}.lightbox-layout{padding-bottom:62px}.photo-retry{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:4}.selection-review{max-height:40vh;overflow:auto;display:grid;gap:10px;margin:15px 0}.selection-review-item{display:flex;align-items:center;gap:12px;overflow-wrap:anywhere}.selection-review-item img{width:64px;height:80px;object-fit:contain;background:#e6eaf0}.comfort-error{color:#a92525}.comfort-success{color:#215d39}.workflow-dialog:has(.selection-review) button{margin:4px}.workflow-dialog>select{display:block;width:100%;margin:12px 0}.customer-view .customer-comfort~.grid .image-actions{flex-wrap:wrap;justify-content:flex-end}.dark .comfort-status{color:#d7dfe8}@media(max-width:600px){.comfort-filters button{min-height:44px}.photo-select span{font-size:11px}.customer-comfort{margin-top:8px}.photo-navigation{bottom:8px}}
#grid .tile .image-actions .photo-select span,#lightbox .image-actions .photo-select span{position:static;inset:auto;display:inline;width:auto;max-width:none;height:auto;background:none;box-shadow:none;padding:0;color:inherit;text-shadow:none;white-space:nowrap;line-height:1.2;font:12px Arial,sans-serif}#grid .tile .image-actions .photo-select{flex:0 0 auto;width:auto!important;min-width:105px}.photo-select svg{flex-shrink:0}
/* Keep dialogs inside the visible viewport, including short landscape screens. */
#workflowDialog{padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));overscroll-behavior:contain}
#workflowDialog .workflow-dialog{box-sizing:border-box;max-height:calc(100dvh - 24px);max-width:100%;overflow-x:hidden;overscroll-behavior:contain;overflow-wrap:anywhere}
#workflowDialog .workflow-dialog>button{min-height:44px}#workflowDialog .workflow-dialog select{min-height:44px;padding-right:36px}
.selection-review-item{min-width:0}.selection-review-item img{flex:0 0 64px}.selection-review-item span{min-width:0}
#lightbox .photo-navigation{bottom:max(10px,env(safe-area-inset-bottom));max-width:calc(100vw - 24px)}
#lightbox .photo-navigation button{min-width:44px;min-height:44px}#lightbox .photo-navigation button:focus-visible{outline:2px solid #a8ccff;outline-offset:-3px}
.slideshow-controls button,.slideshow-controls select{min-width:44px;min-height:44px}
.slideshow{padding-bottom:max(12px,env(safe-area-inset-bottom))}
@media(max-width:480px){
 #gallery:is(.customer-view,.preview-mode) #grid:not(.thumb-size-small){grid-template-columns:minmax(0,1fr);columns:1}
 #gallery:is(.customer-view,.preview-mode) .galleryhero{padding:24px 0}
 #gallery:is(.customer-view,.preview-mode) .galleryhero h1{font-size:min(var(--text-size,80px),12vw);margin-top:0;margin-bottom:14px}
 #gallery:is(.customer-view,.preview-mode) .galleryhero p{font-size:16px}
 .comfort-filters{gap:8px}.comfort-filters button{padding:10px 12px}.comfort-filters>button:last-child:not([aria-pressed]){flex-basis:100%}
 #workflowDialog .workflow-dialog{padding:20px}.selection-review{max-height:35dvh}
}
@media(max-width:760px){#workflowDialog select,#workflowDialog input:not([type=checkbox]):not([type=range]),#workflowDialog textarea{font-size:16px}}
@media(max-height:500px){.slideshow{padding:6px}.slideshow-controls{padding-top:6px;gap:5px}#lightbox:not(.comments-open) .lightbox-layout{max-height:calc(100dvh - 70px);padding-bottom:0}#lightbox:not(.comments-open) .lightbox-frame>img,#lightbox:not(.comments-open) .lightbox-frame>video{max-height:calc(100dvh - 80px)}}
#modal:has(input[name=galleryPassword],input[name=guestPassword]) input{font-size:16px}
/* Dark gallery controls must not inherit light text on a white button. */
#gallery:is(.customer-view,.preview-mode).dark button{background:#293542;color:#edf2f8;border-color:#536579}
#gallery:is(.customer-view,.preview-mode).dark button:is(.active,.primary,[aria-pressed=true]){background:var(--accent,#142d4e);border-color:var(--accent,#142d4e);color:#fff}
#gallery:is(.customer-view,.preview-mode).dark .direct-gallery-links button{background:transparent;border:0;color:#c2cbd7}
#gallery:is(.customer-view,.preview-mode).dark .image-download{background:#293542;color:#edf2f8;border-color:#536579}
#gallery:is(.customer-view,.preview-mode).dark .subgallery-card small{color:#c2cbd7}
#gallery:is(.customer-view,.preview-mode).dark .selection-brief-card{background:#25313e;color:#edf2f8;border-color:#536579}
#gallery:is(.customer-view,.preview-mode).dark .selection-brief-card p{color:#d5dce6}
#galleryNavigation.navigation-unified .direct-gallery-links button,#galleryNavigation.navigation-unified .direct-gallery-current{max-width:min(260px,55vw);overflow:hidden;text-overflow:ellipsis}
#galleryNavigation.navigation-unified .direct-gallery-links{scroll-padding-inline:12px;overscroll-behavior-x:contain;scrollbar-color:#94a6ba transparent}
#gallery:is(.customer-view,.preview-mode).dark .galleryhero p{color:#c7d0db}
@media(max-width:480px){#gallery:is(.customer-view,.preview-mode):not([data-design-fit=cover]) #grid:not(.thumb-size-small) .tile:not(.design-featured) .media-frame>img{width:100%;height:auto;max-height:none}}

@media(max-width:760px){#lightbox.comments-open.compact-discussion .lightbox-stage{display:none}#lightbox.comments-open.compact-discussion #photoComments{flex:1;min-height:0}}
#lightboxFrame .photo-load-status{position:absolute;z-index:2;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;padding:12px 16px;border-radius:8px;background:#233346ed;color:#fff;font:14px/1.5 Arial,sans-serif;white-space:nowrap;pointer-events:none}
#largeImage.photo-pending{visibility:hidden}
#lightboxFrame:is(.photo-loading,.photo-failed){min-width:min(65vw,320px);min-height:min(40svh,240px)}
#grid .media-frame.photo-thumbnail-failed{min-height:160px}
#grid .media-frame.photo-thumbnail-failed>img{min-height:160px}
/* The selection phase is a compact workspace; delivery keeps its presentation. */
#gallery.selection-explorer:is(.customer-view,.preview-mode) #coverHeader,#gallery.selection-explorer:is(.customer-view,.preview-mode) .galleryhero{display:none!important}
#gallery.selection-explorer:is(.customer-view,.preview-mode) #galleryNavigation{--text-font:Arial,Helvetica,sans-serif;margin-top:0;margin-bottom:20px}
#gallery.selection-explorer #galleryNavigation.navigation-unified #breadcrumbs{display:flex;align-items:center;gap:10px;font:14px/1.5 Arial,Helvetica,sans-serif;flex-wrap:wrap}
#gallery.selection-explorer #galleryNavigation .direct-gallery-links{display:none}
#gallery.selection-explorer #galleryNavigation #breadcrumbs button{font:inherit;min-height:44px;padding:8px 10px;background:transparent;border:0;color:inherit}
#gallery.selection-explorer #breadcrumbs .breadcrumb-current{font-weight:700;overflow-wrap:anywhere}
#gallery.selection-explorer #subgalleryHeading{font:600 16px/1.4 Arial,sans-serif;letter-spacing:0;text-transform:none;text-align:left;margin:0 0 12px}
#gallery.selection-explorer #subgalleries{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:10px;margin-bottom:20px}
#gallery.selection-explorer .subgallery-card{display:flex;align-items:center;justify-content:flex-start;gap:12px;padding:14px 16px;min-height:68px;border:1px solid #d9e1eb;border-radius:8px;background:#f7f9fc;text-align:left;font:600 14px/1.4 Arial,sans-serif;color:#253951}
#gallery.selection-explorer .subgallery-card .folder{display:inline-flex;flex:none;font-size:22px;color:inherit}
#gallery.selection-explorer .subgallery-card>span:not(.folder){min-width:0;overflow-wrap:anywhere}
#gallery.selection-explorer .subgallery-card small{display:block;font:12px/1.5 Arial,sans-serif;margin-top:4px;color:#68778b}
#gallery.selection-explorer #backToPortal{font-size:12px;margin:0 0 16px}
#gallery.selection-explorer .customer-comfort{margin-top:12px}
#grid img.preview-waiting{background:#eef1f5;min-height:100px}
.saved-selection-list{display:grid;gap:10px;margin:16px 0;max-height:55dvh;overflow:auto}
.saved-selection-row{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;text-align:left;min-height:68px;margin:0!important;font:14px/1.5 Arial,sans-serif;overflow-wrap:anywhere}
.saved-selection-row span{font-size:12px;color:#64748b}
.saved-selection-dialog{width:min(1000px,94vw)!important}
.saved-selection-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px;margin:20px 0;max-height:55dvh;overflow:auto}
.saved-selection-photo{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:0!important;min-width:0;text-align:left;padding:10px}
.saved-selection-photo img{width:100%;height:160px;object-fit:contain;background:#f1f3f6;border-radius:5px}
.saved-selection-photo strong,.saved-selection-photo small{font:12px/1.5 Arial,sans-serif;overflow-wrap:anywhere}
.saved-selection-photo small{color:#64748b}.saved-selection-large{display:block;width:100%;max-height:60dvh;object-fit:contain;background:#18212d;border-radius:7px}
.saved-selection-photo-nav{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}
#gallery.selection-explorer.dark .subgallery-card{background:#293542;color:#edf2f8;border-color:#536579}
#gallery.selection-explorer.dark .subgallery-card small{color:#c2cbd7}
@media(max-width:600px){.saved-selection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.saved-selection-photo img{height:125px}#gallery.selection-explorer #galleryNavigation{margin-bottom:14px}#gallery.selection-explorer #subgalleries{grid-template-columns:1fr}.saved-selection-photo-nav button{flex:1;font-size:12px}}
