.photo-frame{position:relative}
.photo-guides{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.photo-head-guide{position:absolute;left:24%;top:10%;width:52%;height:52%;border:1px dashed white;border-radius:48%;box-shadow:0 0 0 1px #142b4766}
.photo-eye-guide{position:absolute;left:8%;right:8%;top:37%;border-top:1px dashed white;box-shadow:0 1px #142b4780}
.photo-center-guide{position:absolute;top:5%;bottom:7%;left:50%;border-left:1px dashed #ffffffb3;box-shadow:1px 0 #142b4733}
.photo-controls{margin:0;min-width:0}
.photo-controls label{display:flex;justify-content:space-between;gap:4px 12px;flex-wrap:wrap}
.photo-controls output{color:#526175;font-weight:400;font-variant-numeric:tabular-nums;white-space:nowrap;margin-left:auto}
.photo-two-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px}.photo-two-cols>div{min-width:0}
.photo-actions{display:flex;gap:10px;flex-wrap:wrap}.photo-actions button{font-size:14px;padding:10px 14px;margin-top:4px}
.photo-guide-toggle{justify-content:flex-start!important;align-items:center;margin:18px 0;flex-wrap:nowrap!important;gap:10px!important}
.photo-quality{padding:12px 14px;background:#edf2f6;border-left:3px solid #526175;font-size:14px;border-radius:4px}
.photo-quality[data-level=warning]{background:#fff7e5;border-color:#ad790c;color:#775305}
.photo-quality[data-level=error]{background:#fff0ef;border-color:#a23b34;color:#832e28}
.photo-output{margin-top:8px}
.workspace.student-workspace{display:block;max-width:920px;margin:auto}
.student-name-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.photo-editor-layout{display:grid;grid-template-columns:minmax(140px,.85fr) minmax(0,1.15fr);gap:24px;align-items:start;margin:24px 0;scroll-margin-top:12px;isolation:isolate}
.photo-editor-layout:not(.is-editing){grid-template-columns:1fr}
.photo-editor-stage{position:sticky;top:12px;align-self:start;min-width:0;text-align:center;background:#f1f4f8;border:1px solid #d8dfe8;border-radius:12px;padding:14px;z-index:2}
.photo-editor-layout:not(.is-editing) .photo-editor-stage{width:min(100%,330px);justify-self:center}
.photo-editor-stage .portrait{width:min(100%,270px);max-width:none;margin:0 auto}
.photo-editor-stage button{font-size:14px;margin:12px 0 0;padding:9px 12px}
.teacher-photo-frame{width:min(100%,240px);aspect-ratio:4/5;margin:0 auto;border:1px solid #b7c3d1}
.teacher-photo-frame #teacherCrop{display:block;width:100%;max-width:none;height:100%;margin:0;border:0}
.photo-summary{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid #d8dfe8;padding:0 0 18px;flex-wrap:wrap}
.photo-summary strong,.photo-summary span{overflow-wrap:anywhere}.photo-summary>div>span{display:block;color:#526175}
.photo-tip-summary{font-size:14px;color:#334962;margin-bottom:10px}
.photo-advice{font-size:14px;color:#334962;padding:12px 14px;background:#edf2f6;border-radius:8px}
.photo-advice summary{font-weight:600}.photo-advice ul{padding-left:18px;margin-bottom:0}.photo-advice li{margin:10px 0}
.camera-is-open{overflow:hidden}
.camera-dialog{padding:0;border:1px solid #a7b5c6;border-radius:14px;background:#fff;color:#142b47;width:min(960px,calc(100% - 24px));max-width:none;height:min(820px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);overflow:hidden}
.camera-dialog::backdrop{background:#0d1b2dde}
.camera-shell{display:flex;flex-direction:column;height:100%;min-height:0}
.camera-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid #d8dfe8;flex-shrink:0}
.camera-heading h2{font-size:22px;margin:0}.camera-heading button{font-size:14px;margin:0;padding:9px 12px}
.camera-body{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:start;gap:24px;padding:20px;overflow:auto;min-height:0;flex:1}
.camera-view{position:sticky;top:0;text-align:center;background:#fff;z-index:1}
.camera-frame{width:min(100%,330px,calc(75dvh - 160px));aspect-ratio:4/5;margin:auto;background:#142b47;overflow:hidden;border:2px solid #ba924c;border-radius:8px}
.camera-frame video{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.camera-instruction{font-size:14px;color:#334962;margin:12px 0}
.camera-help{min-width:0}.camera-help select{display:block;width:100%;font:inherit;padding:10px;margin:8px 0 16px;background:white;color:#142b47;border:1px solid #b7c3d1;border-radius:6px}
.camera-status{padding:12px;background:#edf2f6;border-radius:6px;font-size:14px;margin-top:0}
.camera-status.error{background:#fff0ef;color:#832e28}
.camera-footer{display:flex;gap:10px;flex-wrap:wrap;padding:14px 20px;border-top:1px solid #d8dfe8;background:white;flex-shrink:0}
.camera-footer button{margin:0;font-size:14px;padding:12px 16px}
.camera-footer button:disabled{cursor:default}
@media(max-width:640px){
 .student-name-fields{grid-template-columns:1fr;gap:0}
 .photo-editor-layout{display:block}
 .photo-editor-stage{top:0;padding:10px;border-radius:8px;box-shadow:0 5px 12px #142b4712}
 .photo-editor-stage .portrait,.photo-editor-stage .teacher-photo-frame{width:clamp(106px,24dvh,180px);max-width:100%;margin:0 auto}
 .photo-editor-stage button{padding:7px 12px;margin-top:8px}
 .photo-controls{margin-top:14px}.photo-controls label{font-size:14px}.photo-two-cols{gap:12px}
 .photo-adjust-hint{margin-top:0}.student-workspace .note{display:block;font-size:14px}
 .camera-dialog{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}
 .camera-body{display:block;padding:12px}.camera-help{margin-top:12px}
 .camera-frame{width:min(100%,260px,36dvh)}
 .camera-heading,.camera-footer{padding:12px 14px}
 .camera-instruction{margin:8px 0}.camera-footer{padding-bottom:max(12px,env(safe-area-inset-bottom))}
}
@media(max-height:480px) and (min-width:480px){
 .photo-editor-layout{display:grid;grid-template-columns:minmax(120px,.75fr) minmax(0,1.25fr);gap:16px}
 .photo-editor-stage .portrait,.photo-editor-stage .teacher-photo-frame{width:min(100%,190px,48dvh)}
 .camera-dialog{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}
 .camera-body{display:grid;grid-template-columns:1fr 1fr;padding:10px 16px}
 .camera-frame{width:min(100%,calc(75dvh - 125px))}.camera-heading,.camera-footer{padding:8px 14px}
}
@media(max-width:360px){.photo-two-cols{grid-template-columns:1fr;gap:0}.camera-footer button{padding:10px 12px}}
.photo-controls .photo-background{min-width:0;border:1px solid #cbdcf5;border-radius:8px;padding:14px;margin:18px 0;background:#f1f6ff}.photo-background legend{font-size:1rem;font-weight:600;color:#142b47}.photo-background .help,.photo-background-status{font-size:.875rem;line-height:1.5}.photo-background-status:empty{display:none}.photo-background button{min-height:44px}

.portrait-dialog{width:min(1200px,96vw);height:94dvh;max-width:96vw;max-height:96dvh;padding:0;border:0;border-radius:12px;background:#fff}.portrait-dialog::backdrop{background:#081d38b3}.portrait-dialog>div{padding:10px 16px;border-bottom:1px solid #d4dde7}.portrait-dialog iframe{display:block;width:100%;height:calc(100% - 64px);border:0}.portrait-dialog button{margin:0}@media(max-width:600px){.portrait-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;margin:0}}
.photo-quality-advice{font-size:14px;line-height:1.5;margin:8px 0 14px;padding-left:22px}.photo-quality-advice li{margin:6px 0}.photo-quality-details{font-size:12px;line-height:1.5}.photo-review{font-size:13px;line-height:1.5;margin:12px 0}.photo-review summary{cursor:pointer;font-weight:600}.photo-review ul{padding-left:22px}.photo-review p{color:#526175}.photo-quality-advice[hidden]{display:none}
.photo-lighting{margin:12px 0;padding:12px;border:1px solid #cbd5df;border-radius:8px;font-size:14px}.photo-lighting summary{cursor:pointer;font-weight:600}.photo-lighting[open] summary{margin-bottom:12px}.photo-lighting input[type=range]{width:100%}.photo-lighting .photo-actions{flex-wrap:wrap}.photo-lighting [aria-pressed=true]{background:#0b2d5b;color:white}.photo-light-status{font-size:12px;line-height:1.5}

/* Keep guides above video/canvas, legible against both dark hair and a white wall. */
.photo-frame{isolation:isolate}.photo-guides{z-index:3}.photo-head-guide{border:2px dashed white;box-shadow:0 0 0 2px #142b47b3}.photo-eye-guide{border-top:2px dashed white;filter:drop-shadow(0 1px 1px #142b47)}.photo-center-guide{border-left:2px dashed #ffffffe6;filter:drop-shadow(1px 0 1px #142b47)}.camera-frame video{position:relative;z-index:0}.camera-preparation{padding:22px;overflow:auto;flex:1;min-height:0;font-size:1rem}.camera-preparation h3{font-size:1.3rem}.camera-preparation li{margin:12px 0}.camera-preparation ul{padding-left:22px}.camera-preparation button{display:block;width:100%;margin-top:12px}.student-share input{width:100%;font:inherit;padding:12px;box-sizing:border-box}.student-share .help{margin-bottom:8px}.student-share-actions{display:flex;gap:12px;flex-wrap:wrap}
.camera-dialog [hidden]{display:none!important}
