/* ============================================================
   APL TV: the look of APL Launcher (tvOS 26 style) for live TV,
   movies and series. 1920x1080 surface.
   - SF Pro Display, white focus that grows with a slight spring,
     Liquid Glass sheets (static gradients and a masked rim, no live
     blur: the same cost as APL Launcher's default "perf" mode).
   - The video plane is UNDER the page: html, body and every view are
     transparent where the picture must show (preview window, full
     screen, multiview). #bg draws the dark backdrop everywhere else.
   ============================================================ */

/* The typeface: Inter in every weight (shipped in fonts/), the system's SF Pro on the screens that have
   it. Two addresses for each file: ../fonts/ when this file is read from css/, fonts/ when an automatic
   update puts it in the page itself (js/boot.js), where ../fonts/ points outside the app */
@font-face { font-family: "SF Pro Display"; font-weight: 400; font-style: normal; font-display: swap; src: local("SF Pro Display"), url("../fonts/inter-400.woff2") format("woff2"), url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "SF Pro Display"; font-weight: 500; font-style: normal; font-display: swap; src: local("SF Pro Display Medium"), url("../fonts/inter-500.woff2") format("woff2"), url("fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "SF Pro Display"; font-weight: 600; font-style: normal; font-display: swap; src: local("SF Pro Display Medium"), url("../fonts/inter-600.woff2") format("woff2"), url("fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "SF Pro Display"; font-weight: 700; font-style: normal; font-display: swap; src: local("SF Pro Display Bold"), url("../fonts/inter-700.woff2") format("woff2"), url("fonts/inter-700.woff2") format("woff2"); }

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ease: cubic-bezier(0.25, 1, 0.5, 1);
    --spring: cubic-bezier(0.34, 1.32, 0.64, 1);
    --glass:
        radial-gradient(120% 90% at 12% 0%, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0.03) 45%, rgba(255,255,255,0) 70%),
        linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.01) 50%, rgba(255,255,255,0.03) 100%);
    --glass-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 0 14px rgba(255,255,255,0.07), 0 12px 32px rgba(0,0,0,0.24);
    --focus-bg: #f5f5f7;
    --focus-fg: #1c1c1e;
    --dim: rgba(255,255,255,0.62);
    --faint: rgba(255,255,255,0.42);
    --blue: #e50914; --red: #e50914;
    --imdb: #f5c518;
    --live: #ff453a;
}

html, body {
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    background: transparent;
    color: #fff;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    cursor: none;
    user-select: none;
}
body.is-preview { cursor: default; }
.ime { position: fixed; left: -2000px; top: 0; width: 600px; height: 60px; opacity: 0; }

/* ===================== VIDEO PLANE ===================== */
#av { position: fixed; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 0; }
.pvideo { position: fixed; z-index: 0; background: #000; object-fit: contain; }

/* ===================== BACKDROP ===================== */
.bg { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; background: radial-gradient(120% 90% at 20% 0%, var(--bg-glow, #2b0b10) 0%, #120509 45%, #06070b 100%); transition: opacity 300ms ease; }
.bg__img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 500ms ease; }
.bg__img.is-on { opacity: 1; }
.bg__scrim { position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(90deg, rgba(6,7,11,0.92) 0%, rgba(6,7,11,0.70) 35%, rgba(6,7,11,0.15) 70%, rgba(6,7,11,0.05) 100%),
                linear-gradient(180deg, rgba(6,7,11,0.35) 0%, rgba(6,7,11,0) 22%, rgba(6,7,11,0) 50%, rgba(6,7,11,0.85) 78%, #06070b 100%); }
.bg.is-soft .bg__img { filter: none; }
.bg.is-dark .bg__scrim { background: rgba(6,7,11,0.86); }
/* While a picture plays under the page (full screen, preview window, multiview), no backdrop */
.has-video .bg, .in-live .bg, .in-guide .bg { opacity: 0; }

/* ===================== GLASS ===================== */
.glass, .tabs, .status, .btn, .chip, .lrow, .crow, .gcell, .kb__key, .srow, .osd__bar, .osd__list, .ccard__art, .menu__panel, .field {
    position: relative;
}
.glass, .tabs, .status, .osd__bar, .osd__list, .menu__panel {
    background: var(--glass), rgba(26, 28, 36, 0.72);
    box-shadow: var(--glass-shadow);
}
.glass::before, .tabs::before, .status::before, .osd__bar::before, .osd__list::before, .menu__panel::before, .btn::before, .chip::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.42) 0%, rgba(255,255,255,0.10) 24%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.06) 76%, rgba(255,255,255,0.24) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.is-focused::before { opacity: 0; }

/* ===================== TOP BAR: tabs + clock ===================== */
.top { position: fixed; left: 0; right: 0; top: 0; height: 116px; z-index: 20; pointer-events: none; transition: opacity 260ms ease, transform 300ms var(--ease); }
.top.is-hidden { opacity: 0; transform: translateY(-30px); }
.tabs { position: absolute; top: 30px; left: 50%; transform: translateX(calc(-50% + var(--shift, 0px))); display: flex; gap: clamp(2px, 0.25vw, 3px); padding: 5px; border-radius: 34px; white-space: nowrap; transition: transform 220ms var(--ease); }
.tab { position: relative; height: clamp(34px, 4.4vh, 46px); padding: 0 clamp(12px, 1.15vw, 22px); border-radius: 24px; display: flex; align-items: center; gap: clamp(5px, 0.5vw, 8px); font-size: clamp(16px, 1.05vw, 21px); font-weight: 600; color: rgba(255,255,255,0.78); transition: transform 220ms var(--spring), background 160ms ease, color 160ms ease; }
.tab svg { display: block; }
.tab.is-current { background: rgba(255,255,255,0.16); color: #fff; }
.tab.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.08); box-shadow: 0 12px 30px rgba(0,0,0,0.35); z-index: 1; }
/* a marca no lugar da data: a logo do servidor, o nome quando ela falta */
.brand { position: absolute; left: clamp(20px, 2.2vw, 42px); top: 33px; height: clamp(38px, 4.4vh, 46px); max-width: 330px; display: flex; align-items: center; gap: 10px; }
.brand__img { display: block; max-height: clamp(26px, 3.1vh, 34px); max-width: 190px; width: auto; object-fit: contain; }
.brand__name { font-size: clamp(16px, 1.05vw, 21px); font-weight: 700; letter-spacing: 0.02em; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand--name .brand__img { display: none; }
.brand:not(.brand--name) .brand__name { display: none; }
.status { position: absolute; top: 33px; right: clamp(20px, 2.2vw, 42px); height: clamp(38px, 4.4vh, 46px); padding: 0 clamp(8px, 1vw, 18px); border-radius: 24px; display: flex; align-items: center; }
.status__clock { font-size: clamp(17px, 1.05vw, 21px); font-weight: 500; }
.profile { display: inline-flex; align-items: center; gap: 10px; height: clamp(32px, 3.7vh, 40px); padding: 0 clamp(8px, 0.85vw, 16px) 0 6px; margin-left: 12px;
    border: 0; border-radius: 20px; background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.88);
    font-family: inherit; font-size: clamp(15px, 0.95vw, 18px); font-weight: 600; cursor: pointer; outline: none; white-space: nowrap;
    transition: transform 220ms var(--spring), background 150ms ease, color 150ms ease; }
.profile.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.08); box-shadow: 0 12px 30px rgba(0,0,0,0.35); z-index: 1; }
.profile-av { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none;
    border-radius: 50%; background: rgba(255,255,255,0.24); color: #fff; font-size: 16px; font-weight: 700; }
/* com o desenho do perfil escolhido, o chip mostra a imagem (como na Netflix de TV);
   a inicial fica so quando o perfil nao tem imagem */
.profile-av.has-img { background-size: cover; background-position: center; font-size: 0; }
.profile-name { font-size: 18px; font-weight: 600; }
/* a engrenagem dos Ajustes, entre o relogio e o perfil: mesma altura do chip, redonda */
.cfg { display: inline-flex; align-items: center; justify-content: center; width: clamp(30px, 3.5vh, 38px); height: clamp(30px, 3.5vh, 38px); margin-left: 12px; flex: none;
    border: 0; border-radius: 50%; background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.88);
    cursor: pointer; outline: none; transition: transform 220ms var(--spring), background 150ms ease, color 150ms ease; }
.cfg svg { display: block; }
.cfg.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.08); box-shadow: 0 12px 30px rgba(0,0,0,0.35); z-index: 1; }

/* ===================== VIEWS ===================== */
.views { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 5; }
.view { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: none; overflow: hidden; }
.view.is-on { display: block; animation: viewIn 260ms var(--ease); }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
.has-video:not(.in-live):not(.in-guide) .views, .has-video .top { opacity: 0; pointer-events: none; }
.in-live.has-video .views, .in-guide.has-video .views { opacity: 1; }
.in-live.has-video .top, .in-guide.has-video .top { opacity: 1; }
.is-fullscreen .views, .is-fullscreen .top, .is-fullscreen .detail { opacity: 0 !important; }

.empty { position: absolute; left: 0; right: 0; top: 380px; text-align: center; }
.empty__title { font-size: 46px; font-weight: 700; margin-bottom: 16px; }
.empty__text { font-size: 28px; color: var(--dim); line-height: 1.4; max-width: 1000px; margin: 0 auto 40px; white-space: pre-line; }
.empty .btn { margin: 0 12px; }

