#chatCamera{position:fixed;inset:0;z-index:13000;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:#080b0f;color:#fff;font:15px/1.4 system-ui,-apple-system,sans-serif;isolation:isolate;overscroll-behavior:contain;box-sizing:border-box;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));touch-action:manipulation}
#chatCamera[hidden],#chatCamera [hidden]{display:none!important}
/* Reset native dialog dimensions so modal capture fills the entire viewport. */
dialog#chatCamera{width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;overflow:hidden}
dialog#chatCamera::backdrop{background:#080b0f}
#chatCamera *{box-sizing:border-box}
#chatCamera button{color:#fff;background:transparent;border:0;cursor:pointer;min-width:48px;min-height:48px;padding:12px;font:inherit;display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:999px;-webkit-tap-highlight-color:transparent}
#chatCamera button:focus-visible{outline:3px solid #3ab6ff;outline-offset:3px}
#chatCamera button:disabled{opacity:.45;cursor:default}
#chatCamera svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
#chatCamera .captureTop{display:grid;grid-template-columns:48px 1fr 48px;align-items:center;min-height:56px;gap:8px;z-index:1}
#chatCamera [data-status]{text-align:center;font-size:13px;line-height:1.4;font-weight:600;padding:6px 0}
#chatCamera .captureStage{position:relative;overflow:hidden;min-height:0;display:grid;place-items:center;border-radius:16px;background:#000}
#chatCamera .captureStage video,#chatCamera .captureStage img{position:absolute;width:100%;height:100%;object-fit:contain}
#chatCamera .captureLiveFrame{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;width:100%;height:100%;touch-action:none}
#chatCamera .captureLiveFrame video{inset:0;transform-origin:center;pointer-events:none}
#chatCamera .captureZoom{margin:0 0 8px}
#chatCamera .captureZoomPresets{display:flex;justify-content:center;gap:12px}
#chatCamera .captureZoomPresets button{min-width:44px;min-height:44px;padding:8px;background:#20262c;font-size:14px;font-weight:700}
#chatCamera .captureZoomPresets button[aria-pressed=true]{background:#087dca;color:#fff;box-shadow:inset 0 0 0 1px #76cfff}
#chatCamera .captureZoomRange{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:10px;align-items:center;max-width:300px;margin:auto}
#chatCamera .captureZoomRange input{width:100%;min-width:0;min-height:36px;margin:0;padding:0;accent-color:#159dff;touch-action:pan-x}
#chatCamera .captureZoomRange output{text-align:center;font-size:13px;font-variant-numeric:tabular-nums;color:#a7deff}
#chatCamera[data-preview=true] .captureLiveFrame{display:none}
#chatCamera [data-photo],#chatCamera [data-playback],#chatCamera .captureReview{display:none}
#chatCamera .captureBottom{padding:10px 12px 0;max-width:480px;width:100%;justify-self:center}
#chatCamera .captureModes{display:flex;gap:8px;justify-content:center;margin-bottom:12px}
#chatCamera .captureModes button{min-height:40px;padding:8px 23px;font-size:14px;font-weight:700;color:#c7cdd4}
#chatCamera .captureModes button[aria-pressed=true]{background:#163648;color:#7ed2ff}
#chatCamera .captureActions{display:grid;grid-template-columns:1fr 88px 1fr;align-items:center;justify-items:center;gap:28px}
#chatCamera [data-gallery],#chatCamera [data-flip]{background:#20262c;width:50px;height:50px;padding:12px}
#chatCamera [data-shutter]{width:78px;height:78px;padding:5px;border:4px solid #fff;background:transparent}
#chatCamera [data-shutter] span{display:block;width:100%;height:100%;border-radius:50%;background:#fff;transition:border-radius .15s,transform .15s}
#chatCamera[data-mode=video] [data-shutter] span{background:#4998ff;transform:scale(.78)}
#chatCamera[data-recording=true] [data-shutter] span{border-radius:8px;transform:scale(.55)}
#chatCamera[data-recording=true] [data-status]{color:#69aaff;font-variant-numeric:tabular-nums}
#chatCamera [data-hint]{text-align:center;font-size:12px;color:#bec7d0;margin:12px 0 4px;min-height:18px}
#chatCamera[data-preview=true] [data-live],#chatCamera[data-preview=true] .captureBottom{display:none}
#chatCamera[data-preview=true][data-kind=image] [data-photo],#chatCamera[data-preview=true][data-kind=video] [data-playback]{display:block}
#chatCamera[data-preview=true] .captureReview{display:flex;justify-content:space-between;gap:24px;padding:18px 8px 4px;width:100%;max-width:600px;justify-self:center}
#chatCamera [data-send]{background:#078de2;padding:12px 24px;font-weight:750}
#chatCamera [data-retake]{background:#20262c;padding:12px 20px}
#chatCamera .captureError{position:relative;z-index:1;display:grid;gap:12px;padding:20px;text-align:center;pointer-events:none}
#chatCamera .captureError button{background:#243442;max-width:280px;pointer-events:auto}
@media(orientation:landscape) and (max-height:600px){#chatCamera{grid-template-columns:1fr 170px;grid-template-rows:auto minmax(0,1fr);column-gap:10px}#chatCamera .captureTop{grid-column:1/3;min-height:44px}#chatCamera .captureStage{grid-column:1}#chatCamera .captureBottom{grid-column:2;grid-row:2;align-self:center;padding:4px}#chatCamera .captureActions{grid-template-columns:1fr 1fr;gap:8px}#chatCamera [data-shutter]{grid-row:1;grid-column:1/3}#chatCamera[data-preview=true] .captureReview{grid-column:2;grid-row:2;flex-direction:column;justify-content:center;padding:6px;gap:16px}#chatCamera .captureModes{gap:0}#chatCamera .captureModes button{padding:8px 14px}}

#chatCamera [data-live]:not(.frameReady){visibility:hidden!important;}
#chatCamera [data-live]::-webkit-media-controls,#chatCamera [data-live]::-webkit-media-controls-start-playback-button,#chatCamera [data-live]::-webkit-media-controls-overlay-play-button{display:none!important;-webkit-appearance:none;}
html.vobixInstalled #chatCamera{padding-top:max(12px,var(--vobix-safe-top,28px));padding-bottom:max(40px,var(--vobix-safe-bottom,40px));}
#chatCamera .captureReview{padding-bottom:12px;}
@media(orientation:landscape) and (max-height:600px){
 #chatCamera .captureZoomRange,#chatCamera [data-hint]{display:none}
 #chatCamera .captureZoomPresets{gap:8px}
 #chatCamera .captureModes{margin-bottom:6px}
 #chatCamera .captureActions{grid-template-columns:1fr 64px 1fr;gap:4px}
 #chatCamera [data-shutter]{grid-row:auto;grid-column:auto;width:64px;height:64px}
 #chatCamera [data-gallery],#chatCamera [data-flip]{width:44px;height:44px;min-width:44px;min-height:44px}
}

/* 20261009.media2 — approved camera: image first, compact controls. */
#chatCamera {
  grid-template-rows:minmax(0,1fr) auto;padding:0;
  padding-bottom:max(8px,env(safe-area-inset-bottom));
  -webkit-text-size-adjust:100%;
}
html.vobixInstalled #chatCamera {padding-top:0;padding-bottom:max(16px,var(--vobix-safe-bottom,32px));}
#chatCamera .captureTop {
  position:absolute;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));
  top:max(8px,env(safe-area-inset-top));z-index:3;min-height:44px;
  grid-template-columns:44px minmax(0,1fr) 44px;
}
html.vobixInstalled #chatCamera .captureTop {top:max(8px,var(--vobix-safe-top,28px));}
#chatCamera .captureTop [data-close] {width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;background:#151b24aa;}
#chatCamera [data-status]:not(:empty) {background:#151b24c9;border-radius:22px;padding:8px 12px;color:#fff;font-size:12px;}
#chatCamera .captureStage {grid-row:1;border-radius:0 0 22px 22px;min-height:0;}
#chatCamera .captureZoom {position:absolute;bottom:14px;left:50%;transform:translateX(-50%);z-index:2;margin:0;}
#chatCamera .captureZoomPresets {display:flex;gap:2px;padding:3px;border-radius:999px;background:#141b23bc;backdrop-filter:blur(12px);}
#chatCamera .captureZoomPresets button {width:42px;height:42px;min-width:42px;min-height:42px;background:transparent;padding:7px;font-size:13px;}
#chatCamera .captureZoomPresets button[aria-pressed=true] {background:#078df4;box-shadow:inset 0 0 0 1px #8bd4ff;}
#chatCamera .captureZoomRange {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:-1px;}
#chatCamera .captureZoomRange:focus-within {position:relative;width:180px;height:auto;clip-path:none;margin:8px auto 0;background:#141b23df;border-radius:12px;padding:0 8px;}
#chatCamera .captureBottom {grid-row:2;padding:8px 16px 4px;max-width:430px;}
#chatCamera .captureModes {margin:0 0 8px;gap:4px;}
#chatCamera .captureModes button {min-height:36px;padding:7px 22px;font-size:13px;}
#chatCamera .captureModes button[aria-pressed=true] {background:#078df4;color:white;}
#chatCamera .captureActions {grid-template-columns:1fr 76px 1fr;gap:20px;}
#chatCamera [data-shutter] {width:72px;height:72px;min-width:72px;min-height:72px;border-width:3px;padding:4px;}
#chatCamera [data-gallery],#chatCamera [data-flip] {width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;}
#chatCamera [data-hint] {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:-1px;}
#chatCamera .captureReview {grid-row:2;align-items:center;max-width:430px;gap:16px;padding:14px 16px 6px;}
#chatCamera [data-send],#chatCamera [data-retake] {min-height:44px;padding:10px 18px;font-size:14px;}
@media(orientation:landscape) and (max-height:600px) {
 #chatCamera {grid-template-columns:minmax(0,1fr) 152px;grid-template-rows:minmax(0,1fr);padding:0 max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));}
 html.vobixInstalled #chatCamera {padding-bottom:max(12px,var(--vobix-safe-bottom,32px));}
 #chatCamera .captureTop {right:168px;grid-column:1;}
 #chatCamera .captureStage {grid-column:1;grid-row:1;border-radius:0 0 18px 18px;}
 #chatCamera .captureBottom {grid-column:2;grid-row:1;align-self:center;padding:4px;}
 #chatCamera .captureActions {grid-template-columns:1fr 1fr;gap:12px;}
 #chatCamera [data-shutter] {grid-column:1/3;grid-row:1;}
 #chatCamera .captureModes button {padding:7px 14px;}
 #chatCamera .captureZoom {bottom:10px;}
 #chatCamera[data-preview=true] .captureReview {grid-column:2;grid-row:1;align-self:center;padding:8px;flex-direction:column;}
}

