.skin-camera-image{position:absolute;overflow:hidden}
.skin-camera-image video{display:block;width:100%;height:100%;object-fit:contain;transform:scaleX(-1)}
.skin-camera-guide{position:absolute;box-sizing:border-box;border:2px dashed #ffffffd9;border-radius:50%;box-shadow:0 0 0 1px #30303066;pointer-events:none;transform:none;transition:none;animation:none}
.skin-camera-guide[data-ready="true"]{border-color:#356b52;border-style:solid}
#captureQuality [data-state="unknown"] strong,#captureQuality [data-state="pending"] strong{color:#686868}
#captureQuality [data-state="bad"]{background:#fff7ed;border-color:#dac7a9}
#takePhoto:disabled{opacity:.65}
.analysis-error-detail{font-size:12px;color:var(--muted);overflow-wrap:anywhere;line-height:1.4;margin:7px auto;max-width:600px}
#analysisCamera[open]:not([data-camera-state="live"]) .embedded-actions{text-align:center;padding:10px;box-sizing:border-box}
#analysisCamera[open]:not([data-camera-state="live"]) .analysis-note{font-size:clamp(17px,1.6vw,23px);line-height:1.5;max-height:none;overflow:visible;max-width:34em;margin:0 auto 20px;text-align:center;color:#5a5a5a}
#analysisCamera[open]:not([data-camera-state="live"]) .embedded-links>*{justify-content:center;font-size:16px}
#analysisCamera[open] #newAnalysisAttempt{font-size:clamp(17px,1.5vw,21px);line-height:1.35;min-height:52px;max-width:100%;white-space:normal;padding:13px 20px;margin:10px auto}
@media(max-height:480px){#analysisCamera[open]:not([data-camera-state="live"]) .analysis-note{font-size:17px;margin-bottom:10px}#analysisCamera[open] #newAnalysisAttempt{font-size:17px;padding:10px 12px}}
#analysisCamera[data-landscape="true"] .embedded-actions{max-height:100%;overflow-y:auto;overscroll-behavior:contain}
/* The shutter has its own bottom row: reachable, without covering the face. */
#analysisCamera[open][data-camera-state="live"]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px 12px}
#analysisCamera[open][data-camera-state="live"] .camera-bar{grid-column:1;grid-row:1;flex-wrap:nowrap;justify-content:space-between}
#analysisCamera[open][data-camera-state="live"] .camera-brand img{width:180px;height:auto}
#analysisCamera[open][data-camera-state="live"] .camera-feedback{grid-column:1;grid-row:2;min-width:0;width:100%;max-width:900px;margin:0 auto;text-align:center}
#analysisCamera[open][data-camera-state="live"] .embedded-stage{grid-column:1;grid-row:3;min-height:0}
#analysisCamera[open][data-camera-state="live"] .embedded-actions{display:none}
#analysisCamera[open][data-camera-state="live"] .camera-shutter{grid-column:1;grid-row:4;align-self:end;justify-self:center;width:min(360px,100%);text-align:center;z-index:2}
#analysisCamera[open][data-camera-state="live"] #takePhoto{width:100%;max-width:100%;min-height:56px;white-space:normal;padding:14px 18px;font-size:17px;line-height:1.3;touch-action:manipulation;border-radius:30px}
#analysisCamera[open][data-camera-state="live"] #captureQuality{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 7px}
#analysisCamera[open][data-camera-state="live"] #captureQuality>div{padding:7px 5px}
#analysisCamera[open][data-camera-state="live"] #captureQuality span{font-size:14px;line-height:1.2}
/* Reserve two lines even for short labels, so quality changes cannot move the preview. */
#analysisCamera[open][data-camera-state="live"] #captureQuality strong{font-size:16px;line-height:1.25;margin-top:3px;font-weight:500;min-height:2.5em;display:flex;align-items:center;justify-content:center}
#analysisCamera[open][data-camera-state="live"] #analysisStatus{font-size:16px;line-height:1.3;margin:0;min-height:2.6em;max-height:none;overflow:visible}
@media(max-width:600px){
 #analysisCamera[open][data-camera-state="live"]{grid-template-columns:minmax(0,1fr);gap:8px}
 #analysisCamera[open][data-camera-state="live"] .embedded-stage{grid-column:1}
 #analysisCamera[open][data-camera-state="live"] .camera-shutter{grid-column:1;justify-self:center;width:min(360px,100%)}
 #analysisCamera[open][data-camera-state="live"] #takePhoto{width:100%;font-size:17px;min-height:56px}
 #analysisCamera[open][data-camera-state="live"] #captureQuality{gap:5px}
 #analysisCamera[open][data-camera-state="live"] #captureQuality span{font-size:12px}
 #analysisCamera[open][data-camera-state="live"] #captureQuality strong{font-size:14px}
 #analysisCamera[open][data-camera-state="live"] #analysisStatus{font-size:14px}
}
@media(max-height:480px){
 #analysisCamera[open][data-camera-state="live"]{gap:5px 12px}
 #analysisCamera[open][data-camera-state="live"] .camera-brand img{width:150px;height:auto}
 #analysisCamera[open][data-camera-state="live"] #captureQuality{gap:5px;margin-bottom:4px}
 #analysisCamera[open][data-camera-state="live"] #captureQuality>div{padding:4px}
 #analysisCamera[open][data-camera-state="live"] #captureQuality span{font-size:12px}
 #analysisCamera[open][data-camera-state="live"] #captureQuality strong{font-size:14px;margin-top:2px}
 #analysisCamera[open][data-camera-state="live"] #analysisStatus{font-size:13px}
 #analysisCamera[open][data-camera-state="live"] #takePhoto{font-size:14px;min-height:56px;padding:10px}
}

.camera-auto-hint{margin:8px 0;color:#161616;font-size:16px;line-height:1.4;min-height:2.8em;display:grid;place-items:center}
.camera-auto-hint[hidden]{display:none}
#analysisCamera[open][data-camera-state="live"] .camera-bar{min-height:76px}
#captureCountdown{position:static;transform:none;display:flex;flex:none;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:110px;box-sizing:border-box;padding:5px 8px;margin-inline-start:auto;border-radius:12px;background:#f1f1f1;color:#222222;pointer-events:none;text-align:center}
#captureCountdown[hidden]{display:none}
#captureCountdown strong{font-size:38px;font-variant-numeric:tabular-nums;line-height:1;font-weight:600}
#captureCountdown span{font-size:12px;line-height:1.3;white-space:normal}
#photoConfirmation p{margin:0 auto 12px;font-size:clamp(17px,2vw,24px);line-height:1.4;text-align:center}
.photo-confirmation-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}
.photo-confirmation-actions button{min-height:48px;white-space:normal;line-height:1.3;font-size:17px;padding:12px 18px}
#analysisCamera[data-photo-review="true"] .embedded-actions{overflow:auto;max-height:100%}
#analysisCamera[data-photo-review="true"] #analysisStatus{font-size:15px;margin:0 auto 12px}
@media(max-width:600px){
 #analysisCamera[open][data-camera-state="live"] .camera-brand>div{display:none}
 #captureCountdown{width:105px}
 #photoConfirmation p{font-size:16px;margin-bottom:8px}
 .photo-confirmation-actions{gap:8px}.photo-confirmation-actions button{font-size:15px;padding:10px 12px}
}
@media(max-height:480px){
 #analysisCamera[open][data-camera-state="live"] .camera-bar{min-height:58px}
 #captureCountdown{width:120px;flex-direction:row;gap:8px;padding:4px 8px}
 #captureCountdown strong{font-size:32px}
}
/* Pose guidance stays below the oval and never covers the face. */
#analysisCamera[open][data-camera-state="live"] .camera-shutter{width:min(680px,100%);padding:0 8px;box-sizing:border-box}
#analysisCamera[open][data-camera-state="live"] .camera-auto-hint{min-height:1.4em;margin:0 0 3px;font-size:15px}
#analysisCamera[open][data-camera-state="live"] .camera-shutter #analysisStatus{min-height:2.6em;margin:0;font-size:16px}
#analysisCamera[open][data-camera-state="live"] .camera-shutter[data-ready="true"] #analysisStatus{color:#222222;font-weight:600}

.capture-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;overflow:auto;min-height:0}
.capture-gallery figure{margin:0;min-width:0;text-align:center}
.capture-gallery img{width:100%;max-height:48dvh;object-fit:contain;display:block}
.capture-gallery figcaption{font-size:15px;line-height:1.4;margin-top:8px}
@media(max-width:600px){.capture-gallery{grid-template-columns:1fr}.capture-gallery img{max-height:40dvh}}

.photo-view-switch{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;align-self:center;width:100%;gap:6px;margin:0 auto 10px}.photo-view-switch button{font-size:13px;padding:8px 10px;min-height:40px}.photo-view-switch button[aria-pressed="true"]{background:#161616;color:white;border-color:#161616}.gallery-map{position:relative;aspect-ratio:.72;max-height:48dvh;margin:auto}.gallery-map img{display:block;width:100%;height:100%;object-fit:contain}.gallery-map svg{position:absolute;inset:0;width:100%;height:100%}.capture-gallery p{font-size:13px;line-height:1.4}
/* Green photo controls; readiness stays tied to the actual camera checks. */
#analysisCamera button,.flow-screen[data-key="photo-capture"] button,.photo-view-switch button{background:#edf5ef;color:#28543f;border-color:#90b79f}
#analysisCamera .primary,.flow-screen[data-key="photo-capture"] .primary,.photo-view-switch button[aria-pressed="true"]{background:#356b52;border-color:#356b52;color:#fff}
#analysisCamera button:not(:disabled):hover,.photo-view-switch button:not(:disabled):hover{background:#dcece1}
#analysisCamera .primary:not(:disabled):hover,.photo-view-switch button[aria-pressed="true"]:not(:disabled):hover{background:#28543f;color:#fff}
#analysisCamera button:focus-visible,.photo-view-switch button:focus-visible{outline:2px solid #356b52;outline-offset:3px}
#analysisCamera #captureQuality [data-state="good"]{background:#edf5ef;border-color:#90b79f}
#analysisCamera #captureQuality [data-state="good"] strong,#analysisCamera[open][data-camera-state="live"] .camera-shutter[data-ready="true"] #analysisStatus{color:#28543f}
#captureCountdown{background:#edf5ef;color:#28543f}
#modal[open]:has(.capture-gallery){display:flex;flex-direction:column;height:min(90dvh,900px);max-height:calc(100dvh - 24px)}
#modal:has(.capture-gallery) .modal-head{flex:none}
#modal:has(.capture-gallery) #modalBody{display:flex;flex-direction:column;min-height:0;flex:1}
#modal:has(.capture-gallery) #modalBody>p{flex:none;font-size:13px;margin:0 0 10px}
.capture-gallery{min-height:0;overflow-y:auto;overscroll-behavior:contain}
