/* Photo-specific layout; visual tokens are shared with Add Place. */
#photo-review-modal { padding: 12px; background: rgba(16,24,39,.68); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#photo-import-content { font-size: 12px; }
#photo-import-content button { font-size: 11px; }
#photo-review-content { width: 100%; max-width: 430px; height: min(860px,calc(100dvh - 40px)); display: flex; flex-direction: column; overflow: hidden; position: relative; background: #fdfcf9; border: 1px solid rgba(255,255,255,.8); border-radius: var(--place-radius); box-shadow: 0 24px 62px rgba(9,19,39,.34); color: var(--place-ink); font-family: var(--place-font); font-size: 12px; }
#photo-review-content #photo-review-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 12px 16px; background: var(--place-body); scrollbar-color: #c7cad0 transparent; }
#photo-review-content .photo-review-header { padding: 14px 16px 10px; background: rgba(255,255,255,.82); display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex: none; }
#photo-review-content .photo-review-header h2 { margin: 0; color: var(--place-heading); font-size: var(--place-title-size); line-height: 28px; letter-spacing: normal; font-weight: 900; }
#photo-review-content .photo-review-header p { margin: 8px 0 0; color: var(--place-muted); }
#photo-review-content .photo-review-close { display: grid; place-items: center; border: 0; border-radius: 999px; background: #f2f3f5; color: var(--place-muted); font-size: 21px; }

#photo-review-content button { min-height: 44px; box-sizing: border-box; border: 1px solid var(--place-line); border-radius: var(--place-control-radius); padding: 8px 9px; background: rgba(255,255,255,.82); color: var(--place-ink); font-family: inherit; font-size: 12px; line-height: 1.4; font-weight: 600; }
#photo-review-content button:focus-visible { outline: 2px solid var(--place-accent); outline-offset: 2px; }
#photo-review-content button.is-primary, #photo-review-content #photo-review-next { border-color: var(--place-accent); background: var(--place-accent); color: white; font-weight: 800; box-shadow: 0 7px 14px rgba(37,103,243,.18); }
#photo-review-content button:disabled { opacity: .42; box-shadow: none; cursor: not-allowed; }
#photo-review-content :is(input,select,textarea) { min-width: 0; box-sizing: border-box; border: 2px solid var(--place-line); border-radius: 12px; background: #fff; color: var(--place-ink); padding: 10px 12px; font-family: inherit; font-size: var(--place-input-size); line-height: 20px; font-weight: 700; }
#photo-review-content :is(input,select,textarea):focus { outline: none; border-color: var(--place-accent); box-shadow: 0 0 0 3px rgba(45,109,246,.12); }

