#recordings-page{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;background:#000;color:#fff;overflow:auto;overscroll-behavior:contain;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
#gallery-toolbar{position:sticky;top:0;z-index:2;display:flex;justify-content:flex-end;gap:8px;max-width:1438px;height:0;margin:0 auto;overflow:visible}
#gallery-toolbar button{align-self:flex-start;margin-top:12px;padding:6px 10px;min-height:32px;border:1px solid #555;background:#080808e8;color:#fff;border-radius:5px;font:12px Arial;white-space:nowrap}
#gallery-toolbar button:last-child{margin-right:12px}
#gallery-toolbar #gallery-delete-selected{border-color:#b22;background:#771717;color:#fff}
#gallery-toolbar button:disabled{opacity:.5;cursor:not-allowed}
#gallery-help{max-width:1438px;margin:48px auto -42px;padding:0 5.1%;color:#aaa;font:12px/1.4 Arial,sans-serif}
#gallery-layout{max-width:1438px;margin:0 auto;padding:26px 5.1% 36px;display:grid;grid-template-columns:minmax(0,1fr);gap:62px;align-items:start}
.gallery-section{min-width:0}
.gallery-section h2{margin:0 0 14px;padding:0;border:0;color:#fff;font:normal clamp(28px,6.9vw,46px)/1.1 Arial,sans-serif;letter-spacing:-1px}
.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:clamp(12px,2.6vw,34px);row-gap:clamp(16px,4.2vw,28px)}
#gallery-videos{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px clamp(16px,4.3vw,32px)}
.gallery-segment-divider{margin:18px 0 14px;border-top:3px dashed #e8e8e8}
.gallery-segment-overlay h3{margin:0 0 10px;color:#e5e5e5;font:600 13px/1.3 Arial,sans-serif;letter-spacing:.03em}
.gallery-segments{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.gallery-segment{min-width:0;margin:0;color:#ddd;font:11px/1.3 Arial,sans-serif}
.gallery-segment-preview{position:relative;width:100%;aspect-ratio:16/9;background:#111;overflow:hidden}
.gallery-segment-preview img{display:block;width:100%;height:100%;object-fit:cover}
.gallery-segment-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:#aaa;background:#101010;font:10px Arial,sans-serif}
.gallery-segment figcaption{margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#gallery-segment-waiting{margin:8px 0;color:#aaa;font:12px/1.4 Arial,sans-serif}
button.gallery-thumb{display:block;position:relative;width:100%;height:0;min-height:0;margin:0;padding:0 0 56.25%;border:0;border-radius:0;background:#0b0b0b;overflow:hidden;cursor:pointer;touch-action:manipulation}
.gallery-thumb img{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:100%;height:100%;object-fit:cover}
.gallery-thumb:hover{outline:1px solid #ddd;outline-offset:2px}
.gallery-thumb.is-selected{outline:3px solid #33d5ff;outline-offset:-3px}
.gallery-select-check{position:absolute;top:7px;left:7px;z-index:2;display:grid;place-items:center;width:28px;height:28px;border:2px solid #fff;border-radius:50%;background:#111b;color:#fff;font:bold 19px/1 Arial;box-shadow:0 1px 5px #000}
.gallery-thumb.is-selected .gallery-select-check{background:#087fa0}
.gallery-thumb:focus-visible{outline:2px solid #4bd6ff;outline-offset:3px}
.gallery-play{position:absolute;right:7px;bottom:6px;padding:3px 6px;border-radius:50%;background:#000a;color:#fff;font:16px Arial;z-index:1}
.gallery-no-poster{position:absolute;top:40%;left:0;width:100%;color:#aaa;font:14px Arial;text-align:center}
.gallery-empty{margin:20px 0;color:#aaa;font:14px/1.5 Arial}
#gallery-status{max-width:1438px;margin:0 auto;padding:0 5.1% 24px;color:#aaa;font:12px/1.5 Arial}
#gallery-viewer{z-index:70;width:calc(100vw - 32px);max-width:1200px;background:#000;color:white;border:1px solid #555;padding:12px;overflow:auto}
#gallery-viewer-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
#gallery-viewer-title{font:14px Arial;overflow-wrap:anywhere;min-width:0}
#gallery-viewer button,#gallery-download{display:inline-block;min-height:36px;padding:8px 12px;background:#111;color:#fff;border:1px solid #666;border-radius:4px;font:14px Arial;text-decoration:none;cursor:pointer}
#gallery-viewer img,#gallery-viewer video{position:static!important;display:block;width:100%!important;height:auto!important;min-height:0!important;max-height:75vh;object-fit:contain;background:#000}
#gallery-viewer-foot{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:12px}
#gallery-viewer-status{font:12px Arial;text-align:center;color:#bbb}
@media(orientation:landscape){#gallery-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:6.8%;row-gap:32px;padding-top:26px}.gallery-grid{row-gap:16px}#gallery-videos{row-gap:30px}.gallery-section h2{font-size:clamp(28px,3.2vw,46px)}}
@media(orientation:portrait){#gallery-layout{padding-left:4%;padding-right:4%}}
@media(max-width:500px){#gallery-toolbar button{font-size:10px;padding:4px 7px;min-height:28px}.gallery-section h2{margin-bottom:12px}#gallery-layout{gap:42px}#gallery-videos{row-gap:18px}}
@media(max-width:500px){.gallery-segments{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
/* Updated desktop reference; phone landscape retains the supplied wider spacing. */
@media(orientation:landscape) and (min-height:601px){
 #gallery-layout{max-width:1284px;padding:60px 41px 36px;grid-template-columns:minmax(0,.98fr) minmax(0,1fr);column-gap:24px}
 .gallery-section h2{font-size:46px;margin-bottom:4px}
 .gallery-grid{column-gap:34px;row-gap:15px}
 #gallery-videos{column-gap:30px;row-gap:32px}
}
#gallery-toolbar button,.gallery-empty,#gallery-status,#gallery-viewer-title,#gallery-viewer button,#gallery-download,#gallery-viewer-status,.gallery-no-poster{font-size:12pt;line-height:1.3}
#gallery-toolbar button{min-height:36px}
#gallery-saved-toggle{padding:2px!important;background:transparent!important;border:0!important;min-width:40px;min-height:40px}
#gallery-saved-toggle img{display:block;width:36px;height:36px}
