/* The cleaner app's own camera (ADR-0235, camera.js). A camera is dark in light and dark mode alike, like the phone's
   own: the kit's black and white, white controls on black, red only for "Discard" (with the word). 44px+ targets. */
.vcam{
  position:fixed; inset:0; z-index:1000; display:flex; flex-direction:column;
  background:var(--gray-950); color:var(--gray-100); font-family:var(--font-sans);
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overscroll-behavior:contain;
}
.vcam [hidden]{display:none !important}
.vcam button{font:inherit; color:inherit; touch-action:manipulation; -webkit-tap-highlight-color:transparent; cursor:pointer}
.vcam button:disabled{opacity:.4; cursor:default}
.vcam :focus-visible{outline:2px solid var(--gray-100); outline-offset:2px}

.vcam-top{display:flex; align-items:center; gap:8px; padding:6px 8px; min-height:56px}
.vcam-ic{flex:none; width:44px; height:44px; display:grid; place-items:center; border:0; border-radius:var(--radius-pill); background:rgba(255,255,255,.12)}
.vcam-ic[aria-pressed="true"]{background:var(--gray-100); color:var(--gray-950)}
.vcam-title{flex:1; min-width:0; text-align:center; line-height:1.25}
.vcam-title b{display:block; font-weight:600; font-size:16px}
.vcam-title small{display:block; color:var(--gray-400); font-size:13px; text-wrap:balance}

