.selection-entry{border-top:1px solid var(--line,#ddd);margin-top:24px;padding-top:22px;min-width:0}.selection-entry-row{display:flex;align-items:center;justify-content:space-between;gap:18px}.selection-entry h3{font-size:17px;margin:0 0 6px}.selection-entry-summary{font-size:12px;line-height:1.7;color:var(--muted,#858a8c);margin:0}.selection-entry-row>button{flex:none}
#customer-selection-dialog{box-sizing:border-box;width:min(1440px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 24px);padding:24px;border:1px solid #ccc;border-radius:4px;color:var(--ink,#62676a);background:#fff;overflow:auto}
#customer-selection-dialog::backdrop{background:rgba(26,34,38,.42)}#customer-selection-dialog *{box-sizing:border-box}#customer-selection-dialog [hidden]{display:none!important}.selection-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.selection-head h2{margin:0;font-size:24px;color:var(--title,#50575a)}.selection-head h2:focus{outline:none}.selection-customer{margin:5px 0 0;font-size:13px}.selection-head-tools{display:flex;align-items:center;gap:8px;flex:none}#customer-selection-dialog .selection-icon{width:42px;height:42px;min-height:42px;display:inline-flex;align-items:center;justify-content:center;line-height:1;padding:0;border:1px solid #bbb;border-radius:2px;background:#fff;color:#62676a;font-family:inherit;font-size:24px;line-height:1;cursor:pointer}
#customer-selection-dialog button{min-height:40px;line-height:1.35;border-radius:2px;font-family:inherit}#customer-selection-dialog button:disabled{cursor:default;opacity:.5}#customer-selection-dialog button:focus-visible,#customer-selection-dialog [tabindex]:focus-visible{outline:2px solid #555;outline-offset:3px}.selection-pane{min-width:0}.selection-status p{margin:10px 0 0;font-size:13px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.selection-status .error{color:#a34238}.selection-status:empty{display:none}.selection-progress{color:#666}.selection-help{font-size:12px;line-height:1.65;color:#808587;margin:8px 0 12px}.selection-upload-controls>button{flex:none}.selection-upload-controls .selection-start-options{margin-right:auto}.selection-count{font-size:13px;white-space:nowrap}#customer-selection-dialog textarea{width:100%;max-width:100%;min-height:150px;padding:14px;border:1px solid #bbb;border-radius:2px;background:#fff;color:#555;font-family:inherit;font-size:14px;line-height:1.7;resize:vertical;white-space:pre-wrap}#customer-selection-dialog textarea:focus{outline:2px solid #777;outline-offset:1px}#selection-notes:focus::placeholder{color:transparent}#customer-selection-dialog>label{display:block;margin:12px 0 8px}.selection-guide-reference{margin:0;border:1px solid #e3e3df;padding:12px 14px;font-size:12px;line-height:1.65;background:#fafaf8;min-width:0}.selection-guide-reference p,.selection-guide-body{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 0}.selection-guide-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.selection-guide-head h3{margin:0;font-size:14px;line-height:1.5;color:var(--title,#50575a)}#customer-selection-dialog .selection-guide-head button{min-height:28px;flex:none;padding:4px 9px;font-size:11px}.selection-empty{padding:24px 0;font-size:13px;color:#888}.selection-start-options{display:flex;gap:7px;flex-wrap:wrap}.selection-start-options [aria-pressed=true]{background:#eee!important;border-color:#555!important;color:#222!important}.selection-start-options button{font-size:12px;padding:9px 12px}
.selection-upload-controls{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;min-width:0}
/* Keep the guide, requests, and album controls visible in one compact stage. */
.selection-intro{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:14px;margin-bottom:14px;align-items:stretch}.selection-intro>*{min-width:0}.selection-notes-field{display:flex;min-width:0}.selection-intro .selection-help{margin:6px 0 0;font-size:11px;line-height:1.55}#customer-selection-dialog .selection-intro #selection-notes{display:block;flex:1;height:auto;margin:0;min-height:88px;padding:9px 11px;font-size:13px;line-height:1.6}
.selection-pricing{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;min-width:0;font-size:13px;line-height:1.5;font-variant-numeric:tabular-nums}.selection-pricing .selection-count,.selection-pricing .selection-extra-fee{white-space:nowrap}.selection-extra-fee{font-size:13px;font-weight:600}.selection-pricing.is-over-limit,.selection-pricing.is-over-limit .selection-count,.selection-pricing.is-over-limit .selection-extra-fee,.selection-count.is-over-limit{color:#b3342a}.selection-final-summary .selection-pricing{gap:4px 12px}:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-pricing{margin-top:6px;font-weight:400}:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-pricing .selection-extra-fee{font-weight:600}
@media(max-width:740px){.selection-intro{grid-template-columns:minmax(0,1fr);gap:12px;margin-bottom:12px}.selection-guide-reference{padding:10px 12px}}
@media(max-width:600px){.selection-upload-controls{gap:8px}.selection-upload-controls .selection-start-options{margin-right:0;margin-left:auto}#customer-selection-dialog .selection-intro #selection-notes{font-size:16px;min-height:96px}.selection-guide-head{gap:8px}}

.selection-album-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 14px;margin-top:18px;align-items:stretch;padding:8px}.selection-spread{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:0;background:#fff;min-width:0;padding:0;overflow:visible;box-shadow:0 0 10px 2px rgba(0,0,0,.14),0 0 3px 1px rgba(0,0,0,.08)}.selection-photo{min-width:0;background:#fff;padding:0;position:relative;display:flex;flex-direction:column;align-items:stretch;gap:0;border:0;color:#555;overflow:visible}.selection-spread>.selection-photo+.selection-photo::before{content:"";position:absolute;inset:0 auto 0 0;width:1px;background:#d6d6d2;pointer-events:none;z-index:1}.selection-photo[draggable=true]{cursor:grab;touch-action:pan-y}.selection-photo[draggable=true] .selection-photo-frame{touch-action:none;user-select:none;-webkit-user-select:none}.selection-photo[draggable=true] img{-webkit-user-drag:none;user-select:none}.selection-photo[draggable=true]:active{cursor:grabbing}.selection-photo.is-selected::after,.selection-photo.is-dragging::after,.selection-photo.is-drop-target::after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 0 2px #222;pointer-events:none;z-index:2}.selection-photo.is-dragging::after,.selection-photo.is-drop-target::after{box-shadow:inset 0 0 0 3px #555}#customer-selection-dialog .selection-photo[tabindex]:focus-visible{outline:2px solid #555;outline-offset:-2px}.selection-photo.is-dragging{opacity:.45}.selection-photo.is-drop-target{outline:0;background:#eee}.selection-photo-frame{width:100%;aspect-ratio:16/11;flex:none;background:#fff;overflow:hidden;position:relative;min-width:0}.selection-photo-area{position:absolute;inset:4.5454545455% 3.125%;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;background:#fff}.selection-photo-area img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;font-size:11px;line-height:1.5;color:#888}.selection-filename,.selection-blank-label{font-family:Arial,sans-serif;user-select:text}.selection-filename{display:flex;align-items:center;justify-content:center;text-align:center;max-width:100%;min-width:0;height:22px;padding:3px 6px 5px;font-size:10px;font-weight:500;line-height:1.4;white-space:nowrap;overflow:visible;overflow-wrap:normal;word-break:normal}.selection-filename-text{display:block;flex:none;white-space:nowrap;line-height:1.4;font-size:inherit;font-weight:inherit;transform-origin:center}.selection-blank-label{display:block;font-size:12px;font-weight:400;line-height:1.4;text-align:center;white-space:nowrap;color:#909491}.selection-photo-empty{justify-content:flex-start;color:#909491;font-size:12px;background:#fff}#customer-selection-dialog .selection-photo-remove{position:absolute;top:5px;right:5px;z-index:3;display:none;align-items:center;justify-content:center;width:28px;height:28px;min-height:28px;padding:0;font-size:22px;font-weight:600;line-height:1;background:#fff;color:#bb342b;border:1px solid #bb342b;border-radius:2px;box-shadow:0 1px 4px #0002;touch-action:manipulation}#customer-selection-dialog .selection-photo-remove:hover{background:#bb342b;color:#fff}#customer-selection-dialog .selection-photo.is-selected .selection-photo-remove{display:inline-flex}@media(hover:hover){#customer-selection-dialog .selection-photo:hover .selection-photo-remove{display:inline-flex}}#customer-selection-dialog .selection-thumb-retry{position:absolute;inset:auto 4px 4px;min-height:28px;font-size:11px;padding:4px;background:white;border:1px solid #bbb}.selection-final-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px;padding:12px 14px;border:1px solid #ddd;background:#f8f8f5}.selection-final-summary strong{font-size:15px;color:#333}.selection-final-summary .selection-help{margin:0 0 0 auto}.selection-final-notes{border-bottom:1px solid #ddd;margin:16px 0;padding-bottom:16px;font-size:13px;line-height:1.7}.selection-final-notes p{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.selection-export-tools{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.selection-export-tools button{font-size:13px}.selection-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;bottom:-24px;background:#fff;border-top:1px solid #ddd;padding:14px 0 8px;margin-top:20px;z-index:3}.selection-footer-left,.selection-footer-right{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}.selection-footer-right{margin-left:auto}#customer-selection-dialog>.selection-footer-right{margin-top:16px}#customer-selection-dialog .selection-footer button{height:44px;min-height:44px;flex:none;padding:10px 14px;font-size:13px;white-space:nowrap}.selection-pricing-footer{display:grid;grid-template-columns:auto auto;align-content:center;align-items:center;justify-content:space-between;gap:0 12px;height:44px;min-height:44px;padding:4px 10px;border:1px solid #ccc;background:#fafaf8}.selection-pricing-footer .selection-price-notice{grid-column:1/-1;font-size:10px;font-weight:400;line-height:1.5;white-space:nowrap;color:#808587}.selection-pricing-footer.is-over-limit .selection-price-notice{color:#b3342a}.selection-pricing-footer .selection-count,.selection-pricing-footer .selection-extra-fee{font-size:12px;line-height:1.5}
@media(max-width:1100px){.selection-album-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.selection-filename{font-size:11px}}
@media(max-width:600px){.selection-entry-row{align-items:flex-start;flex-direction:column;gap:12px}.selection-entry-row>button{align-self:flex-end}#customer-selection-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px 12px}.selection-head{gap:10px;margin-bottom:14px}.selection-head h2{font-size:20px}.selection-head-tools{gap:6px}#customer-selection-dialog .selection-icon{width:38px;height:38px;min-height:38px}.selection-start-options{gap:5px}.selection-start-options button{font-size:11px;padding:7px}.selection-album-grid{grid-template-columns:minmax(0,1fr);gap:16px}.selection-filename{font-size:10px}.selection-blank-label{font-size:12px}.selection-footer{bottom:-16px;gap:7px;flex-wrap:wrap;padding:12px 0 6px}.selection-footer-right{gap:6px;flex:1 1 100%;flex-wrap:wrap}.selection-footer-right>.selection-pricing-footer{flex:1 1 100%;height:44px}.selection-footer-right>button{flex:1!important;min-width:0}#customer-selection-dialog .selection-footer button{font-size:12px;padding:9px 10px}.selection-footer-left:empty{display:none}.selection-final-summary{gap:8px;align-items:flex-start;flex-direction:column}.selection-final-summary .selection-help{margin:0}.selection-export-tools button{font-size:12px;padding:9px 12px}#customer-selection-dialog textarea{font-size:16px}}
@media print{.selection-album-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.selection-spread{break-inside:avoid}}

.selection-upload-recovery{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.selection-upload-recovery button{font-size:12px;padding:10px 12px}

/* Deleted photos wait in the footer, with an undo, until the customer saves. */
#customer-selection-dialog .selection-remove-all{color:#bb342b;border-color:#bb342b}
#customer-selection-dialog .selection-remove-all:hover:not(:disabled){background:#bb342b;color:#fff}
.selection-footer{flex-wrap:wrap}.selection-footer>.selection-status{flex:1 1 100%;min-width:0;max-height:min(30vh,180px);overflow:auto}.selection-footer>.selection-status p{margin:0 0 4px}
.selection-removals{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;min-width:0;font-size:13px;line-height:1.5}.selection-removals-text{color:#bb342b;font-weight:600}
#customer-selection-dialog .selection-footer button.has-removals{border-color:#222;color:#222;font-weight:600}

/* A separate top-layer dialog blocks pointer and keyboard access while photos upload. */
#selection-upload-blocker{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:24px;border:0;border-radius:0;box-sizing:border-box;background:transparent;color:#333;overflow:hidden;overscroll-behavior:contain;touch-action:none;cursor:wait}
#selection-upload-blocker[open]{display:grid;place-items:center}
#selection-upload-blocker::backdrop{background:rgba(60,60,60,.7)}
#selection-upload-blocker *{box-sizing:border-box}
#selection-upload-blocker .selection-upload-box{width:min(340px,100%);padding:28px 24px;background:#fff;border:1px solid #d4d4d4;border-radius:4px;text-align:center;box-shadow:0 8px 32px rgba(0,0,0,.12)}
#selection-upload-blocker h2{margin:0 0 18px;font-family:inherit;font-size:20px;font-weight:700;line-height:1.4;color:#333}
#selection-upload-blocker .selection-upload-percent{margin:0 0 12px;font-size:32px;font-weight:700;line-height:1.2;color:#222;font-variant-numeric:tabular-nums}
#selection-upload-blocker progress{display:block;width:100%;height:10px;margin:0 0 16px;appearance:none;-webkit-appearance:none;border:0;border-radius:0;background:#e4e4e4;accent-color:#222;overflow:hidden}
#selection-upload-blocker progress::-webkit-progress-bar{background:#e4e4e4}
#selection-upload-blocker progress::-webkit-progress-value{background:#222}
#selection-upload-blocker progress::-moz-progress-bar{background:#222}
#selection-upload-blocker .selection-upload-detail{margin:0;font-size:13px;line-height:1.65;white-space:pre-line;overflow-wrap:anywhere;color:#666}
#selection-upload-blocker:focus{outline:none}
@media print{#selection-upload-blocker{display:none!important}}

/* Keep confirmation within the same visual language as the selection workflow. */
:is(#selection-confirm-dialog,#selection-delete-confirm){box-sizing:border-box;width:min(480px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:24px;border:1px solid #ccc;border-radius:4px;background:#fff;color:var(--ink,#62676a);font-family:inherit;overflow:auto;overscroll-behavior:contain;box-shadow:0 12px 48px rgba(0,0,0,.14)}
:is(#selection-confirm-dialog,#selection-delete-confirm)::backdrop{background:rgba(26,34,38,.42)}
:is(#selection-confirm-dialog,#selection-delete-confirm) *{box-sizing:border-box}
:is(#selection-confirm-dialog,#selection-delete-confirm):focus,:is(#selection-confirm-dialog,#selection-delete-confirm) h2:focus{outline:none}
:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-confirm-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
:is(#selection-confirm-dialog,#selection-delete-confirm) h2{margin:0;color:var(--title,#50575a);font-size:22px;font-weight:700;line-height:1.4}
:is(#selection-confirm-dialog,#selection-delete-confirm) p{margin:12px 0;font-size:14px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-confirm-summary{padding:12px 14px;border:1px solid #ddd;background:#f8f8f5;color:#333;font-size:15px;font-weight:600;line-height:1.6}
:is(#selection-confirm-dialog,#selection-delete-confirm) button{min-height:42px;padding:10px 18px;border:1px solid #bbb;border-radius:2px;background:#fff;color:#62676a;font-family:inherit;font-size:14px;line-height:1.35;cursor:pointer}
:is(#selection-confirm-dialog,#selection-delete-confirm) button:focus-visible{outline:2px solid #555;outline-offset:2px}
:is(#selection-confirm-dialog,#selection-delete-confirm) button:disabled{cursor:default;opacity:.5}
:is(#selection-confirm-dialog,#selection-delete-confirm) button.primary{border-color:#222;background:#222;color:#fff}
:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-icon{width:42px;height:42px;min-height:42px;flex:none;display:inline-flex;align-items:center;justify-content:center;padding:0;font-size:24px;line-height:1}
:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-confirm-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px;padding-top:18px;border-top:1px solid #ddd}
@media(max-width:600px){:is(#selection-confirm-dialog,#selection-delete-confirm){padding:20px;width:calc(100vw - 24px);max-width:calc(100vw - 24px)}:is(#selection-confirm-dialog,#selection-delete-confirm) h2{font-size:20px}:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-confirm-head{gap:12px;margin-bottom:16px}:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-confirm-actions{margin-top:20px}:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-confirm-actions button{flex:1;min-width:0;padding:10px 12px}}
@media print{:is(#selection-confirm-dialog,#selection-delete-confirm){display:none!important}}

/* Guide formatting reuses the file-page editor while respecting the selection popup. */
#customer-selection-dialog .rich-editor{min-width:0;margin:12px 0}#customer-selection-dialog .rich-toolbar{gap:6px;padding:10px;flex-wrap:wrap}#customer-selection-dialog .rich-toolbar button,#customer-selection-dialog .rich-toolbar select{height:34px;min-height:34px;padding:5px 9px;font-size:12px}#customer-selection-dialog .rich-toolbar input[type=color]{height:34px;min-height:34px;width:38px;padding:4px}#customer-selection-dialog .rich-input{min-height:180px;max-height:40dvh;overflow:auto;font-size:14px;line-height:1.65}#customer-selection-dialog .rich-output{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}.selection-guide-body:empty{display:none}
@media(max-width:600px){#customer-selection-dialog .rich-input{font-size:16px;min-height:160px}#customer-selection-dialog .rich-toolbar{gap:5px;padding:8px}:is(#selection-confirm-dialog,#selection-delete-confirm) .selection-confirm-actions{flex-wrap:wrap}}
@media print{.selection-head-tools,.selection-footer,.selection-export-tools,.selection-status,.selection-photo-remove{display:none!important}}

.selection-entry-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.selection-entry-actions button{white-space:nowrap}.selection-entry-status:empty{display:none}.selection-entry-status p{margin:10px 0 0;font-size:14px}.selection-entry-status .error{color:#b42318}@media(max-width:600px){.selection-entry-actions{width:100%;justify-content:flex-end}.selection-entry-actions button{padding:10px 12px;min-height:44px}}

/* Final proof opens as a read-only preview; exporting is an explicit header action. */
#customer-selection-dialog.selection-proof-dialog .selection-head{flex-wrap:wrap;align-items:center}
.selection-proof-dialog .selection-head>div:first-child{min-width:0;flex:1 1 140px}
.selection-proof-dialog .selection-head-tools{margin-left:auto}
#customer-selection-dialog #selection-proof-download{height:42px;min-height:42px;padding:10px 16px;font-size:13px;white-space:nowrap}
.selection-proof-pane .selection-album-grid{margin-top:0}
@media(max-width:600px){#customer-selection-dialog #selection-proof-download{height:38px;min-height:38px;padding:8px 12px;font-size:12px}}

/* Contracts without an album: single photos instead of facing pages. */
.selection-album-grid.is-plain{grid-template-columns:repeat(6,minmax(0,1fr))}
.selection-spread.is-single{grid-template-columns:minmax(0,1fr)}
@media(max-width:1100px){.selection-album-grid.is-plain{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){.selection-album-grid.is-plain{grid-template-columns:repeat(3,minmax(0,1fr))}}
