/* Photo Import follows the supplied 393px iPhone flow. */
#photo-review-modal{padding:0;background:rgba(15,23,42,.9);color:#1e293b;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Noto Sans TC",Inter,sans-serif;-webkit-font-smoothing:antialiased}
#photo-import-content{font-size:12px}#photo-import-content button{font-size:11px}
#photo-review-content{position:relative;width:100%;max-width:393px;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:#f8fafc;color:#1e293b;font:400 12px/1.5 -apple-system,BlinkMacSystemFont,"SF Pro Display","Noto Sans TC",Inter,sans-serif}
#photo-review-content *{box-sizing:border-box}
#photo-review-content #photo-review-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding:12px 14px 20px;background:#f8fafc}
#photo-review-content #photo-review-body::-webkit-scrollbar{display:none}
#photo-review-content .photo-review-header{position:relative;flex:none;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:max(10px,env(safe-area-inset-top)) 16px 13px;border-bottom:1px solid rgba(226,232,240,.7);background:rgba(255,255,255,.86);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
.photo-review-heading-row,.photo-review-title-row{display:flex;align-items:center;min-width:0}.photo-review-heading-row{gap:8px}.photo-review-title-row{gap:6px}
#photo-review-content .photo-review-header h2{margin:0;color:#0f172a;font-size:16px;font-weight:700;line-height:1.25;letter-spacing:-.01em}
#photo-review-content .photo-review-header p{margin:2px 0 0;color:#64748b;font-size:11px;font-weight:400;line-height:1.4}
#photo-review-count-badge{flex:none;padding:2px 8px;border:1px solid #dbeafe;border-radius:999px;color:#0062cc;background:#eef6ff;font-size:10px;font-weight:600}
#photo-review-count-badge[hidden],#photo-review-back[hidden]{display:none!important}
#photo-review-content :is(.photo-review-close,#photo-review-back){width:32px;min-width:32px;height:32px;min-height:32px;display:grid;place-items:center;padding:0;border:0;border-radius:999px;color:#94a3b8;background:transparent}
#photo-review-content #photo-review-back{color:#007aff}#photo-review-content :is(.photo-review-close,#photo-review-back) i{font-size:16px}
.photo-review-step-track{position:absolute;right:16px;bottom:7px;left:16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;transform:translateY(100%)}
.photo-review-step-track span{height:4px;border-radius:999px;background:#e2e8f0;transition:background-color .3s ease}.photo-review-step-track span.is-active{background:#007aff}
#photo-review-content button{min-height:44px;border:1px solid #e2e8f0;border-radius:12px;padding:8px 10px;color:#334155;background:#fff;font:600 11px/1.35 inherit;transition:transform .15s cubic-bezier(.25,1,.5,1),opacity .15s,background-color .15s}
#photo-review-content button:active{transform:scale(.96);opacity:.85}#photo-review-content button:focus-visible{outline:2px solid #007aff;outline-offset:2px}#photo-review-content button:disabled{opacity:.42;box-shadow:none;cursor:not-allowed}
#photo-review-content button.is-primary,#photo-review-content #photo-review-next{border-color:#007aff;color:#fff;background:#007aff;box-shadow:0 8px 20px -4px rgba(0,122,255,.35)}
#photo-review-content :is(input,select,textarea){min-width:0;min-height:44px;width:100%;border:1px solid #e2e8f0;border-radius:12px;padding:8px 10px;color:#1e293b;background:#f8fafc;font:500 12px/1.35 inherit}
#photo-review-content :is(input,select,textarea):focus{outline:none;border-color:#007aff;background:#fff}
.photo-review-overview{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;margin-bottom:15px;padding:12px;border:1px solid #dbeafe;border-radius:16px;background:rgba(239,246,255,.7);box-shadow:0 2px 8px rgba(0,0,0,.04)}
.photo-review-overview-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:12px;color:#fff;background:#007aff}.photo-review-overview-icon i{font-size:16px}.photo-review-overview-copy{min-width:0}.photo-review-overview-copy b,.photo-review-overview-copy small{display:block}.photo-review-overview-copy b{color:#0f172a;font-size:12px;font-weight:700}.photo-review-overview-copy small{margin-top:2px;color:#64748b;font-size:10px}.photo-review-radius{padding:2px 8px;border:1px solid #bfdbfe;border-radius:999px;color:#0062cc;background:#fff;font-size:10px;font-weight:600;white-space:nowrap}
.photo-review-progress{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 4px 10px}.photo-review-progress strong{color:#334155;font-size:12px}.photo-review-progress span{color:#94a3b8;font-size:10px;text-align:right}.photo-review-list{display:grid;gap:12px}
.photo-review-card,.photo-review-final-group,.photo-split-target,.representative-selection-capacity{border:1px solid rgba(226,232,240,.8);border-radius:16px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.04)}.photo-review-card{padding:14px}.photo-review-card-head,.photo-review-final-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.photo-review-card-title{display:flex;min-width:0;align-items:flex-start;gap:8px}.photo-review-number{width:24px;height:24px;flex:none;display:grid;place-items:center;border-radius:8px;color:#0062cc;background:#eef6ff;font-size:12px;font-weight:700}.photo-review-card-title h3{margin:0;color:#0f172a;font-size:12px;font-weight:700}.photo-review-card-title p{display:flex;align-items:center;gap:4px;margin:2px 0 0;color:#94a3b8;font-size:10px}.photo-review-eyebrow{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.photo-review-state{flex:none;color:#64748b;font-size:10px;font-weight:600}
.photo-review-previews{position:relative;display:flex;gap:8px;min-height:0;margin:12px 0 10px;overflow-x:auto;scrollbar-width:none}.photo-review-previews::-webkit-scrollbar{display:none}.photo-review-previews .photo-local-preview,.photo-review-more{width:68px;max-width:calc((100% - 24px)/4);aspect-ratio:1;flex:0 0 auto;overflow:hidden;border-radius:12px;background:#f1f5f9}.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:5px;color:#64748b;font-size:9px;text-align:center}.photo-review-more{display:grid;place-items:center;color:#fff;background:#334155;font-size:11px;font-weight:700}
.photo-review-facts,.photo-review-meta{display:flex;flex-wrap:wrap;gap:4px 10px;color:#64748b;font-size:10px}.photo-review-facts{padding-top:9px;border-top:1px solid #f1f5f9}.photo-review-facts strong{color:#64748b;font-weight:500}.photo-review-match-list,.photo-review-muted,.photo-review-warning,.photo-review-split-note{margin:7px 0 0;color:#64748b;font-size:10px}.photo-review-match-list{display:flex;flex-wrap:wrap;gap:4px 8px}.photo-review-match-list span:first-child{font-weight:700}
.photo-review-action-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:10px}#photo-review-content .photo-review-action-grid button{min-width:0;min-height:40px;padding:5px 2px;font-size:10px;white-space:nowrap}#photo-review-content .photo-review-action-grid button i{font-size:14px}#photo-review-content .photo-review-action-grid button.is-primary{border-color:#bfdbfe;color:#0062cc;background:#eef6ff;box-shadow:none}#photo-review-content .photo-review-action-grid button.is-placeholder:disabled{background:#f8fafc}
.photo-review-resume,.photo-review-primary-actions,.photo-review-choice-row{margin-top:10px}.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-details{margin-top:9px}.photo-review-final-details>summary{min-height:40px;display:flex;align-items:center;color:#64748b;font-size:10px;cursor:pointer}.photo-review-final-list{display:grid;gap:10px;padding-top:8px}.photo-review-final-group{padding:12px;background:#f8fafc}.photo-review-final-head strong{color:#0f172a;font-size:12px}.photo-review-final-head span{color:#94a3b8;font-size:10px}.photo-review-final-group>button{width:100%;margin-top:8px}.photo-review-decision,.photo-selection-handoff{display:grid;gap:7px;margin-top:10px;padding-top:10px;border-top:1px solid #f1f5f9}.photo-review-decision-current{margin:0;color:#64748b;font-size:10px}.photo-review-choice{width:100%;text-align:left}.photo-review-select-label{display:grid;gap:5px;color:#64748b;font-size:10px;font-weight:600}.photo-selection-handoff-row{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#64748b;font-size:10px}
#photo-review-content [data-unassigned-pool]{margin-top:14px;border-color:rgba(253,230,138,.9);background:rgba(255,251,235,.72)}.photo-unassigned-heading{display:flex;align-items:center;gap:8px;padding-bottom:9px;border-bottom:1px solid rgba(253,230,138,.65)}.photo-unassigned-heading>span{width:24px;height:24px;display:grid;place-items:center;border-radius:8px;color:#fff;background:#f59e0b}.photo-unassigned-heading h3{margin:0;color:#451a03;font-size:12px;font-weight:700}.photo-unassigned-heading h3 b{margin-left:5px;padding:2px 6px;border-radius:999px;background:rgba(253,230,138,.8);font-size:10px}.photo-unassigned-heading p{margin:2px 0 0;color:rgba(146,64,14,.8);font-size:10px}
.photo-split-help{margin:9px 0;color:#92400e;font-size:10px}.photo-preview-options{margin:4px 0 8px;color:#92400e;font-size:10px}.photo-preview-options summary{cursor:pointer}.photo-split-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}#photo-review-content .photo-split-photo,#photo-review-content .representative-photo-toggle{position:relative;width:100%;min-width:0;min-height:0;padding:0;overflow:hidden;border:2px solid transparent;border-radius:12px;background:#f1f5f9;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;color:#fff;background:rgba(15,23,42,.68);font-size:8px;padding:1px 3px;white-space:nowrap;text-overflow:ellipsis}.photo-split-photo.is-selected,.representative-photo-item.is-selected .representative-photo-toggle{border-color:#007aff!important;box-shadow:0 0 0 2px rgba(0,122,255,.22)}.photo-split-photo.is-selected:after{content:'✓';position:absolute;top:4px;right:4px;width:18px;height:18px;display:grid;place-items:center;border-radius:50%;color:#fff;background:#007aff;font-size:10px}.photo-split-selection{margin:8px 0;color:#92400e;text-align:center;font-size:10px;font-weight:600}#photo-review-content [data-unassigned-pool] .photo-split-actions{grid-template-columns:1fr;padding-top:9px;border-top:1px solid rgba(253,230,138,.65)}#photo-review-content [data-unassigned-pool] .photo-split-actions button{border-color:#fcd34d;color:#fff;background:#f59e0b}
.photo-split-targets{display:grid;gap:8px;margin-top:12px}.photo-split-target{padding:10px}.photo-split-target-head{display:flex;align-items:center;justify-content:space-between}.photo-split-target strong{color:#0f172a;font-size:11px}.photo-split-target span{color:#64748b;font-size:10px}.photo-split-target-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.photo-split-target-controls select{max-width:none}.photo-split-toolbar,.representative-selection-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px}.photo-split-toolbar strong,.representative-selection-toolbar strong{color:#0f172a;font-size:12px;text-align:center}.photo-split-toolbar span,.representative-selection-toolbar span{color:#64748b;font-size:10px;text-align:center}.representative-selection-capacity{margin:12px 0;padding:11px;color:#64748b;font-size:10px}.representative-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 7px}.representative-photo-item{min-width:0}.representative-photo-order{position:absolute;top:4px;right:4px;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;color:#fff;background:#007aff;font-size:10px;font-weight:700}.representative-photo-preview{width:100%;margin-top:5px}.photo-review-footer-status{margin:13px 4px 0;color:#94a3b8;text-align:center;font-size:10px}
#photo-review-content .photo-review-sticky{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px max(12px,env(safe-area-inset-bottom));border-top:1px solid rgba(226,232,240,.8);background:rgba(255,255,255,.9);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}#photo-review-content .photo-review-sticky.hidden{display:none}.photo-review-footer-copy{min-width:0}#photo-review-cta-label{display:block;color:#94a3b8;font-size:10px;font-weight:500}#photo-review-cta-status{display:block;overflow:hidden;color:#0f172a;font-size:12px;font-weight:700;white-space:nowrap;text-overflow:ellipsis}#photo-review-cta-status button{min-height:32px;padding:0;border:0;color:#0062cc;background:transparent;box-shadow:none}#photo-review-content #photo-review-next{width:min(55%,200px);min-width:142px;min-height:44px;display:flex;align-items:center;justify-content:center;gap:6px;padding:9px 14px;font-size:12px;font-weight:700}#photo-review-content #photo-review-next i{font-size:15px}
.photo-import-prompt{position:fixed;inset:0;z-index:40700;display:flex;align-items:center;justify-content:center;padding:14px;background:rgba(15,23,42,.72);backdrop-filter:blur(10px)}.photo-import-prompt>section{width:100%;max-width:360px;padding:18px;border-radius:20px;background:#fff;font-size:12px}.photo-import-prompt h2{font-size:16px}.photo-import-prompt p{padding:10px 0}.photo-import-prompt footer{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media(min-width:600px){#photo-review-modal{padding:24px}#photo-review-content{height:min(852px,calc(100dvh - 48px));border:8px solid #1e293b;border-radius:50px;box-shadow:0 25px 60px -15px rgba(0,0,0,.35)}.representative-photo-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:359px){#photo-review-content .photo-review-header{padding-right:12px;padding-left:12px}#photo-review-content #photo-review-body{padding-right:10px;padding-left:10px}.photo-review-overview{gap:7px;padding:10px}.photo-review-radius{padding-inline:6px}.photo-review-action-grid{gap:4px}#photo-review-content .photo-review-action-grid button{font-size:9px}#photo-review-content .photo-review-sticky{padding-right:12px;padding-left:12px}#photo-review-content #photo-review-next{min-width:132px}}
@media(prefers-reduced-motion:reduce){#photo-review-modal,#photo-review-content button,.photo-review-step-track span{transition:none!important}}

/* Supplied Step 1 card and unassigned-pool presentation. */
#photo-review-content .photo-review-rename{width:auto;min-height:44px;margin:-7px 0;padding:4px 8px;border:0;background:transparent;color:#64748b;font-size:11px;box-shadow:none}
.photo-review-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:8px;border-top:1px solid #f1f5f9;color:#64748b;font-size:10px}.photo-review-card-foot>span{display:flex;min-width:0;align-items:center;gap:4px}.photo-review-card-foot>span i{color:#94a3b8}.photo-review-card-foot button,#photo-review-content .photo-review-card-foot button{width:auto;min-height:44px;margin:-7px 0;padding:2px 0;border:0;background:transparent;color:#0062cc;font-size:10px;box-shadow:none}.photo-review-card-manager{margin-top:0}.photo-review-card-manager>summary{display:none}.photo-review-card-manager[open]{margin-top:10px;padding-top:10px;border-top:1px solid #f1f5f9}
#photo-review-content [data-unassigned-pool],.photo-review-unassigned{margin-top:14px;padding:14px;border:1px solid rgba(253,230,138,.9);border-radius:16px;background:rgba(255,251,235,.72);box-shadow:0 2px 8px rgba(0,0,0,.04)}.photo-unassigned-heading{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:8px;padding-bottom:9px;border-bottom:1px solid rgba(253,230,138,.65)}#photo-review-content .photo-unassigned-select-all{width:auto;min-height:44px;margin:-7px 0;padding:4px 8px;border:0;border-radius:8px;background:#fef3c7;color:#78350f;font-size:11px;box-shadow:none}.photo-review-unassigned .photo-split-grid{margin-top:10px}.photo-review-unassigned.is-complete{display:flex;align-items:center;gap:8px;border-color:#a7f3d0;background:#ecfdf5;color:#065f46}.photo-review-unassigned.is-complete>span{display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#10b981;color:#fff}.photo-review-unassigned.is-complete h3,.photo-review-unassigned.is-complete p{margin:0}.photo-review-unassigned.is-complete h3{font-size:12px}.photo-review-unassigned.is-complete p{margin-top:2px;color:#059669;font-size:10px}
.photo-unassigned-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-top:10px;border-top:1px solid rgba(253,230,138,.65)}.photo-unassigned-actions details{position:relative}.photo-unassigned-actions summary,#photo-review-content .photo-unassigned-actions>button{display:flex;min-height:40px;align-items:center;justify-content:center;gap:5px;padding:7px 8px;border:1px solid #fde68a;border-radius:12px;background:#fff;color:#78350f;font-size:11px;font-weight:700;list-style:none;cursor:pointer}.photo-unassigned-actions summary::-webkit-details-marker{display:none}#photo-review-content .photo-unassigned-actions>button{border-color:#f59e0b;background:#f59e0b;color:#fff}.photo-unassigned-actions details>div{position:absolute;right:0;bottom:calc(100% + 6px);left:0;z-index:4;display:grid;gap:5px;padding:7px;border:1px solid #fde68a;border-radius:12px;background:#fff;box-shadow:0 10px 25px rgba(120,53,15,.18)}#photo-review-content .photo-unassigned-actions details button{min-height:40px;padding:6px;font-size:10px}.photo-unassigned-actions details span{padding:6px;color:#92400e;font-size:10px;text-align:center}

/* The iframe keeps its existing content styles; the App owns the modal shell. */
#photo-review-modal:has(.photo-reference-active){padding:0;background:rgba(17,24,39,.6);backdrop-filter:blur(4px)}
#photo-review-modal #photo-review-content.photo-reference-active{position:relative;width:100%;max-width:none;height:100dvh;max-height:none;padding:0;border:0;border-radius:0;background:#f8fafc;box-shadow:none;overflow:hidden}
#photo-review-content.photo-reference-active> :not(#photo-reference-frame){display:none!important}
#photo-reference-frame{display:block;width:100%;height:100%;border:0;background:transparent}
@media(min-width:600px){
  #photo-review-modal:has(.photo-reference-active){padding:12px}
  #photo-review-modal #photo-review-content.photo-reference-active{width:95vw;max-width:100%;height:85dvh;max-height:85dvh;border:1px solid rgba(38,49,47,.1);border-radius:16px;box-shadow:0 10px 28px rgba(15,23,42,.1)}
}
@media(min-width:768px){
  #photo-review-modal:has(.photo-reference-active){padding:16px}
  #photo-review-modal #photo-review-content.photo-reference-active{width:100%;max-width:42rem;height:90dvh;max-height:90dvh}
}