.vcam-view{position:relative; flex:1; min-height:0; overflow:hidden; background:#000}
.vcam-view video{width:100%; height:100%; object-fit:contain; display:block}
.vcam.can-focus .vcam-view video{cursor:crosshair}
.vcam-ring{position:absolute; width:72px; height:72px; margin:-36px 0 0 -36px; border:2px solid var(--gray-100); border-radius:12px; pointer-events:none}
.vcam-ring.go{animation:vcam-ring .5s var(--spring)}
@keyframes vcam-ring{from{transform:scale(1.4); opacity:0}to{transform:scale(1); opacity:1}}
.vcam-flash{position:absolute; inset:0; background:#fff; opacity:0; pointer-events:none}
.vcam-flash.go{animation:vcam-flash .25s ease-out}
@keyframes vcam-flash{from{opacity:.7}to{opacity:0}}
.vcam-msg{position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; padding:24px; text-align:center}
.vcam-msg[hidden]{display:none}
.vcam-msg p{margin:0; max-width:34ch; font-size:16px; line-height:1.4; color:var(--gray-200)}
.vcam-msg div{display:flex; flex-direction:column; gap:10px; width:min(280px,100%)}

.vcam-bright{display:flex; align-items:center; gap:12px; padding:10px 20px 4px; color:var(--gray-300)}
.vcam-bright[hidden]{display:none}
.vcam-bright input{flex:1; height:44px; accent-color:var(--gray-100); touch-action:pan-x}

.vcam-tray{display:flex; gap:8px; padding:6px 12px; min-height:68px; overflow-x:auto; scrollbar-width:none; scroll-behavior:smooth}
.vcam-tray::-webkit-scrollbar{display:none}
.vcam-th{position:relative; flex:none; width:56px; height:56px; border-radius:var(--radius-md); overflow:hidden; background:var(--gray-800)}
.vcam-th img{width:100%; height:100%; object-fit:cover; display:block}
.vcam-th[data-st="wait"] img{visibility:hidden}
.vcam-th[data-st="wait"]::after{content:""; position:absolute; inset:0; margin:auto; width:20px; height:20px; border:2px solid var(--gray-500); border-top-color:var(--gray-100); border-radius:50%; animation:vcam-spin .8s linear infinite}
@keyframes vcam-spin{to{transform:rotate(1turn)}}
/* Saving / saved / not saved, bottom-left of each thumbnail (the words are in its label and the status line). */
.vcam-st{position:absolute; left:4px; bottom:4px; width:18px; height:18px; border-radius:50%; display:none; place-items:center; box-sizing:border-box}
.vcam-st svg{display:none}
.vcam-th[data-st="queued"] .vcam-st,.vcam-th[data-st="up"] .vcam-st{display:block; border:2px solid rgba(255,255,255,.35); border-top-color:var(--gray-100); background:rgba(10,10,10,.55); animation:vcam-spin .8s linear infinite}
.vcam-th[data-st="ok"] .vcam-st{display:grid; background:var(--gray-100); color:var(--gray-950)}
.vcam-th[data-st="ok"] .vi-check{display:block}
.vcam-th[data-st="bad"] .vcam-st{display:grid; background:#f97066; color:var(--gray-950)}
.vcam-th[data-st="bad"] .vi-alert{display:block}
.vcam-th[data-st="bad"]{box-shadow:inset 0 0 0 2px #f97066}
/* The ✕ is drawn small but its tap area covers the whole thumbnail's top-right half. */
.vcam-rm{position:absolute; top:0; right:0; width:44px; height:44px; padding:4px; border:0; background:none; display:flex; align-items:flex-start; justify-content:flex-end}
.vcam-rm svg{width:20px; height:20px; padding:3px; border-radius:50%; background:rgba(10,10,10,.75); color:var(--gray-100); box-sizing:border-box}

/* Status sits on the picture's bottom edge, so it costs no height. */
.vcam-status{position:absolute; left:50%; bottom:10px; transform:translateX(-50%); max-width:calc(100% - 24px); margin:0; padding:6px 12px; border-radius:var(--radius-pill); background:rgba(10,10,10,.75); text-align:center; font-size:14px; line-height:1.35; color:var(--gray-100); font-variant-numeric:tabular-nums}
.vcam-status:empty{display:none}

.vcam-src{display:flex; justify-content:center; gap:8px; padding:2px 12px}
/* Camera blocked: the picture area offers the phone camera and library, so don't repeat them or show a dead shutter. */
.vcam.off .vcam-src,.vcam.off .vcam-shut{visibility:hidden}
.vcam-bar{display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; padding:8px 12px 12px}
.vcam-end{display:flex; justify-content:flex-end; min-width:0}
.vcam-pill{display:inline-flex; align-items:center; gap:6px; min-height:44px; max-width:100%; padding:0 12px; border:0; border-radius:var(--radius-pill); background:rgba(255,255,255,.12); font-size:14px; white-space:nowrap}
.vcam-pill span{overflow:hidden; text-overflow:ellipsis}
.vcam-pill.big{justify-content:center; min-height:52px; font-size:16px; font-weight:500}
.vcam-pill.bad{background:#f97066; color:var(--gray-950); font-weight:600}
.vcam-shut{width:76px; height:76px; border-radius:50%; border:4px solid var(--gray-100); background:var(--gray-100); box-shadow:inset 0 0 0 3px var(--gray-950); transition:transform .12s var(--spring)}
.vcam-shut:active:not(:disabled){transform:scale(.9)}
.vcam-done{min-height:52px; padding:0 18px; border:0; border-radius:var(--radius-pill); background:var(--gray-100); color:var(--gray-950) !important; font-weight:600; font-size:16px; font-variant-numeric:tabular-nums; white-space:nowrap}
.vcam.busy .vcam-tray{opacity:.6}
.vcam.busy .vcam-done{opacity:1}
.vcam.busy .vcam-done::before{content:""; display:inline-block; width:14px; height:14px; margin-right:8px; vertical-align:-2px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:vcam-spin .8s linear infinite}
/* Undo is drawn 32px tall; ::after stretches its tap area to 44px. */
.vcam-undo{position:relative; min-height:32px; margin-left:6px; padding:0 10px; border:0; border-radius:var(--radius-pill); background:var(--gray-100); color:var(--gray-950) !important; font-weight:600; font-size:14px}
.vcam-undo::after{content:""; position:absolute; inset:-6px -4px}

.vcam-ask{position:absolute; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); padding:16px; border-radius:var(--radius-lg); background:var(--gray-900); box-shadow:0 8px 40px rgba(0,0,0,.6); text-align:center}
.vcam-ask[hidden]{display:none}
.vcam-ask p{margin:0 0 12px; font-size:16px; font-weight:500}
.vcam-ask div{display:flex; gap:10px; justify-content:center}
.vcam-ask .vcam-pill{flex:1; justify-content:center; font-size:16px}

@media (prefers-reduced-motion: reduce){
  .vcam-shut{transition:none}
  .vcam-flash.go,.vcam-ring.go{animation:none}
  .vcam-th[data-st="wait"]::after,.vcam-st,.vcam.busy .vcam-done::before{animation-duration:2.4s !important}
}

/* Photos tab (ADR-0465): room chips that stay picked, the room's before photos to match the angle, and one wide Done. */
.vcam-chips{display:flex; gap:8px; padding:6px 12px 2px; overflow-x:auto; scrollbar-width:none; overscroll-behavior-x:contain}
.vcam-chips::-webkit-scrollbar{display:none}
.vcam-chip{flex:none; min-height:44px; padding:0 14px; border:1px solid rgba(255,255,255,.28); border-radius:var(--radius-pill); background:transparent; font-size:15px; font-weight:500; white-space:nowrap}
.vcam-chips.need .vcam-chip{border-color:var(--gray-100); animation:vcam-need .5s ease 2}
@keyframes vcam-need{50%{transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.vcam-chips.need .vcam-chip{animation:none}}
.vcam-chip[aria-checked="true"]{background:var(--gray-100); border-color:var(--gray-100); color:var(--gray-950) !important}
.vcam-ref{display:flex; align-items:center; gap:6px; padding:6px 12px 0; overflow-x:auto; scrollbar-width:none}
.vcam-ref small{flex:none; color:var(--gray-400); font-size:13px; margin-right:2px}
.vcam-ref img{flex:none; width:44px; height:44px; border-radius:var(--radius-sm,6px); object-fit:cover; opacity:.9}
.vcam-endrow{padding:0 12px 12px}
.vcam-done.wide{width:100%; min-height:56px; font-size:17px}