.photo-review-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 10px; overflow: hidden; border: 1px solid var(--place-line); border-radius: 14px; background: rgba(255,255,255,.66); }
.photo-review-overview span { display: flex; min-width: 0; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 8px 5px; color: var(--place-muted); }
.photo-review-overview span + span { border-left: 1px solid var(--place-line); }
.photo-review-overview i { color: #344563; font-size: 20px; flex: none; }
.photo-review-overview b { min-width: 0; font-size: 11px; line-height: 1.35; font-weight: 700; text-align: center; }
.photo-review-progress { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: -7px 2px 14px; color: var(--place-muted); font-size: 11px; font-weight: 600; }
.photo-review-list { display: grid; gap: 10px; }
.photo-review-card,.photo-review-final-group,.photo-split-target,.representative-selection-capacity { border: 1px solid var(--place-line); border-radius: 10px; background: rgba(255,255,255,.7); box-shadow: none; }
.photo-review-card { padding: 10px; }
.photo-review-card-head,.photo-review-final-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.photo-review-eyebrow { display: block; margin-bottom: 4px; color: var(--place-muted); font-size: 11px; font-weight: 700; }
#photo-review-content h3 { margin: 0; color: var(--place-heading); font-size: var(--place-section-size); line-height: 1.5; letter-spacing: normal; font-weight: 700; }
#photo-review-content h4 { font-size: 17px; }
.photo-review-state { flex: none; padding: 5px 8px; border-radius: 999px; background: #f2f4f7; color: var(--place-muted); font-size: 11px; font-weight: 700; }
.photo-review-previews { position: relative; display: flex; gap: 8px; min-height: 0; margin: 12px 0 10px; }
.photo-review-previews .photo-local-preview { width: 82px; max-width: calc((100vw - 100px) / 3); aspect-ratio: 1; flex: none; overflow: hidden; border-radius: var(--place-control-radius); background: #edf0f4; }
.photo-review-previews .photo-local-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-review-previews .photo-local-preview > span { width: 100%; height: 100%; display: grid; place-items: center; padding: 6px; color: var(--place-muted); font-size: 11px; line-height: 1.35; text-align: center; }
.photo-review-more { position: static; width: 82px; max-width: calc((100vw - 100px) / 3); aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--place-control-radius); background: var(--place-ink); color: white; font-size: 13px; font-weight: 800; }
.photo-review-facts,.photo-review-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--place-muted); font-size: 11px; line-height: 1.45; }
.photo-review-facts strong { color: var(--place-ink); font-weight: 800; }
.photo-review-match-list,.photo-review-muted,.photo-review-warning,.photo-review-split-note { margin: 7px 0 0; color: var(--place-muted); font-size: 11px; line-height: 1.45; }
.photo-review-match-list { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.photo-review-match-list span:first-child { color: var(--place-muted); font-weight: 700; }
.photo-review-action-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; margin-top: 8px; }
#photo-review-content .photo-review-action-grid button { min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px; font-size: 11px; white-space: nowrap; }
.photo-review-action-grid button i { font-size: 17px; line-height: 1; }
#photo-review-content .photo-review-action-grid button.is-primary { background: #eef4ff; border-color: #8bb2ff; color: var(--place-accent); box-shadow: none; }
#photo-review-content .photo-review-action-grid button.is-placeholder:disabled { opacity: .34; background: #f9fafb; }
.photo-review-resume,.photo-review-primary-actions,.photo-review-choice-row { margin-top: 12px; }
.photo-review-primary-actions,.photo-review-choice-row,.photo-split-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.photo-review-final-list { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e1e5ea; }
.photo-review-final-group { padding: 14px; }
.photo-review-final-head strong { color: var(--place-ink); font-size: 14px; font-weight: 800; }
.photo-review-final-head span { color: var(--place-muted); font-size: 11px; }
.photo-review-final-group > button { width: 100%; margin-top: 9px; }
.photo-review-decision,.photo-selection-handoff { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e3e7ec; }
.photo-review-decision-current { margin: 0; color: var(--place-muted); font-size: 11px; font-weight: 700; }
.photo-review-choice { width: 100%; text-align: left; }
.photo-review-select-label { display: grid; gap: 5px; color: var(--place-muted); font-size: 11px; font-weight: 700; }
.photo-selection-handoff-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--place-muted); font-size: 11px; }