/* Live camera fills the display; controls float over the image. */
#chatCamera, html.vobixInstalled #chatCamera {display:block;padding:0;}
#chatCamera .captureStage {position:absolute;inset:0;border-radius:0;}
#chatCamera .captureLiveFrame {width:100%;height:100%;}
#chatCamera .captureLiveFrame video {object-fit:cover;}
#chatCamera .captureTop {grid-template-columns:44px minmax(0,1fr) auto;}
#chatCamera [data-flash] {background:#12192380;padding:8px 12px;min-height:44px;gap:5px;font-size:11px;}
#chatCamera [data-flash][aria-pressed=true] {color:#ffe38b;}
#chatCamera .captureBottom, #chatCamera .captureReview {
 position:absolute;bottom:0;left:0;right:0;z-index:2;max-width:none;
 padding:34px 20px max(16px,env(safe-area-inset-bottom));
 background:linear-gradient(transparent,rgba(5,12,20,.30) 38%,rgba(5,12,20,.62));
 text-shadow:0 1px 4px #0008;
}
html.vobixInstalled #chatCamera .captureBottom, html.vobixInstalled #chatCamera .captureReview {padding-bottom:max(16px,var(--vobix-safe-bottom,32px));}
#chatCamera .captureModes, #chatCamera .captureActions {max-width:380px;margin-left:auto;margin-right:auto;}
#chatCamera .captureModes button {color:#fff;background:#12192352;}
#chatCamera [data-gallery], #chatCamera [data-flip], #chatCamera [data-retake] {background:#12192380;}
#chatCamera .captureZoom {bottom:calc(172px + env(safe-area-inset-bottom));}
html.vobixInstalled #chatCamera .captureZoom {bottom:calc(172px + var(--vobix-safe-bottom,32px));}
#chatCamera[data-screen-flash=true]::after {content:'';position:absolute;inset:0;box-shadow:inset 0 0 0 15vmin white;z-index:1;pointer-events:none;}
#chatCamera [data-live]:not(.frameReady) {visibility:visible!important;opacity:0;}
@media(orientation:landscape) and (max-height:600px) {
 #chatCamera .captureTop {right:180px;}
 #chatCamera .captureBottom, #chatCamera[data-preview=true] .captureReview {left:auto;right:0;top:0;bottom:0;width:172px;display:flex;flex-direction:column;justify-content:center;padding:16px 16px 16px 28px;background:linear-gradient(90deg,transparent,rgba(5,12,20,.55));}
 #chatCamera .captureZoom, html.vobixInstalled #chatCamera .captureZoom {bottom:max(20px,calc(var(--vobix-safe-bottom,env(safe-area-inset-bottom,0px)) + 8px));left:calc(50% - 70px);}
 #chatCamera .captureModes {order:2;margin-top:12px;}
}