/* ===================== BUTTONS, CHIPS ===================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; height: 76px; padding: 0 40px; border-radius: 38px; font-size: 28px; font-weight: 600; color: #fff;
    background: var(--glass), rgba(60, 64, 78, 0.62); box-shadow: var(--glass-shadow); transition: transform 240ms var(--spring), background 150ms ease, color 150ms ease; white-space: nowrap; }
.btn--primary { background: var(--glass), rgba(255,255,255,0.26); }
.btn.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.08); box-shadow: 0 18px 40px rgba(0,0,0,0.45); z-index: 2; }
.btn--round { width: 76px; padding: 0; }
.chip { display: inline-flex; align-items: center; height: 58px; padding: 0 28px; border-radius: 29px; font-size: 24px; font-weight: 600; color: rgba(255,255,255,0.86); white-space: nowrap;
    background: var(--glass), rgba(40, 43, 54, 0.66); box-shadow: var(--glass-shadow); transition: transform 220ms var(--spring), background 150ms ease, color 150ms ease; }
.chip.is-current { background: rgba(255,255,255,0.22); color: #fff; }
.chip.is-on { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.45); }
.chip.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.08); box-shadow: 0 14px 30px rgba(0,0,0,0.4); z-index: 2; }
.chip__n { margin-left: 12px; font-size: 20px; opacity: 0.6; }
.chip.is-focused .lrow__flag { background: rgba(0,0,0,0.08); color: #3a3a3c; }

.imdb { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 6px; border-radius: 8px; font-size: 23px; font-weight: 700; color: #fff; }
.imdb b { display: inline-block; padding: 1px 7px; border-radius: 5px; background: var(--imdb); color: #000; font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.badge { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 7px; border: 2px solid rgba(255,255,255,0.5); font-size: 18px; font-weight: 700; color: rgba(255,255,255,0.86); letter-spacing: 0.5px; }
.badge--live { border: 0; background: var(--live); color: #fff; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.5); margin: 0 14px; vertical-align: middle; }
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.22); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: #fff; }

/* ===================== HOME (Apple TV / Netflix style) ===================== */
.home { position: absolute; left: 0; top: 0; width: 1920px; transition: transform 380ms var(--ease); }
.hero { position: relative; height: 780px; padding: 220px 0 0 96px; transition: opacity 320ms ease; }
.home.is-rows .hero { opacity: 0; }
.in-rows .bg__scrim { background: linear-gradient(180deg, rgba(6,7,11,0.5) 0%, rgba(6,7,11,0.78) 45%, rgba(6,7,11,0.92) 100%); }
.hero__logo { max-width: 760px; max-height: 170px; display: block; margin-bottom: 26px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5)); }
.hero__title { font-size: 84px; font-weight: 700; letter-spacing: -1.5px; line-height: 1.02; max-width: 1100px; margin-bottom: 22px; text-shadow: 0 4px 30px rgba(0,0,0,0.5);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero__kicker { font-size: 24px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 14px; }
.hero__meta { display: flex; align-items: center; gap: 0; font-size: 25px; font-weight: 500; color: rgba(255,255,255,0.86); margin-bottom: 20px; }
.hero__meta > * + * { margin-left: 16px; }
.hero__desc { width: 900px; font-size: 27px; line-height: 1.38; color: rgba(255,255,255,0.84); text-shadow: 0 2px 14px rgba(0,0,0,0.6);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 34px; min-height: 37px; }
.hero__btns { display: flex; gap: 22px; }
.hero__dots { position: absolute; right: 96px; bottom: 40px; display: flex; gap: 10px; }
.hero__dots i { width: 10px; height: 10px; border-radius: 5px; background: rgba(255,255,255,0.35); transition: width 300ms var(--ease), background 300ms ease; }
.hero__dots i.is-on { width: 34px; background: #fff; }

.rows { padding-bottom: 300px; }
.row { position: relative; margin-bottom: 26px; }
.row__title { padding-left: 96px; height: 54px; font-size: 31px; font-weight: 700; letter-spacing: -0.2px; display: flex; align-items: center; gap: 14px; }
.row__title small { font-size: 23px; font-weight: 500; color: var(--faint); }
.row__clip { position: relative; height: var(--row-h, 300px); overflow: visible; }
.row__strip { position: absolute; left: 96px; top: 18px; display: flex; gap: 36px; transition: transform 360ms var(--ease); }

/* Cards */
.card { position: relative; flex: none; transition: transform 260ms var(--spring); }
.card__art { position: relative; border-radius: 18px; overflow: hidden; background: #1c1f28 center / cover no-repeat; box-shadow: 0 8px 20px rgba(0,0,0,0.35); transition: box-shadow 260ms ease; }
.card__art::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(165deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.06) 38%, rgba(255,255,255,0) 60%); opacity: 0; transition: opacity 260ms ease; }
.card.is-focused { transform: scale(1.1); z-index: 3; }
.card.is-focused .card__art { box-shadow: 0 28px 46px -8px rgba(0,0,0,0.7), 0 10px 18px rgba(0,0,0,0.4); }
.card.is-focused .card__art::after { opacity: 1; }
.card__fallback { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center;
    font-size: 28px; font-weight: 700; line-height: 1.15; color: rgba(255,255,255,0.88); background: linear-gradient(160deg, #2c3448 0%, #151a26 100%); }
.card__cap { margin-top: 14px; font-size: 23px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255,255,255,0.9); }
.card__sub { margin-top: 3px; font-size: 20px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 10px; }
.card__sub .imdb { height: 26px; font-size: 19px; padding: 0; }
.card__sub .imdb b { font-size: 14px; padding: 0 5px; }
.card__bar { position: absolute; left: 16px; right: 16px; bottom: 14px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.3); overflow: hidden; }
.card__bar i { display: block; height: 100%; background: #fff; border-radius: 3px; }
.card__rate { position: absolute; top: 12px; right: 12px; }
.card__rate .imdb { height: 30px; background: rgba(0,0,0,0.62); padding: 0 9px 0 5px; font-size: 19px; }
.card__rate .imdb b { font-size: 14px; padding: 0 5px; }

.card--poster .card__art { width: 230px; height: 345px; }
.card--poster { width: 230px; }
.card--wide .card__art { width: 420px; height: 236px; }
.card--wide { width: 420px; }
.card__wtxt { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 20px 26px; background: linear-gradient(transparent, rgba(0,0,0,0.82) 60%); }
.card__wtitle { font-size: 27px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__wsub { font-size: 20px; color: rgba(255,255,255,0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Channel card: logo on glass, what is on, live progress */
.card--channel { width: 330px; }
.card--channel .card__art { width: 330px; height: 186px; background: radial-gradient(80% 90% at 50% 30%, #3a3f4d 0%, #181b23 100%); }
.card__logo { position: absolute; left: 40px; right: 40px; top: 50px; bottom: 56px; background: center / contain no-repeat; }
.card__logo--txt { display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; text-align: center; line-height: 1.05; background: none; }
.card__now { position: absolute; left: 18px; right: 18px; bottom: 24px; font-size: 19px; font-weight: 600; color: rgba(255,255,255,0.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.card--channel .card__bar { bottom: 12px; height: 5px; left: 40px; right: 40px; }
.card__live { position: absolute; top: 12px; left: 12px; }

/* ===================== LIVE TV (TiviMate layout) ===================== */
/* The whole view is dark except the preview window, where the video plane shows through */
.live__hole { position: absolute; left: 1190px; top: 150px; width: 670px; height: 377px; border-radius: 22px; box-shadow: 0 0 0 3000px #07080c; z-index: 0; }
.live__hole::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.12); }
.live__holemsg { position: absolute; left: 1190px; top: 150px; width: 670px; height: 377px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    font-size: 24px; color: var(--faint); text-align: center; z-index: 1; }
.live__holemsg.is-hidden { display: none; }
.live__cats { position: absolute; left: 50px; top: 140px; width: 420px; height: 920px; overflow: hidden; padding: 10px 14px; z-index: 1;
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 60px), transparent 100%); }
.live__chans { position: absolute; left: 480px; top: 140px; width: 690px; height: 920px; overflow: hidden; padding: 10px 14px; z-index: 1;
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 60px), transparent 100%); }
.live__list { transition: transform 240ms var(--ease); }
.live__head { height: 50px; padding-left: 22px; font-size: 21px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; }
.lrow { display: flex; align-items: center; height: 64px; margin-bottom: 8px; padding: 0 24px; border-radius: 32px; font-size: 25px; font-weight: 500; color: rgba(255,255,255,0.86);
    transition: transform 220ms var(--spring), background 150ms ease, color 150ms ease; }
.lrow__label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow__n { margin-left: 14px; font-size: 20px; color: var(--faint); }
.lrow__flag { margin-right: 12px; font-size: 16px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.8); letter-spacing: 0.5px; }
.lrow.is-current { background: rgba(255,255,255,0.13); color: #fff; }
.lrow.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.04); box-shadow: 0 14px 30px rgba(0,0,0,0.35); }
.lrow.is-focused .lrow__n { color: #6e6e73; }
.lrow.is-focused .lrow__flag { background: rgba(0,0,0,0.08); color: #3a3a3c; }
.lrow__ico { margin-right: 14px; display: flex; opacity: 0.85; }

.crow { display: flex; align-items: center; height: 92px; margin-bottom: 8px; padding: 0 22px 0 16px; border-radius: 24px; transition: transform 220ms var(--spring), background 150ms ease, color 150ms ease; }
.crow__num { width: 58px; flex: none; font-size: 22px; font-weight: 600; color: var(--faint); text-align: center; }
.crow__logo { flex: none; width: 116px; height: 66px; border-radius: 12px; margin-right: 20px; background: rgba(255,255,255,0.07) center / contain no-repeat; background-origin: content-box; padding: 7px 10px;
    display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: rgba(255,255,255,0.7); overflow: hidden; text-align: center; line-height: 1.05; }
.crow__txt { flex: 1; min-width: 0; }
.crow__name { font-size: 27px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 10px; }
.crow__name .q { font-size: 15px; font-weight: 700; padding: 1px 6px; border-radius: 4px; border: 1.5px solid currentColor; opacity: 0.55; }
.crow__prog { margin-top: 4px; font-size: 21px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow__bar { margin-top: 8px; width: 220px; height: 4px; }
.crow__fav { flex: none; margin-left: 12px; color: #ffd60a; display: flex; }
.crow.is-current { background: rgba(255,255,255,0.10); }
.crow.is-current .crow__num { color: var(--blue); }
.crow.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.03); box-shadow: 0 14px 30px rgba(0,0,0,0.35); }
.crow.is-focused .crow__num, .crow.is-focused .crow__prog { color: #6e6e73; }
.crow.is-focused .crow__logo { background-color: rgba(0,0,0,0.85); color: #fff; }
.crow.is-focused .bar { background: rgba(0,0,0,0.14); }
.crow.is-focused .bar i { background: #1d1d1f; }
.crow.is-focused .crow__fav { color: #ff9f0a; }

.live__info { position: absolute; left: 1190px; top: 552px; width: 670px; height: 500px; z-index: 1; }
.live__chan { display: flex; align-items: center; gap: 16px; font-size: 24px; font-weight: 600; color: var(--dim); margin-bottom: 12px; }
.live__now { font-size: 38px; font-weight: 700; line-height: 1.12; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live__time { display: flex; align-items: center; gap: 18px; font-size: 22px; color: var(--dim); margin-bottom: 18px; }
.live__time .bar { flex: 1; max-width: 300px; }
.live__desc { font-size: 23px; line-height: 1.4; color: rgba(255,255,255,0.72); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 20px; }
.live__next { font-size: 22px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live__next b { color: rgba(255,255,255,0.8); font-weight: 600; }
.live__hint { position: absolute; left: 1190px; bottom: 30px; font-size: 20px; color: var(--faint); z-index: 1; }

/* ===================== GUIDE (EPG grid) ===================== */
.guide__hole { position: absolute; left: 1300px; top: 140px; width: 560px; height: 315px; border-radius: 20px; box-shadow: 0 0 0 3000px #07080c; z-index: 0; }
.guide__hole::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.12); }
.guide__top { position: absolute; left: 96px; top: 150px; width: 1150px; height: 300px; z-index: 1; }
.guide__cat { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.guide__title { font-size: 44px; font-weight: 700; line-height: 1.1; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guide__meta { font-size: 23px; color: var(--dim); margin-bottom: 14px; display: flex; align-items: center; gap: 14px; }
.guide__desc { font-size: 23px; line-height: 1.4; color: rgba(255,255,255,0.72); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.guide__grid { position: absolute; left: 50px; top: 478px; width: 1820px; height: 580px; overflow: hidden; z-index: 1; }
.guide__ruler { position: absolute; left: 376px; top: 0; right: 0; height: 44px; overflow: hidden; }
.guide__tick { position: absolute; top: 6px; font-size: 21px; font-weight: 600; color: var(--dim); padding-left: 12px; border-left: 2px solid rgba(255,255,255,0.18); height: 30px; line-height: 30px; }
.guide__body { position: absolute; left: 0; top: 52px; right: 0; bottom: 0; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 50px), transparent 100%); }
.guide__rows { transition: transform 240ms var(--ease); }
.grow { position: relative; height: 84px; margin-bottom: 8px; }
.grow__ch { position: absolute; left: 0; top: 0; width: 360px; height: 84px; border-radius: 18px; background: rgba(255,255,255,0.07); display: flex; align-items: center; padding: 0 14px; gap: 14px; }
.grow__ch.is-current { background: rgba(255,255,255,0.16); }
.grow__num { width: 44px; font-size: 20px; font-weight: 600; color: var(--faint); text-align: center; flex: none; }
.grow__logo { width: 92px; height: 54px; flex: none; background: center / contain no-repeat; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; text-align: center; color: rgba(255,255,255,0.75); overflow: hidden; }
.grow__name { font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.grow__progs { position: absolute; left: 376px; top: 0; right: 0; height: 84px; overflow: hidden; }
.gcell { position: absolute; top: 0; height: 84px; border-radius: 16px; padding: 0 18px; display: flex; flex-direction: column; justify-content: center; overflow: hidden;
    background: rgba(255,255,255,0.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); transition: background 120ms ease, color 120ms ease; }
.gcell__t { font-size: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcell__h { font-size: 18px; color: var(--faint); white-space: nowrap; overflow: hidden; }
.gcell.is-now { background: rgba(255,255,255,0.15); }
.gcell.is-past { opacity: 0.55; }
.gcell.is-empty { background: rgba(255,255,255,0.04); }
.gcell.is-empty .gcell__t { color: var(--faint); font-weight: 500; }
.gcell.is-focused { background: var(--focus-bg); color: var(--focus-fg); opacity: 1; box-shadow: 0 10px 24px rgba(0,0,0,0.35); z-index: 2; }
.gcell.is-focused .gcell__h, .gcell.is-empty.is-focused .gcell__t { color: #6e6e73; }
.guide__now { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: var(--live); border-radius: 2px; z-index: 3; box-shadow: 0 0 10px rgba(255,69,58,0.6); }

/* ===================== MOVIES / SERIES ===================== */
.vod__chips { position: absolute; left: 0; right: 0; top: 140px; height: 90px; overflow: hidden; }
.vod__chipstrip { position: absolute; left: 96px; top: 14px; display: flex; gap: 16px; transition: transform 300ms var(--ease); }
.vod__grid { position: absolute; left: 0; right: 0; top: 236px; bottom: 0; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26px, #000 calc(100% - 60px), transparent 100%); }
.vod__gridin { position: absolute; left: 96px; top: 30px; display: grid; grid-template-columns: repeat(7, 220px); column-gap: 36px; row-gap: 34px; transition: transform 320ms var(--ease); }
.vod__gridin .card--poster, .vod__gridin .card--poster .card__art { width: 220px; }
.vod__gridin .card--poster .card__art { height: 330px; }
.vod__count { position: absolute; right: 96px; top: 160px; font-size: 22px; color: var(--faint); }

/* ===================== DETAIL (movie / series page) ===================== */
.detail { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 25; display: none; overflow: hidden; background: #06070b; }
.detail.is-open { display: block; animation: viewIn 280ms var(--ease); }
.detail__bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: center / cover no-repeat; transition: opacity 400ms ease; }
.detail__scrim { position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(90deg, rgba(6,7,11,0.96) 0%, rgba(6,7,11,0.82) 34%, rgba(6,7,11,0.25) 66%, rgba(6,7,11,0.1) 100%),
                linear-gradient(180deg, rgba(6,7,11,0.2) 0%, rgba(6,7,11,0) 30%, rgba(6,7,11,0.6) 72%, #06070b 100%); }
.detail__in { position: absolute; left: 0; top: 0; width: 1920px; transition: transform 380ms var(--ease); }
.detail__main { position: relative; height: 1080px; padding: 200px 0 0 96px; }
.detail__logo { max-width: 720px; max-height: 200px; display: block; margin-bottom: 28px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5)); }
.detail__title { font-size: 80px; font-weight: 700; letter-spacing: -1.5px; line-height: 1.02; max-width: 1150px; margin-bottom: 24px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail__meta { display: flex; align-items: center; flex-wrap: wrap; font-size: 25px; color: rgba(255,255,255,0.86); margin-bottom: 22px; }
.detail__meta > * { margin-right: 14px; }
.detail__meta > .dot { margin: 0 14px 0 0; }
.detail__tagline { font-size: 26px; font-style: italic; color: rgba(255,255,255,0.7); margin-bottom: 14px; }
.detail__desc { width: 1000px; font-size: 28px; line-height: 1.42; color: rgba(255,255,255,0.86); margin-bottom: 40px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.detail__btns { display: flex; gap: 22px; margin-bottom: 36px; }
.detail__people { width: 1000px; font-size: 22px; line-height: 1.5; color: var(--faint); }
.detail__people b { color: rgba(255,255,255,0.75); font-weight: 600; }
.detail__progress { display: flex; align-items: center; gap: 16px; font-size: 22px; color: var(--dim); margin: -16px 0 30px; }
.detail__progress .bar { width: 260px; }
.detail__section { padding: 0 96px; margin-top: -270px; position: relative; }
.detail__seasons { display: flex; gap: 14px; margin-bottom: 22px; height: 70px; align-items: center; }
.detail__eps { position: relative; height: 420px; }
.detail__epstrip { position: absolute; left: 0; top: 10px; display: flex; gap: 32px; transition: transform 340ms var(--ease); }
.ep { flex: none; width: 420px; transition: transform 260ms var(--spring); }
.ep__art { position: relative; width: 420px; height: 236px; border-radius: 18px; overflow: hidden; background: #1c1f28 center / cover no-repeat; box-shadow: 0 8px 20px rgba(0,0,0,0.35); }
.ep__n { margin-top: 14px; font-size: 20px; font-weight: 600; color: var(--faint); }
.ep__t { margin-top: 2px; font-size: 25px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep__d { margin-top: 6px; font-size: 20px; line-height: 1.35; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep__d--none { color: rgba(255,255,255,0.34); font-style: italic; }
.ep.is-focused { transform: scale(1.08); z-index: 2; }
.ep.is-focused .ep__art { box-shadow: 0 0 0 4px var(--focus-bg), 0 26px 44px rgba(0,0,0,0.6); }

/* Cast & Crew */
.detail__h { height: 56px; font-size: 30px; font-weight: 700; display: flex; align-items: center; margin-bottom: 4px; }
.detail__cast { position: relative; margin-top: 26px; }
.detail__caststrip { position: relative; height: 300px; }
.pcard { flex: none; width: 190px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 240ms var(--spring); }
.pcard__photo { width: 170px; height: 170px; border-radius: 50%; background: #2a2f3c center 20% / cover no-repeat; display: flex; align-items: center; justify-content: center;
    font-size: 52px; font-weight: 700; color: rgba(255,255,255,0.7); box-shadow: 0 10px 24px rgba(0,0,0,0.35); transition: box-shadow 240ms ease; }
.pcard__name { margin-top: 14px; font-size: 22px; font-weight: 600; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__role { margin-top: 2px; font-size: 18px; color: var(--faint); max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard.is-focused { transform: scale(1.1); z-index: 2; }
.pcard.is-focused .pcard__photo { box-shadow: 0 0 0 5px var(--focus-bg), 0 20px 40px rgba(0,0,0,0.55); }

/* ===================== PERSON (actor, director) ===================== */
.person { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 27; display: none; overflow: hidden;
    background: radial-gradient(120% 90% at 20% 0%, #1d2536 0%, #0b0d14 55%, #06070b 100%); }
.person.is-open { display: block; animation: viewIn 260ms var(--ease); }
.person__in { position: absolute; left: 0; top: 0; width: 1920px; transition: transform 360ms var(--ease); }
.person__head { display: flex; gap: 64px; padding: 110px 96px 0; height: 520px; }
.person__photo { flex: none; width: 320px; height: 320px; border-radius: 50%; background: #2a2f3c center 20% / cover no-repeat; box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center; font-size: 100px; font-weight: 700; color: rgba(255,255,255,0.7); }
.person__txt { flex: 1; min-width: 0; padding-top: 24px; }
.person__name { font-size: 72px; font-weight: 700; letter-spacing: -1px; margin-bottom: 14px; }
.person__meta { font-size: 25px; color: var(--dim); margin-bottom: 22px; min-height: 30px; }
.person__bio { font-size: 25px; line-height: 1.42; color: rgba(255,255,255,0.8); max-width: 1300px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.person__rows { padding-bottom: 300px; }
.person__empty { padding: 30px 96px; font-size: 28px; color: var(--dim); }

/* ===================== PLAYER OSD ===================== */
.osd { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 30; display: none; pointer-events: none; }
.osd.is-on { display: block; }
.osd__shade { position: absolute; left: 0; right: 0; bottom: 0; height: 520px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.75)); opacity: 0; transition: opacity 260ms ease; }
.osd.is-shown .osd__shade { opacity: 1; }
.osd__bar { position: absolute; left: 60px; right: 60px; bottom: 50px; min-height: 190px; border-radius: 40px; padding: 30px 40px; display: flex; align-items: center; gap: 34px;
    opacity: 0; transform: translateY(30px); transition: opacity 240ms ease, transform 320ms var(--ease); }
.osd.is-shown .osd__bar { opacity: 1; transform: none; }
.osd__logo { flex: none; width: 190px; height: 120px; border-radius: 22px; background: rgba(255,255,255,0.08) center / contain no-repeat; background-origin: content-box; padding: 14px 18px;
    display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; text-align: center; }
.osd__txt { flex: 1; min-width: 0; }
.osd__ch { display: flex; align-items: center; gap: 14px; font-size: 25px; font-weight: 600; color: var(--dim); margin-bottom: 8px; }
.osd__ch b { color: #fff; font-weight: 700; }
.osd__title { font-size: 40px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 14px; }
.osd__time { display: flex; align-items: center; gap: 20px; font-size: 22px; color: var(--dim); }
.osd__time .bar { flex: 1; height: 8px; border-radius: 4px; }
.osd__next { margin-top: 12px; font-size: 22px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osd__next b { color: rgba(255,255,255,0.82); font-weight: 600; }
.osd__clock { position: absolute; top: 50px; right: 60px; font-size: 34px; font-weight: 600; text-shadow: 0 2px 14px rgba(0,0,0,0.7); opacity: 0; transition: opacity 240ms ease; }
.osd.is-shown .osd__clock { opacity: 1; }
.osd__num { position: absolute; top: 50px; left: 60px; height: 96px; min-width: 150px; padding: 0 30px; border-radius: 30px; font-size: 64px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.osd__num.is-on { display: flex; }
.osd__state { position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px; border-radius: 36px; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
    background: rgba(10,12,16,0.72); box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.08); }
.osd__state.is-on { display: flex; }
.osd__load { position: relative; width: 152px; height: 152px; display: flex; align-items: center; justify-content: center; }
.osd__loadlogo { display: none; width: 118px; height: 118px; object-fit: contain; border-radius: 18px; }
.osd__loadring { display: none; position: absolute; inset: 0; border-radius: 50%; border: 5px solid rgba(255,255,255,0.14); border-top-color: #e50914; animation: spin 1s linear infinite; }
.osd__state.has-logo .osd__spin { display: none; }
.osd__state.has-logo .osd__loadring { display: block; }
.osd__loadname { max-width: 290px; font-size: 26px; font-weight: 700; color: #fff; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osd__spin { width: 64px; height: 64px; border-radius: 50%; border: 6px solid rgba(255,255,255,0.25); border-top-color: #fff; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.osd__err { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 900px; padding: 40px 50px; border-radius: 36px; text-align: center; display: none; }
.osd__err.is-on { display: block; }
.osd__err h3 { font-size: 38px; margin-bottom: 14px; }
.osd__err p { font-size: 25px; color: var(--dim); line-height: 1.4; }
/* VOD transport */
.osd__seek { display: flex; align-items: center; gap: 22px; font-size: 24px; font-weight: 600; color: rgba(255,255,255,0.86); font-variant-numeric: tabular-nums; }
.osd__seek .bar { flex: 1; height: 10px; border-radius: 5px; position: relative; overflow: visible; }
.osd__seek .bar i { border-radius: 5px; }
.osd__seek .bar u { position: absolute; top: -7px; width: 24px; height: 24px; margin-left: -12px; border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.5); text-decoration: none; }
.osd__seekhint { margin-top: 12px; font-size: 21px; color: var(--faint); }
/* Channel list over the picture (OK in live) */
.osd__list { position: absolute; left: 40px; top: 40px; bottom: 40px; width: 720px; border-radius: 40px; padding: 26px 22px; overflow: hidden; opacity: 0; transform: translateX(-40px);
    transition: opacity 220ms ease, transform 300ms var(--ease); pointer-events: none; }
.osd.has-list .osd__list { opacity: 1; transform: none; }
.osd__listhead { height: 56px; padding: 0 18px; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.osd__listhead small { font-size: 21px; font-weight: 500; color: var(--faint); }
.osd__listclip { position: absolute; left: 22px; right: 22px; top: 92px; bottom: 26px; overflow: hidden; }
.osd.has-list .osd__bar { opacity: 0; }

/* ===================== MULTIVIEW ===================== */
.mvui { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 30; display: none; }
.mvui.is-on { display: block; }
.mvt { position: absolute; border-radius: 6px; box-shadow: 0 0 0 0 transparent; transition: box-shadow 160ms ease; }
.mvt.is-focused { box-shadow: 0 0 0 5px var(--focus-bg), 0 0 30px rgba(0,0,0,0.6); z-index: 2; }
.mvt__label { position: absolute; left: 18px; bottom: 16px; padding: 8px 16px; border-radius: 14px; background: rgba(0,0,0,0.6); font-size: 21px; font-weight: 600; display: flex; align-items: center; gap: 10px; max-width: 90%; }
.mvt__label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mvt__audio { display: none; }
.mvt.is-audio .mvt__audio { display: flex; }
.mvt__empty { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; font-size: 26px; color: var(--dim); background: #0b0c11; border-radius: 6px; }
.mvt__plus { width: 90px; height: 90px; border-radius: 45px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); }
.mvt.is-focused .mvt__plus { background: var(--focus-bg); color: var(--focus-fg); }
.mvt__err { position: absolute; left: 0; right: 0; top: 45%; text-align: center; font-size: 22px; color: var(--dim); }
.mvui__hint { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 20px; color: rgba(255,255,255,0.6); text-shadow: 0 1px 8px #000; }

/* ===================== SHEET (settings, forms, QR, pickers) ===================== */
.sheet { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 35; display: none; background: linear-gradient(160deg, #222a3b 0%, #11141c 55%, #090a0f 100%); }
.sheet.is-open { display: block; animation: viewIn 240ms var(--ease); }
.sheet__title { position: absolute; top: 62px; left: 0; right: 0; text-align: center; font-size: 52px; font-weight: 700; letter-spacing: -0.5px; }
.sheet__hero { position: absolute; left: 160px; top: 230px; width: 640px; display: flex; flex-direction: column; align-items: center; }
.sheet__icon { width: 400px; height: 400px; border-radius: 96px; display: flex; align-items: center; justify-content: center; background: var(--glass), rgba(255,255,255,0.10); box-shadow: var(--glass-shadow); }
.sheet__desc { margin-top: 40px; width: 600px; font-size: 25px; line-height: 1.4; font-weight: 500; color: rgba(255,255,255,0.75); text-align: center; white-space: pre-line; min-height: 70px; }
.sheet__listwrap { position: absolute; left: 1000px; top: 170px; width: 820px; height: 870px; overflow: hidden; padding: 20px 20px 0;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 40px), transparent 100%); }
.sheet__list { transition: transform 300ms var(--ease); }
.srow { display: flex; align-items: center; height: 76px; margin-bottom: 12px; padding: 0 30px 0 34px; border-radius: 38px; background: rgba(255,255,255,0.12); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
    font-size: 29px; font-weight: 500; transition: transform 250ms var(--spring), background 150ms ease, color 150ms ease; }
.srow__label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 14px; }
.srow__value { margin-left: 20px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.srow__value.is-secret { letter-spacing: 3px; }
.srow__acc { margin-left: 14px; display: flex; color: rgba(255,255,255,0.5); }
.srow--action .srow__label { justify-content: center; }
.srow--danger { color: #ff453a; }
.srow__section { margin: 24px 0 12px 34px; font-size: 21px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.srow.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.04); box-shadow: 0 16px 36px rgba(0,0,0,0.3); }
.srow.is-focused .srow__value, .srow.is-focused .srow__acc { color: #6e6e73; }
.srow.is-focused.srow--danger { color: #ff3b30; }
.srow.is-editing { background: var(--focus-bg); color: var(--focus-fg); box-shadow: 0 0 0 4px var(--blue), 0 16px 36px rgba(0,0,0,0.3); }
.srow.is-editing .srow__value { color: var(--focus-fg); }

/* QR code page */
.qr { position: absolute; left: 160px; top: 200px; width: 640px; display: flex; flex-direction: column; align-items: center; }
.qr__box { width: 460px; height: 460px; padding: 30px; border-radius: 48px; background: #fff; box-shadow: 0 30px 70px rgba(0,0,0,0.45); }
.qr__box canvas { width: 400px; height: 400px; image-rendering: pixelated; display: block; }
.qr__url { margin-top: 30px; font-size: 26px; font-weight: 600; color: #fff; text-align: center; }
.qr__pin { margin-top: 10px; font-size: 22px; color: var(--dim); }
.qr__state { margin-top: 26px; display: flex; align-items: center; gap: 14px; font-size: 24px; color: var(--dim); }
.qr__state i { width: 14px; height: 14px; border-radius: 7px; background: #30d158; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.steps { position: absolute; left: 1000px; top: 230px; width: 780px; }
.step { display: flex; gap: 26px; margin-bottom: 44px; font-size: 30px; line-height: 1.35; color: rgba(255,255,255,0.88); }
.step b { flex: none; width: 56px; height: 56px; border-radius: 28px; background: rgba(255,255,255,0.14); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.steps .btn { margin-top: 20px; }

/* On-screen keyboard (search) */
.search__field { position: absolute; left: 96px; top: 150px; width: 1728px; height: 90px; border-radius: 45px; padding: 0 40px; display: flex; align-items: center; gap: 20px; font-size: 38px; font-weight: 600;
    background: var(--glass), rgba(40, 43, 54, 0.66); box-shadow: var(--glass-shadow); }
.search__field span { flex: 1; white-space: nowrap; overflow: hidden; }
.search__field .caret { display: inline-block; width: 3px; height: 44px; background: var(--blue); vertical-align: middle; animation: pulse 1s steps(1) infinite; margin-left: 2px; }
.search__field:not(.is-active) .caret { display: none; }
.search__ph { color: var(--faint); font-weight: 500; }
/* 14 keys a row with margins, not a CSS grid: TVs without grid support showed the letters in one column */
.kb { position: absolute; left: 96px; top: 270px; width: 1722px; display: flex; flex-wrap: wrap; }
.kb__key { flex: none; width: 98px; margin: 0 25px 12px 0; height: 70px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 29px; font-weight: 600; background: rgba(255,255,255,0.09);
    transition: transform 200ms var(--spring), background 120ms ease, color 120ms ease; }
.kb__key--wide { width: 221px; font-size: 23px; }
/* four rows like a computer's keyboard (or the alphabet), the actions in a column on the right */
.kb { top: 262px; flex-direction: column; }
.kb__row { display: flex; width: 1722px; }
.kb .kb__key { width: 116px; margin: 0 18px 12px 0; }
.kb__row:nth-child(2) { padding-left: 34px; }
.kb__row:nth-child(3) { padding-left: 68px; }
.kb .kb__key--alt { width: 150px; font-size: 22px; }
.kb .kb__key--act { width: 300px; margin-left: auto; margin-right: 0; font-size: 23px; }
.kb__key--tv { gap: 12px; }
.qr__pin--big { font-size: 64px; font-weight: 700; letter-spacing: 10px; }
.kb__key--tv svg { flex: none; }
.kb__key.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.12); box-shadow: 0 10px 24px rgba(0,0,0,0.4); z-index: 2; }
.search__results { position: absolute; left: 0; right: 0; top: 540px; bottom: 0; overflow: hidden; }
.search__results .rows { padding-bottom: 0; }
.search__in { transition: transform 360ms var(--ease); }

/* ===================== MENU (OK held), ALERT, TOAST ===================== */
.menu { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; display: none; background: rgba(0,0,0,0.45); }
.menu.is-open { display: block; }
.menu__panel { position: absolute; left: 50%; top: 50%; min-width: 620px; max-width: 900px; padding: 14px; border-radius: 32px; transform: translate(-50%, -50%) scale(0.92); opacity: 0;
    background: var(--glass), rgba(40, 42, 50, 0.97); transition: opacity 180ms ease, transform 320ms var(--spring); }
.menu.is-open .menu__panel { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.menu__title { padding: 16px 28px 14px; font-size: 24px; font-weight: 600; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu__item { display: flex; align-items: center; justify-content: space-between; gap: 40px; height: 80px; padding: 0 28px 0 30px; border-radius: 20px; font-size: 30px; font-weight: 600;
    transition: background 150ms ease, color 150ms ease, transform 220ms var(--spring); }
.menu__item.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.03); }
.menu__item.is-danger { color: #ff453a; }
.menu__item.is-focused.is-danger { color: #ff3b30; }
.menu__item svg { flex: none; opacity: 0.9; }
.menu__check { color: var(--blue); }
/* A long menu scrolls inside the panel (never past the screen's edges): about 10 lines, then a half line */
.menu__list { position: relative; max-height: 852px; overflow: hidden; margin: 0 -14px; padding: 6px 14px; scroll-behavior: smooth; }
.reduce-motion .menu__list { scroll-behavior: auto; }
.menu__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.alert { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 45; display: flex; align-items: center; justify-content: center; background: rgba(8, 9, 12, 0.9); opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.alert.is-open { opacity: 1; pointer-events: auto; }
.alert__box { width: 820px; text-align: center; transform: scale(0.94); transition: transform 320ms var(--spring); }
.alert.is-open .alert__box { transform: scale(1); }
.alert__title { margin: 0 0 18px; font-size: 46px; font-weight: 700; }
.alert__msg { margin: 0 0 46px; font-size: 29px; line-height: 1.38; color: rgba(255, 255, 255, 0.66); white-space: pre-line; }
.alert__buttons { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.alert__btn { width: 620px; height: 86px; line-height: 86px; border-radius: 20px; background: rgba(255, 255, 255, 0.14); font-size: 31px; font-weight: 600; transition: background 160ms ease, color 160ms ease, transform 240ms var(--spring); }
.alert__btn.is-danger { color: #ff453a; }
.alert__btn.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.06); }
.alert__btn.is-focused.is-danger { color: #ff3b30; }
.listwarn { width: 760px; text-align: left; margin: -8px 0 34px; display: flex; flex-direction: column; gap: 10px; }
.listblock { position: fixed; inset: 0; z-index: 80; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    background: radial-gradient(120% 100% at 50% 0%, #1a1016 0%, #0b0b0f 55%, #050507 100%); }
.listblock.is-open { display: flex; }
.lb__icon { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 26px;
    background: rgba(229,9,20,0.14); color: #ff7b7b; box-shadow: inset 0 0 0 1px rgba(229,9,20,0.4); }
.lb__title { margin: 0 0 14px; font-size: 52px; font-weight: 700; letter-spacing: -1px; color: #fff; }
.lb__msg { margin: 0 0 34px; max-width: 1100px; font-size: 27px; line-height: 1.4; color: rgba(255,255,255,0.62); }
.lb__list { width: 1100px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.lb__row { padding: 18px 24px; border-radius: 18px; text-align: left; background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07); }
.lb__row b { display: block; font-size: 25px; color: #fff; margin-bottom: 6px; }
.lb__row span { display: block; font-size: 22px; color: #ff9b8f; line-height: 1.35; }
.lb__row small { display: block; margin-top: 8px; font-size: 19px; color: rgba(255,255,255,0.5); }
.lb__actions { display: flex; gap: 14px; }
.lb__btn { min-width: 280px; height: 78px; line-height: 78px; border-radius: 20px; font-size: 27px; font-weight: 600; text-align: center;
    background: rgba(255,255,255,0.1); color: #fff; transition: transform 200ms var(--spring), background 160ms ease, color 160ms ease; }
.lb__btn.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.05); }
.listwarn__row { padding: 16px 20px; border-radius: 16px; background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07); }
.listwarn__row b { display: block; font-size: 24px; color: #fff; margin-bottom: 6px; }
.listwarn__row span { display: block; font-size: 20px; color: #ffb4b4; line-height: 1.35; }
.listwarn__row small { display: block; margin-top: 8px; font-size: 18px; color: rgba(255,255,255,0.5); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); display: flex; align-items: center; gap: 14px; padding: 18px 30px 18px 24px; border-radius: 22px;
    background: linear-gradient(180deg, rgba(38, 72, 128, 0.94), rgba(17, 28, 46, 0.97)); box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(111, 176, 255, 0.34);
    font-size: 25px; font-weight: 500; color: #eaf2ff; opacity: 0; transition: opacity 200ms ease, transform 300ms var(--ease); z-index: 50; max-width: 1400px; text-align: left; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast__ico { display: flex; flex: none; color: #8dc2ff; }
.toast__txt { min-width: 0; }

/* ---------- cartao de problema (js/ui.js, TV.fault) ----------
   Canto de baixo a direita, azul: o app explica o que houve, nao acusa. O codigo a direita do titulo e o
   que o operador procura no relatorio; os dois botoes andam com as setas e OK, Back fecha. */
.fault { position: fixed; inset: 0; z-index: 66; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.fault::before { content: ""; position: absolute; inset: 0; background: rgba(5, 7, 11, 0.88); backdrop-filter: blur(4px); }
.fault.is-open { opacity: 1; pointer-events: auto; }
.fault__card { position: relative; width: 900px; display: flex; gap: 22px; padding: 34px 38px 30px 44px; border-radius: 28px; overflow: hidden;
    background: linear-gradient(180deg, rgba(32, 62, 112, 0.98), rgba(13, 23, 40, 0.99));
    box-shadow: 0 40px 110px rgba(0,0,0,0.75), inset 0 0 0 1px rgba(111, 176, 255, 0.32);
    transform: translateY(26px) scale(0.97); transition: transform 340ms var(--spring); }
.fault.is-open .fault__card { transform: none; }
.fault__bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, #8dc2ff, #2f81f7); }
.fault__ico { flex: none; width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(47, 129, 247, 0.22); color: #a9d1ff; box-shadow: inset 0 0 0 1px rgba(111, 176, 255, 0.28); }
.fault__body { flex: 1; min-width: 0; }
.fault__head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.fault__title { margin: 0; font-size: 30px; font-weight: 700; color: #fff; min-width: 0; }
.fault__code { flex: none; padding: 6px 12px; border-radius: 10px; font-size: 18px; font-weight: 700; letter-spacing: 0.6px; font-variant-numeric: tabular-nums;
    background: rgba(47, 129, 247, 0.18); box-shadow: inset 0 0 0 1px rgba(111, 176, 255, 0.42); color: #b6d7ff; }
.fault__msg { margin: 0 0 8px; font-size: 24px; line-height: 1.38; color: rgba(233, 242, 255, 0.92); }
.fault__hint { margin: 0 0 18px; font-size: 21px; line-height: 1.36; color: rgba(176, 202, 234, 0.8); }
.fault__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.fault__meta { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
.fault__when { font-size: 18px; color: rgba(160, 185, 215, 0.62); }
.fault__sent { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; color: #8dc2ff; }
.fault__btns { display: flex; gap: 12px; flex: none; }
.fault__btn { height: 62px; padding: 0 26px; line-height: 62px; border-radius: 16px; font-size: 23px; font-weight: 600; white-space: nowrap;
    color: #dcebff; background: rgba(255, 255, 255, 0.08); transition: transform 200ms var(--spring), background 160ms ease, color 160ms ease; }
.fault__btn.is-primary { color: #fff; background: linear-gradient(180deg, #3d8bfd, #2f6fe0); box-shadow: 0 10px 24px rgba(47, 111, 224, 0.35); }
.fault__btn.is-focused { transform: scale(1.06); background: #fff; color: #10233f; }
.fault__btn.is-focused.is-primary { background: #fff; color: #1a4c96; }
.fault__btn.is-focused.is-ghost { background: #fff; color: #10233f; }

/* diagnostico (TV.status): leitura unica da conta, das listas e dos ultimos erros */
.diag { width: 1000px; max-height: 700px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.diag__group { padding: 16px 20px; border-radius: 16px; background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07); }
.diag__label { margin: 0 0 10px; font-size: 18px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(141,194,255,0.82); }
.diag__row { display: flex; align-items: baseline; gap: 16px; min-height: 34px; font-size: 21px; line-height: 1.35; color: rgba(233,242,255,0.9); }
.diag__row b { flex: none; min-width: 170px; font-weight: 600; color: rgba(255,255,255,0.55); }
.diag__row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diag__ok { color: #7ee2a8 !important; }
.diag__bad { color: #ff9b8f !important; }
.diag__list { max-height: 230px; overflow: hidden; }
.diag__ev { display: flex; gap: 14px; padding: 7px 0; font-size: 19px; border-top: 1px solid rgba(255,255,255,0.06); }
.diag__ev time { flex: none; width: 100px; color: rgba(160,185,215,0.62); font-variant-numeric: tabular-nums; }
.diag__ev code { flex: none; width: 175px; color: #b6d7ff; font-size: 17px; }
.diag__ev span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diag__empty { font-size: 20px; color: rgba(255,255,255,0.5); }

/* ===================== BOOT =====================
   Splash animado: letra por letra, brilho varrendo o logo e barra de progresso
   enquanto o catalogo carrega. Tudo desce junto com .is-hidden (500ms de fade).
   As regras usam opacity na keyframe e nao no seletor: .reduce-motion mata a
   animacao com animation:none e o logo nao pode sumir junto com ela. */
.boot { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(24px, 3.6vh, 40px); transition: opacity 500ms ease; }
.boot.is-hidden { opacity: 0; pointer-events: none; }
.boot__logo { position: relative; display: flex; align-items: baseline; gap: 14px; padding: 6px 8px; overflow: hidden; }
.boot__mark { font-size: clamp(74px, 6.3vw, 120px); font-weight: 700; letter-spacing: -3px; }
.boot__tv { font-size: clamp(74px, 6.3vw, 120px); font-weight: 400; letter-spacing: -2px; color: rgba(255,255,255,0.7); }
.boot__mark i, .boot__tv i { font-style: normal; display: inline-block; opacity: 1; animation: bootLetter 640ms var(--ease) both; }
.boot__mark i:nth-child(1) { animation-delay: 80ms; }
.boot__mark i:nth-child(2) { animation-delay: 170ms; }
.boot__mark i:nth-child(3) { animation-delay: 260ms; }
.boot__mark i:nth-child(4) { animation-delay: 350ms; }
.boot__mark i:nth-child(5) { animation-delay: 440ms; }
.boot__mark i:nth-child(6) { animation-delay: 530ms; }
.boot__tv i:nth-child(1) { animation-delay: 620ms; }
.boot__tv i:nth-child(2) { animation-delay: 710ms; }
.boot__tv i:nth-child(3) { animation-delay: 800ms; }
.boot__tv i:nth-child(4) { animation-delay: 890ms; }
.boot__tv i:nth-child(5) { animation-delay: 980ms; }
.boot__tv i:nth-child(6) { animation-delay: 1070ms; }
.boot__glint {
    position: absolute; top: 0; bottom: 0; left: -45%; width: 32%; pointer-events: none;
    background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-18deg); mix-blend-mode: screen;
    animation: bootGlint 2800ms 900ms ease-in-out infinite;
}
.boot__bar {
    width: clamp(240px, 26vw, 460px); height: 4px; border-radius: 2px; overflow: hidden;
    background: rgba(255,255,255,0.10); opacity: 1; animation: bootFade 520ms 700ms var(--ease) both;
}
.boot__bar i {
    display: block; height: 100%; width: 34%; border-radius: 2px;
    background: linear-gradient(90deg, #e50914, #ff5561);
    animation: bootSlide 1500ms cubic-bezier(0.6, 0, 0.35, 1) infinite;
    will-change: transform;
}
/* a real percentage: the bar stops moving and fills. scaleX is drawn by the GPU — the bar
   grows without a single layout, which is what keeps the splash at 60 fps on a weak TV */
.boot__bar.has-pct i {
    width: 100%; animation: none; transform-origin: 0 50%; transform: scaleX(0);
    transition: transform 380ms var(--ease);
}
/* progresso real fora do boot: a mesma barra, agora no modal de recarregar lista */
.loadbar { width: 620px; height: 5px; margin: 0 auto 40px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,0.10); }
.loadbar i { display: block; height: 100%; width: 34%; border-radius: 3px; background: linear-gradient(90deg, #e50914, #ff5561); animation: bootSlide 1500ms cubic-bezier(0.6, 0, 0.35, 1) infinite; will-change: transform; }
.loadbar.has-pct i { width: 100%; animation: none; transform-origin: 0 50%; transform: scaleX(0); transition: transform 380ms var(--ease); }
.loadpct { margin: -26px 0 26px; font-size: 20px; font-weight: 600; color: rgba(255,255,255,0.56); font-variant-numeric: tabular-nums; }
.boot__msg { font-size: clamp(17px, 1.35vw, 26px); color: var(--faint); min-height: 32px; text-align: center; padding: 0 24px; animation: bootFade 520ms 840ms var(--ease) both; }
@keyframes bootLetter { from { opacity: 0; transform: translateY(0.30em) scale(0.86); } to { opacity: 1; transform: none; } }
@keyframes bootGlint { 0% { left: -45%; opacity: 0; } 12% { opacity: 1; } 55% { opacity: 1; } 70%, 100% { left: 115%; opacity: 0; } }
@keyframes bootFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bootSlide { 0% { transform: translateX(-115%); } 100% { transform: translateX(320%); } }
@keyframes bootIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }

/* ===================== MOTION OFF ===================== */
.reduce-motion *, .reduce-motion *::after, .reduce-motion *::before { transition-duration: 0ms !important; animation: none !important; }

/* ===================== SCREEN SAVER (OLED screen protection, js/saver.js) ===================== */
.saver { position: fixed; top: 0; left: 0; width: 1920px; height: 1080px; z-index: 9000; background: #000; opacity: 0; visibility: hidden; transition: opacity 900ms ease, visibility 0s linear 900ms; overflow: hidden; }
.saver.is-on { opacity: 1; visibility: visible; transition: opacity 900ms ease, visibility 0s; }
.saver__pic { position: absolute; top: -5%; left: -5%; right: -5%; bottom: -5%; background: #000 center / cover no-repeat; opacity: 0; transition: opacity 2400ms ease; }
.saver__pic.is-on { opacity: 0.72; }
.saver__pic.is-moving { animation: saverPan 16s linear forwards; }
.saver__pic.is-moving.is-left { animation-name: saverPanLeft; }
@keyframes saverPan { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-2.5%, -1.5%); } }
@keyframes saverPanLeft { from { transform: scale(1.08) translate(-2.5%, 1%); } to { transform: scale(1) translate(0, 0); } }
/* A soft shade on the side of the time, so it reads on any picture */
.saver__shade { position: absolute; left: 0; right: 0; height: 62%; opacity: 0; transition: opacity 1200ms ease; pointer-events: none; }
.saver__shade--b { bottom: 0; background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.42) 34%, rgba(0,0,0,0) 100%); }
.saver__shade--t { top: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.42) 34%, rgba(0,0,0,0) 100%); }
.saver[data-corner="bl"] .saver__shade--b, .saver[data-corner="br"] .saver__shade--b,
.saver[data-corner="tl"] .saver__shade--t, .saver[data-corner="tr"] .saver__shade--t { opacity: 1; }
/* The time in a corner, with the interface's margins (120 px from the sides) */
.saver__clock { position: absolute; max-width: 980px; color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,0.45); opacity: 0; transition: opacity 900ms ease; }
.saver__clock.is-on { opacity: 1; }
.saver[data-corner="bl"] .saver__clock { left: 120px; bottom: 100px; text-align: left; }
.saver[data-corner="br"] .saver__clock { right: 120px; bottom: 100px; text-align: right; }
.saver[data-corner="tr"] .saver__clock { right: 120px; top: 92px; text-align: right; }
.saver[data-corner="tl"] .saver__clock { left: 120px; top: 92px; text-align: left; }
.saver__time { display: block; font-size: 140px; font-weight: 300; letter-spacing: -4px; line-height: 0.92; font-variant-numeric: tabular-nums; }
.saver[data-corner="bl"] .saver__time, .saver[data-corner="tl"] .saver__time { margin-left: -9px; }   /* the digits' own margin: lined up with the date */
.saver__date { display: block; margin-top: 22px; font-size: 26px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.saver__title { display: block; margin-top: 12px; font-size: 26px; font-weight: 400; color: rgba(255,255,255,0.56); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 700ms ease; }
.saver__title.is-on { opacity: 1; }

/* ===================== A QR CODE IN AN ALERT (Settings > Support APL TV) ===================== */
.alert__qr { display: flex; flex-direction: column; align-items: center; margin: -10px 0 40px; }
.alert__qr canvas { width: 360px; height: 360px; padding: 26px; border-radius: 40px; background: #fff; image-rendering: pixelated; box-shadow: 0 24px 60px rgba(0,0,0,0.45); }
.alert__qrurl { margin-top: 22px; font-size: 26px; font-weight: 600; color: rgba(255,255,255,0.8); }

/* ===================== A SHORT TEXT TO TYPE (TV.prompt: a group's name) ===================== */
.alert__field { margin: 6px auto 26px; max-width: 640px; min-height: 76px; padding: 18px 28px; border-radius: 22px; background: rgba(255,255,255,0.12); font-size: 34px; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert__ph { color: rgba(255,255,255,0.4); font-weight: 500; }

/* ===================== THE FIRST START: HOW TO SHOW THE PLAYLIST (TV.playlistSetup) ===================== */
.alert__box.setup { width: 1000px; }
.setup__list { margin: 0 0 30px; text-align: left; }
.setup__row { display: flex; align-items: center; gap: 24px; padding: 20px 30px; margin-bottom: 12px; border-radius: 24px; background: rgba(255,255,255,0.08); transition: background 160ms ease, color 160ms ease, transform 200ms ease; }
.setup__row.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.02); }
.setup__txt { flex: 1; min-width: 0; }
.setup__txt b { display: block; font-size: 30px; font-weight: 600; }
.setup__txt small { display: block; margin-top: 6px; font-size: 22px; opacity: 0.7; }
.setup__row em { font-style: normal; font-size: 28px; font-weight: 600; opacity: 0.85; }

/* ---------- Esportes (js/sports.js) ----------
   365Scores pelo helper: cartao de jogo com os dois escudos, placar ou horario, e a competicao.
   A pagina inteira sobe e desce por transform, como a Home, para nada ser cortado embaixo. */
.tab--icon { padding: 0 24px; }
.sp-page { position: absolute; left: 0; top: 0; width: 1920px; padding: 150px 0 160px; transition: transform 320ms var(--ease); }
.sp-rows { position: relative; }
.sp-note { position: absolute; left: 96px; top: 96px; display: none; align-items: center; gap: 14px; font-size: 26px; color: rgba(255,255,255,0.72); }
.sp-note.is-on { display: flex; }
.sp-note.is-error { color: #ffb4b4; }
.sp-note small { display: block; font-size: 20px; opacity: 0.75; }
.sp-card { width: 380px; height: 258px; border-radius: 26px; padding: 18px 22px 16px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(155deg, rgba(34,38,48,0.94) 0%, rgba(16,18,24,0.96) 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07), 0 12px 30px rgba(0,0,0,0.28);
    transition: transform 220ms var(--spring), background 160ms ease, box-shadow 160ms ease; }
.sp-card.is-live { background: linear-gradient(155deg, rgba(54,22,28,0.96) 0%, rgba(24,13,17,0.97) 100%); box-shadow: inset 0 0 0 2px rgba(229,9,20,0.55), 0 12px 30px rgba(0,0,0,0.3); }
.sp-card.is-done { opacity: 0.66; }
.sp-card.is-focused { transform: scale(1.05); background: var(--focus-bg); color: var(--focus-fg); box-shadow: 0 18px 44px rgba(0,0,0,0.5); z-index: 2; }
.sp-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 19px; color: rgba(255,255,255,0.66); }
.sp-card.is-focused .sp-card__top, .sp-card.is-focused .sp-card__foot { color: inherit; opacity: 0.8; }
.sp-card__comp { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.sp-card__comp img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.sp-card__when { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; flex: none; font-weight: 700; letter-spacing: 0.4px; }
.sp-card.is-live .sp-card__when { color: #ff6b6b; }
.sp-dot { width: 9px; height: 9px; border-radius: 50%; background: #e50914; box-shadow: 0 0 10px #e50914; }
.sp-card__body { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sp-team { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; }
.sp-team__logo { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; }
.sp-team__logo img { max-width: 84px; max-height: 84px; object-fit: contain; }
.sp-team__name { font-size: 20px; line-height: 1.15; text-align: center; color: #fff; max-height: 46px; overflow: hidden; }
.sp-card__score { font-size: 38px; font-weight: 700; letter-spacing: 1px; color: #fff; min-width: 100px; text-align: center; font-variant-numeric: tabular-nums; }
.sp-card__foot { font-size: 17px; color: rgba(255,255,255,0.52); min-height: 20px; }
.sp-page .row__title { font-size: 34px; font-weight: 700; letter-spacing: -0.6px; color: #fff; }
.sp-page .row__title small { font-size: 21px; font-weight: 500; color: rgba(255,255,255,0.48); letter-spacing: 0; }
.sp-page .row:first-child .row__title { color: #ff6b6b; }
.sp-empty { position: absolute; left: 96px; top: 30px; max-width: 980px; }
.sp-empty__ico { opacity: 0.5; margin-bottom: 18px; }
.sp-empty h2 { font-size: 38px; font-weight: 700; margin: 0 0 12px; }
.sp-empty p { font-size: 26px; color: rgba(255,255,255,0.72); margin: 0 0 10px; }
.sp-empty small { font-size: 21px; color: rgba(255,255,255,0.5); }

/* ---------- serie sem episodio na lista do provedor (1.0.28) ---------- */
.card__off { position: absolute; left: 14px; bottom: 14px; z-index: 2; padding: 6px 12px; border-radius: 12px; background: rgba(0,0,0,0.72); color: #ffb4b4; font-size: 18px; font-weight: 600; letter-spacing: 0.2px; }
.badge--off { background: rgba(229,9,20,0.22); color: #ff9a9a; }

/* ---------- sugestoes da busca (1.0.28): pilulas de texto, como na Netflix ---------- */
.sug { height: 96px; min-width: 220px; max-width: 520px; padding: 0 24px; border-radius: 20px; background: rgba(255,255,255,0.08); display: flex; align-items: center; gap: 14px; transition: transform 200ms var(--spring), background 160ms ease; }
.sug.is-focused { background: var(--focus-bg); color: var(--focus-fg); transform: scale(1.04); box-shadow: 0 12px 28px rgba(0,0,0,0.4); }
.sug__ico { opacity: 0.7; display: flex; }
.sug__txt { font-size: 26px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug.is-focused .sug__ico { opacity: 1; }

/* ---------- chapa premium (1.0.29) ----------
   Tres degraus para a imagem de um canal ou de um titulo: a logo do nosso pacote,
   a do provedor, e por fim a chapa do app. Assim nenhum cartao fica retangulo
   vazio, e nenhum canal herda a logo errada so para nao ficar sem. */
.plate {
    background-color: #0b1424;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 128'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%237ec8ff' stop-opacity='.58'/%3E%3Cstop offset='1' stop-color='%233a7bff' stop-opacity='.26'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='11' y='11' width='106' height='106' rx='27' fill='none' stroke='url(%23g)' stroke-width='4'/%3E%3Cpath d='M54 43l31 21-31 21z' fill='url(%23g)'/%3E%3C/svg%3E"),
        radial-gradient(120% 120% at 22% 6%, rgba(56,116,255,0.22) 0%, rgba(10,17,30,0) 64%),
        linear-gradient(150deg, #17253d 0%, #0f1a2c 48%, #0a1220 100%);
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: center, center, center;
    background-size: 88px auto, cover, cover;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.card__logo--txt.plate { font-size: 30px; color: rgba(233,241,255,0.92); }
.card__fallback.plate { background-position: center, center, center; background-size: 56px auto, cover, cover; color: rgba(233,241,255,0.9); }

/* ---------- Esportes (1.0.29) ----------
   Tres acrescimos, nada de layout novo: o escudo do time e a marca da competicao caem para as iniciais
   quando a imagem nao vem, o anel de carregamento fica limpo e centrado no lugar da nota, e o erro do
   servico ganha codigo. O cartao, as faixas e a altura das linhas seguem iguais. */
.sp-team__logo {
    position: relative; overflow: hidden; border-radius: 20px;
    background: linear-gradient(150deg, rgba(96,128,184,0.42) 0%, rgba(30,45,70,0.55) 55%, rgba(14,22,36,0.6) 100%);
}
.sp-team__logo::after {
    content: attr(data-i); position: absolute; left: 0; top: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 27px; font-weight: 700; letter-spacing: 1px; color: rgba(233,241,255,0.9);
}
.sp-team__logo img { position: relative; z-index: 1; max-width: 78px; max-height: 78px; object-fit: contain; }
.sp-team__logo.has-img { background: none; }
.sp-team__logo.has-img::after { content: none; }

.sp-comp__logo {
    position: relative; overflow: hidden; flex: none; width: 26px; height: 26px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(150deg, rgba(96,128,184,0.38) 0%, rgba(16,26,43,0.55) 100%);
}
.sp-comp__logo::after {
    content: attr(data-i); position: absolute; left: 0; top: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; letter-spacing: 0.3px; color: rgba(233,241,255,0.86);
}
.sp-comp__logo img { position: relative; z-index: 1; width: 26px; height: 26px; object-fit: contain; }
.sp-comp__logo.has-img { background: none; }
.sp-comp__logo.has-img::after { content: none; }

.sp-note.is-load { left: 0; right: 0; justify-content: center; }
/* o anel de carregamento do Esportes, na cor do app: dois arcos girando em sentidos
   opostos sobre um halo. So transform: nenhum repaint por quadro, e a tela fraca
   nao engasga. */
.sp-spin {
    position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(126,200,255,0.18) 0%, rgba(126,200,255,0) 64%);
}
.sp-spin::before, .sp-spin::after { content: ""; position: absolute; border-radius: 50%; box-sizing: border-box; }
.sp-spin::before {
    left: 0; top: 0; right: 0; bottom: 0;
    border: 3px solid rgba(126,200,255,0.14);
    border-top-color: #7ec8ff; border-right-color: rgba(58,123,255,0.9);
    animation: spSpin 820ms cubic-bezier(.5,.1,.5,.9) infinite;
}
.sp-spin::after {
    left: 9px; top: 9px; right: 9px; bottom: 9px;
    border: 2px solid rgba(126,200,255,0.10);
    border-bottom-color: rgba(126,200,255,0.92);
    animation: spSpin 560ms linear infinite reverse;
}
@keyframes spSpin { to { transform: rotate(360deg); } }

/* onde passa o jogo: o nome da emissora no pe do cartao, e o atalho quando a
   playlist do provedor tem o canal */
.sp-tv { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sp-tv span { overflow: hidden; text-overflow: ellipsis; }
.sp-tv.is-on { color: #8dc2ff; font-weight: 600; }
.sp-tv.is-on svg { flex: none; }

.sp-err { display: flex; flex-direction: column; align-items: flex-start; max-width: 940px; }
.sp-err > * + * { margin-top: 8px; }
.sp-err__code {
    display: inline-block; padding: 4px 12px; border-radius: 10px;
    background: rgba(229,9,20,0.2); color: #ff9a9a;
    font-size: 18px; font-weight: 700; letter-spacing: 0.6px;
}
.sp-err__why { font-size: 25px; line-height: 1.3; color: #ffc9c9; }
.sp-err small { font-size: 20px; color: var(--dim); }

/* ---------- menu do perfil, no desenho da Netflix de TV ----------
   OK no chip abre um painel escuro, colado no canto: fundo quase preto (o
   #141414 da Netflix), sem vidro e sem titulo grande; as linhas sao brancas, o
   foco e um retangulo cinza (nao uma pilula branca), os perfis vem com o
   desenho do servidor e o que esta em uso leva o visto. */
.pmenu {
    position: fixed; z-index: 60; top: 92px; right: clamp(20px, 2.2vw, 42px);
    width: clamp(248px, 17vw, 300px); pointer-events: auto;
    transform-origin: top right; animation: pmenuIn 160ms var(--ease) both;
}
.pmenu.is-off { display: none; }
.pmenu__panel {
    padding: 6px; border-radius: 6px;
    background: #141414;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 18px 44px rgba(0,0,0,0.72);
}
.pmenu__head {
    padding: 11px 12px 8px; font-size: 12px; font-weight: 700;
    letter-spacing: 1.3px; text-transform: uppercase; color: rgba(255,255,255,0.54);
}
.pmenu__list { display: flex; flex-direction: column; }
.pmenu__row {
    display: flex; align-items: center; gap: 12px;
    height: 46px; padding: 0 12px; border-radius: 4px;
    color: #fff; font-size: 17px; font-weight: 500;
    white-space: nowrap; cursor: pointer;
    transition: background 120ms ease;
}
.pmenu__row.is-focused { background: #333; color: #fff; }
.pmenu__row--sep { position: relative; margin-top: 6px; }
.pmenu__row--sep::before {
    content: ""; position: absolute; left: 12px; right: 12px; top: -3px; height: 1px;
    background: #333;
}
.pmenu__av {
    flex: none; width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #333; color: #fff;
    font-size: 15px; font-weight: 700;
}
.pmenu__av--img { background-size: cover; background-position: center; }
.pmenu__ico { flex: none; width: 30px; display: flex; align-items: center; justify-content: center; opacity: 0.8; }
.pmenu__row.is-focused .pmenu__ico { opacity: 1; }
.pmenu__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pmenu__check { flex: none; display: flex; color: #fff; }

@keyframes pmenuIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- "Ver tudo" no fim de uma fileira (1.0.29) ----------
   Um cartao do mesmo tamanho dos outros, sem capa: o icone da lista e o que falta
   ver. OK nele abre a aba certa com o filtro certo, em vez de abrir um titulo. */
.card--more .card__art {
    background:
        radial-gradient(120% 120% at 30% 8%, rgba(56,116,255,0.20) 0%, rgba(10,17,30,0) 66%),
        linear-gradient(150deg, rgba(28,42,66,0.92) 0%, rgba(13,21,35,0.94) 60%, rgba(9,15,25,0.96) 100%);
    border: 2px dashed rgba(255,255,255,0.18);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    box-sizing: border-box;
}
.card--more .card__moreico { display: flex; color: rgba(233,241,255,0.82); }
.card--more .card__moretxt { font-size: 19px; font-weight: 600; letter-spacing: 0.3px; color: rgba(233,241,255,0.6); text-align: center; padding: 0 18px; }
.card--more.is-focused .card__art { border-color: rgba(255,255,255,0.42); }
