.family-photo{display:grid;gap:16px}
.photo-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap}
.photo-header h2{margin-bottom:5px}.photo-header p{margin-bottom:0;max-width:58ch}
.photo-progress{display:grid;gap:2px;padding:10px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.photo-progress strong{font-size:1.25rem;font-variant-numeric:tabular-nums}.photo-progress span{font-size:.78rem;color:var(--muted)}
.photo-upload{display:grid;gap:6px;max-width:32rem}.photo-upload input{width:100%;font-weight:400}
.photo-rotate,.photo-actions,.photo-alternatives,.photo-footer,.photo-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.photo-rotate span{color:var(--muted);font-size:.9rem}.photo-rotate button{min-width:48px;padding:7px 10px}
.photo-layout{display:grid;gap:20px}.photo-layout>section{min-width:0}.photo-legend{font-size:.82rem;margin-bottom:9px}
.photo-legend span{display:inline-flex;align-items:center;gap:6px}.photo-legend span::before{content:"";width:12px;height:12px;border-radius:3px;border:2px solid currentColor}
.photo-key-uncertain{color:#8a5a00}.photo-key-conflict{color:var(--error)}
.photo-board{width:min(100%,540px);aspect-ratio:1;display:grid;grid-template-columns:repeat(9,minmax(0,1fr));grid-template-rows:repeat(9,minmax(0,1fr));border:2px solid var(--strong);background:var(--surface);overflow:hidden}
.photo-cell{min-width:0;min-height:0;border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;padding:0;background:var(--surface);font-size:clamp(15px,4.8vw,28px);font-variant-numeric:tabular-nums}
.photo-cell:nth-child(3n){border-right:2px solid var(--strong)}.photo-cell.photo-block-bottom{border-bottom:2px solid var(--strong)}
.photo-cell.photo-uncertain{background:#fff2cc;box-shadow:inset 0 -3px #bb7a00;color:#352500}
.photo-cell.photo-conflict{background:var(--errorbg);color:var(--error);text-decoration:underline;text-decoration-thickness:2px}
.photo-cell.photo-uncertain.photo-conflict{box-shadow:inset 0 -3px #bb7a00}
.photo-cell.photo-selected{outline:3px solid var(--accent);outline-offset:-3px;position:relative;z-index:1}
.photo-cell:focus-visible,.family-photo button:focus-visible,.family-photo input:focus-visible{outline:3px solid var(--accent);outline-offset:2px;position:relative;z-index:2}
.photo-detail{border:1px solid var(--line);border-radius:16px;padding:16px;background:var(--surface)}
.photo-detail-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.photo-detail-head h3{margin:0;font-size:1.04rem}
.photo-kicker,.photo-label{font-size:.82rem;font-weight:700;margin:0 0 6px}.photo-label{margin-top:14px}
.photo-crop{position:relative;flex:0 0 72px;width:72px;height:72px;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:#fff}
.photo-crop img{position:absolute;width:900%;height:900%;max-width:none;object-fit:fill}
.photo-crop .photo-crop-col-0{left:-0%}
.photo-crop .photo-crop-col-1{left:-100%}
.photo-crop .photo-crop-col-2{left:-200%}
.photo-crop .photo-crop-col-3{left:-300%}
.photo-crop .photo-crop-col-4{left:-400%}
.photo-crop .photo-crop-col-5{left:-500%}
.photo-crop .photo-crop-col-6{left:-600%}
.photo-crop .photo-crop-col-7{left:-700%}
.photo-crop .photo-crop-col-8{left:-800%}
.photo-crop .photo-crop-row-0{top:-0%}
.photo-crop .photo-crop-row-1{top:-100%}
.photo-crop .photo-crop-row-2{top:-200%}
.photo-crop .photo-crop-row-3{top:-300%}
.photo-crop .photo-crop-row-4{top:-400%}
.photo-crop .photo-crop-row-5{top:-500%}
.photo-crop .photo-crop-row-6{top:-600%}
.photo-crop .photo-crop-row-7{top:-700%}
.photo-crop .photo-crop-row-8{top:-800%}
.photo-digits{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.photo-digits button{padding:6px;min-width:0}
.photo-actions{margin-top:14px}.photo-actions button{flex:1 1 150px}.photo-preview summary{cursor:pointer;font-weight:600}.photo-preview img{display:block;margin-top:10px;width:min(100%,440px);border-radius:12px}
.photo-footer{padding-top:4px}.photo-empty p{max-width:60ch}.photo-footer button{flex:1 1 180px}
@media(min-width:760px){.photo-layout{grid-template-columns:minmax(0,1.25fr) minmax(250px,.75fr);align-items:start}}
@media(prefers-color-scheme:dark){.photo-key-uncertain{color:#ffd077}.photo-cell.photo-uncertain{background:#574317;color:#fff2ce}.photo-cell.photo-conflict{background:var(--errorbg);color:var(--error)}}
