.category-rail { display:none; }
.catalog-loading { position:relative; z-index:1; margin:auto; text-align:center; padding:2rem; }
.catalog-loading:before { content:""; display:block; width:3rem; height:3rem; border:.18rem solid #555;
  border-top-color:var(--accent); border-radius:50%; margin:0 auto 1rem; animation:catalog-turn .85s linear infinite; }
@keyframes catalog-turn { to { transform:rotate(360deg); } }
.catalog-loading progress { width:18rem; max-width:100%; height:.36rem; accent-color:var(--accent); }
@media(prefers-reduced-motion:reduce){.catalog-loading:before{animation:none}}
@media(min-width:760px){
  .shell { --rail:3.8rem; --gutter:2.1vw; background:#050505; }
  .shell .side-rail { position:absolute; inset:0 auto 0 0; width:var(--rail); padding:.6rem .35rem;
    display:flex; flex-direction:column; justify-content:center; align-items:stretch; gap:.15rem;
    background:rgba(4,4,5,.96); overflow:hidden; border:0; z-index:6; }
  .shell .side-rail:focus-within { width:11.75rem; box-shadow:1.5rem 0 2rem #0008; }
  .side-rail .logo { display:none; }
  .shell .side-rail nav,.shell .side-rail .nav-right { display:flex; flex:none; align-items:stretch; flex-direction:column; width:100%; gap:.15rem; margin:0; padding:0; }
  .shell .side-rail .nav-button { display:flex; align-items:center; justify-content:flex-start; overflow:hidden;
    white-space:nowrap; min-height:2.4rem; gap:.75rem; padding:.4rem .78rem; width:100%; margin:0; border:2px solid transparent; }
  .side-rail .nav-button span { display:none; }
  .side-rail:focus-within .nav-button span { display:inline; }
  .shell .side-rail .nav-button .icon { width:1.15rem; height:1.15rem; margin:0; flex:none; }
  .shell .side-rail .nav-button:focus,.shell .card:focus,.shell .category-option:focus { outline:2px solid var(--accent); outline-offset:-2px; }
  .shell .side-rail .active:after { left:.75rem; right:auto; width:1.2rem; }
  .side-rail + .content { margin-left:var(--rail); }
  .shell .topbar:not(.side-rail) .nav-button:not(.active) { color:#ddd; }
  .shell .topbar:not(.side-rail) nav .icon { display:none; }
  .shell .page-home { background:#050505; }
  .billboard .hero { min-height:49vh; }
  .shell .hero:after { background:linear-gradient(90deg,#050505 0%,rgba(5,5,5,.88) 23%,rgba(5,5,5,.36) 55%,transparent 78%),linear-gradient(0deg,#050505,transparent 33%); }
  .shell .hero-copy { width:53%; }
  .shell .hero h1 { text-transform:uppercase; font-family:"Arial Narrow",Roboto,"Segoe UI",sans-serif; font-stretch:condensed; line-height:1.05; font-size:clamp(1.7rem,3.3vw,4rem); }
  .shell .hero-copy .eyebrow { color:#ddd; font-size:.68rem; }
  .page-home .hero-copy p { -webkit-line-clamp:3; }
  .shell .row .card { flex:0 0 calc((100% - 4.8rem)/7); border-radius:.23rem; }
  .shell .row .cards,.shell .catalog-layout .cards { gap:.55rem; }
  .shell .catalog-layout { position:relative; padding:1.4rem 2.1vw 3rem calc(17vw + 2.1vw); min-height:100%; }
  .shell .catalog-layout .category-rail { display:block; position:absolute; inset:0 auto auto 0; width:17vw; height:100%;
    max-height:100vh; overflow:auto; background:#0b0b0c; border-right:1px solid #262627; padding:1.25rem .75rem; }
  .category-rail h2 { font-size:1.1rem; }
  .shell .category-option { display:block; text-align:left; background:none; border:0; border-radius:.15rem; width:100%; min-height:2.2rem; padding:.35rem .5rem; }
  .category-option span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .shell .category-option[aria-pressed=true] {background:#222;}
  .catalog-layout .filters>div:first-child {display:none;}
  .shell .catalog-layout .cards { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .shell .catalog-layout .card { border-radius:.3rem; background:#101011; }
  .shell .catalog-layout .card-copy { position:static; padding:.32rem; background:transparent; }
  .catalog-layout .card-copy small {display:none}
  .catalog-layout .card-copy strong {white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block;}
  .shell .page-detail { padding:0 0 2rem; background:#050505; }
  .page-detail .detail-back { position:absolute; right:2vw; top:1rem; z-index:3; }
  .shell .page-detail .hero { border:0; margin:0!important; border-radius:0; min-height:54vh; }
  .page-detail .hero-copy .summary { -webkit-line-clamp:4; }
  .page-detail .hero-copy .credits {color:#c3c1c1; font-size:.77rem; margin:.2rem 0; -webkit-line-clamp:1;}
  .shell .page-detail>.panel {margin:0; padding:.5rem 3vw; border:0; background:transparent;}
  .shell .hero .primary { color:#101010; background:#fff; }
  .hero .primary .icon {filter:brightness(0)}
  .shell .hero button:focus {outline:3px solid var(--accent);}
  .mp-bar button {border:0;background:transparent;}
  .mp-bar button::before {display:block;margin:.25em auto .5em;width:1.45em;height:1.45em;}
  .mp-bar button:focus {outline:2px solid var(--accent);background:#242424;}
}
.live-board .empty-channel {text-align:center;font-size:1rem;padding:1rem;}
.live-board .guide-label,.live-board .guide-body h3 {font-size:.85rem;color:#93d9bc;font-weight:500;}
.channel-number {color:#91d9b9;font-size:.75rem;min-width:1.4em;text-align:center;}
.channel-list .card-copy progress {width:100%;height:.2rem;accent-color:#79dbab;}
.channel-head .channel-bug {width:2.7rem;height:2.7rem;object-fit:contain;background:#fafafa;border-radius:.25rem;}
.live-board .live-actions {display:flex;gap:.3rem;margin-top:auto;padding:.5rem;}
.live-actions button {min-height:2rem;font-size:.78rem;padding:.35rem .5rem;}
.mp-live .mp-heading,.mp-bar>strong,.mp-live .mp-bar>.mp-kind,.mp-live .mp-bar>span {display:none;}
.mp-bar .mp-station strong {display:block;}
.mp-lineup span {float:none;}
.max-playback video::-webkit-media-controls-overlay-play-button {display:none;}
.max-playback.awaiting-frame video {opacity:0;}
.mp-buffering .mp-status {left:50%;right:auto;top:47%;transform:translateX(-50%);width:12em;max-width:75%;padding:.25em 0 .55em;background:transparent;border-radius:0;font-size:.88em;color:#eee;}
.mp-buffering .mp-status:after {content:"";display:block;height:2px;margin:.5em auto 0;background:linear-gradient(90deg,#343434,#89c6a9,#343434);background-size:200% 100%;animation:channel-wait 1.3s linear infinite;}
.mp-live.mp-buffering .mp-loading {display:none;}
@keyframes channel-wait {to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.mp-buffering .mp-status:after{animation:none}}
.mp-live .mp-bar .with-icon span {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);}
.mp-live .mp-bar .with-icon {border:1px solid #666;border-radius:50%;width:2.2em;height:2.2em;}
.mp-live .mp-bar .with-icon:before {display:none;}
.mp-live .mp-bar .with-icon[aria-pressed=true] {border-color:#83d4ae;background:#264236;}
.mp-station {display:flex;align-items:center;gap:.9em;margin:.5em 0;}
.mp-station>img {width:3.5em;height:3.5em;object-fit:contain;background:#fff;border-radius:.3em;}
.mp-lineup {display:flex;align-items:center;flex-wrap:wrap;gap:.7em;margin:.65em 0;font-size:.85em;}
.mp-lineup b {padding:.25em .5em;border-radius:.25em;background:#46464a;font-size:.8em;}
.mp-lineup b:first-child {background:#b31624;}
.mp-live .mp-bar .mp-back {position:fixed;top:3vh;left:3vw;}
.mp-live .mp-bar button {min-height:2em;font-size:.85em;}
.mp-live .mp-bar .with-icon .icon {width:1em;height:1em;}
.mp-live .mp-bar.mp-folded {pointer-events:none;}
.mp-live .mp-bar.mp-folded .mp-back {visibility:hidden;}
@media(min-width:760px){
  .shell .live-board {--green:#83d4ae;position:relative;min-height:100%;padding:.85rem 1.4vw 1rem 25%;background:#0b0e12;}
  .live-board .live-categories {position:absolute;display:block;left:0;top:0;width:23%;height:100%;max-height:100vh;overflow:auto;padding:.2rem .75rem;}
  .live-categories h2 {font-size:1.22rem;font-weight:500;margin:.6rem .2rem;}
  .live-categories .category-option {min-height:3rem;margin:.18rem 0;font-weight:500;text-align:left;}
  .shell .live-categories .category-option[aria-pressed=true]{background:#242830;border:1px solid #41464e;}
  .shell .live-board .page-title {border:0;margin:0;padding:0;display:block;width:27%;min-height:4.15rem;}
  .shell .live-board .page-title h1 {font-size:1rem;line-height:1.3;}
  .live-board .page-title .muted {font-size:.72rem;}
  .shell .live-board .filters {position:absolute;top:.6rem;left:44%;width:16%;margin:0;}
  .live-board .filters>div,.live-board .filters>.field,.live-board .filters>button,.live-board .channel-search button {display:none;}
  .live-board .channel-search {margin:0;display:block;width:100%;}
  .live-board .channel-search:before {content:'Buscar canal';color:#b9bfc5;font-size:.65rem;}
  .live-board .channel-search input {width:100%;min-height:1.8rem;padding:.3rem .45rem;background:#1b1d23;border-color:transparent;font-size:.8rem;}
  .live-board .channel-layout {display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:.72rem;align-items:start;}
  .live-board .channel-list {width:auto;max-height:79vh;overflow:auto;background:transparent;border:0;padding:0;scrollbar-width:thin;}
  .shell .live-board .channel-list .card {min-height:3.05rem;max-width:none;margin:0 0 .35rem;border:1px solid transparent;background:#1b1e24;border-radius:.4rem;}
  .shell .live-board .channel-list .card[aria-pressed=true],.shell .live-board .card:focus {border-color:var(--green);outline:1px solid var(--green);outline-offset:-1px;background:#2a2e33;}
  .shell .live-board .channel-list .poster {width:2.55rem;height:2.55rem;background:#34373e;}
  .shell .live-board .channel-list .card-copy {flex:1;min-width:0;padding:.2rem .45rem;}
  .shell .live-board .channel-list strong {font-size:.87rem;line-height:1.2;}
  .shell .live-board .channel-list small {display:block;font-size:.7rem;line-height:1.15;}
  .live-board .live-guide {margin-top:-4.15rem;display:flex;flex-direction:column;min-height:calc(100vh - 2rem);max-height:calc(100vh - 2rem);background:#202329;border:0;padding:.6rem;border-radius:.65rem;overflow:hidden;}
  .live-board .channel-head {display:flex;align-items:center;gap:.65rem;padding:.2rem;border:0;}
  .live-board .channel-head h2 {font-size:1rem;margin:0;}
  .live-board .guide-body {min-height:0;flex:1;overflow:auto;padding:.25rem;}
  .live-board .channel-schedule {max-height:none;}
  .live-board .channel-schedule li {padding:.35rem 0;border:0;display:grid;grid-template-columns:auto 1fr;column-gap:.7rem;}
  .live-board .channel-schedule .schedule-time,.live-board .channel-schedule .program-name {font-size:.76rem;margin:0;}
  .live-board .channel-schedule li p,.live-board .channel-schedule .program-tag {display:none;}
  .live-board .channel-schedule progress {grid-column:2;accent-color:var(--green);}
  .live-board .live-actions {padding:.25rem 0;}
  .live-board .live-actions button {background:#171a20;border:0;flex:1;justify-content:center;}
  .shell .billboard .hero-copy {padding-top:1.25rem;padding-bottom:1.2rem;}
  .shell .catalog-layout .filters {margin:.25rem 0;}
  .shell .page-detail .actions {flex-wrap:wrap;width:max-content;max-width:90vw;}
  .shell .side-rail:not(.catalog-mode)+.content {transition:margin-left 0s linear .24s;}
  .shell .side-rail:focus-within:not(.catalog-mode)+.content {margin-left:11.75rem;transition:none;}
  .shell .side-rail.catalog-mode:focus-within {width:var(--rail);box-shadow:none;}
  .shell .side-rail.catalog-mode .nav-button span {display:none;}
  .shell .live-board {display:grid;grid-template-columns:minmax(0,23fr) minmax(0,35fr) minmax(0,30fr);
    grid-template-rows:auto auto minmax(0,1fr) auto;column-gap:.75rem;height:100%;min-height:0;padding:.75rem 1rem .75rem .55rem;overflow:hidden;}
  .live-board .live-categories {position:static;grid-column:1;grid-row:1/5;width:auto;height:auto;max-height:none;min-height:0;padding:0 .35rem;}
  .shell .live-board .page-title {grid-column:2;grid-row:1;width:50%;min-height:3.25rem;align-self:start;}
  .shell .live-board .filters {position:static;grid-column:2;grid-row:1;justify-self:end;align-self:start;width:47%;z-index:1;}
  .live-board>p {grid-column:2;grid-row:2;margin:0;}
  .live-board>div:nth-of-type(3),.live-board .channel-layout {display:contents;}
  .live-board .channel-list {grid-column:2;grid-row:3;max-height:none;height:100%;min-height:0;}
  .live-board .live-guide {grid-column:3;grid-row:1/5;margin:0;height:100%;min-height:0;max-height:none;}
  .live-board .pager {grid-column:2;grid-row:4;margin:.3rem 0;}
  .live-board>div:nth-of-type(3)>.status,.live-board>div:nth-of-type(3)>.error {grid-column:2;grid-row:3;}
}
.mp-live .mp-buttons {display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.55rem;margin-top:.75rem;}
.mp-live .mp-bar .mp-buttons button {margin:0;}
.mp-live .mp-buttons button[class] {
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  width:2.8rem;height:2.8rem;min-width:2.8rem;min-height:2.8rem;padding:0;
  box-sizing:border-box;background:#26282bd9;border:1px solid #65676a;border-radius:50%;
  font-size:0;line-height:0;vertical-align:middle;
}
.mp-live .mp-buttons button[class]:before {content:"";display:block;position:absolute;left:50%;top:50%;
  width:1.38rem;height:1.38rem;margin:0;transform:translate(-50%,-50%);background-position:center;background-size:contain;background-repeat:no-repeat;}
.mp-live .mp-buttons button.mp-back {position:fixed;top:3vh;left:3vw;}
.mp-live .mp-buttons .mp-favorite:before {background-image:url('../assets/icons/Heart.svg');}
.mp-live .mp-buttons .mp-favorite img {display:none;}
.mp-live .mp-buttons .mp-favorite[aria-pressed=true]{background:#29493e;border-color:#91dfbb;}
.mp-live .mp-buttons .mp-screen:before {background-image:url('../assets/icons/Fullscreen.svg');}
.mp-live .mp-buttons .mp-next-station:before,.mp-live .mp-buttons .mp-prev-station:before {background-image:url('../assets/icons/ChevronRight.svg');}
.mp-live .mp-buttons button.mp-next-station:before {transform:translate(-50%,-50%) rotate(90deg);}
.mp-live .mp-buttons button.mp-prev-station:before {transform:translate(-50%,-50%) rotate(-90deg);}
.mp-live .mp-buttons .mp-mute:before {background-image:url('../assets/icons/Volume2.svg');}
.mp-live .mp-buttons .mp-mute[aria-pressed=true]:before {background-image:url('../assets/icons/VolumeOff.svg');}
.mp-live .mp-buttons button:focus {outline:.15rem solid #97e2be;outline-offset:.12rem;}
.mp-live .mp-buttons button:focus:after {content:attr(title);position:absolute;bottom:calc(100% + .4rem);right:0;
  font:500 .78rem/1.25 Arial,sans-serif;color:#fff;background:#191b1eeb;white-space:nowrap;border-radius:.2rem;padding:.25rem .45rem;pointer-events:none;}
.mp-live .mp-buttons .mp-back:focus:after {top:100%;bottom:auto;right:auto;left:0;}
.mp-live .mp-buttons button:not([class]) {font-size:.82rem;padding:.3rem .65rem;border-radius:.3rem;background:#232529;}
.mp-live .mp-buttons button:not([class]):before {display:none;}
.mp-live .mp-buttons button:disabled {color:#a4e5c3;border-color:#77ae92;opacity:1;}

.pair-dialog {width:37rem; padding:1.15rem 1.3rem;}
.pair-dialog h2 {margin:0 0 .65rem;}
.pair-layout {display:flex; align-items:center;}
.pair-figure {flex:none; margin-right:1.1rem;}
.pair-dialog .support-code {width:10.5rem; max-width:31vh; padding:0; margin:0 auto; height:auto;}
.pair-instructions {min-width:0; overflow-wrap:break-word;}
.pair-instructions p {margin:0 0 .55rem; line-height:1.3;}
.pair-dialog .pair-code {margin:.55rem 0 .25rem; font-size:1.2rem;}
.pair-dialog .status {margin:0 0 .55rem; padding:0;}
@media (max-width:520px) and (orientation:portrait) {
  .pair-layout {display:block;}
  .pair-figure {margin:0 0 .75rem;}
}
.shell .cards .card.movie .card-copy,.shell .cards .card.series .card-copy,.shell .cards .card.episode .card-copy {
  position:static; opacity:1; padding:.34rem .4rem; background:#121214; text-align:left;
}
.shell .row .cards .card.movie .card-copy small,.shell .row .cards .card.series .card-copy small,.shell .row .cards .card.episode .card-copy small {display:none;}
.shell .cards .card.movie:focus:after,.shell .cards .card.series:focus:after,.shell .cards .card.episode:focus:after {
  content:""; position:absolute; top:0; right:0; bottom:0; left:0; z-index:2; pointer-events:none;
  border:.25rem solid #fff; border-radius:inherit; box-shadow:inset 0 0 0 .12rem #171719;
}

.shell .page-settings .panel {min-width:0;padding:.85rem 1rem;}
.shell .page-settings .panel h2 {margin:0 0 .55rem;font-size:1.18rem;}
.page-settings .panel dl {display:grid;grid-template-columns:max-content minmax(0,1fr);gap:.28rem 1rem;}
.page-settings .panel dt,.page-settings .panel dd {margin:0;padding:0;}
.page-settings .panel dd,.page-settings .panel .small {word-wrap:break-word;overflow-wrap:anywhere;}
.page-settings .panel .small {font-size:.87rem;}
.page-settings .panel .field,.page-settings .panel .check {margin:.35rem 0;}
.page-settings .panel .muted {margin:.25rem 0 .45rem;}
.page-settings .panel .actions {margin:0;}
.page-settings .panel .actions button {font-size:.92rem;min-height:2.35rem;padding:.35rem .65rem;}
@media (min-width:781px) {
  .shell .page-settings {padding:1rem 2.2vw;}
  .shell .page-settings .page-title {margin:0 0 .7rem;padding:0 0 .55rem;}
  .shell .page-settings .page-title h1 {font-size:1.9rem;}
  .page-settings .split {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin:0;}
  .page-settings .split>.panel {width:auto;margin:0;}
}

/* Match the 1280 x 720 TV reference on landscape screens. */
@media (min-width:760px) and (orientation:landscape) {
  :root {font-size:1.25vw;}
  .max-playback {font-size:1rem;}
}
@media (min-width:760px) and (min-aspect-ratio:16/9) {
  :root {font-size:2.222222vh;}
}
@media (min-width:760px) and (min-aspect-ratio:2/1) {
  .shell .row .card {flex-basis:10.5rem;}
  .shell .catalog-layout .cards {grid-template-columns:repeat(auto-fill,minmax(9rem,1fr));}
}
.page-settings .panel p.small {word-break:break-word;}

/* Episódios na interface completa do Media Station X */
.season-head {display:flex;align-items:center;flex-wrap:wrap;gap:.8rem;margin:.25rem 0 .9rem}
.season-head h2,.season-head .field {margin:0;width:auto}
.season-head .field>span {display:none}
.season-head select {width:auto;max-width:15rem;min-height:0;padding:.42rem .75rem;font-size:.86rem;background:#1c1c20;color:white;border:1px solid #55555d;border-radius:.35rem}
.season-head small {color:#b2b2b9;font-size:.8rem}
.episode-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.1rem .95rem;align-items:start;padding:.24rem}
.shell .episodes .episode-tile {display:block;min-width:0;width:100%;margin:0;padding:0 0 .48rem;border:0;border-radius:.48rem;background:#161619;color:#fff;text-align:left;overflow:hidden;scroll-margin-block:12vh;white-space:normal}
.shell .episodes .episode-tile:focus {outline:.18rem solid #fff;outline-offset:.14rem;background:#29292f;box-shadow:0 0 0 .4rem var(--accent)}
.episode-frame {display:block;position:relative;padding-top:56.25%;background:linear-gradient(125deg,#23232b,#101015);overflow:hidden}
.episode-frame .episode-art {position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.episode-frame .episode-cover {position:absolute;left:0;top:0;width:36%;height:100%;object-fit:cover;box-shadow:.18rem 0 .8rem #0009}
.episode-frame .poster-fallback {object-fit:contain;background:linear-gradient(115deg,#1c1c24,#080809)}
.episode-number,.episode-frame .episode-length,.episode-seen {position:absolute;padding:.16rem .38rem;background:rgba(0,0,0,.81);color:white;border-radius:.22rem;font-size:.73rem;line-height:1.25}
.episode-number {z-index:1;top:.42rem;left:.42rem}
.episode-length {bottom:.42rem;right:.42rem}
.episode-seen {top:.42rem;right:.42rem}
.episode-play {z-index:1;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:2.7rem;height:2.7rem;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--accent);opacity:0}
.episode-tile:focus .episode-play,.episode-tile:hover .episode-play,.episode-art[hidden]+.episode-number+.episode-play {opacity:1}
.shell .episodes .episode-play .icon {margin:0;width:1.35rem;height:1.35rem}
.episode-progress {z-index:2;position:absolute;bottom:0;left:0;right:0;height:.22rem;background:#64646a}
.episode-progress span {display:block;height:100%;background:var(--accent)}
.episode-title,.episode-summary {display:block;margin:.48rem .62rem 0;line-height:1.3;overflow:hidden}
.episode-title {font-size:.94rem;white-space:nowrap;text-overflow:ellipsis}
.episode-summary {font-size:.76rem;font-weight:400;color:#c6c6cb;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.6em}
@media(max-width:900px){.episode-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.episode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
