.ratlab-camera { position:fixed; inset:0; width:100%; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; background:#080a0c; color:#fff; letter-spacing:0; font-family:system-ui,sans-serif; }
.ratlab-camera button,.ratlab-camera select,.ratlab-camera input { font:inherit; }
.ratlab-camera[open] { display:grid; grid-template-rows:auto minmax(140px,1fr) auto; }
.ratlab-camera::backdrop { background:#000; }
.ratlab-camera [hidden] { display:none !important; }
.ratlab-camera header { display:flex; align-items:center; justify-content:space-between; padding: max(8px,env(safe-area-inset-top)) 16px 8px; gap:12px; }
.ratlab-camera button { min-height:44px; min-width:44px; border:1px solid #42484d; border-radius:6px; background:#202428; color:#fff; cursor:pointer; }
.ratlab-camera button:disabled { opacity:.45; cursor:default; }
.ratlab-camera button:focus-visible, .ratlab-camera input:focus-visible, .ratlab-camera select:focus-visible { outline:2px solid #fff; outline-offset:3px; }
.ratlab-camera header button { font-size:24px; }
.ratlab-camera-stage { min-height:0; overflow:hidden; display:flex; justify-content:center; background:#000; }
.ratlab-camera-stage canvas,.ratlab-camera-stage img,.ratlab-camera-stage video[data-review] { width:auto; height:100%; max-width:100%; object-fit:contain; aspect-ratio:9/16; }
.ratlab-camera [data-source] { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.ratlab-camera-controls { padding:8px 16px max(12px,env(safe-area-inset-bottom)); width:min(100%,640px); box-sizing:border-box; margin:auto; max-height:48dvh; overflow:auto; }
.ratlab-camera-controls p { margin:0 0 8px; font-size:14px; }
.ratlab-camera [data-settings] { display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; align-items:center; }
.ratlab-camera label { display:flex; gap:8px; align-items:center; font-size:14px; min-width:0; }
.ratlab-camera select { min-width:0; width:100%; min-height:40px; color:#fff; background:#202428; border:1px solid #42484d; border-radius:4px; }
.ratlab-camera-modes { display:flex; gap:4px; }
.ratlab-camera-modes button { flex:1; }
.ratlab-camera-modes [aria-pressed=true] { border-color:#fa234b; background:#4b1422; }
.ratlab-camera-adjust { grid-column:1/-1; display:flex; gap:16px; }
.ratlab-camera-adjust label { flex:1; }
.ratlab-camera input[type=range] { width:100%; min-width:0; accent-color:#fa234b; }
.ratlab-camera-actions { display:flex; justify-content:center; gap:12px; margin-top:8px; }
.ratlab-camera-actions button:not([data-capture]) { padding:8px 20px; }
.ratlab-camera button[data-capture] { width:56px; height:56px; border-radius:50%; background:#fff; border:4px solid #444; padding:4px; }
.ratlab-camera [data-capture] span { display:block; width:100%; height:100%; border-radius:50%; background:#fa234b; }
.ratlab-camera [data-capture].is-recording span { border-radius:3px; transform:scale(.65); }
.ratlab-camera [data-use] { background:#db1237; border-color:#db1237; }
@media (min-width:700px) and (orientation:landscape) {
 .ratlab-camera[open] { grid-template-columns:minmax(0,1fr) 320px; grid-template-rows:auto minmax(0,1fr); }
 .ratlab-camera header { grid-column:1/-1; }
 .ratlab-camera-controls { max-height:100%; width:100%; padding:16px; }
 .ratlab-camera [data-settings] { grid-template-columns:1fr; }
 .ratlab-camera-adjust { flex-direction:column; }
}
@media (max-height:480px) and (max-width:699px) {
 .ratlab-camera[open] { grid-template-columns:minmax(0,1fr) minmax(200px,45%); grid-template-rows:auto minmax(0,1fr); }
 .ratlab-camera header { grid-column:1/-1; }
 .ratlab-camera-controls { max-height:100%; }
 .ratlab-camera [data-settings] { grid-template-columns:1fr; }
 .ratlab-camera-adjust { flex-direction:column; }
}
