/* A phone-style source sheet, viewfinder and photo review. */
.photo-flow-dialog{padding:28px;width:460px;max-width:calc(100% - 30px);border:1px solid #718b9c55;background:var(--paper)}.photo-flow-dialog .dialog-heading{align-items:flex-start;margin-bottom:20px}.photo-flow-dialog .dialog-heading h2{font-size:34px;line-height:1.03;letter-spacing:-1px;max-width:290px}.photo-flow-dialog .dialog-heading .icon-button{min-width:44px;min-height:44px}.photo-source-intro .eyebrow{font-size:9px;color:var(--blue)}#dialog-content .photo-source-intro p{font:500 29px/1.08 var(--hand);margin:11px 0 26px;color:var(--ink)}.photo-source-options{display:flex;flex-direction:column;gap:12px}.photo-source-card{width:100%;display:flex;align-items:center;text-align:left;gap:16px;min-height:107px;padding:20px 17px;border:1px solid #7893a766;background:#dbe6ec;color:var(--ink)}.photo-source-card>span:nth-child(2){flex:1;min-width:0}.photo-source-card strong{display:block;font:500 25px/1.1 var(--serif);letter-spacing:-.6px}.photo-source-card small{display:block;font-size:11px;line-height:1.5;margin-top:7px}.photo-source-card>.photo-source-icon{width:42px;display:grid;place-items:center;flex-shrink:0}.photo-source-card>svg{flex-shrink:0}.photo-source-camera{background:var(--blue);color:#fffaf0;border-color:var(--blue)}.photo-source-camera small{color:#e6ebf7}.photo-source-library small{color:#586b78}.photo-source-card:hover{filter:brightness(1.04)}#dialog-content .photo-spaces{font:9px/1.5 var(--mono);color:var(--muted);margin-top:20px;letter-spacing:.03em}.photo-demo-link{font-size:10px;gap:9px;margin-top:10px;color:var(--blue);text-decoration:none}.photo-flow-dialog #dialog-content .photo-local-note{font-size:10px;line-height:1.5;color:var(--muted);margin-top:12px}.photo-flow-dialog [hidden]{display:none!important}.photo-flow-error{color:#9c332d;font-size:12px!important;line-height:1.55!important;margin:14px 0}.photo-flow-dialog .photo-add-grid{justify-content:space-between;min-height:52px;font-size:13px}.photo-review-image{position:relative;background:#dce5e8;display:flex;justify-content:center;align-items:center;min-height:200px;overflow:hidden}.photo-review-image>img{width:100%;height:clamp(210px,40dvh,350px);object-fit:contain;display:block}.photo-review-image>span{position:absolute;bottom:12px;left:12px;background:#f5f1e9e8;padding:7px 9px;font:9px/1 var(--mono);color:var(--ink)}.photo-review-image>button{position:absolute;right:10px;top:10px;width:38px;height:38px;border:0;display:grid;place-items:center;background:#f5f1e9e8;color:var(--ink);border-radius:50%}.photo-review-strip{display:flex;gap:8px;overflow:auto;padding:11px 0 2px;scroll-snap-type:x mandatory}.photo-review-strip button{padding:2px;border:1px solid transparent;background:none;flex:0 0 53px;height:63px;scroll-snap-align:start}.photo-review-strip button[aria-pressed=true]{border-color:var(--blue);border-width:2px}.photo-review-strip img{height:100%;width:100%;object-fit:cover}.photo-review-tools{display:flex;justify-content:space-between;gap:12px;margin:13px 0 2px}.photo-review-tools button{font-size:11px;display:inline-flex;gap:7px;align-items:center;background:none;border:0;min-height:38px;padding:0;color:var(--ink)}.photo-flow-dialog .field{font-size:12px}.photo-flow-dialog .field input{min-height:49px;background:#fcfaf5;border:1px solid #43292366;font-size:14px}.photo-flow-dialog .field .form-hint{font-size:10px}.photo-flow-dialog .field{gap:8px}
.photo-camera-dialog{background:#152b38;color:#f5f1e9;border-color:#637a87;padding:22px;width:470px;max-height:96dvh;overflow:auto}.photo-camera-dialog .dialog-heading{margin-bottom:15px;align-items:center}.photo-camera-dialog .dialog-heading h2{font-size:30px;max-width:none}.photo-camera-dialog .dialog-heading .icon-button{color:#f5f1e9}.photo-camera-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.camera-mode-pill{font:9px/1.4 var(--mono);letter-spacing:.06em;border:1px solid #d2e2ec65;background:#314f62;padding:7px 10px;border-radius:24px}.camera-quality-label{font:8px/1.4 var(--mono);letter-spacing:.08em;color:#c9d8e1}.photo-viewfinder{position:relative;width:100%;aspect-ratio:3/4;max-height:calc(100dvh - 270px);min-height:220px;overflow:hidden;background:#0e202b;isolation:isolate}.photo-viewfinder>video,.photo-viewfinder>img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}.photo-viewfinder.is-selfie>video,.photo-viewfinder.is-selfie>img{transform:scaleX(-1)}.viewfinder-corner{position:absolute;width:25px;height:25px;border-color:#fffaf0;border-style:solid;opacity:.82;pointer-events:none;z-index:1}.corner-tl{top:17px;left:17px;border-width:1px 0 0 1px}.corner-tr{top:17px;right:17px;border-width:1px 1px 0 0}.corner-bl{bottom:17px;left:17px;border-width:0 0 1px 1px}.corner-br{bottom:17px;right:17px;border-width:0 1px 1px 0}.camera-status-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:30px;text-align:center;color:#e4edf2;background:#132936df}.camera-status-overlay p{font-size:13px!important;line-height:1.6!important}.camera-status-overlay button{background:#e4edf2;color:#152b38;border:1px solid #c0d3df;padding:10px 16px;min-height:44px;font-size:11px;width:100%}.photo-camera-controls{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;justify-items:center;padding-top:19px;gap:15px}.camera-side-action{width:52px;height:52px;display:grid;place-items:center;border:1px solid #dae8f14d;border-radius:50%;background:#314d5e;color:#f5f1e9}.photo-shutter{height:74px;width:74px;padding:5px;border:2px solid #fcfaf5;border-radius:50%;background:none;display:grid;place-items:center}.photo-shutter>span{display:block;width:100%;height:100%;background:#fcfaf5;border-radius:50%;transition:transform .15s}.photo-shutter:active>span{transform:scale(.9)}.photo-shutter:disabled,.camera-side-action:disabled{opacity:.35;cursor:default}.photo-camera-dialog #dialog-content .camera-switch-caption{font:500 21px/1.15 var(--hand);text-align:center;color:#e3edf2;margin-top:15px}.camera-library-link,.camera-live-link{display:flex;justify-content:center;align-items:center;gap:9px;border:0;background:none;color:#d8e6ee;font-size:11px;min-height:44px;margin:8px auto 0;padding:8px 12px}.camera-live-link{font-size:10px;text-decoration:underline;text-underline-offset:4px;color:#abc3d1;margin-top:0}.photo-camera-dialog .camera-error{color:#ffe6ce}.photo-shutter:focus-visible,.camera-side-action:focus-visible,.camera-library-link:focus-visible,.camera-live-link:focus-visible{outline:2px solid #f5f1e9;outline-offset:4px}
@media(max-width:759px){.photo-flow-dialog{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,var(--phone-preview-width));max-width:100%;max-height:94dvh;padding:29px 24px max(26px,env(safe-area-inset-bottom));border-radius:23px 23px 0 0;border-bottom:0;box-shadow:0 -10px 60px #142a391c}.photo-flow-dialog::before{content:'';display:block;width:39px;height:3px;background:#9babb3;border-radius:5px;position:absolute;top:10px;left:calc(50% - 19.5px)}.photo-flow-dialog .dialog-heading h2{font-size:32px;line-height:1.04;max-width:260px}.photo-flow-dialog .dialog-heading{margin-bottom:20px}.photo-source-card{padding:21px 15px;gap:14px;min-height:108px;border-radius:12px}.photo-source-card strong{font-size:25px}.photo-source-card small{font-size:10px}.photo-source-card>.photo-source-icon{width:36px}.photo-flow-dialog .field input{font-size:16px}.photo-flow-dialog .photo-add-grid{position:sticky;bottom:0;margin-top:21px!important}.photo-flow-dialog .photo-review-image{margin-inline:-5px}.photo-review-image>img{height:clamp(200px,34dvh,320px)}.photo-review-tools{margin-top:12px}.photo-flow-dialog[data-photo-stage=review]{max-height:96dvh}.photo-camera-dialog{inset:0;margin:auto;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:23px 20px max(18px,env(safe-area-inset-bottom));background:#152b38}.photo-camera-dialog::before{display:none}.photo-camera-dialog .dialog-heading h2{font-size:29px;max-width:none}.photo-camera-dialog .dialog-heading{margin-bottom:16px}.photo-viewfinder{max-height:calc(100dvh - 302px);min-height:200px;border-radius:6px}.photo-camera-controls{padding-top:18px}.photo-camera-dialog #dialog-content .camera-switch-caption{font-size:21px;margin-top:13px}.camera-library-link{margin-top:6px}.camera-live-link{min-height:33px;padding:5px 10px}.camera-mode-pill{font-size:8px}.camera-quality-label{font-size:7px}}
@media(max-width:360px){.photo-flow-dialog{padding-inline:20px}.photo-flow-dialog .dialog-heading h2{font-size:29px;max-width:220px}.photo-source-card strong{font-size:23px}.photo-source-card{padding:19px 13px;gap:11px}.photo-source-card small{font-size:9px}.photo-source-card>.photo-source-icon{width:32px}.photo-source-intro p{font-size:27px!important}.photo-camera-dialog{padding:18px 16px max(12px,env(safe-area-inset-bottom))}.photo-camera-dialog .dialog-heading h2{font-size:27px}.photo-viewfinder{max-height:calc(100dvh - 286px)}.photo-shutter{width:68px;height:68px}.camera-side-action{width:47px;height:47px}.photo-camera-dialog #dialog-content .camera-switch-caption{font-size:20px}.photo-review-image>img{height:clamp(180px,31dvh,280px)}}
.photo-review-tools button{min-height:44px}.photo-review-image>button{width:44px;height:44px}

/* Portrait 4:3 stays proportional on short screens instead of being height-clamped. */
.photo-camera-dialog{padding:20px;width:510px}
.photo-camera-dialog .photo-viewfinder{width:min(100%,calc((100dvh - 280px) * .75));height:auto;aspect-ratio:3 / 4;min-height:0;max-height:none;margin-inline:auto}
.photo-camera-dialog .photo-viewfinder>video{object-fit:contain}
@media(max-width:759px){
 .photo-camera-dialog{padding:20px 16px max(16px,env(safe-area-inset-bottom))}
 .photo-camera-dialog .dialog-heading{margin-bottom:12px}
 .photo-camera-dialog .photo-viewfinder{width:min(calc(100% + 32px),calc((100dvh - 252px - env(safe-area-inset-bottom)) * .75));margin-left:50%;margin-right:0;transform:translateX(-50%)}
 .photo-camera-dialog .photo-camera-controls{padding-top:14px}
 .photo-camera-dialog .camera-library-link{margin-top:5px}
}

/* Keep the message and submit action together, with no overlapping sticky footer. */
.photo-flow-dialog[data-photo-stage=review] .dialog-heading{margin-bottom:12px;align-items:center}
.photo-flow-dialog[data-photo-stage=review] .dialog-heading h2{font-size:28px;max-width:none}
.photo-flow-dialog[data-photo-stage=review] #dialog-title:focus,.photo-flow-dialog[data-photo-stage=upload] #dialog-title:focus{outline:none}
#photo-review-form{display:grid;gap:10px}
.photo-flow-dialog[data-photo-stage=review] #dialog-content .field{margin:0;gap:6px}
.photo-flow-dialog[data-photo-stage=review] .person-name-fields{gap:10px}
.photo-flow-dialog[data-photo-stage=review] .required-mark{display:none}
.photo-flow-dialog[data-photo-stage=review] .field input{min-height:44px;padding:10px;font-size:16px}
.photo-flow-dialog[data-photo-stage=review] .photo-message-field textarea{height:64px;min-height:64px;padding:10px;font-size:16px;resize:vertical}
.photo-field-label{display:flex;align-items:baseline;gap:7px}
.photo-flow-dialog[data-photo-stage=review] .photo-review-image{min-height:0;margin:0}
.photo-flow-dialog[data-photo-stage=review] .photo-review-image>img{height:clamp(100px,calc(100dvh - 345px),260px)}
.photo-flow-dialog[data-photo-stage=review] .has-multiple .photo-review-image>img{height:clamp(90px,calc(100dvh - 430px),230px)}
.photo-review-actions{position:absolute;right:10px;bottom:10px;display:flex;gap:7px}
.photo-review-actions button{display:grid;place-items:center;width:44px;height:44px;border:1px solid #718b9c55;border-radius:50%;background:#f5f1e9ed;color:var(--ink)}
.photo-flow-dialog[data-photo-stage=review] .photo-review-strip{padding:0;gap:6px}
.photo-flow-dialog[data-photo-stage=review] .photo-review-strip button{height:49px;flex-basis:44px}
.photo-flow-dialog[data-photo-stage=review] #dialog-content .photo-add-grid{position:static;margin-top:0!important;min-height:48px}
.photo-flow-dialog[data-photo-stage=review] .photo-flow-error{margin:0}
.photo-flow-dialog[open][data-photo-stage=upload]{display:flex;flex-direction:column;min-height:0}
.photo-flow-dialog[data-photo-stage=upload] #dialog-content{display:grid;place-items:center;flex:1}
.photo-upload-screen{width:min(100%,320px);padding:4px 0 12px}
.photo-upload-print{position:relative;box-sizing:border-box;width:clamp(108px,22dvh,176px);aspect-ratio:3/4;padding:8px 8px 28px;margin:12px auto 35px;background:#fcfaf5;border:1px solid #718b9c55;box-shadow:0 8px 18px #172d3c15;transform:rotate(-3deg)}
.photo-upload-print>img{display:block;width:100%;height:100%;object-fit:contain;background:#e0e8ed}
.photo-upload-mark{position:absolute;top:-15px;right:-22px;display:grid;place-items:center;width:44px;height:44px;color:var(--blue);transform:rotate(12deg)}
.photo-upload-mark svg{width:36px;height:36px;background:transparent;stroke-width:1.9}
.photo-upload-counter{position:absolute;bottom:9px;left:0;right:0;text-align:center;font:9px/1 var(--mono);color:#314b5c}
.photo-upload-status{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.photo-upload-screen h3{font:500 23px/1.2 var(--serif);letter-spacing:-.5px;margin:0;color:var(--ink)}
.photo-upload-status>span{font:11px/1.4 var(--mono);color:var(--muted);font-variant-numeric:tabular-nums}
.photo-upload-progress{height:5px;overflow:hidden;background:#718b9c33;margin:15px 0 12px;border-radius:4px}
.photo-upload-progress>span{display:block;height:100%;background:var(--blue);transition:width .2s linear}
.photo-upload-progress[data-indeterminate=true]>span{width:35%;animation:photo-prepare 1.8s ease-in-out infinite alternate}
.photo-flow-dialog #dialog-content .photo-upload-screen p{font-size:11px;line-height:1.6;color:var(--muted);margin:0}
@keyframes photo-prepare{from{transform:translateX(0)}to{transform:translateX(185%)}}
@media(max-width:759px){
 .photo-flow-dialog[data-photo-stage=review]{padding:22px 18px max(16px,env(safe-area-inset-bottom));max-height:calc(100dvh - 12px);overflow:auto}
 .photo-flow-dialog[data-photo-stage=upload]{inset:auto 0 0;height:auto;max-height:96dvh;min-height:0;padding:25px 22px max(22px,env(safe-area-inset-bottom))}
 .photo-flow-dialog[data-photo-stage=upload] .dialog-heading h2{font-size:28px}
}
@media(prefers-reduced-motion:reduce){.photo-upload-progress>span{animation:none!important;transition:none}}

/* Desktop uses the same camera → review → uploading flow at a useful width. */
@media(min-width:960px){
 .photo-flow-dialog[data-photo-stage=review]{width:840px;max-width:calc(100vw - 64px);max-height:calc(100dvh - 48px);padding:26px;overflow:auto}
 .photo-flow-dialog[data-photo-stage=review] .dialog-heading{margin-bottom:18px}
 .photo-flow-dialog[data-photo-stage=review] #photo-review-form{grid-template-columns:minmax(0,1.1fr) minmax(280px,1fr);grid-template-rows:max-content max-content min-content 1fr;column-gap:24px;row-gap:12px;align-items:start}
 .photo-flow-dialog[data-photo-stage=review] .photo-review-image{grid-column:1;grid-row:1/5;align-self:stretch}
 .photo-flow-dialog[data-photo-stage=review] .photo-review-image>img,.photo-flow-dialog[data-photo-stage=review] .has-multiple .photo-review-image>img{height:clamp(220px,calc(100dvh - 245px),380px)}
 .photo-flow-dialog[data-photo-stage=review] .person-name-fields{grid-column:2;grid-row:1}
 .photo-flow-dialog[data-photo-stage=review] .photo-message-field{grid-column:2;grid-row:2}
 .photo-flow-dialog[data-photo-stage=review] .photo-message-field textarea{height:110px;min-height:80px}
 .photo-flow-dialog[data-photo-stage=review] .photo-flow-error{grid-column:2;grid-row:3}
 .photo-flow-dialog[data-photo-stage=review] .photo-add-grid{grid-column:2;grid-row:4;align-self:start}
 .photo-flow-dialog[data-photo-stage=review] .photo-review-strip{grid-column:1/-1;grid-row:5}
 .photo-flow-dialog.photo-camera-dialog{width:720px;padding:24px;max-height:calc(100dvh - 32px)}
 .photo-camera-dialog .photo-viewfinder{width:min(100%,calc((100dvh - 260px) * 1.333333));aspect-ratio:4/3}
 .photo-camera-dialog .photo-camera-controls{max-width:420px;width:100%;margin-inline:auto}
 .photo-flow-dialog[data-photo-stage=upload]{position:fixed;inset:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0;padding:32px 48px}
 .photo-flow-dialog[data-photo-stage=upload] .dialog-heading{width:100%;margin:0}
 .photo-flow-dialog[data-photo-stage=upload] .dialog-heading h2{max-width:none}
 .photo-upload-screen{width:min(100%,540px)}
 .photo-upload-print{width:clamp(176px,32dvh,280px);margin-bottom:44px}
 .photo-upload-screen h3{font-size:32px}
}
