/* Atlas geometry and palette: shared with the native-client specification. */
html body .atlas-music-browse { position:relative; }
html body .atlas-music-browse .browse-head { align-items:start; gap:24px; margin-bottom:0; }
html body .atlas-music-browse .browse-title { display:flex; align-items:baseline; gap:32px; }
html body .atlas-music-browse .browse-head h2 { font-size:128px; font-size:clamp(48px,6.7vw,128px); margin:0; }
html body .atlas-music-browse .browse-subline { text-transform:uppercase; letter-spacing:.35em; font-size:14px; }
html body .atlas-music-browse .browse-controls { padding:0; height:0; margin-bottom:0; }
html body .atlas-music-browse .browse-controls > details { position:absolute; right:0; top:64px; z-index:4; }
html body .atlas-music-browse .browse-controls > details[open] { background:var(--panel); max-width:650px; padding:16px; border:1px solid var(--line); }
.atlas-album-overview > .shelf-head { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.atlas-music-tabs { display:flex; flex-wrap:wrap; gap:12px; margin:0 0 24px; }
html body .atlas-music-tabs button { min-width:160px; min-height:48px; font-size:20px; }
html body .atlas-music-tabs button[aria-pressed="true"] { color:#171a1b; background:var(--accent); border-color:var(--accent); font-weight:700; }
html body .atlas-music-browse .music-album-grid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:24px; }
html body .atlas-music-browse .music-album-tile { display:block; background:transparent; border:0; min-width:0; min-height:0; padding:0; }
html body .atlas-music-browse .music-album-tile .poster { width:100%; height:auto; aspect-ratio:1; border:1px solid var(--line); background-size:cover; }
html body .atlas-music-browse .music-album-tile .tile-body { padding:12px 0; gap:4px; }
html body .atlas-music-browse .music-album-tile h3 { font-size:20px; line-height:1.3; margin:0; overflow-wrap:break-word; }
html body .atlas-music-browse .music-album-tile p { font-size:15px; margin:4px 0 0; }
html body .atlas-music-browse .music-album-tile .tile-actions:empty { display:none; }
@supports not (aspect-ratio:1) { html body .atlas-music-browse .music-album-tile .poster { height:0; padding-top:100%; } }
@media(max-width:1100px) { html body .atlas-music-browse .music-album-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-height:760px) and (min-width:901px) {
  html body .atlas-music-browse .browse-head h2 { font-size:72px; }
  html body .atlas-music-browse .browse-subline { font-size:11px; letter-spacing:.2em; }
  html body .atlas-music-browse .browse-title { gap:20px; }
  html body .atlas-music-browse .browse-controls > details { top:56px; }
  html body .atlas-music-browse .browse-head { padding-bottom:0; }
  .atlas-music-tabs { margin-bottom:0; }
  html body .atlas-music-queue { margin-top:16px; }
  .atlas-music-queue .shelf-head { margin-bottom:0; }
  html body .atlas-queue-row { min-height:48px; padding-top:4px; padding-bottom:4px; }
}
@media(max-width:900px) {
  html body .atlas-music-browse .browse-title { display:block; }
  html body .atlas-music-browse .browse-controls { height:auto; padding-bottom:16px; }
  html body .atlas-music-browse .browse-controls > details { position:static; }
}
@media(max-width:700px) {
  html body .atlas-music-browse .music-album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  html body .atlas-music-tabs button { min-width:0; flex:1 1 40%; font-size:16px; }
  html body .atlas-music-browse .browse-subline { font-size:11px; letter-spacing:.2em; }
}
@media(min-width:1600px) {
  html body .atlas-music-browse .browse-head h2 { font-size:144px; }
  html body .atlas-music-browse .browse-title { gap:64px; }
  html body .atlas-music-browse .browse-subline { font-size:20px; }
  html body .atlas-music-tabs button { min-width:270px; min-height:72px; font-size:28px; }
  html body .atlas-music-browse .music-album-tile h3 { font-size:28px; }
  html body .atlas-music-browse .music-album-tile p { font-size:20px; }
  html body .atlas-music-queue { font-size:22px; }
  html body .atlas-music-queue h3 { font-size:28px; }
}
.atlas-music-queue { margin-top:32px; min-width:0; }
.atlas-music-queue > p { margin:0 0 12px; }
.atlas-queue-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 32px; margin:0; padding:0; list-style:none; }
.atlas-queue-row { display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:12px; align-items:center; min-height:56px; padding:8px 12px; border-top:1px solid var(--line); }
.atlas-queue-title { overflow-wrap:break-word; min-width:0; }
.atlas-queue-title small { display:block; color:var(--muted); font-size:12px; }
.atlas-queue-row.is-current .atlas-queue-number { color:var(--accent); font-weight:700; }
.atlas-queue-number, .atlas-queue-duration { font-variant-numeric:tabular-nums; }
.atlas-queue-more > summary { cursor:pointer; min-height:48px; display:flex; align-items:center; padding:8px 12px; }
.atlas-queue-more > summary:focus { outline:2px solid var(--accent); outline-offset:2px; }
@media(max-width:700px) { .atlas-queue-list { grid-template-columns:minmax(0,1fr); } }
@font-face { font-family: Atlas; src: url('/web/fonts/Inter-Regular.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }
:root { --bg:var(--atlas-background); --panel:var(--atlas-surface); --panel-2:var(--atlas-surface-raised); --text:var(--atlas-text); --muted:var(--atlas-muted); --accent:var(--atlas-accent); --accent-2:var(--atlas-accent); --focus:var(--atlas-focus); --line:var(--atlas-border); --atlas-gutter:32px; }
html body { background:var(--atlas-background); color:var(--text); font-family:Atlas,Inter,"Segoe UI",sans-serif; }
html body::before { display:none; }
html body main, html.xbox-webview body main { margin:0; padding:24px var(--atlas-gutter) 64px; width:100%; max-width:none; }
html body .commandbar, html.xbox-webview body .commandbar { position:relative; top:auto; left:auto; right:auto; margin:0; min-height:80px; padding:16px var(--atlas-gutter); display:flex; align-items:center; gap:20px; border:0; background:var(--bg); }
.atlas-breadcrumbs { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.atlas-breadcrumbs button { background:transparent; border:0; padding:0 8px; }
.atlas-breadcrumbs span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.atlas-shell-brand { display:flex; align-items:center; gap:10px; font-size:20px; white-space:nowrap; }
.atlas-shell-brand img { width:40px; height:40px; object-fit:contain; }
html body .commandbar .global-search-trigger { flex:0 0 auto; width:48px; min-width:48px; padding:8px; }
.commandbar .global-search-trigger span:not(:first-child), .commandbar .global-search-trigger kbd { display:none; }
.atlas-controller-key { display:none; border:1px solid var(--accent); border-radius:50%; width:26px; height:26px; line-height:24px; color:var(--accent); margin-right:8px; }
html.xbox-webview .atlas-controller-key { display:inline-block; }
html body .topbar, html.xbox-webview body .topbar { display:none; }
html body.atlas-sections-open .topbar { display:flex; position:fixed; top:0; left:0; right:0; bottom:0; z-index:1500; width:100%; height:100%; padding:36px 5vw; background:var(--atlas-background); flex-direction:column; align-items:stretch; overflow:auto; }
html body .topbar .brand { display:flex; flex-direction:row; width:auto; }
.atlas-sections-close { position:absolute; top:36px; right:5vw; }
html body .topbar .primary-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; width:100%; margin:36px 0; overflow:visible; }
html body .topbar .primary-nav button { display:flex; min-height:96px; width:100%; padding:20px; font-size:24px; justify-content:flex-start; }
html body .topbar .primary-nav .nav-secondary { display:flex; }
html body .topbar .primary-nav #mobileMoreButton { display:none; }
html body .topbar .nav-server-status { position:static; margin-top:auto; }
.atlas-section-library { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:16px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.atlas-section-library > label:first-child { font-size:20px; font-weight:700; white-space:nowrap; }
.atlas-section-library select { width:300px; max-width:70vw; min-width:0; background:var(--panel); border:1px solid var(--line); color:var(--text); }
.atlas-section-library .library-merge-control { margin-left:8px; }
@media(max-height:800px) and (min-width:901px) {
  html body.atlas-sections-open .topbar { padding-top:20px; padding-bottom:20px; }
  html body .topbar .primary-nav { margin:12px 0; gap:10px; }
  html body .topbar .primary-nav button { min-height:64px; padding:10px 16px; font-size:20px; }
  .atlas-section-library { padding:8px 0; }
}
html body button, html body .button, html body input, html body select, html body textarea,
html.xbox-webview body button, html.xbox-webview body .button, html.xbox-webview body select { min-height:48px; border-radius:3px; font-size:16px; }
html body button:focus-visible, html body [tabindex]:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
html body button.primary { color:var(--atlas-on-accent); background:var(--accent); border-color:var(--accent); }
html body button.active, html body button[aria-pressed="true"] { border-color:var(--accent); }
html body .card, html body .content-tile, html body .poster, html body .poster-art, html body dialog, html body .dialog-fallback-open { border-radius:3px; }
.atlas-hub { position:relative; min-height:570px; display:flex; flex-direction:column; justify-content:space-between; gap:40px; padding:28px 0 0; }
.atlas-hub-heading h2 { font-size:64px; font-size:clamp(40px,5vw,80px); line-height:1.06; font-weight:800; letter-spacing:-.025em; margin:12px 0 40px; }
.atlas-portals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) minmax(120px,.7fr); gap:16px; }
html body .atlas-portal { position:relative; display:flex; align-items:flex-end; min-height:240px; padding:20px; background-color:var(--panel); background-position:center; background-size:cover; text-align:left; border:1px solid var(--line); }
.atlas-portal span { font-size:32px; font-weight:800; text-shadow:0 2px 10px #000; color:#fff; }
.atlas-hub-utilities { display:grid; gap:8px; }
.atlas-hub-utilities button { background:var(--panel); }
html body .home-command { display:none; }
html body .home-reference { gap:40px; }
html body .cinematic-home-hero { min-height:420px; border-radius:0; border:0; }
html body .browse-title h2, html body .browse-head h2 { font-size:56px; font-size:clamp(36px,4.5vw,72px); line-height:1.1; letter-spacing:-.025em; }
html body .media-tabs:not(.search-category-tabs) { display:none; }
html body .browse-head { background:transparent; border:0; padding:0 0 24px; }
html body .browse-controls { background:transparent; border:0; padding:0 0 24px; }
html body .detail-hero { border:0; background:transparent; gap:36px; }
html body .detail-copy h2 { font-size:48px; font-size:clamp(32px,4vw,64px); letter-spacing:.035em; }
html body .home-api-shelf .rail { grid-auto-columns:minmax(200px,260px); gap:20px; }
html body .home-api-shelf .content-tile button { min-height:48px; font-size:16px; }
html body .home-api-shelf .tile-body h3 { font-size:20px; }
html body .home-api-shelf .tile-body p { font-size:16px; }
html body .settings-layout { display:block; }
html body .settings-sidebar { position:static; width:100%; display:flex; flex-wrap:wrap; margin-bottom:24px; gap:8px; }
html body #playerDialog.player-fullscreen .video-controls { background:linear-gradient(transparent,rgba(0,0,0,.88)); border:0; border-radius:0; padding:64px 4vw 28px; }
html body .player-control-deck { display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; }
html body .player-transport-controls button { min-width:64px; min-height:56px; background:transparent; }
html body .player-transport-controls .primary { border:2px solid var(--accent); color:var(--text); box-shadow:0 0 10px #f3be4d33; }
html body .timeline-track input { accent-color:var(--accent); }
html body .player-option-controls { display:flex; flex-wrap:wrap; gap:12px; }
html.xbox-webview body { font-size:20px; --atlas-gutter:4vw; }
html.xbox-webview body .commandbar { min-height:92px; }
html.xbox-webview body button, html.xbox-webview body select { font-size:20px; padding:10px 16px; min-height:48px; }
html.xbox-webview body #profileSwitcher { width:180px; min-width:120px; font-size:18px; min-height:48px; }
@media(min-width:1800px) { :root { --atlas-gutter:64px; } .atlas-hub { min-height:680px; } .atlas-portal { min-height:300px!important; } }
@media(max-width:900px) { .atlas-shell-brand strong { display:none; } .atlas-portals { grid-template-columns:repeat(2,minmax(0,1fr)); } .atlas-hub-utilities { grid-column:1 / -1; grid-template-columns:repeat(4,1fr); } .atlas-hub { min-height:0; } html body .topbar .primary-nav { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { :root { --atlas-gutter:16px; } html body .commandbar { flex-wrap:wrap; gap:8px; padding:8px 16px; } .atlas-breadcrumbs { order:2; flex-basis:100%; } .atlas-shell-brand strong { display:inline; } .commandbar .top-actions { margin-left:auto; } .commandbar #profileSwitcher { max-width:120px; } .atlas-portal span { font-size:24px; } html body .atlas-portal { min-height:180px; padding:14px; } .atlas-hub-heading h2 { margin-bottom:12px; } .atlas-hub-utilities { grid-template-columns:repeat(2,1fr); } html body .topbar .primary-nav button { font-size:18px; min-height:72px; } }
@media(prefers-reduced-motion:reduce) { html body *, html body *::before, html body *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

/* The application retains one scrolling content surface below the fixed-height header. */
html body:not(.auth-mode) { display:flex; flex-direction:column; }
html body:not(.auth-mode) .commandbar { flex:0 0 auto; }
html body:not(.auth-mode) main { height:auto; flex:1 1 0; min-height:0; }
html body.auth-mode .commandbar { display:none; }
html body .view { max-width:none; }
.atlas-hub { background-position:center; background-size:cover; padding:32px; }
.atlas-hub-heading { position:relative; z-index:1; }
.atlas-hub-heading h2 { max-width:600px; }
.atlas-portals { position:relative; z-index:1; }
.atlas-hub::before { content:""; position:absolute; top:0; right:0; bottom:0; left:0; background:linear-gradient(90deg,#0c0f12e8 0%,#0c0f1240 70%),linear-gradient(0deg,var(--atlas-background) 0%,transparent 70%); }
@media(max-width:600px) { .atlas-hub { padding:16px; } }

[data-atlas-options][hidden] { display:none!important; }
[data-atlas-options]:not([hidden]) { display:flex; flex-wrap:wrap; gap:12px; padding:20px; border:1px solid var(--line); background:var(--panel); }
html body .player-transport-controls { width:100%; justify-content:space-between; }
html body .player-option-controls:has([data-atlas-options]:not([hidden])) { width:100%; }
html body.atlas-sections-open .brand { justify-content:flex-start; min-height:56px; }
html body.atlas-sections-open .brand-copy, html body.atlas-sections-open .nav-label { display:block; }
html body.atlas-sections-open .primary-nav { flex:0 0 auto; }
html body.atlas-sections-open .primary-nav button { flex-direction:row; justify-content:flex-start; border:1px solid var(--line); border-radius:3px; background:var(--panel); color:var(--text); }
html body.atlas-sections-open .primary-nav button.active { background:var(--atlas-accent); border-color:var(--atlas-accent); color:var(--atlas-on-accent); box-shadow:none; }
html body.atlas-sections-open .primary-nav button.active::before { display:none; }
html body.atlas-sections-open .primary-nav button:focus { outline:3px solid var(--atlas-focus); outline-offset:3px; }
html body.atlas-sections-open [data-atlas-action="refresh"] { align-self:flex-start; padding:12px 24px; }
.atlas-hub { gap:16px; padding:24px; }
.atlas-hub-heading h2 { margin:12px 0 8px; }

html body .atlas-portal-empty { background-size:cover,96px auto; background-repeat:no-repeat; }
html body button { min-width:48px; }
@media(max-width:600px) {
  .atlas-breadcrumbs { order:2; flex:1 1 190px; gap:4px; }
  .commandbar .top-actions { order:3; flex:0 0 auto; margin-left:0; }
  .commandbar #profileSwitcher { min-width:96px; width:110px; }
}

/* Full-screen Atlas shell: the hub, section and details share one safe-area grid. */
html body .commandbar .atlas-shell-back,
html body .commandbar #atlasSectionsButton,
.atlas-detail-header > button { background:transparent; border-color:transparent; white-space:nowrap; }
.atlas-back-key { color:#ff6962; border-color:#ff6962; }
body[data-atlas-view="home"] .commandbar > .atlas-breadcrumbs { display:none; }
body[data-atlas-view="home"] .commandbar > .atlas-shell-brand { margin-right:auto; }
.atlas-section-account { display:flex; align-items:center; gap:16px; margin-bottom:24px; }
.atlas-section-account select { width:auto; min-width:180px; max-width:60vw; }
html body .atlas-hub { min-height:calc(100vh - 128px); margin:-24px calc(-1 * var(--atlas-gutter)) 0; padding:32px var(--atlas-gutter) 24px; gap:28px; }
.atlas-hub-heading h2 { font-size:clamp(52px,6.15vw,118px); line-height:1.04; max-width:900px; margin:0 0 24px; }
.atlas-hub-heading .kicker { font-size:clamp(14px,1.35vw,26px); line-height:1.7; letter-spacing:.3em; }
.atlas-portals { grid-template-columns:repeat(4,minmax(0,1fr)) minmax(120px,.7fr); gap:20px; }
html body .atlas-portal { min-height:clamp(220px,18vw,348px); padding:24px; }
.atlas-portal span { font-size:clamp(28px,3vw,56px); }
.atlas-hub-utilities { grid-template-columns:1fr; grid-template-rows:1fr 1fr; }
.atlas-hub-utilities button { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:12px; font-size:clamp(18px,1.5vw,28px); }
.atlas-hub-utilities svg { width:36px; height:36px; fill:none; stroke:currentColor; stroke-width:1.5; }
html body .atlas-portal:focus-visible { border-color:var(--focus); box-shadow:0 0 16px #f3be4d66; outline-offset:0; }
/* Explicit edges also reset legacy dialog centering on engines without inset. */
html body .detail-dialog { position:fixed; top:0; right:0; bottom:0; left:0; inset:0; width:100vw; height:100vh; max-width:none; max-height:none; margin:0; transform:none; border:0; border-radius:0; background:var(--bg); padding:0; }
.atlas-detail-header { display:flex; align-items:center; gap:20px; padding:16px var(--atlas-gutter); min-height:92px; }
.atlas-detail-header .atlas-breadcrumbs { flex:1 1 0; }
.atlas-detail-header .atlas-breadcrumbs button { flex-shrink:0; }
.atlas-detail-header .atlas-breadcrumbs #atlasDetailParent { max-width:24vw; overflow:hidden; text-overflow:ellipsis; }
#atlasDetailTitle { max-width:28vw; }
html body #detailContent { max-height:calc(100vh - 92px); padding:8px var(--atlas-gutter) 48px; }
html body .detail-hero { grid-template-columns:minmax(220px,29%) minmax(0,1fr); align-items:start; padding:0; gap:48px; }
html body .detail-art { max-height:76vh; width:100%; border-radius:0; border:1px solid var(--line); }
html body .detail-copy { padding:24px 0; gap:24px; }
html body .detail-copy h2 { font-size:clamp(40px,5vw,96px); line-height:1.05; }
html body .detail-copy p:not(.kicker):not(.muted) { color:var(--text); font-size:clamp(18px,1.5vw,28px); line-height:1.45; }
html body .detail-actions button { min-height:64px; border-radius:3px; }
@media(max-width:900px) {
  html body .atlas-hub { min-height:0; }
  .atlas-portals { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .atlas-hub-utilities { grid-column:1 / -1; grid-template-columns:1fr 1fr; grid-template-rows:1fr; }
  .atlas-hub-utilities button { min-height:72px; flex-direction:row; }
  .atlas-detail-header { flex-wrap:wrap; gap:8px; }
  .atlas-detail-header .atlas-breadcrumbs { flex-basis:100%; order:2; }
  #atlasDetailTitle { max-width:none; }
  .atlas-detail-header .atlas-shell-brand { margin-right:auto; }
  html body #detailContent { max-height:calc(100vh - 136px); }
  html body .detail-hero { gap:24px; }
}
@media(max-width:600px) {
  html body .atlas-hub { padding-top:24px; }
  .atlas-hub-heading h2 { font-size:48px; }
  .atlas-hub-heading .kicker { font-size:12px; letter-spacing:.18em; }
  .atlas-portals { gap:12px; }
  html body .atlas-portal { min-height:180px; padding:16px; }
  .atlas-portal span { font-size:28px; }
  html body .detail-hero { grid-template-columns:1fr; }
  html body .detail-art { width:min(65vw,320px); justify-self:center; max-height:none; }
  html body .detail-copy { padding:0; gap:16px; }
  .commandbar .atlas-shell-back { display:none; }
}
.atlas-hub-heading .kicker { color:var(--text); font-weight:400; }

/* TV detail follows Atlas panel 3: heading, wide artwork, seasons, episode stills. */
.atlas-tv-heading { display:flex; align-items:baseline; flex-wrap:wrap; gap:24px; margin:0 0 12px; }
.atlas-tv-heading h2 { margin:0; font-size:clamp(40px,6.6vw,126px); line-height:1; letter-spacing:-.025em; }
.atlas-tv-heading .kicker { margin:0; color:var(--text); font-weight:400; letter-spacing:.28em; font-size:clamp(12px,1.2vw,23px); }
.atlas-show-banner { position:relative; min-height:clamp(220px,18.5vw,356px); border:1px solid var(--line); background-size:cover; background-position:center top; display:flex; align-items:flex-end; }
.atlas-show-banner::before { content:""; position:absolute; inset:0; background:linear-gradient(90deg,#090d12e8,transparent 80%); }
.atlas-show-banner-copy { position:relative; max-width:75%; padding:24px 32px; }
.atlas-show-banner-copy h2 { margin:0 0 12px; font-size:clamp(28px,3vw,58px); line-height:1.05; letter-spacing:.1em; overflow-wrap:anywhere; }
html body .atlas-show-banner-copy .title-link { font-size:inherit; font-weight:inherit; letter-spacing:inherit; line-height:inherit; text-align:left; padding:0; }
.atlas-show-banner-copy p { margin:0; color:var(--text); font-size:clamp(14px,1.15vw,22px); }
.atlas-season-strip { display:flex; gap:12px; overflow-x:auto; padding:12px 3px; }
html body .atlas-season-strip button { flex:0 0 auto; min-width:clamp(160px,16.5vw,316px); min-height:clamp(48px,4vw,77px); font-size:clamp(16px,1.65vw,32px); padding:8px 24px; }
html body .atlas-season-strip button[aria-pressed="true"] { color:var(--atlas-on-accent); background:var(--accent); border-color:var(--accent); }
.atlas-episode-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:12px 0 24px; }
html body .atlas-episode-card { position:relative; display:block; width:100%; aspect-ratio:1.45; min-height:180px; padding:0; text-align:left; overflow:hidden; border:1px solid var(--line); background:var(--panel); }
.atlas-episode-art { position:absolute; inset:0; background-position:center; background-size:cover; }
.atlas-episode-copy { position:absolute; inset:0; padding:14px; display:flex; flex-direction:column; justify-content:flex-end; background:linear-gradient(transparent 35%,#080c10ee 100%); }
.atlas-episode-copy strong { display:block; padding-right:56px; font-size:clamp(17px,1.4vw,27px); line-height:1.2; overflow-wrap:anywhere; }
.atlas-episode-code, .atlas-episode-state { font-size:clamp(13px,1vw,19px); }
.atlas-episode-state:empty { display:none; }
.atlas-episode-duration { position:absolute; right:14px; bottom:14px; font-size:clamp(13px,1vw,19px); }
html body .atlas-episode-card:focus-visible { border-color:var(--focus); box-shadow:0 0 14px #f3be4d66; outline-offset:0; }
.atlas-show-seasons > .row { margin-bottom:24px; }
.atlas-show-seasons .season-detail { margin:0; padding:0; border:0; }
.atlas-show-information { border-top:1px solid var(--line); margin-top:24px; }
html body .atlas-show-information .detail-copy h2 { font-size:clamp(28px,3vw,48px); }
@media(max-width:900px) {
  .atlas-episode-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .atlas-show-banner-copy { max-width:90%; padding:20px; }
}
@media(max-width:600px) {
  .atlas-tv-heading { gap:8px; }
  .atlas-tv-heading .kicker { font-size:11px; letter-spacing:.16em; }
  .atlas-show-banner { min-height:220px; }
  .atlas-episode-grid { gap:12px; }
  html body .atlas-episode-card { min-height:190px; }
  .atlas-episode-copy { padding:10px; }
  .atlas-episode-copy strong { padding-right:0; font-size:17px; }
  .atlas-episode-duration { position:static; margin-top:6px; }
  html body .atlas-season-strip button { min-width:120px; }
}

@media(max-height:760px) and (min-width:901px) {
  .atlas-tv-heading h2 { font-size:clamp(40px,5vw,64px); }
  html body .atlas-season-strip button { min-height:48px; font-size:18px; }
}

/* Atlas Movies: a single genre strip and six portrait covers at TV/desktop size. */
html body .atlas-movie-browse .browse-head { position:relative; display:flex; align-items:flex-end; justify-content:space-between; gap:24px; padding-bottom:24px; overflow:visible; }
html body .atlas-movie-browse .browse-head h2 { margin:0 0 8px; font-size:clamp(48px,6.6vw,126px); line-height:1; }
html body .atlas-movie-browse .browse-subline { color:var(--text); font-size:clamp(12px,1.2vw,23px); text-transform:uppercase; letter-spacing:.28em; margin:0; }
.atlas-movie-search { flex:0 0 auto; position:relative; }
.atlas-movie-search summary, .atlas-browse-options summary { min-height:48px; padding:12px 16px; cursor:pointer; border:1px solid var(--line); border-radius:3px; }
.atlas-movie-search summary:focus-visible, .atlas-browse-options summary:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
html body .atlas-movie-search .searchbar { position:absolute; right:0; top:100%; z-index:5; width:min(580px,85vw); padding:20px; background:var(--panel); border:1px solid var(--line); }
.atlas-genre-navigation { display:flex; align-items:center; gap:12px; }
.atlas-genre-strip { display:flex; flex:1 1 0; min-width:0; gap:16px; overflow-x:auto; padding:4px; scrollbar-width:thin; }
html body .atlas-genre-strip button { flex:0 0 auto; min-width:120px; min-height:clamp(48px,3.5vw,68px); font-size:clamp(16px,1.3vw,25px); padding:10px 24px; white-space:nowrap; background:var(--panel); }
html body .atlas-genre-strip button[aria-pressed="true"] { color:var(--atlas-on-accent); background:var(--accent); border-color:var(--accent); }
.atlas-genre-navigation > button { flex:0 0 48px; background:transparent; border-color:transparent; font-size:28px; }
.atlas-browse-options { margin-top:16px; }
.atlas-browse-options summary { width:max-content; max-width:100%; }
.atlas-browse-options summary span { color:var(--muted); margin-left:12px; }
.atlas-browse-options[open] { padding:0 0 16px; border-bottom:1px solid var(--line); }
.atlas-browse-options[open] .browse-mode-tabs { margin-top:16px; }
html body .atlas-movie-browse #browseResults > .poster-grid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:20px; }
html body .atlas-movie-browse #browseResults > .shelf-head h3 { display:none; }
html body .atlas-movie-browse #browseResults > .shelf-head { justify-content:flex-end; min-height:0; margin:0 0 12px; }
html body .atlas-movie-tile { position:relative; display:block; min-height:0; overflow:visible; background:transparent; border:1px solid transparent; }
html body .atlas-movie-tile > .poster { width:100%; height:auto; aspect-ratio:2/3; min-height:0; border:1px solid var(--line); background-position:center; background-size:cover; }
html body .atlas-movie-tile .tile-body { padding:12px 0; min-height:0; }
html body .atlas-movie-tile .tile-body h3 { font-size:clamp(16px,1.25vw,24px); line-height:1.2; overflow-wrap:anywhere; }
html body .atlas-movie-tile .tile-body p { font-size:clamp(14px,1vw,19px); }
html body .atlas-movie-tile .atlas-movie-actions { position:absolute; top:8px; right:8px; padding:0 10px; min-width:48px; min-height:48px; background:#0c0f12df; border-color:var(--line); }
html body .atlas-movie-tile .tile-actions { position:absolute; top:64px; right:8px; left:8px; z-index:3; display:flex; flex-direction:column; max-height:calc(100% - 72px); overflow:auto; padding:12px; background:var(--panel); border:1px solid var(--accent); }
html body .atlas-movie-tile .tile-actions[hidden] { display:none; }
html body .atlas-movie-tile:focus-visible, html body .atlas-movie-tile:focus-within, html body .atlas-movie-tile:hover { transform:none; border-color:var(--accent); box-shadow:0 0 14px #f3be4d44; }
@media(max-width:1100px) { html body .atlas-movie-browse #browseResults > .poster-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:700px) {
  html body .atlas-movie-browse .browse-head { display:block; }
  .atlas-movie-search { margin-top:16px; }
  .atlas-movie-search summary { width:max-content; }
  html body .atlas-movie-search .searchbar { position:static; width:100%; margin-top:8px; flex-wrap:wrap; }
  .atlas-genre-navigation { gap:4px; }
  .atlas-genre-strip { gap:8px; }
  html body .atlas-genre-strip button { padding:8px 16px; min-width:96px; }
  html body .atlas-movie-browse #browseResults > .poster-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .atlas-browse-options summary span { display:block; margin:6px 0 0; }
}
@media(min-width:701px) {
  html body .atlas-movie-browse #browseControls { position:relative; }
  .atlas-movie-browse .atlas-browse-options { position:absolute; top:-88px; right:180px; margin:0; z-index:6; }
  .atlas-movie-browse .atlas-browse-options[open] { width:min(700px,80vw); padding:16px; background:var(--panel); border:1px solid var(--line); }
  .atlas-movie-browse .atlas-browse-options summary { margin-left:auto; }
}
html body .atlas-movie-browse #browseControls { grid-template-columns:minmax(0,1fr); min-width:0; }
.atlas-genre-navigation { min-width:0; width:100%; }
@media(max-height:760px) and (min-width:901px) {
  html body .atlas-movie-browse .browse-head h2 { font-size:64px; }
  html body .atlas-movie-browse .browse-head { padding-bottom:12px; }
}
html body .atlas-movie-browse #browseResults > .poster-grid > .empty { grid-column:1 / -1; min-height:180px; }
@media(max-width:700px) {
  html body .atlas-movie-browse #browseControls { padding-bottom:12px; margin-bottom:0; }
  .atlas-browse-options summary span { display:inline; margin-left:8px; }
}
/* EdgeHTML/UWP does not implement aspect-ratio or clamp(). */
@supports not (aspect-ratio: 1) {
  html body .atlas-movie-tile > .poster { height:0; padding-bottom:150%; }
  html body .atlas-episode-card { height:0; padding-bottom:69%; }
}
@supports not (font-size: clamp(16px, 2vw, 32px)) {
  .atlas-tv-heading h2, html body .atlas-movie-browse .browse-head h2 { font-size:6.6vw; }
  .atlas-tv-heading .kicker, html body .atlas-movie-browse .browse-subline { font-size:1.2vw; }
  .atlas-show-banner { min-height:18.5vw; }
  .atlas-show-banner-copy h2 { font-size:3vw; }
  .atlas-show-banner-copy p { font-size:1.15vw; }
  html body .atlas-season-strip button { min-width:16.5vw; min-height:4vw; font-size:1.65vw; }
  .atlas-episode-copy strong { font-size:1.4vw; }
  .atlas-episode-code, .atlas-episode-state, .atlas-episode-duration { font-size:1vw; }
  html body .atlas-genre-strip button { min-height:3.5vw; font-size:1.3vw; }
  html body .atlas-movie-tile .tile-body h3 { font-size:1.25vw; }
  html body .atlas-movie-tile .tile-body p { font-size:1vw; }
  @media(max-width:900px) {
    .atlas-tv-heading h2, html body .atlas-movie-browse .browse-head h2 { font-size:48px; }
    .atlas-tv-heading .kicker, html body .atlas-movie-browse .browse-subline { font-size:12px; }
    .atlas-show-banner { min-height:220px; }
    .atlas-show-banner-copy h2 { font-size:28px; }
    .atlas-show-banner-copy p { font-size:14px; }
    html body .atlas-season-strip button { min-width:120px; min-height:48px; font-size:16px; }
    .atlas-episode-copy strong, html body .atlas-movie-tile .tile-body h3 { font-size:17px; }
    .atlas-episode-code, .atlas-episode-state, .atlas-episode-duration, html body .atlas-movie-tile .tile-body p { font-size:14px; }
    html body .atlas-genre-strip button { min-height:48px; font-size:16px; }
  }
  @media(max-height:760px) and (min-width:901px) {
    .atlas-tv-heading h2, html body .atlas-movie-browse .browse-head h2 { font-size:64px; }
    html body .atlas-season-strip button, html body .atlas-genre-strip button { min-height:48px; font-size:18px; }
  }
}

/* Action menus float inside cards, preserving poster proportions and 48px targets. */
html body .atlas-card-compact { position:relative; min-height:0; }
html body .atlas-card-compact > .atlas-card-more { position:absolute; top:8px; right:8px; z-index:2; min-width:48px; min-height:48px; padding:6px; background:#0c0f12e8; border:1px solid var(--line); color:var(--text); }
html body .atlas-card-compact > .tile-actions[hidden] { display:none!important; }
html body .atlas-card-compact.atlas-actions-expanded > .tile-actions { position:absolute; display:flex; flex-direction:column; flex-wrap:nowrap; top:60px; left:8px; right:8px; bottom:auto; width:auto; max-height:calc(100% - 68px); overflow-y:auto; z-index:3; padding:8px; background:var(--panel); border:1px solid var(--accent); }
html body .atlas-card-compact > .tile-actions button, html body .atlas-card-compact > .tile-actions a { min-height:48px; width:100%; text-align:left; }
html body .atlas-section-recent { margin-bottom:32px; }
html body .atlas-section-recent .rail { grid-auto-columns:minmax(200px,260px); }
/* EdgeHTML renders a wide native scroll bar; keep scrolling available without a right rail. */
html body main { -ms-overflow-style:none; scrollbar-width:none; }
html body main::-webkit-scrollbar { width:0; height:0; }

/* All accounts retain their profile settings; administration remains permission gated. */
html body.atlas-sections-open .primary-nav { gap:12px; margin:18px 0; }
html body.atlas-sections-open .primary-nav button { min-height:72px; padding:10px 16px; font-size:clamp(16px,1.4vw,24px); }
@media(max-height:760px) and (min-width:901px) {
  html body.atlas-sections-open .topbar { padding-top:20px; padding-bottom:20px; }
  html body.atlas-sections-open .primary-nav { gap:8px; margin:10px 0; }
  html body.atlas-sections-open .primary-nav button { min-height:56px; }
}

html body .atlas-card-compact, html.xbox-webview body .atlas-card-compact,
html body .home-api-shelf .atlas-card-compact, html.xbox-webview body .home-api-shelf .atlas-card-compact {
  min-height:0; grid-template-rows:auto auto; padding-bottom:0;
}
html body .atlas-card-compact > .poster, html.xbox-webview body .atlas-card-compact > .poster {
  width:100%; height:auto; min-height:0; aspect-ratio:1/1; background-size:cover; background-position:center;
}
html body .atlas-card-compact > .tile-body { min-height:64px; }

/* Keep the complete video transport reachable in two phone-sized rows. */
@media(max-width:600px) {
  html body #playerDialog .player-transport-controls {
    display:grid;
    grid-template-columns:repeat(20,minmax(0,1fr));
    gap:6px;
    width:100%;
  }
  html body #playerDialog .player-transport-controls button {
    width:100%; min-width:0; min-height:48px; height:48px;
    padding:0 2px; font-size:14px; white-space:nowrap;
  }
  #previousEpisodeButton { grid-column:1 / span 4; grid-row:1; }
  #seekBack30 { grid-column:5 / span 4; grid-row:1; }
  #videoPlayPause { grid-column:9 / span 4; grid-row:1; }
  #seekForward30 { grid-column:13 / span 4; grid-row:1; }
  #nextEpisodeButton { grid-column:17 / span 4; grid-row:1; }
  .player-transport-controls [data-atlas-toggle="atlasAudioOptions"] { grid-column:1 / span 5; grid-row:2; }
  .player-transport-controls [data-atlas-toggle="atlasSubtitleOptions"] { grid-column:6 / span 5; grid-row:2; }
  .player-transport-controls [data-atlas-toggle="atlasMoreOptions"] { grid-column:11 / span 5; grid-row:2; }
  #stopPlaybackButton { grid-column:16 / span 5; grid-row:2; }
}

/* EdgeHTML has legacy MS Grid only; keep browse cards within their columns. */
@supports not (display: grid) {
  html body .topbar .primary-nav,
  html body .atlas-movie-browse #browseResults > .poster-grid,
  html body .binge-resume-grid { display:flex; flex-wrap:wrap; }
  html body .topbar .primary-nav button { width:calc(25% - 20px); margin:10px; flex:0 0 auto; }
  html body .atlas-movie-browse #browseResults > .poster-grid > .content-tile { width:calc(16.666% - 20px); min-width:0; margin:10px; flex:0 0 auto; }
  html body .binge-resume-grid > .content-tile { width:calc(33.333% - 14px); min-width:0; margin:7px; }
  html body .atlas-movie-tile .tile-body h3 { word-wrap:break-word; }
  @media(max-width:1100px) {
    html body .atlas-movie-browse #browseResults > .poster-grid > .content-tile { width:calc(25% - 20px); }
  }
  @media(max-width:900px) {
    html body .topbar .primary-nav button { width:calc(50% - 20px); }
    html body .binge-resume-grid > .content-tile { width:calc(50% - 14px); }
  }
  @media(max-width:700px) {
    html body .atlas-movie-browse #browseResults > .poster-grid > .content-tile { width:calc(50% - 20px); }
    html body .binge-resume-grid > .content-tile { width:calc(100% - 14px); }
  }
}
html body .binge-open { display:block; width:100%; min-width:0; padding:0; text-align:left; border:0; background:transparent; color:inherit; }
html body .binge-open .poster { width:100%; }
html body .binge-open .tile-body { white-space:normal; }

/* Closed disclosures must stay closed even where details is an unknown element. */
html body details.atlas-movie-search:not([open]) > :not(summary),
html body details.atlas-browse-options:not([open]) > :not(summary) { display:none; }
html body .atlas-movie-search > summary,
html body .atlas-browse-options > summary { display:block; }
/* Xbox filter panels take their own space instead of floating over recent titles. */
html.xbox-webview body .atlas-movie-browse .browse-head { flex-wrap:wrap; }
html.xbox-webview body .atlas-movie-search { min-width:0; max-width:100%; }
html.xbox-webview body .atlas-movie-search .searchbar { position:static; width:360px; max-width:100%; margin-top:12px; display:flex; flex-wrap:wrap; }
html.xbox-webview body .atlas-movie-search .searchbar input { flex:1 1 200px; width:100%; min-width:0; }
html.xbox-webview body .atlas-movie-browse .atlas-browse-options,
html.xbox-webview body .atlas-movie-browse .atlas-browse-options[open] { position:static; top:auto; right:auto; width:100%; max-width:100%; margin:16px 0 0; }
html.xbox-webview body .atlas-movie-browse .atlas-browse-options summary { width:auto; margin-left:0; }
