/* Final responsive layout layer. Keep theme colors and playback logic independent. */
:root{--touch-target:44px}
.mast-in>*,.account-tools,.mast-in>form,.profile-main,.profile-layout,.screening>section,.player-tools>div,.actions>*{min-width:0}
.mast .account-trigger{min-width:44px!important;min-height:44px;max-width:150px;flex:none;align-items:center;justify-content:center}
.mast .account-trigger>.profile-avatar{display:grid!important;width:32px;height:32px;max-width:none;overflow:hidden;flex:none}
.mast .account-trigger>span:not(.profile-avatar){max-width:92px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.mast .festive-trigger{width:44px;height:44px;flex:0 0 44px}
.mast .library{align-items:center;justify-content:center;min-height:44px;white-space:nowrap}
.mast .brand{flex:none;white-space:nowrap}.mast .brand img{flex:none}
.profile-avatar{isolation:isolate;filter:none;opacity:1;transform:none;aspect-ratio:1;flex-shrink:0;line-height:1;box-shadow:0 0 0 1px #ffffff13}
.profile-avatar img{display:block!important;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center;filter:none!important;mask-image:none!important;-webkit-mask-image:none!important;opacity:1!important;transform:none!important}
.profile-banner .profile-avatar{width:88px;height:88px}.menu-identity .profile-avatar{width:48px;height:48px}
.avatar-picker{border:0;margin:0;padding:0;min-width:0;display:grid;gap:10px}.avatar-picker legend{font-size:14px;font-weight:600;padding:0;margin-bottom:4px}.avatar-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;min-width:0}.avatar-option{position:relative;display:flex!important;flex-direction:column;align-items:center;justify-content:flex-start;gap:7px!important;padding:10px 4px 8px;background:#13101e;border:1px solid #4b3d60;border-radius:11px;cursor:pointer;min-height:88px;text-align:center}.avatar-option .profile-avatar{width:50px;height:50px;font-size:20px}.avatar-option input[type=radio]{position:absolute;width:1px;height:1px;padding:0;opacity:0;pointer-events:none}.avatar-option:has(input:checked){border-color:var(--brand-crimson);box-shadow:inset 0 0 0 1px var(--brand-crimson);background:#302030}.avatar-option:has(input:focus-visible){outline:2px solid var(--ink);outline-offset:2px}.avatar-option span.avatar-name{font-size:11px;line-height:1.3;overflow-wrap:anywhere;font-weight:500}.avatar-option:hover{border-color:var(--violet)}
.account-menu{overscroll-behavior:contain;max-height:calc(100dvh - 100px);overflow-x:hidden}.account-menu :is(a,button){min-height:44px;line-height:1.35}.account-menu .menu-identity{overflow:hidden}.account-menu .menu-identity>div{flex:1}.account-menu .menu-identity .profile-avatar{flex:0 0 48px}
.button,.save-label{align-items:center;justify-content:center;gap:8px;line-height:1.25;text-align:center;overflow-wrap:anywhere;min-height:44px}.button svg,.save-label svg,.rail-controls svg,.profile-side svg,.mobile-dock svg,.account-tools svg{flex:none}.button:disabled{cursor:not-allowed}.actions,.reference,.pills{max-width:100%;flex-wrap:wrap}.section-head,.cinema-row header{min-width:0}.section-head>h2,.cinema-row h2{min-width:0;overflow-wrap:anywhere}.cinema-row header>a{flex:none}.rail-controls{flex:none}.rail-controls button{display:grid;place-items:center}.profile-card .actions{gap:10px}.community-post-header>div{min-width:0;overflow-wrap:anywhere}.community-post .actions{gap:8px}.community-controls{gap:12px}.profile-form input:not([type=checkbox]):not([type=radio]),.profile-form textarea,.profile-form select{min-height:44px}.setting-row{min-height:68px}.theme-dialog,.account-dialog{overscroll-behavior:contain}.theme-close,.account-close{width:44px;height:44px;min-width:44px;display:grid;place-items:center}.theme-option{min-height:110px}.theme-effects{min-height:44px}.queue li a{min-height:44px;align-items:center}.queue .pagination a{display:grid;place-items:center;width:44px;height:44px}.player-tools>a{min-height:44px;display:inline-flex;align-items:center;justify-content:center}.player-tools .button{min-height:44px}.player-tools .ep-next{flex-direction:row}.profile-side a{min-height:44px}.profile-card a,.account-body a{overflow-wrap:anywhere}.title-card .save{touch-action:manipulation}
@media(min-width:1025px) and (max-width:1279px){.mast-in{gap:12px}.mast-in>nav{gap:12px}.mast-in>nav a{font-size:13px;white-space:nowrap}.mast-in>form{flex:1;min-width:115px;max-width:220px}.mast-in>form input{width:100%;min-width:0}.mast-in>.library span,.mast .account-trigger>span:not(.profile-avatar){display:none}.mast .account-trigger{width:44px!important;padding:0}.mast .brand{font-size:21px}}
@media(max-width:1024px){
  .mast-in{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"brand search account";align-items:center;gap:10px;min-height:64px;padding:calc(8px + env(safe-area-inset-top)) var(--pad) 8px}
  .mast-in>.brand{grid-area:brand;font-size:22px;justify-self:start}.mast-in>.brand img{width:34px;height:34px;margin-right:6px}.mast-in>form{grid-area:search;justify-self:stretch;width:100%;max-width:none;min-height:44px;height:44px;margin:0}.mast-in>form input{flex:1;width:0;min-width:0;font-size:16px;padding:8px 10px}.mast-in>form button{width:44px;height:42px;flex:0 0 44px}.mast-in>.library{display:none!important}.mast-in>nav{display:none!important}.mast .account-tools{grid-area:account;justify-self:end;gap:8px}.mast .account-trigger{width:44px!important;padding:0}.mast .account-trigger>span:not(.profile-avatar){display:none!important}.mast .account-trigger>.profile-avatar{display:grid!important;width:32px;height:32px}
  .mobile-dock{grid-template-columns:repeat(5,minmax(0,1fr))!important;width:min(calc(100% - 24px),520px);gap:2px;padding:5px;bottom:calc(8px + env(safe-area-inset-bottom));align-items:stretch}.mobile-dock a{min-height:52px;min-width:0;gap:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;white-space:nowrap;padding:4px 1px!important;border-radius:13px}.mobile-dock a span{font-size:11px;line-height:1.2;max-width:100%;white-space:nowrap}.mobile-dock svg{width:21px;height:21px;display:block}.mobile-dock a:focus-visible{outline-offset:-2px}body{padding-bottom:calc(85px + env(safe-area-inset-bottom))}
  .rail-controls button{width:44px;height:44px}.pills a,.pills button,.reference a{min-height:38px}.title-card .save{width:44px;height:44px;min-width:44px;display:grid;place-items:center;opacity:1}.avatar-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.profile-banner .profile-avatar{width:72px;height:72px}
  .cinema-row header{flex-wrap:wrap;column-gap:10px;row-gap:5px}.cinema-row h2{flex:1 1 auto}.rail-controls{margin-left:auto}.player-tools{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px}.player-tools>div{flex:1 1 100%;display:flex;flex-wrap:wrap;gap:8px}.player-tools>div>span{flex:0 0 100%;font-weight:600;color:var(--dim)}.player-tools .button{min-width:0;padding:9px 12px}.player-tools>a{margin-left:0}.player-tools>.theatre-toggle,.player-tools>a{flex:1 1 120px}.player-tools .episode-navigation>.button{flex:1 1 120px}.player-tools .episode-navigation:empty{display:none}
}
@media(max-width:600px){
  .mast-in{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand account" "search search";gap:7px 10px;min-height:0;padding:calc(7px + env(safe-area-inset-top)) var(--pad) 8px}.mast-in>.brand{font-size:22px}.mast-in>form{height:44px;min-height:44px}.mast .account-tools{gap:7px}.mast-in>.brand img{width:34px;height:34px}.touch-filters{gap:7px!important}.touch-filters a{min-height:40px}
  .profile-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px}.profile-side a{min-height:44px;justify-content:flex-start;gap:7px;font-size:12px;padding:8px;line-height:1.25}.profile-side a svg{width:17px;height:17px}.profile-side a[aria-current=page]{box-shadow:inset 3px 0 var(--brand-crimson)}.profile-layout{margin-top:12px}.profile-card{padding:16px}.profile-card .actions>*{flex:1 1 130px}.profile-form .button{justify-self:stretch;width:100%}.profile-banner .profile-avatar{width:64px;height:64px}.profile-banner{gap:12px;min-height:112px}.setting-row{padding:12px;gap:10px}.setting-copy{overflow-wrap:anywhere}.setting-row:has([data-open-themes]){align-items:stretch}.setting-row [data-open-themes]{width:100%}
  .billboard .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px;max-width:360px;margin-inline:auto}.billboard .actions>*{width:100%;min-height:44px!important;padding-inline:8px!important}.billboard .actions>.save-label{grid-column:1/-1}.billboard .actions>.button svg{width:17px;height:17px}.detail .actions{display:grid;grid-template-columns:1fr;width:100%;gap:8px}.detail .actions>*{width:100%;min-height:44px;font-size:13px!important;padding:8px!important}.detail .pills a{min-height:36px}.detail .detail-copy{min-width:0}.mascot-callout .actions,.empty-collection .actions{display:grid;grid-template-columns:1fr;gap:8px}.mascot-callout .actions>*,.empty-collection .actions>*{width:100%}.filters .button,.filters>a{min-height:44px}.filters>a{display:flex;align-items:center;justify-content:center;width:100%}.pagination{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:5px}.pagination .button{min-width:0;font-size:12px;gap:4px;padding:7px}.pagination .button svg{width:14px;height:14px}.pagination>*:last-child{justify-self:end}.pagination>*:first-child{justify-self:start}
  .community-controls label{min-height:44px}.community-controls>.button{flex:1 1 100px}.community-post .actions>.button{flex:1 1 72px;min-height:44px}.community-head>.button{min-height:44px}.community-form,.community-post,.community-empty{padding:14px}.community-replies{padding-left:9px}.account-body{padding:27px 18px 18px}.account-body h2{padding-right:40px}.account-close{top:8px;right:8px}.account-actions{gap:6px 14px}.account-actions .text-button{min-height:44px}.theme-dialog{padding:16px}.theme-grid{gap:8px}.theme-option small{font-size:11px}.theme-foot .button{min-height:44px}
  footer{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding-bottom:20px}footer .brand{grid-column:1;grid-row:1}footer nav{grid-column:1/-1;grid-row:2;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px}footer nav a{min-height:44px;display:flex;align-items:center;font-size:13px;line-height:1.3}#back-top{grid-column:2;grid-row:1;width:44px;height:44px;justify-self:end}
}
@media(max-width:360px){.mobile-dock{width:calc(100% - 16px);gap:0;padding:4px}.mobile-dock a span{font-size:10px}.mobile-dock a{min-height:48px}.profile-side a{font-size:11px}.profile-side svg{width:16px;height:16px}.avatar-option .profile-avatar{width:44px;height:44px}.profile-banner .profile-avatar{width:56px;height:56px}.profile-banner strong{font-size:19px}.cinema-row header>a{font-size:11px}.rail-controls button{width:40px;height:44px}.detail{grid-template-columns:minmax(76px,27%) minmax(0,1fr)}.detail .actions .button{font-size:12px!important}}
@media(max-height:500px) and (max-width:1024px){.mast{position:relative}.mobile-dock{bottom:calc(4px + env(safe-area-inset-bottom))}.account-menu{max-height:calc(100dvh - 70px)}.account-dialog,.theme-dialog{max-height:calc(100dvh - 16px)}}
/* Keep genre shortcuts on Home only; the main navigation lives in the dock. */
.mast>.touch-filters{display:none!important}
@media(max-width:1024px){body[data-page=home] .mast>.touch-filters{display:flex!important;width:100%;padding:0 var(--pad) 10px;gap:8px!important;overflow-x:auto;scrollbar-width:none}body[data-page=home] .mast>.touch-filters a{padding:0 13px!important;min-height:40px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;flex:none;line-height:1.25}.mast>.touch-filters a[aria-current=page]:after{display:none}.player-tools>div:not(.episode-navigation)>.button{flex:1 1 100px}.player-tools>.theatre-toggle+.player-tools{margin-left:0}}

/* New HD avatar gallery and real-time profile preview. */
.avatar-live{display:flex;align-items:center;gap:16px;min-width:0;background:#191523;border:1px solid #4b3d60;border-radius:13px;padding:14px;margin:5px 0 8px}.avatar-live .profile-avatar{width:104px;height:104px;font-size:36px}.avatar-live strong{display:block;font-size:17px;color:var(--ink);margin-bottom:5px}.avatar-live small{display:block;color:var(--dim);line-height:1.4}.avatar-grid{grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:10px}.avatar-option{padding:10px 6px;min-height:112px}.avatar-option .profile-avatar{width:min(100%,84px);height:auto;aspect-ratio:1;font-size:29px}.avatar-option:has(input:checked)::after{content:"✓";position:absolute;top:6px;right:6px;background:var(--brand-crimson);color:#141014;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;font-weight:bold}.avatar-option .avatar-name{font-size:12px!important}@media(max-width:600px){.avatar-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.avatar-live .profile-avatar{width:78px;height:78px}.avatar-live{padding:10px;gap:12px}.avatar-option{min-height:91px;padding:8px 4px}.avatar-option .profile-avatar{width:min(100%,68px);height:auto;aspect-ratio:1}}