#chatCamera[data-preview=true] .captureReview {display:grid;grid-template-columns:auto 44px auto;align-items:center;gap:10px;}
#chatCamera .captureReview [data-once] {width:44px;height:44px;min-width:44px;padding:0;font-size:27px;background:#12192380;border:1px solid #ffffff80;}
#chatCamera .captureReview [data-once][aria-pressed=true] {background:#078df4;border-color:#b8eaff;color:#fff;}
#chatCamera[data-single-view-options=false] .captureReview {grid-template-columns:auto auto;}
@media(orientation:landscape) and (max-height:600px) {#chatCamera[data-preview=true] .captureReview {grid-template-columns:1fr;align-content:center;justify-items:center;}}

/* Full-screen live framing, shared by the saved photo and video crop. */
#chatCamera .captureLiveFrame video{object-fit:cover;}
@layer vobixLight {
 body #chatCamera{background:#080b0f!important;color:#fff!important;}
 body #chatCamera button{background:#17212cba!important;color:#fff!important;box-shadow:none!important;border:0!important;font:500 14px/1.3 system-ui!important;}
 body #chatCamera button :is(span,svg){color:inherit!important;}
 body #chatCamera .captureModes button{background:transparent!important;}
 body #chatCamera .captureModes button[aria-pressed=true]{background:#087fe4!important;}
 body #chatCamera .captureZoomPresets button{background:transparent!important;font-size:13px!important;}
 body #chatCamera .captureZoomPresets button[aria-pressed=true]{background:#087fe4!important;box-shadow:inset 0 0 0 1px #a6d9ff!important;}
 body #chatCamera [data-shutter]{background:transparent!important;border:3px solid #fff!important;}
 body #chatCamera [data-shutter] span{background:#fff!important;}
 body #chatCamera[data-mode=video] [data-shutter] span{background:#4998ff!important;}
 body #chatCamera [data-send]{background:#087fe4!important;}
 body #chatCamera [data-flash]{font-size:12px!important;}
 body #chatCamera [data-status]{color:#fff!important;}
}

/* Keep feedback below the controls instead of squeezing it into a narrow column. */
#chatCamera .captureTop{grid-template-columns:44px minmax(0,1fr) auto;align-items:start;}
#chatCamera .captureTop [data-close]{grid-column:1;grid-row:1;}
#chatCamera .captureTop [data-flash]{grid-column:3;grid-row:1;max-width:180px;}
#chatCamera .captureTop [data-status]{grid-column:1/-1;grid-row:2;min-width:0;max-width:360px;justify-self:center;overflow-wrap:break-word;}
#chatCamera .captureTop [data-status]:empty{display:none;}
#chatCamera .captureTop [data-status]:not(:empty){font:500 13px/1.4 system-ui!important;max-height:84px;overflow:auto;margin-top:6px;}

/* Review the photo/video edge to edge, with the send arrow in its own circle. */
#chatCamera[data-preview=true] .captureReview{grid-template-columns:minmax(0,1fr) 44px 56px;max-width:none;gap:12px;align-items:center}
#chatCamera[data-preview=true][data-single-view-options=false] .captureReview{grid-template-columns:minmax(0,1fr) 56px}
#chatCamera[data-preview=true] [data-retake]{justify-self:start;border-radius:24px;gap:8px;padding:10px 14px}
#chatCamera[data-preview=true] [data-send]{display:grid;place-items:center;width:56px;height:56px;min-width:56px;padding:14px;border-radius:50%;justify-self:end}
#chatCamera[data-preview=true] [data-send] span{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#chatCamera[data-preview=true] [data-send] svg{width:27px;height:27px}
#chatCamera[data-preview=true] [data-photo],#chatCamera[data-preview=true] [data-playback]{object-fit:contain!important;background:#080b0f}
@media(orientation:landscape) and (max-height:600px){
 #chatCamera[data-preview=true] .captureReview,#chatCamera[data-preview=true][data-single-view-options=false] .captureReview{grid-template-columns:1fr;justify-items:center;gap:18px}
 #chatCamera[data-preview=true] :is([data-send],[data-retake]){justify-self:center}
}
@layer vobixLight{body #chatCamera[data-preview=true] [data-send]{border-radius:50%!important;background:#087fe4!important;padding:14px!important}}