[data-unassigned-pool] { margin-top: 20px; border-top-width: 2px; }
[data-unassigned-pool] > h3 { display: flex; align-items: center; gap: 8px; }
.photo-split-help { margin: 10px 0; color: var(--place-muted); font-size: 11px; line-height: 1.5; }
.photo-split-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
#photo-review-content .photo-split-photo,#photo-review-content .representative-photo-toggle { position: relative; width: 100%; min-width: 0; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: #edf0f4; aspect-ratio: 1; }
.photo-split-photo .photo-local-preview,.representative-photo-toggle .photo-local-preview { display: block; width: 100%; height: 100%; }
.photo-split-photo img,.representative-photo-toggle img { width: 100%; height: 100%; object-fit: cover; }
.photo-split-photo > span:last-child:not(.photo-local-preview) { position: absolute; right: 3px; bottom: 3px; left: 3px; overflow: hidden; border-radius: 5px; background: rgba(20,31,49,.72); color: white; font-size: 11px; line-height: 1.25; padding: 2px 3px; text-overflow: ellipsis; white-space: nowrap; }
.photo-split-photo.is-selected,.representative-photo-item.is-selected .representative-photo-toggle { border-color: var(--place-accent) !important; box-shadow: 0 0 0 2px rgba(37,103,243,.15); }
.photo-split-photo.is-selected::after { content: '✓'; position: absolute; top: 5px; right: 5px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--place-accent); color: white; font-size: 11px; }
.photo-split-selection { margin: 10px 0; color: var(--place-muted); text-align: center; font-size: 11px; font-weight: 700; }
.photo-split-targets { display: grid; gap: 8px; margin-top: 13px; }
.photo-split-target { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; }
.photo-split-target strong { color: var(--place-ink); font-size: 11px; }
.photo-split-target span { display: block; color: var(--place-muted); font-size: 11px; }
.photo-split-target > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.photo-split-target button { min-height: 36px !important; font-size: 11px !important; }
.photo-split-target select { max-width: 148px; min-height: 36px; padding: 6px 8px; font-size: 11px; }
.photo-split-toolbar,.representative-selection-toolbar { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; }
.photo-split-toolbar strong,.representative-selection-toolbar strong { display: block; color: var(--place-ink); font-size: 13px; text-align: center; }
.photo-split-toolbar span,.representative-selection-toolbar span { display: block; color: var(--place-muted); font-size: 11px; text-align: center; }
.representative-selection-capacity { margin: 14px 0; padding: 13px; color: var(--place-muted); font-size: 11px; line-height: 1.45; }
.representative-photo-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px 7px; }
.representative-photo-item { min-width: 0; }
.representative-photo-order { position: absolute; top: 4px; right: 4px; display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: var(--place-accent); color: white; font-size: 11px; font-weight: 800; }
.representative-photo-preview { width: 100%; min-height: 36px !important; margin-top: 5px; font-size: 11px !important; }

