/* Shared navigation: independent of camera controls. */
.ip-site-menu{position:relative;flex:none;margin:0;padding:0;border:0;line-height:1.3;color:#e4f2f5;font:600 14px/1.3 system-ui,sans-serif;z-index:90}
.ip-site-menu>summary{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;min-width:44px;padding:0 10px;box-sizing:border-box;border:1px solid #456675;border-radius:9px;background:#142b39;color:#e4f2f5;cursor:pointer;list-style:none;white-space:nowrap}
.ip-site-menu>summary::-webkit-details-marker{display:none}.ip-site-menu>summary::marker{content:''}.ip-site-menu[open]>summary{border-color:#75d8dc;background:#224956}
.ip-site-menu:not([open])>.ip-site-menu-links{display:none!important}
.ip-site-menu>.ip-site-menu-links{position:absolute;top:calc(100% + 8px);right:0;display:grid;grid-template-columns:1fr;gap:3px;box-sizing:border-box;width:min(290px,calc(100vw - 24px));max-height:min(65vh,520px);max-height:min(65dvh,520px);overflow:auto;overscroll-behavior:contain;padding:8px;background:#101e2d;border:1px solid #426475;border-radius:12px;box-shadow:0 14px 40px #0009;z-index:100}
.ip-site-menu>.ip-site-menu-links .ip-menu-section>a{display:flex;align-items:center;min-height:44px;padding:8px 12px;border:1px solid transparent;border-radius:7px;background:transparent;color:#e4f2f5;font:600 14px/1.3 system-ui,sans-serif;text-decoration:none;box-sizing:border-box;white-space:normal}
.ip-site-menu>.ip-site-menu-links .ip-menu-section>a:hover,.ip-site-menu>.ip-site-menu-links .ip-menu-section>a[aria-current=page]{background:#203d4e;border-color:#416675}.ip-site-menu :focus-visible{outline:2px solid #8ce3e5;outline-offset:2px}
.topbar .brand-group{gap:6px}.topbar .brand-group .ip-site-menu{position:static}.topbar .brand-group .ip-site-menu-links{top:52px;left:10px;right:auto}.topbar:has(.ip-site-menu[open]){z-index:85}
.tv-bug:has(.ip-site-menu){display:flex;align-items:center;justify-content:space-between;gap:8px}.tv-bug .ip-site-menu-links{position:static;margin-top:8px}.tv-bug:has(.ip-site-menu[open]){align-items:flex-start;flex-wrap:wrap}.tv-hud:has(.ip-site-menu[open]){opacity:1!important;visibility:visible!important;transform:none!important;pointer-events:auto!important}.tv-hud:has(.ip-site-menu[open]) .tv-bug{pointer-events:auto!important}
body.ip-info>header{position:relative;display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:12px;padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));z-index:90}
body.ip-info>header .brand{min-width:0}body.ip-info>header .ip-site-menu-links{width:min(290px,calc(100vw - 32px))}body.ip-info main{box-sizing:border-box;width:100%;overflow-wrap:anywhere}body.ip-info footer{padding:22px 16px max(22px,env(safe-area-inset-bottom));color:#b4c7d2}body.ip-info .ip-footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;max-width:900px;margin:auto}body.ip-info .ip-footer-links a{display:inline-flex;align-items:center;min-height:44px;padding:6px 12px;background:transparent;border:1px solid #345061;color:#d4e8ec;text-decoration:none;box-sizing:border-box;border-radius:7px}body.ip-info .ip-footer-links a[aria-current=page]{background:#203d4e;border-color:#67c4c8}
body.ip-info .jump a,body.ip-info .catalog-entry .btn,body.ip-info .catalog-recovery-summary button{display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box}body.ip-info .ip-collection-jump a{flex:1 1 220px}body.ip-info section[id],body.ip-info h2[id]{scroll-margin-top:20px}body.ip-info .catalog-filters label{min-width:0}body.ip-info .catalog-filters select{max-width:100%}
@media(max-width:960px){.topbar .ip-menu-word{display:none}.topbar .brand-group .brand-anchor{flex:1 1 auto;min-width:0}.topbar .brand-group .brand-anchor .ip-approved-logo{width:min(100%,180px);max-width:100%;flex-shrink:1}.topbar .brand-group .ip-site-menu>summary{padding:0 8px}.topbar .brand-group .ip-site-menu-links{top:56px}}
@media(max-width:600px){body.ip-info>header .brand img{width:clamp(140px,52vw,210px)}body.ip-info main{padding:18px 16px 40px}body.ip-info .ip-page-summary{font-size:16px}body.ip-info .ip-page-intro{margin-bottom:18px}body.ip-info .card{padding:16px}body.ip-info .grid{gap:12px;margin-bottom:22px}body.ip-info .jump{gap:6px}body.ip-info .jump a{flex:1 1 130px;justify-content:center;text-align:center}body.ip-info .cam-links{columns:1;font-size:15px}body.ip-info .cam-links a{display:block;padding:9px 0;min-height:44px;box-sizing:border-box}body.ip-info .catalog-filters label{flex-basis:100%}body.ip-info .catalog-filters :is(input,select,button){font-size:16px;min-height:44px}body.ip-info .ip-footer-links a{flex:1 1 130px;justify-content:center;text-align:center}.tv-bug .ip-menu-word{display:none}}
@media(max-width:360px){body.phone-mode .topbar .brand-group .brand-anchor .ip-approved-logo{width:100%;max-width:145px}.topbar .brand-group{gap:4px}.topbar .ip-more-controls{padding-inline:6px}}

/* Functional destinations, installation and support have distinct groups. */
.ip-menu-section{display:grid;gap:3px;min-width:0;padding:5px 0}.ip-menu-section+.ip-menu-section{border-top:1px solid #345061;padding-top:9px}.ip-menu-heading{font:600 11px/1.3 system-ui,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:#a5bcc9;padding:4px 10px}.ip-site-menu .ip-menu-primary>a{background:#182c3c;border-color:#304b5a}.ip-site-menu .ip-menu-primary>a[aria-current=page]{background:#234958;border-color:#75d8dc}.ip-site-menu .ip-menu-legal>a{font-size:13px;color:#b4c7d2}.ip-site-menu a[data-ip-install][hidden]{display:none!important}.ip-menu-section:has(a[data-ip-install][hidden]):not(:has([data-ip-phone-view])){display:none}.ip-site-menu .ip-menu-section>a:focus{outline:2px solid #8ce3e5;outline-offset:-2px}.smart-tv .tv-btn,.smart-tv .tv-bug summary,.smart-tv .tv-bug a{min-height:48px}.smart-tv :is(button,a,select,summary):focus{outline:3px solid #8ce3e5;outline-offset:2px}

.ip-phone-view-note{display:block;padding:0 12px 8px;color:#adc4d1;font:400 12px/1.4 system-ui,sans-serif}.ip-site-menu [data-ip-phone-view]{border-color:#456675!important;}

/* R146: same viewing-mode navigation on both phone viewers, including desktop override. */
.ip-view-switch{display:none}
body.phone-mode .ip-view-switch,.phone-desktop .ip-view-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:4px;background:#0b1926;border:1px solid #365363;border-radius:10px;box-sizing:border-box;min-width:0;pointer-events:auto}
.ip-view-switch a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:44px;min-width:0;padding:5px 3px;border:1px solid transparent;border-radius:7px;color:#c5d7e3;text-decoration:none;font:650 13px/1.25 system-ui;text-align:center;box-sizing:border-box}
.ip-view-switch a span{font:400 11px/1.25 system-ui;color:inherit}.ip-view-switch a[aria-current=page]{background:#234958;border-color:#75d8dc;color:#f0fcff}.ip-view-switch a:focus-visible{outline:2px solid #8ce3e5;outline-offset:2px}
body.phone-mode .topbar,body.phone-mode .topbar:not(.ip-controls-expanded),.phone-desktop .topbar{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'brand more' 'mode mode' 'tools tools' 'actions actions'}
.topbar .ip-view-switch{grid-area:mode}
body.phone-mode .topbar #launchSmartTvBtn,.phone-desktop .topbar #launchSmartTvBtn,body.phone-mode .tv-controls #returnDeckLink,.phone-desktop .tv-controls #returnDeckLink{display:none!important}
body.phone-mode .topbar:not(.ip-controls-expanded) .header-tools{grid-template-columns:minmax(0,1fr);grid-template-areas:'random'}
body.phone-mode .topbar.ip-controls-expanded .header-tools{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:'search search' 'scope random' 'live live'}
body.phone-mode .topbar .header-tools:has(.hg-local-preview){grid-template-areas:'search search' 'scope random' 'live live' 'preview preview'}
.phone-desktop .topbar .header-tools{grid-template-areas:'primary search';grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
body.phone-mode .tv-hud{grid-template-columns:minmax(0,1fr)}
body.phone-mode .tv-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
body.phone-mode .tv-theme-control{grid-column:1/-1;order:4}
body.phone-mode .tv-controls #tvRotateBtn{order:1;width:100%}
body.phone-mode .tv-controls #tvOptionsBtn{grid-column:1/-1;order:3}
body.phone-mode .tv-bug .ip-site-menu-links{position:absolute;top:calc(100% + 8px);right:0;margin:0}
body.phone-mode .tv-bug:has(.ip-site-menu[open]){flex-wrap:nowrap;align-items:center}
body.phone-mode .tv-bug .ip-site-menu{position:relative}
body.phone-mode .tv-bug .ip-approved-logo{width:clamp(145px,44vw,210px)}
body.phone-mode .tv-bug .ip-menu-word,body.phone-mode .topbar .ip-menu-word{display:inline}
body.phone-mode .topbar .brand-group .ip-site-menu>summary{padding:0 6px;gap:3px}
@media(max-width:360px){body.phone-mode .topbar .ip-menu-word{display:none}}
@media(orientation:landscape){body.phone-mode .tv-controls{grid-template-columns:repeat(3,minmax(0,1fr))}body.phone-mode .tv-controls #tvOptionsBtn{grid-column:auto}body.phone-mode:not(.hg-immersive) .tv-wall{max-width:100%}}

/* R147: phone viewport and navigation hardening. One document scrollport;
   compact controls stay reachable, expanded controls scroll with the page. */
html:has(body.phone-mode:not(.frameless):not(.hg-immersive)){height:auto;overflow-x:clip;overflow-y:visible;scroll-padding-top:160px}
body.phone-mode:not(.frameless):not(.hg-immersive){width:100%;max-width:100%;height:auto;min-height:100vh;min-height:100dvh;overflow:visible}
body.phone-mode:not(.frameless) .app{width:100%;max-width:100%;min-width:0;height:auto;padding-bottom:calc(66px + env(safe-area-inset-bottom,0px))}
body.phone-mode:not(.frameless) .topbar{width:100%;max-width:100%;min-width:0;justify-content:stretch;align-items:center;gap:6px;padding:calc(8px + env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) 8px max(10px,env(safe-area-inset-left,0px));background:#122332;backdrop-filter:none;-webkit-backdrop-filter:none}
body.phone-mode:not(.frameless) .topbar:not(.ip-controls-expanded){position:sticky;top:0;z-index:80;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'brand more' 'mode mode' 'tools tools'}
body.phone-mode .topbar.ip-controls-expanded{position:relative;top:auto;z-index:80}
body.phone-mode .topbar .brand-group{min-width:0;width:100%;gap:6px;flex-wrap:nowrap;justify-content:space-between}
body.phone-mode .topbar .brand-group .brand-anchor{flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden}
body.phone-mode .topbar .brand-group .brand-anchor .ip-approved-logo{width:100%;max-width:190px;min-width:0;height:auto;object-fit:contain;object-position:left center}
body.phone-mode .topbar .brand-group .ip-site-menu>summary{width:44px;min-width:44px;height:44px;padding:0}
body.phone-mode .topbar .ip-menu-word{display:none}
body.phone-mode .topbar .ip-more-controls{min-height:44px;max-width:100%;padding-inline:8px;font-size:12px;white-space:normal;line-height:1.2;text-align:center}
body.phone-mode .topbar .header-tools,body.phone-mode .topbar .deck-actions{min-width:0;max-width:100%}
body.phone-mode .topbar .brand-group .ip-site-menu-links{top:calc(44px + 16px + env(safe-area-inset-top,0px));left:max(10px,env(safe-area-inset-left,0px));right:max(10px,env(safe-area-inset-right,0px));width:auto;max-width:360px;max-height:calc(100vh - 90px);max-height:calc(100dvh - 90px)}
body.phone-mode .ip-view-switch{padding:3px;gap:4px}
body.phone-mode .ip-view-switch a{min-height:44px;padding:3px 5px}
body.phone-mode .grid-scroll{padding:10px max(10px,env(safe-area-inset-right,0px)) 10px max(10px,env(safe-area-inset-left,0px));min-width:0;max-width:100%}
body.phone-mode :is(.workspace,.center-stage,.video-grid,.feed-card,.feed-bar,.ctx-left,.ctx-right){min-width:0;max-width:100%}
body.phone-mode .feed-title{overflow-wrap:anywhere;word-break:normal}
body.phone-mode .feed-bar .feed-sub{overflow-wrap:anywhere}
body.phone-mode .ctx-right .pager-box{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:6px;padding:8px max(10px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px));width:auto;left:0;right:0}
body.phone-mode .pager-box .pg-btn{width:100%;min-width:0;min-height:44px;height:44px;font-size:clamp(12px,3.3vw,14px);white-space:normal;padding:4px}
body.phone-mode .pager-position{display:flex;justify-content:center;align-items:center;gap:4px;min-width:76px;font-variant-numeric:tabular-nums}
body.phone-mode .pager-position .pg-in{width:3ch;min-width:32px;font:700 16px/1.2 system-ui;text-align:center}
body.phone-mode .pager-position .pg-tot{font:500 13px/1.2 system-ui;color:#b6cbd6}
body.phone-mode:not(.hg-immersive) .tv-hud{width:100%;max-width:100%;min-width:0;padding:calc(8px + env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) 8px max(10px,env(safe-area-inset-left,0px));background:#122332;transform:none;opacity:1;visibility:visible}
body.phone-mode:not(.hg-immersive) .tv-hud :is(.tv-bug,.tv-controls){pointer-events:auto;min-width:0;max-width:100%}
body.phone-mode .tv-bug{backdrop-filter:none;-webkit-backdrop-filter:none;min-width:0}
body.phone-mode .tv-bug .ip-tv-brand{min-width:0;flex:1 1 auto}
body.phone-mode .tv-bug .ip-approved-logo{width:100%;max-width:190px;height:auto}
body.phone-mode .tv-bug .ip-site-menu{flex:none}
body.phone-mode .tv-bug .ip-site-menu-links{max-width:calc(100vw - 24px)}
body.phone-mode .tv-theme-control,body.phone-mode .tv-theme-control select{min-width:0;max-width:100%}
body.phone-mode:not(.hg-immersive) .tv-wall{width:100%;max-width:100%;padding-inline:max(10px,env(safe-area-inset-left,0px)) max(10px,env(safe-area-inset-right,0px))}
body.phone-mode .tv-controls .tv-btn{min-height:44px;font-size:13px}
@media(orientation:landscape) and (min-width:620px){
 body.phone-mode:not(.frameless) .topbar:not(.ip-controls-expanded){grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;grid-template-areas:'brand mode more' 'tools tools tools'}
 body.phone-mode .topbar .brand-group .brand-anchor .ip-approved-logo{max-width:160px}
 body.phone-mode:not(.frameless) .topbar:not(.ip-controls-expanded) .header-tools{grid-template-columns:minmax(0,1fr)}
}
body.phone-mode .tv-hud .tv-bug{width:100%;justify-self:stretch;position:static}
body.phone-mode .tv-hud .tv-bug .ip-site-menu{position:static}
body.phone-mode .tv-hud .tv-bug .ip-site-menu-links{top:calc(44px + 16px + env(safe-area-inset-top,0px));left:max(10px,env(safe-area-inset-left,0px));right:max(10px,env(safe-area-inset-right,0px));width:auto;max-width:360px;max-height:calc(100dvh - 90px)}

/* R148: shared touch controls and compact landscape TV viewing. */
body.phone-mode :is(.topbar .cmd-btn,.topbar .scope-cycle-btn,.topbar .randomizer-btn,.topbar .ip-more-controls,.tv-controls .tv-btn,.pager-box .pg-btn){box-sizing:border-box;min-height:44px;border-radius:9px;font-family:system-ui,sans-serif;font-weight:650;line-height:1.25;letter-spacing:0;white-space:normal;text-align:center;overflow-wrap:normal;}
body.phone-mode :is(.topbar .cmd-btn,.tv-controls .tv-btn){padding:7px 9px;height:auto;}
body.phone-mode :is(.topbar .randomizer-btn,#tvShuffleAllBtn){background:#79d6d8;color:#082331;border:1px solid #8ce3e5;}
body.phone-mode :is(.topbar .ip-more-controls,#tvOptionsBtn,.pager-box #prevPgBtn){background:#162e3e;border:1px solid #456675;color:#e4f2f5;}
body.phone-mode .tv-controls #tvRotateBtn[aria-pressed=true]{background:#234958;color:#e8fcff;border-color:#75d8dc;}
body.phone-mode .tv-controls #tvPoolStatus{grid-column:1/-1;min-width:0;}
body.phone-mode .tv-controls #tvPerformanceHint:not([hidden]){grid-column:1/-1;min-width:0;}
body.phone-mode .tv-theme-control select{font-size:16px;min-height:44px;}
body.phone-mode .topbar :is(input:not([type=checkbox]),select),body.phone-mode .pager-position .pg-in{font-size:16px;}
body.phone-mode .tv-controls button:disabled{display:inline-flex;opacity:.5;cursor:default;}
body.phone-mode .tv-controls button[hidden]{display:none!important;}
body.phone-mode:not(.hg-immersive) .tv-hud{max-height:none;overflow:visible;}
body.phone-mode .tv-hud .tv-bug .ip-site-menu-links{max-height:calc(100vh - 90px);max-height:calc(100dvh - 90px);}
body.ip-info>header{padding-top:max(12px,env(safe-area-inset-top,0px));}
body.ip-info>header .brand img{max-width:100%;height:auto;}
body.ip-info :is(.catalog-filters input,.catalog-filters select,.collection-search input){font-size:16px;}
@media(max-width:600px){body.ip-info>header .ip-menu-word{display:none;}body.ip-info>header .ip-site-menu>summary{width:44px;padding:0;}body.ip-info .ip-footer-links a{font-size:13px;}}
@media(orientation:landscape) and (min-width:620px){
 body.phone-mode:not(.hg-immersive) .tv-hud{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:6px;}
 body.phone-mode:not(.hg-immersive) .tv-hud .tv-bug{grid-column:1;}
 body.phone-mode:not(.hg-immersive) .tv-hud .ip-view-switch{grid-column:2;}
 body.phone-mode:not(.hg-immersive) .tv-hud .tv-controls{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr));}
 body.phone-mode:not(.hg-immersive) .tv-hud .tv-controls #tvOptionsBtn{grid-column:auto;}
 body.phone-mode:not(.hg-immersive) .tv-hud .tv-theme-control{grid-column:1/-1;grid-template-columns:auto minmax(0,1fr);align-items:center;}
 body.phone-mode:not(.hg-immersive) .tv-hud .tv-controls #tvPoolStatus{grid-column:1/-1;}
 body.phone-mode:not(.hg-immersive) .tv-wall{width:100%;max-width:100%;}
}
