.context-r8-controls{position:absolute;z-index:7;top:75px;left:23px;right:83px;width:min(590px,calc(100% - 106px));display:grid;gap:7px;pointer-events:auto}
.context-r8-controls[hidden],.context-r8-stage[hidden],.context-r8-controls [hidden],.context-r8-stage [hidden]{display:none!important}
.context-r8-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:4px;border:1px solid #dce5cc;border-radius:10px;background:#fafff2f2;box-shadow:0 3px 18px #13200d24;backdrop-filter:blur(8px)}
.context-r8-tabs button{min-height:36px;padding:8px 9px;border-radius:6px;color:#526343;font-size:11px;font-weight:650;line-height:1.3;overflow-wrap:anywhere}
.context-r8-tabs button[aria-pressed=true]{background:#abd329;color:#1b270e}
.context-r8-tabs button:hover{background:#edf4da}.context-r8-tabs button[aria-pressed=true]:hover{background:#bedf43}
.context-r8-cameras{display:flex;gap:5px;flex-wrap:wrap}
.context-r8-cameras button,.context-r8-map{min-height:32px;border:1px solid #d2dec1;border-radius:6px;padding:7px 11px;background:#fbfff2f0;color:#40552c;font-size:10px;font-weight:600;line-height:1.4;box-shadow:0 2px 8px #11200d14}
.context-r8-cameras button[aria-pressed=true]{border-color:#7e9b2a;background:#e6f2c7;color:#304510}
.context-r8-map{justify-self:start;background:#172211eb;color:#e0efc5;border-color:#536a3e;box-shadow:none}
.context-r8-map:hover{background:#304923;color:#fff}
.context-r8-actions{display:flex;gap:5px;flex-wrap:wrap}.context-r8-actions a{text-decoration:none;display:inline-flex;align-items:center}
.context-r8-chapters{display:flex;align-items:center;gap:8px;min-width:0;padding:6px 8px;border:1px solid #d5e0c4;border-radius:7px;background:#fafff2f2}.context-r8-chapters>span{flex:0 0 auto;font-size:9px;font-weight:600;color:#5c704a;line-height:1.4}.context-r8-chapters>div{display:flex;gap:4px;flex-wrap:wrap;min-width:0}.context-r8-chapters button{min-height:28px;padding:5px 8px;border:1px solid #bdcea2;border-radius:5px;background:#fff;color:#3d5526;font-size:9px;line-height:1.3;font-weight:600}.context-r8-chapters button[aria-pressed=true]{background:#abd329;border-color:#94b828;color:#24350f}.context-r8-chapters button:hover{background:#eaf4d0}
.context-r8-selector-row{display:flex;gap:8px;align-items:center;padding:7px 9px;border:1px solid #dce5cc;border-radius:7px;background:#fafff2f0;box-shadow:0 2px 10px #13200d14;min-width:0}
.context-r8-selector-row label{font-size:9px;color:#5e7151;flex:0 0 auto}
.context-r8-selector-row select{min-width:0;width:100%;max-width:100%;border:1px solid #c8d5b5;border-radius:5px;padding:7px 27px 7px 8px;background:#fff;color:#283c1e;font:inherit;font-size:10px;font-weight:600;line-height:1.4;min-height:32px}
.context-r8-controls button:focus-visible,.context-r8-selector-row select:focus-visible{outline:2px solid #4d6a20;outline-offset:2px}
.context-r8-stage{position:absolute;z-index:2;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#111710}
.context-r8-image,.context-r8-video{position:absolute;inset:147px 0 96px;width:100%;height:calc(100% - 243px);object-fit:contain;background:#0d120d;display:block}
.context-r8-video{max-width:100%;border:0}
.context-r8-caption{position:absolute;left:23px;right:84px;bottom:100px;display:flex;flex-direction:column;gap:4px;padding:10px 12px;width:fit-content;max-width:calc(100% - 107px);border:1px solid #ffffff2b;border-radius:7px;background:#10190ee8;color:#f4f8ec;pointer-events:none}
.context-r8-caption>span:first-child{font-size:8px;letter-spacing:1.1px;font-weight:700;color:#c6e783}
.context-r8-caption strong{font-size:13px;line-height:1.4;font-weight:600}
.context-r8-caption>span:last-child{font-size:9px;line-height:1.45;max-width:460px;color:#cfdbc2}
.context-r8-video-stage .context-r8-caption{display:none}
.context-r8-message{z-index:1;max-width:min(410px,85%);margin:100px 16px 80px;padding:20px;border:1px solid #596d43;border-radius:8px;color:#e7f2d7;text-align:center;font-size:12px;line-height:1.7;background:#172214}
.context-view .photo-mode-toggle,.context-view .room-dock,.context-view .viewport-bottom,.context-view .walk-pad{display:none!important}
.context-view .context-note{bottom:20px;left:23px;right:84px;max-width:min(650px,calc(100% - 107px));justify-content:space-between;gap:16px}
.context-view .context-note .context-distance>strong{font-size:11px}.context-view .context-note .context-distance>small{font-size:9px}.context-view .context-note .context-distance>span{font-size:9px}
.context-view .context-note button{margin-top:0}
.context-view .toast{bottom:110px}
.context-media-view #model-canvas{visibility:hidden;pointer-events:none}
.context-media-view .vertical-tools #zoom-in,.context-media-view .vertical-tools #zoom-out,.context-media-view .vertical-tools #capture-view,.context-media-view .vertical-tools>span{display:none!important}
.context-media-view .vertical-tools{top:75px}
.context-media-view #render-quality,.context-media-view #view-cut-label{display:none!important}
@media(max-width:1100px){.context-r8-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.context-r8-controls{width:min(440px,calc(100% - 106px))}.context-r8-image,.context-r8-video{inset:204px 0 96px;height:calc(100% - 300px)}}
@media(max-width:900px){.context-r8-controls{top:70px;left:17px;right:77px;width:calc(100% - 94px);max-width:440px}.context-media-view .vertical-tools{top:70px}.context-r8-caption{left:17px;right:77px;max-width:calc(100% - 94px)}.context-view .context-note{left:17px;right:77px;max-width:calc(100% - 94px)}}
@media(max-width:600px){.context-r8-controls{top:112px;left:12px;right:62px;width:calc(100% - 74px);gap:6px}.context-r8-tabs{gap:3px;padding:3px}.context-r8-tabs button{min-height:35px;padding:7px 5px;font-size:10px}.context-r8-cameras{gap:4px}.context-r8-cameras button{padding:6px 8px;font-size:9px;min-height:31px}.context-r8-map{font-size:9px;padding:6px 9px;min-height:30px}.context-r8-selector-row{padding:5px;gap:5px}.context-r8-selector-row label{display:none}.context-r8-selector-row select{font-size:10px;padding:6px 23px 6px 6px;min-height:31px}.context-media-view .vertical-tools{top:112px}.context-r8-image,.context-r8-video{inset:245px 0 126px;height:calc(100% - 371px)}.context-r8-caption{left:12px;right:12px;bottom:104px;max-width:calc(100% - 24px);padding:8px 10px;gap:3px}.context-r8-caption>span:first-child{font-size:7px;letter-spacing:.8px}.context-r8-caption strong{font-size:11px}.context-r8-caption>span:last-child{font-size:8px;line-height:1.4}.context-view .context-note{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));max-width:calc(100% - 24px);padding:9px 10px;gap:8px;align-items:center;flex-wrap:nowrap}.context-view .context-note .context-distance{min-width:0;max-width:none}.context-view .context-note .context-distance>strong{font-size:10px}.context-view .context-note .context-distance>small{font-size:8px;line-height:1.4}.context-view .context-note .context-distance>span{font-size:8px;line-height:1.4}.context-view .context-note button{font-size:9px;min-height:32px;padding:6px 8px;white-space:normal;max-width:93px;flex:0 0 93px}.context-view .context-note button span{font-size:12px;margin-left:2px}.context-view .toast{bottom:116px}}
@media(max-height:620px) and (min-width:601px){.context-r8-controls{top:65px}.context-r8-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}.context-r8-tabs button{font-size:9px;min-height:31px;padding:6px}.context-r8-cameras button,.context-r8-map{min-height:27px;padding:5px 8px}.context-r8-image,.context-r8-video{inset:139px 0 83px;height:calc(100% - 222px)}.context-r8-caption{bottom:86px;padding:7px 9px;gap:2px}.context-r8-caption>span:last-child{display:none}.context-view .context-note{bottom:12px;padding:7px 10px}.context-view .context-note .context-distance>small{display:none}}

/* R20: the real-video controls stay outside the image, with usable touch targets. */
.context-r8-controls{width:auto;max-width:none;right:78px;gap:8px}
.context-r8-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
.context-r8-tabs button{font-size:12px;min-height:38px}
.context-r8-selector-row{padding:5px 9px}.context-r8-selector-row label{font-size:11px}.context-r8-selector-row select{font-size:12px;min-height:34px}
.context-r8-chapters{padding:7px 9px;gap:10px}.context-r8-chapters>span{font-size:10px}.context-r8-chapters>div{flex:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.context-r8-chapters button{font-size:11px;min-height:38px;padding:7px 5px}
.context-media-view .context-r8-stage{top:var(--context-content-top,240px);bottom:84px;left:16px;right:16px;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;border-radius:10px;background:#0d120d;align-items:stretch;justify-content:stretch}
.context-media-view .context-r8-image,.context-media-view .context-r8-video{position:static;inset:auto;width:100%;height:100%;min-height:0;max-height:100%;object-fit:contain;grid-row:1}
.context-media-view .context-r8-caption{position:static;inset:auto;grid-row:2;width:auto;max-width:none;padding:9px 12px;gap:2px;border-radius:6px;background:#192313}
.context-media-view .context-r8-caption>span:last-child{max-width:none;font-size:10px}.context-media-view .context-r8-caption strong{font-size:13px}
.context-media-view .context-r8-video-stage{grid-template-rows:minmax(0,1fr) auto}
.context-r20-transport{grid-row:2;padding:10px 12px;border:1px solid #39482b;background:#16200f;color:#eaf3dc;border-radius:8px;display:grid;gap:7px}
.context-r20-timeline-row{display:flex;align-items:center;gap:12px;min-width:0}
.context-r20-timeline{flex:1;min-width:0;height:26px;margin:0;accent-color:#b4d840;cursor:pointer;touch-action:pan-y}
.context-r20-time{font-size:12px;font-variant-numeric:tabular-nums;min-width:86px;text-align:right;white-space:nowrap}
.context-r20-transport-actions{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}
.context-r20-transport button{min-height:36px;padding:7px 14px;border:1px solid #5f7345;border-radius:6px;background:#2a391d;color:#f2f7e9;font:600 12px system-ui;cursor:pointer}
.context-r20-transport button:nth-child(2){min-width:114px;background:#b4d840;color:#17210f;border-color:#b4d840}
.context-r20-transport button:focus-visible,.context-r20-timeline:focus-visible{outline:3px solid #c8e889;outline-offset:2px}
.context-r20-playback-status{font-size:11px;line-height:1.3;color:#d5e3c4}
.context-media-view .context-r8-message{position:absolute;z-index:3;align-self:center;justify-self:center;margin:0;background:#172214f5}
@media(max-width:900px){.context-r8-controls{left:14px;right:64px;width:auto;max-width:none}.context-r8-tabs button{padding:7px 4px;font-size:10px}.context-r8-chapters button{font-size:10px}.context-media-view .context-r8-stage{left:12px;right:12px}}
@media(max-width:600px){.context-r8-controls{top:110px;left:10px;right:10px;gap:6px;width:auto}.context-r8-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}.context-r8-tabs button{font-size:10px;min-height:39px}.context-r8-chapters{display:block;padding:6px}.context-r8-chapters>span{display:none}.context-r8-chapters>div{gap:4px}.context-r8-chapters button{font-size:9px;min-height:38px;padding:6px 3px;line-height:1.3}.context-r8-selector-row{padding:4px 6px}.context-r8-selector-row select{font-size:11px;min-height:32px}.context-r8-actions{gap:4px}.context-r8-map{font-size:9px;min-height:28px;padding:5px 8px}.context-media-view .context-r8-stage{left:8px;right:8px;bottom:96px;gap:5px}.context-media-view .context-r8-caption{padding:7px 9px}.context-media-view .context-r8-caption>span:last-child{font-size:9px}.context-media-view .context-r8-caption strong{font-size:11px}.context-r20-transport{padding:7px 9px;gap:3px}.context-r20-transport button{font-size:11px;min-height:36px;padding:6px 12px}.context-r20-time{font-size:11px;min-width:76px}.context-r20-playback-status{font-size:10px;width:100%;text-align:center}.context-r20-playback-status:empty{display:none}.context-media-view .vertical-tools{top:70px}.context-view .context-note{padding:7px 9px}}
@media(max-height:620px) and (min-width:601px){.context-r8-controls{top:58px;gap:4px}.context-r8-tabs button{min-height:28px;font-size:10px;padding:4px}.context-r8-selector-row{padding:3px 8px}.context-r8-selector-row select{min-height:28px;padding:3px 23px 3px 7px}.context-r8-chapters{padding:3px 8px}.context-r8-chapters button{min-height:28px;padding:4px;font-size:10px}.context-r8-actions{display:none}.context-media-view .context-r8-stage{bottom:60px;gap:3px}.context-r20-transport{padding:4px 9px;gap:2px}.context-r20-transport button{min-height:28px;padding:3px 10px}.context-r20-timeline{height:20px}.context-view .context-note{bottom:6px}}

/* R21: no fixed footer may cover the playback buttons or the seek slider. */
.context-video-view .context-note{display:none!important}
.context-media-view.context-video-view .context-r8-stage{z-index:6;bottom:max(12px,env(safe-area-inset-bottom))}
.context-video-view .context-r8-actions{display:flex}
.context-video-view .context-r20-transport{position:relative;z-index:2;flex-shrink:0}
.context-video-view .context-r20-transport button{min-height:44px;touch-action:manipulation}
.context-video-view .context-r20-timeline{height:32px;touch-action:none}
.context-video-view .context-r8-message{pointer-events:none}
.context-video-view .context-r20-playback-status:not(:empty){flex-basis:100%;text-align:center}
@media(max-height:620px){.context-video-view .context-r20-transport{padding:4px 8px;gap:3px}.context-video-view .context-r20-transport button{min-height:38px}.context-video-view .context-r20-timeline{height:24px}}