#photo-review-content .photo-review-sticky { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex: none; padding: 10px 14px max(10px,env(safe-area-inset-bottom)); border-top: 1px solid #e4e8ed; background: rgba(255,255,255,.96); }
#photo-review-content .photo-review-sticky.hidden { display: none; }
#photo-review-cta-status { min-width: 0; color: var(--place-muted); font-size: 11px; line-height: 1.4; font-weight: 700; }
#photo-review-content #photo-review-next { min-width: 96px; min-height: 44px; font-size: var(--place-button-size); }
.photo-review-footer-status { margin: 16px 0 0; color: var(--place-muted); text-align: center; font-size: 11px; }
.photo-import-prompt { position: fixed; inset: 0; z-index: 40700; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(16,24,39,.68); backdrop-filter: blur(10px); }
.photo-import-prompt > section { width: 100%; max-width: 400px; padding: 20px; border-radius: 20px; background: #fdfcf9; font-size: 12px; }
.photo-import-prompt h2 { font-size: 20px; }
.photo-import-prompt p { padding: 12px 0; }
.photo-import-prompt footer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width:359px) { #photo-review-modal { padding: 8px; } #photo-review-content { height: calc(100dvh - 16px); border-radius: 22px; } #photo-review-content .photo-review-header { padding: 21px 16px 18px; } #photo-review-content .photo-review-header h2 { font-size: var(--place-title-size); } #photo-review-content .photo-review-header p { font-size: 11px; } #photo-review-content .photo-review-close { width: 50px; height: 50px; min-width: 50px; } #photo-review-body { padding: 15px 14px 24px; } .photo-review-card { padding: 13px; } .photo-review-action-grid button { font-size: 11px; } #photo-review-content .photo-review-sticky { padding: 13px 14px max(13px,env(safe-area-inset-bottom)); gap: 8px; } #photo-review-content #photo-review-next { min-width: 105px; font-size: var(--place-button-size); } }
@media (min-width: 600px) { .representative-photo-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } .photo-split-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (min-width:768px) { #photo-review-modal { padding: 20px; } #photo-review-content { max-width: 620px; height: min(900px,92dvh); } }
@media (prefers-reduced-motion:reduce) { #photo-review-modal { transition: none !important; } }

/* Keep these controls above the App's generic button and form selectors. */
#photo-review-content .photo-review-header { border-bottom: 0; }
#photo-review-content .photo-review-header p { font-size: 12px; line-height: 1.45; font-weight: 400; }
#photo-review-content .photo-review-close { width: 38px; min-width: 38px; height: 38px; min-height: 38px; padding: 0; }
#photo-review-content .photo-review-close i { font-size: 20px; }
#photo-review-content .photo-review-eyebrow { display: none; }
#photo-review-content .photo-review-state { padding: 2px 5px; background: transparent; font-size: 10px; font-weight: 400; }
#photo-review-content .photo-review-progress { margin: 0 2px 8px; font-size: 11px; font-weight: 400; }
#photo-review-content .photo-review-previews { gap: 5px; margin: 7px 0 5px; }
#photo-review-content .photo-review-previews .photo-local-preview { width: 76px; max-width: calc((100% - 15px) / 4); border-radius: 8px; }
#photo-review-content .photo-review-more { position: absolute; right: 0; bottom: 0; width: auto; max-width: none; padding: 3px 7px; aspect-ratio: auto; font-size: 12px; }
#photo-review-content .photo-review-facts { gap: 4px 8px; }
#photo-review-content .photo-review-facts strong { color: var(--place-muted); font-weight: 400; }
#photo-review-content .photo-review-match-list { font-weight: 400; }
#photo-review-content .photo-review-overview span { gap: 5px; }
#photo-review-content .photo-review-overview b { font-size: 11px; font-weight: 600; }
#photo-review-content .photo-review-overview i { font-size: 18px; }
#photo-review-content .photo-review-action-grid button { border-radius: 6px; box-shadow: none; }
#photo-review-content .photo-review-action-grid button i { font-size: 16px; }
#photo-review-content #photo-review-next { background: var(--place-accent); border-color: var(--place-accent); color: #fff; box-shadow: none; border-radius: var(--place-control-radius); }
#photo-review-content .photo-review-final-details { margin-top: 8px; }
#photo-review-content .photo-review-final-details > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--place-muted); font-size: 12px; }
#photo-review-content [data-unassigned-pool] { padding: 12px 2px 0; border-width: 1px 0 0; border-radius: 0; background: transparent; }
#photo-review-content [data-unassigned-pool] .photo-split-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; }
#photo-review-content [data-unassigned-pool] .photo-split-help { font-size: 11px; margin: 6px 0; }
#photo-review-content .photo-split-target { display: block; padding: 9px; }
#photo-review-content .photo-split-target-head { display: flex; justify-content: space-between; align-items: center; }
#photo-review-content .photo-split-target-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
#photo-review-content .photo-split-target-controls button { min-width: 0; min-height: 44px !important; font-size: 11px !important; padding: 5px; }
#photo-review-content .photo-split-target-controls select { width: 100%; max-width: none; font-size: 12px; min-height: 44px; padding: 5px; }
#photo-review-content .photo-split-target .photo-review-previews .photo-local-preview { width: 36px; }
#photo-review-content .photo-split-target strong { font-size: 13px; }
#photo-review-content .photo-split-target span { font-size: 11px; }
@media (max-width:359px) { #photo-review-content .photo-review-action-grid { gap: 4px; } #photo-review-content .photo-review-action-grid button { font-size: 10px; } }

#photo-review-content [data-unassigned-pool] .photo-split-grid { display: flex; overflow-x: auto; padding: 3px 0 5px; }
#photo-review-content [data-unassigned-pool] .photo-split-photo { flex: 0 0 48px; width: 48px; height: 48px; }
#photo-review-content [data-unassigned-pool] .photo-split-photo > span:last-child:not(.photo-local-preview) { font-size: 8px; }
#photo-review-content [data-unassigned-pool] .photo-split-actions { grid-template-columns: 1fr; }
#photo-review-content [data-unassigned-pool] .photo-split-actions button { color: var(--place-accent); border-color: #9abaff; background: #f5f8ff; box-shadow: none; }
#photo-review-content .photo-preview-options { margin: 4px 0 8px; font-size: 11px; color: var(--place-muted); }
#photo-review-content .photo-preview-options summary { cursor: pointer; }
