:root {
  --bg: #0B0D12;
  --bg-2: #161B22;
  --glass: rgba(22, 27, 34, 0.72);
  --glass-strong: rgba(11, 13, 18, 0.88);
  --line: rgba(217, 221, 227, 0.14);
  --text: #D9DDE3;
  --muted: #8B949E;
  --accent: #FF2A2A;
  --accent-2: #FF5B4D;
  --accent-deep: #D90F16;
  --focus: #D9DDE3;
  --ok: #3ddc97;
  --warn: #f5c16c;
  --danger: #FF5B4D;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --topbar-height: 72px;
  --top: var(--topbar-height);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(255, 42, 42, 0.16), transparent 55%),
    radial-gradient(700px 480px at 100% 0%, rgba(217, 221, 227, 0.06), transparent 50%),
    var(--bg);
  color: var(--text);
  font: 18px/1.4 "Segoe UI", system-ui, sans-serif;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
#app { height: 100%; }
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.nav-link:focus-visible, .tile:focus-visible { outline-offset: 3px; }
.poster, .h-card, .continue-card, .ch-row {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.2s ease;
}
.poster:hover, .poster:focus-visible,
.h-card:hover, .h-card:focus-visible,
.continue-card:hover, .continue-card:focus-visible,
.ch-row:hover, .ch-row:focus-within {
  transform: translateY(-4px) scale(1.025);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.22);
  z-index: 2;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3A424C; border-radius: 99px; }

video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
}

.shell { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.shell-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.shell-body.has-browse,
.shell-body:has(.browse) { overflow: hidden; }
.top, .stage-top {
  min-height: var(--top);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(11, 13, 18, 0.8);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  z-index: 5;
}
.stage-top {
  position: absolute; top: 0; left: 0; right: 0;
  background: linear-gradient(rgba(11, 13, 18, 0.78), transparent);
  border: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
#live-stage.chrome-idle .stage-top {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
}
.top-gap { flex: 1; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.icon-btn.on { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.22); }
.brand { display: flex; align-items: center; flex: none; }
.logo-plate {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.logo-plate img {
  height: 48px;
  width: auto;
  max-width: none;
  aspect-ratio: 973 / 336;
  object-fit: contain;
}
.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; width: 0; height: 0; }
.nav-short { display: none; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
}
.nav-link svg, .tile svg, .icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-link.on, .nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}
.icon-btn, .avatar {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--text);
}
.avatar { border-radius: 50%; font-weight: 800; color: var(--focus); }

.btn, .opt, .pill {
  border: 1px solid transparent;
  background: var(--accent);
  color: white;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:active { background: var(--accent-deep); }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.btn .play-glyph { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.btn.ghost, .opt, .pill {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
  font-weight: 650;
}
.opt.on, .pill.on, .btn.on { background: var(--accent); border-color: transparent; color: white; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span, .info-card span { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field input, .inline-search, .modal input, .row input {
  width: 100%;
  background: #0B0D12;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.err { color: var(--danger); min-height: 1.2em; }
.ok { color: var(--ok); }

.login-screen { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-card, .modal {
  position: relative;
  width: min(480px, 100%);
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.login-card h1, .home h1, .search-page h1, .fav-page h1, .pane h1 { margin: 8px 0; font-size: 32px; }
.login-card .logo-plate { display: flex; justify-content: center; width: 100%; min-width: 0; margin: 0 auto 4px; }
.login-card .logo-plate img {
  width: min(340px, 100%);
  height: auto;
  max-width: 100%;
  min-width: 0;
}
.login-card .logo-plate + h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.check { display: flex; gap: 8px; align-items: center; color: var(--muted); margin: 8px 0 14px; }

.home { padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 18px; }
.home-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.organizing { color: var(--accent-2); margin: 0; }
.tiles { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 12px; }
.tile {
  display: flex; align-items: center; gap: 14px;
  min-height: 112px; padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%), var(--bg-2);
  border: 1px solid var(--line);
}
.tile.hero {
  background:
    radial-gradient(400px 160px at 10% 0%, rgba(255, 42, 42, 0.35), transparent 60%),
    var(--bg-2);
}
.tile b { display: block; font-size: 22px; }
.tile small { color: var(--muted); }
.tile:hover { border-color: rgba(255, 91, 77, 0.75); }

.rail h2, .group h2, .browse h2 { margin: 0 0 10px; font-size: 18px; }
.rail-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
}
.rail-row::-webkit-scrollbar { display: none; width: 0; height: 0; }
.h-card, .continue-card { flex: 0 0 168px; }
.h-card, .poster, .continue-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.h-card .art, .h-card .art-fallback { height: 96px; }
.h-card p, .poster p, .continue-card p { margin: 8px 10px 10px; font-size: 14px; }
.poster p, .continue-card p {
  min-height: 40px;
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bar { height: 4px; margin: 0 10px 8px; background: #2A313A; border-radius: 99px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.continue-card small { display: block; color: var(--muted); margin: 0 10px 10px; }

.quiet { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.quiet b { color: var(--text); }

.browse {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  padding-top: 24px;
  grid-template-columns: 240px minmax(0, 1fr);
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "label tools"
    "side grid";
}
.browse > .browse-label {
  grid-area: label;
  margin: 0;
  align-self: start;
  padding: 0 16px 8px 20px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.browse-tools { grid-area: tools; }
.browse-side {
  grid-area: side;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.browse-side::-webkit-scrollbar { width: 4px; height: 4px; }
.browse-side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 99px; }
.browse-grid { grid-area: grid; padding: 24px 32px; min-height: 0; overflow: auto; }
.browse-main { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.cats-col, .col {
  min-height: 0; overflow: auto;
  border-right: 1px solid var(--line);
}
.cats-col h2, .col h2 {
  margin: 0; padding: 14px 14px 8px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.cat, .ch, .menu button, .menu a {
  width: calc(100% - 16px);
  margin: 4px 8px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text);
  padding: 10px 12px;
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
}
.cat.on, .cat:hover, .menu .on { background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.cat.pin { color: var(--focus); }
.cat small { color: var(--muted); }
.tools { display: flex; gap: 8px; padding: 12px; align-items: center; }
.browse .browse-tools {
  align-self: start;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0 32px 0 12px;
}
#vod-sort {
  appearance: none;
  -webkit-appearance: none;
  background-color: #161B22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238B949E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 36px 10px 14px;
}
#vod-sort option { background: #161B22; color: var(--text); }
.tools .inline-search { flex: 1; }
.v-scroll { flex: 1 1 0%; min-height: 0; overflow: auto; position: relative; }
.guide .ch-col { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.v-scroll.short { height: 280px; flex: none; }
.v-scroll.mid { height: min(70vh, 760px); flex: none; }
.v-inner { position: relative; width: 100%; }
.v-win { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }

.ch-row { height: 72px; display: flex; align-items: center; gap: 4px; padding-right: 6px; }
.ch-row.is-on { background: rgba(255, 42, 42, 0.12); }
.ch-row.is-focus .ch, .ch:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.ch {
  width: auto; flex: 1; margin: 0 0 0 8px; min-width: 0; height: 64px; justify-content: flex-start;
}
.ch-row.link { width: calc(100% - 8px); margin: 0 4px; padding: 0 8px; border-radius: 12px; }
.ch-num { width: 48px; color: var(--accent-2); font-variant-numeric: tabular-nums; font-weight: 750; flex: none; }
.ch-copy { min-width: 0; display: flex; flex-direction: column; }
.ch-copy b, .ch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q, .badge {
  display: inline-flex; align-items: center;
  width: fit-content; align-self: flex-start;
  border-radius: 999px; padding: 2px 7px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.08); color: var(--text);
  font-style: normal;
}
.ch-copy .q { margin-top: 4px; }
.badge.b-dub { background: rgba(61, 220, 151, 0.18); color: var(--ok); }
.badge.b-leg { background: rgba(217, 221, 227, 0.16); color: var(--focus); }
.badge.b-uhd { background: rgba(245, 193, 108, 0.18); color: var(--warn); }
.badge.b-new { background: rgba(255, 42, 42, 0.2); color: var(--accent-2); }
.badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 1; }
.heart { border: 0; background: transparent; color: var(--muted); font-size: 20px; width: 42px; height: 42px; }
.heart.on { color: var(--accent); }

.art-fallback {
  position: relative; display: grid; place-items: center; overflow: hidden;
  color: transparent; font-weight: 800; letter-spacing: 0.04em;
  background: linear-gradient(90deg, #161B22 25%, #222A33 50%, #161B22 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
  transition: background 300ms ease-out, color 300ms ease-out;
}
.art-fallback img {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 100%; object-fit: cover;
  background: transparent; opacity: 0; transition: opacity 300ms ease-out;
}
.art-fallback img.ready { opacity: 1; }
.art-fallback.fit-contain img { object-fit: contain; padding: 4px; }
.art-fallback.has-ready,
.art-fallback:has(img.ready) { animation: none; background: #161B22; color: transparent; }
.art-fallback.is-broken {
  animation: none;
  color: #fff;
  background: linear-gradient(160deg, rgba(255, 42, 42, 0.35), #161B22 55%);
}
[hidden] { display: none !important; }
.ch-logo { width: 64px; height: 42px; border-radius: 8px; flex: none; font-size: 12px; }
.poster-face { position: relative; aspect-ratio: 2 / 3; }
.poster-art { width: 100%; height: 100%; font-size: 28px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 8px 12px 20px; }
.detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 22px 32px 40px;
}
.detail-hero {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.detail-copy { min-width: 0; }
.detail-wide { width: 100%; min-width: 0; }
.detail-wide h2 { margin: 28px 0 12px; font-size: 20px; }
.detail-wide .cards { padding: 8px 0 12px; }
.cover-art { width: 240px; max-width: 100%; aspect-ratio: 2 / 3; border-radius: 18px; font-size: 42px; border: 1px solid var(--line); }
.season-tabs {
  margin-top: 32px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  scrollbar-width: none;
}
.season-tabs::-webkit-scrollbar { display: none; }
.stab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--muted);
  padding: 12px 16px 10px;
  margin: 0 0 -1px;
  font-weight: 650;
  white-space: nowrap;
}
.stab.on {
  color: #fff;
  font-weight: 800;
  background: transparent;
  border-bottom-color: var(--accent);
}
.crumbs { color: var(--muted); margin-top: 0; }
.ep { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ep-still { width: 148px; height: 84px; border-radius: 10px; flex: none; }
.ep-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ep-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ep-head b { min-width: 0; }
.ep-dur {
  flex: none; width: fit-content;
  border-radius: 999px; padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06); color: var(--muted);
  font-size: 12px; font-style: normal; font-weight: 700;
}

.stage, .player { position: relative; height: 100%; background: #000; overflow: hidden; }
.stage video, .player video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.stage video[data-aspect="zoom"], .player video[data-aspect="zoom"] { object-fit: cover; }
.stage video[data-aspect="fill"], .player video[data-aspect="fill"] { object-fit: fill; }
.frame-hold { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
.reconnect, .soft-fail {
  position: absolute; z-index: 4;
  display: flex; align-items: center; gap: 10px;
  background: rgba(11, 13, 18, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 8px 14px;
}
.reconnect { top: 84px; right: 18px; color: var(--text); }
.soft-fail { left: 50%; bottom: 110px; transform: translateX(-50%); border-radius: 18px; }
.live-hint {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  z-index: 2; color: var(--muted); pointer-events: none;
}
.guide {
  position: absolute; z-index: 3;
  top: 76px; left: 16px; bottom: 96px;
  width: min(760px, calc(100% - 32px));
  display: none;
  grid-template-columns: 280px minmax(0, 1fr);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.stage.guide-open .guide {
  display: grid;
  animation: drawerIn 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
.guide .col { background: transparent; scrollbar-width: none; }
.guide .col::-webkit-scrollbar,
.guide #cat-list::-webkit-scrollbar,
.guide #channel-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.guide #cat-list, .guide #channel-scroll { scrollbar-width: none; }
.guide .cats-col,
.guide .ch-col { display: flex; flex-direction: column; overflow: hidden; }
.guide .ch-col .tools {
  flex: none;
  position: relative;
  z-index: 2;
  background: rgba(12, 13, 18, 0.96);
}
.guide #channel-scroll { flex: 1 1 auto; min-height: 0; padding-top: 8px; }
.guide #cat-list { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px 0 18px; }
.guide-tabs { display: none; }
.mini {
  position: absolute; z-index: 4; left: 16px; right: 16px; bottom: 16px;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.mini.on { opacity: 1; pointer-events: auto; transform: none; }
.mini-top, .mini-bot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-top { flex: 1 1 auto; }
.mini-bot { flex: none; justify-content: flex-end; }
.mini-id { display: flex; gap: 10px; align-items: center; min-width: 0; flex: 1 1 auto; }
.mini-id b { display: block; }
.mini-id small { color: var(--muted); display: block; }
.mini-id > div { min-width: 0; }
.mini-id b, .mini-id small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row, .mini-actions, .opt-row, .pills { display: flex; gap: 6px; flex-wrap: wrap; }
.q-chip { border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); padding: 6px 10px; font-weight: 800; }
.q-chip.on { background: var(--accent); border-color: transparent; }
.q-pills {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.qpill {
  border: 1.5px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.qpill.on { background: #242B34; border-color: #fff; color: #fff; }
.sig { display: flex; align-items: end; gap: 3px; color: var(--muted); min-width: 110px; }
.sig i { width: 5px; background: currentColor; border-radius: 99px; display: block; opacity: 0.25; }
.sig i:nth-child(1) { height: 8px; }
.sig i:nth-child(2) { height: 12px; }
.sig i:nth-child(3) { height: 16px; }
.sig[data-level="1"] i:nth-child(1),
.sig[data-level="2"] i:nth-child(-n+2),
.sig[data-level="3"] i { opacity: 1; color: var(--ok); }
.sig[data-level="1"] { color: var(--warn); }
.sig[data-level="0"] { color: var(--accent-2); }
.sig span { margin-left: 6px; font-size: 13px; }

.osd {
  position: absolute; left: 0; right: 0; z-index: 3;
  display: flex; gap: 8px; align-items: center;
  padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.player.show-osd .osd { opacity: 1; pointer-events: auto; }
.osd-head {
  top: 0;
  border: 0;
  backdrop-filter: none;
  background: linear-gradient(180deg, rgba(8, 9, 14, 0.9) 0%, rgba(8, 9, 14, 0) 100%);
}
.osd.bottom {
  bottom: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 18px 22px 20px;
}
.seek-line { display: flex; align-items: center; gap: 12px; width: 100%; }
.seek-line span { min-width: 52px; font-size: 13px; font-variant-numeric: tabular-nums; }
#time-dur { text-align: right; }
.osd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; flex-wrap: wrap; }
.osd-left, .osd-right { display: flex; align-items: center; gap: 4px; min-width: 0; }
.osd-right { margin-left: auto; justify-content: flex-end; flex-wrap: wrap; }
.seek { flex: 1; min-width: 80px; height: 6px; background: rgba(255,255,255,.22); border-radius: 99px; position: relative; cursor: pointer; }
.seek i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 99px; }
.hit {
  width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  flex: none; border: 0; border-radius: 999px;
  background: transparent; color: #fff;
}
.hit:hover, .hit:focus-visible, .text-hit:hover, .text-hit:focus-visible { background: rgba(255, 255, 255, 0.14); }
.hit svg, .text-hit svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.hit.label { width: auto; padding: 0 10px 0 6px; }
.hit.label span { font-size: 13px; font-weight: 750; }
.hit.on svg { fill: var(--accent); stroke: var(--accent); }
.text-hit {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: #fff;
  border-radius: 999px; padding: 8px 12px;
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.osd-btn {
  width: 42px; height: 42px; padding: 0;
  display: grid; place-items: center; flex: none;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: white;
}
.osd-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
#volume {
  --p: 100%;
  appearance: none;
  -webkit-appearance: none;
  width: 112px;
  height: 22px;
  margin: 0;
  background: transparent;
  accent-color: #fff;
  cursor: pointer;
  flex: none;
}
#volume::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #ffffff var(--p), rgba(255, 255, 255, 0.22) var(--p));
}
#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px; margin-top: -4px;
  border-radius: 50%;
  background: #ffffff;
  border: 0;
}
#volume::-moz-range-track {
  height: 6px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.22);
}
#volume::-moz-range-progress { height: 6px; border-radius: 99px; background: #fff; }
#volume::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0;
}

.settings { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100%; flex: 1; align-items: stretch; }
.menu {
  position: static;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px 12px 16px;
  border-right: 1px solid var(--line);
  gap: 2px;
}
.settings .menu button { width: 100%; margin: 0; justify-content: flex-start; gap: 12px; }
.settings .menu button svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.menu-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.menu-foot button:hover, .menu-foot button:focus-visible { color: var(--accent-2); background: rgba(255, 42, 42, 0.1); }
.pane { padding: 28px 32px 48px; max-width: 820px; }
.cards-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.info-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: #161B22;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.info-card span {
  font-size: 11px;
  color: #8B949E;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.info-card b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
  text-transform: none;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; display: inline-block; flex: none; }
.list-card, .note-card {
  margin-top: 22px;
  padding: 18px 20px;
  background: #161B22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.list-card h2, .note-card p { margin: 0 0 12px; }
.note-card p { color: var(--muted); line-height: 1.45; }
.list-stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 4px 0 16px; }
.list-stats b { display: block; font-size: 22px; font-weight: 750; }
.list-stats span { color: #8B949E; font-size: 12px; letter-spacing: 0.04em; }
.seg {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}
.seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
}
.seg button.on { background: #242B34; border-color: #fff; color: #fff; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 680px; }
.pick {
  text-align: left;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pick.on { background: #242B34; border: 1.5px solid #fff; }
.pick b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.pick small { color: var(--muted); font-weight: 500; line-height: 1.35; }
.tick { font-weight: 800; }
.pin-form { max-width: 380px; }
.pin-form .pin-input {
  text-align: center;
  letter-spacing: 0.55em;
  font-size: 22px;
  font-weight: 700;
  max-width: 220px;
}
.search-page, .fav-page { padding: 8px 18px 28px; }
.loader, .empty { margin: 24px; color: var(--muted); }
.loader { display: grid; justify-items: center; gap: 10px; }
.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25); border-top-color: white;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#modal:empty { display: none; }
#modal:not(:empty) {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 13, 18, 0.82);
  backdrop-filter: blur(12px);
  animation: backdropIn 200ms ease;
}
.modal { animation: modalIn 200ms cubic-bezier(0.22, 1, 0.36, 1); }
.modal-back {
  position: relative;
  inset: auto;
  width: auto;
  max-width: calc(100vw - 32px);
  background: transparent;
  display: block;
  padding: 0;
  z-index: auto;
}
.modal.who { width: min(860px, calc(100vw - 48px)); position: relative; padding: 28px 28px 24px; }
.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: auto;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.modal-x:hover, .modal-x:focus-visible { background: rgba(255, 255, 255, 0.14); }
.who-row { display: flex; flex-wrap: nowrap; gap: 16px; overflow-x: auto; padding: 8px 4px 12px; }
.who-card { position: relative; flex: 0 0 auto; }
.who-pick {
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #161B22;
  color: #fff;
}
.who-pick.on { border: 1.5px solid #fff; }
.who-add { border: 1.5px dashed rgba(255, 255, 255, 0.35); background: transparent; }
.who-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}
.who-plus { background: rgba(255, 255, 255, 0.06); }
.who-plus svg, .who-trash svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.who-name { font-size: 14px; font-weight: 700; text-align: center; max-width: 112px; }
.who-trash {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.78);
}
.who-trash svg { width: 14px; height: 14px; }
.who-trash:hover { background: rgba(255, 42, 42, 0.35); color: #fff; }
.who-draft { max-width: 380px; margin-top: 8px; }
.profiles { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.profile { width: 120px; background: transparent; border: 1px solid var(--line); border-radius: 16px; padding: 12px; color: var(--text); }
.profile.on { border-color: var(--focus); }
.osk { margin-top: 12px; display: grid; gap: 6px; }
.osk-row { display: flex; gap: 6px; justify-content: center; }
.osk button { min-width: 36px; height: 42px; border-radius: 8px; border: 1px solid var(--line); background: #161B22; color: var(--text); }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
  background: #161B22; color: var(--text); border: 1px solid var(--focus);
  border-radius: 999px; padding: 10px 16px; opacity: 0; pointer-events: none;
  transition: 0.2s; z-index: 40; max-width: min(560px, calc(100% - 24px)); text-align: center;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

body[data-density="mobile"] { font-size: 15px; }
body[data-density="mobile"] .tile b { font-size: 18px; }

html[data-density="mobile"] .tiles { grid-template-columns: 1fr 1fr; }
html[data-density="mobile"] .tile.hero { grid-column: 1 / -1; min-height: 96px; }
html[data-density="mobile"] .detail-hero { grid-template-columns: 1fr; }
html[data-density="mobile"] .cover-art { width: min(240px, 70%); }
html[data-density="mobile"] .cards-info,
html[data-density="mobile"] .pick-grid { grid-template-columns: 1fr 1fr; }
html[data-density="mobile"] .top,
html[data-density="mobile"] .stage-top { flex-wrap: nowrap; }

html[data-density="mobile"] .settings {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
html[data-density="mobile"] .settings .menu {
  position: static;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 8px;
  width: 100%;
  min-height: 0;
  margin: 0 0 20px;
  padding: 12px 12px 0;
  border-right: 0;
}
html[data-density="mobile"] .settings .menu::-webkit-scrollbar { display: none; width: 0; height: 0; }
html[data-density="mobile"] .settings .menu button,
html[data-density="mobile"] .menu-foot button {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}
html[data-density="mobile"] .menu-foot {
  margin: 0 0 0 8px;
  padding: 0;
  border: 0;
  display: flex;
}
html[data-density="mobile"] .pane { position: static; padding: 0 16px 32px; }

html[data-density="mobile"] .browse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 48px minmax(0, 1fr);
  grid-template-areas: "side tools" "grid grid";
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 0;
  overflow: hidden;
}
html[data-density="mobile"] .browse-label { display: none; }
html[data-density="mobile"] .browse-side {
  grid-area: side;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  gap: 8px;
  height: 48px;
  max-height: 48px;
  padding: 8px 8px 8px 16px;
  border: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html[data-density="mobile"] .browse-side::-webkit-scrollbar { display: none; width: 0; height: 0; }
html[data-density="mobile"] .browse-side .cat {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 6px 12px;
}
html[data-density="mobile"] .browse-tools {
  grid-area: tools;
  height: 48px;
  padding: 8px 12px 8px 0;
  align-items: center;
}
html[data-density="mobile"] .browse-grid {
  grid-area: grid;
  min-height: 0;
  overflow: auto;
  padding: 8px 12px 16px;
}

html[data-density="mobile"] .guide { grid-template-columns: 1fr; }
html[data-density="mobile"] .guide .cats-col { display: none; }
html[data-density="mobile"] .guide.show-cats .cats-col { display: flex; max-height: none; }
html[data-density="mobile"] .guide.show-cats .ch-col { display: none; }
html[data-density="mobile"] .guide-tabs { display: flex; gap: 6px; }
html[data-density="mobile"] .guide-tabs button { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 10px; }
html[data-density="mobile"] .guide-tabs button.on { background: var(--accent); border-color: transparent; }
html[data-density="mobile"] .mini {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 10px;
}
html[data-density="mobile"] .mini-top,
html[data-density="mobile"] .mini-bot {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
html[data-density="mobile"] .mini-bot { justify-content: flex-start; }
html[data-density="mobile"] .mini-id small,
html[data-density="mobile"] .sig span,
html[data-density="mobile"] .guide-long,
html[data-density="mobile"] .pip-only { display: none; }
html[data-density="mobile"] .sig { min-width: 0; }
html[data-density="mobile"] .mini .hit { width: 34px; height: 34px; }
html[data-density="mobile"] .mini .text-hit { padding: 6px 8px; font-size: 13px; }
html[data-density="mobile"] .mini #volume { width: 64px; flex: 1 1 48px; max-width: 110px; }

html[data-density="tv"] * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-density="tv"] .top,
html[data-density="tv"] .stage-top {
  background: #0B0D12;
}
html[data-density="tv"] .guide .col {
  background: rgba(11, 13, 18, 0.95);
}
html[data-density="tv"] .modal-box {
  background: #11141A;
}
html[data-density="tv"] .browse {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "label tools" "side grid";
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
}
html[data-density="tv"] .browse-label { display: block; }
html[data-density="tv"] .browse-side {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  white-space: normal;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}
html[data-density="tv"] #volume,
html[data-density="tv"] #mute-btn,
html[data-density="tv"] [data-act="mute"],
html[data-density="tv"] [data-act="pip-mute"] {
  display: none !important;
}
html[data-density="tv"] .settings {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}
html[data-density="tv"] .settings .menu {
  position: static;
  flex-direction: column;
  overflow: visible;
  margin: 0;
  border-right: 1px solid var(--line);
}
html[data-density="tv"] .nav-label { display: inline; }
html[data-density="tv"] .nav-short { display: none; }
html[data-density="tv"] .guide { grid-template-columns: 280px minmax(0, 1fr); }
html[data-density="tv"] .guide .cats-col { display: flex; }
html[data-density="tv"] .guide-tabs { display: none; }
html[data-tv-narrow="1"] .nav-links { gap: 2px; flex: 1 1 auto; min-width: 0; }
html[data-tv-narrow="1"] .nav-link { padding: 6px 8px; gap: 4px; }
html[data-tv-narrow="1"] .nav-label { font-size: 13px; }
html[data-density="tv"] .top .logo-plate img,
html[data-density="tv"] .stage-top .logo-plate img { height: 50px; }
html[data-tv-narrow="1"] .top .logo-plate img,
html[data-tv-narrow="1"] .stage-top .logo-plate img { height: 36px; }
html[data-tv-narrow="1"] .icon-btn,
html[data-tv-narrow="1"] .avatar { width: 36px; height: 36px; }
html[data-tv-narrow="1"] .mini {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
html[data-tv-narrow="1"] .mini-top,
html[data-tv-narrow="1"] .mini-bot { width: 100%; min-width: 0; }
html[data-tv-narrow="1"] .mini-id { flex: 1 1 auto; min-width: 160px; }

@media (max-width: 767px) and (orientation: portrait) {
  /* backdrop-filter cria um containing block e prende o position:fixed dentro da top bar. */
  html[data-density="mobile"] .top,
  html[data-density="mobile"] .stage-top {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  html[data-density="mobile"] .top .nav-links,
  html[data-density="mobile"] .stage-top .nav-links {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 30;
    display: flex;
    justify-content: space-around;
    gap: 0;
    width: auto;
    margin: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(11, 13, 18, 0.96);
    border-top: 1px solid var(--line);
    overflow: hidden;
  }
  html[data-density="mobile"] .nav-link {
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 4px 2px;
    border-radius: 12px;
  }
  html[data-density="mobile"] .nav-label { display: none; }
  html[data-density="mobile"] .nav-short { display: block; font-size: 10px; line-height: 1.1; text-align: center; }
  html[data-density="mobile"] .shell-body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  html[data-density="mobile"] .mini { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  html[data-density="mobile"] .guide { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  html[data-density="mobile"] #toast { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  html[data-density="mobile"] #live-stage.chrome-idle .stage-top {
    transform: none;
    opacity: 1;
    background: transparent;
    pointer-events: none;
  }
  html[data-density="mobile"] #live-stage.chrome-idle .stage-top .brand,
  html[data-density="mobile"] #live-stage.chrome-idle .stage-top .top-actions,
  html[data-density="mobile"] #live-stage.chrome-idle .stage-top .back-app {
    opacity: 0;
    pointer-events: none;
  }
  html[data-density="mobile"] #live-stage .stage-top .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}
@media (orientation: landscape) {
  html[data-density="mobile"] .guide #channel-scroll { padding-top: 12px; }
}
@media (max-width: 420px) {
  html[data-density="mobile"] .cards-info,
  html[data-density="mobile"] .tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .guide, .mini, .login-card, .top { background: var(--bg-2); }
}

#app { position: relative; z-index: 2; }
#grid-scroll, #channel-scroll { transition: opacity 150ms ease; }
#grid-scroll.is-fading, #channel-scroll.is-fading { opacity: 0.42; }

.page-enter { animation: pageEnter 220ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes drawerIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #161B22 25%, #222A33 50%, #161B22 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: inherit;
}
.skeleton-grid, .cards .skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.skeleton-rail { display: flex; gap: 12px; overflow: hidden; padding: 8px 0 18px; }
.skeleton-card { background: transparent; border-color: transparent; box-shadow: none; }
.skeleton-card:hover { transform: none; box-shadow: none; }
.skeleton-poster { width: 100%; aspect-ratio: 2 / 3; border-radius: 16px; }
.skeleton-line { display: block; height: 12px; width: 100%; margin-top: 8px; border-radius: 8px; }
.skeleton-line.short { width: 62%; }
.skeleton-line.xs { width: 88px; height: 10px; }
.skeleton-line.title { height: 28px; width: 72%; margin: 14px 0; }
.skeleton-cover { width: 240px; max-width: 100%; aspect-ratio: 2 / 3; border-radius: 18px; }
.skeleton-row { display: flex; gap: 10px; margin-top: 18px; }
.skeleton-btn { width: 148px; height: 44px; border-radius: 12px; }
.skeleton-btn.short { width: 96px; }
.skeleton-channels { display: flex; flex-direction: column; }
.skeleton-row { align-items: center; }
.ch-row.skeleton-row { height: 72px; margin-top: 0; padding: 0 12px; gap: 10px; }
.ch-row.skeleton-row:hover, .poster.skeleton-card:hover { transform: none; box-shadow: none; }
.skeleton-num { width: 36px; height: 14px; border-radius: 7px; flex: none; }
.skeleton-logo { width: 40px; height: 40px; border-radius: 8px; flex: none; }
.sk-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sk-copy .skeleton-line { margin-top: 0; }

body.player-open #app { pointer-events: none; }
body.player-open .stage,
body.player-open .player { background: transparent; }
body.player-open :is(.stage-top, .top, .guide, .mini.on, .player.show-osd .osd) {
  pointer-events: auto;
}
.player-screen { width: 100%; height: 100%; position: relative; overflow: hidden; background: #000; }
.player-screen > .player { width: 100%; height: 100%; }
.shell-body.has-player,
.shell-body:has(.player) { overflow: hidden; }
.shell-body > .player { flex: 1 1 auto; height: auto; min-height: 0; }

.player-host {
  position: fixed;
  z-index: 1;
  overflow: hidden;
  background: #0B0D12;
  color: #fff;
  /* z-index fica de fora: `all` o interpolaria e o vídeo afundaria sob o catálogo. */
  transition-property: top, left, width, height, border-radius, box-shadow;
  transition-duration: 0.38s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.player-host.is-instant { transition: none !important; }
.player-host.is-hidden { display: none !important; }
.player-host.is-page { border-radius: 0; box-shadow: none; }
.player-host.is-mini {
  right: 24px;
  bottom: 24px;
  width: 360px;
  aspect-ratio: 16 / 9;
  z-index: 9500;
  border-radius: 14px;
  background: #0B0D12;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.player-host video {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0B0D12;
  object-fit: contain;
}
.player-host video.is-pending,
.player-host video.is-native,
.player-host.is-pending video {
  opacity: 0 !important;
}
.player-host .load-spin {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}
.player-host.is-pending .load-spin { display: flex; }
.player-host.is-pending { background: #0B0D12; }
.player-host video[data-aspect="zoom"] { object-fit: cover; }
.player-host video[data-aspect="fill"] { object-fit: fill; }
.player-host .pip-hit,
.player-host .pip-chrome { display: none; }
.player-host.is-mini .pip-hit {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.player-host.is-mini .pip-chrome {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.player-host.is-mini .pip-top,
.player-host.is-mini .pip-controls {
  opacity: 0;
  transition: opacity 160ms ease;
}
.player-host.is-mini:hover .pip-top,
.player-host.is-mini:hover .pip-controls,
.player-host.is-mini:focus-within .pip-top,
.player-host.is-mini:focus-within .pip-controls { opacity: 1; }
.pip-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 22px;
  background: linear-gradient(rgba(11, 13, 18, 0.82), transparent);
}
.pip-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pip-live {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  text-transform: uppercase;
}
.pip-actions, .pip-controls { display: flex; gap: 6px; pointer-events: auto; }
.pip-controls { position: absolute; left: 8px; bottom: 10px; }
.pip-btn {
  pointer-events: auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 13, 18, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  backdrop-filter: blur(8px);
}
.pip-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.pip-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}
.pip-progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.player-host .soft-fail { position: fixed; z-index: 9600; }
.player-host.is-mini .reconnect { top: 8px; right: 8px; z-index: 4; }
.player-host.is-mini .soft-fail {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 36px;
  transform: none;
  z-index: 6;
  width: auto;
}
@media (max-width: 720px) {
  .player-host.is-mini { width: 260px; right: 16px; bottom: 16px; }
  .skeleton-cover { width: min(240px, 70%); }
}
@media (hover: none) {
  .player-host.is-mini .pip-top,
  .player-host.is-mini .pip-controls { opacity: 1; }
}

.login-legal { margin: 16px 0 0; text-align: center; }
.login-legal a { color: var(--focus); }

.back-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(11, 13, 18, 0.72);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 750;
  font-size: 14px;
  z-index: 6;
}
.back-app svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.native-return {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 40;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(11, 13, 18, 0.92);
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 750;
}
html[data-density="mobile"] .native-return { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }

html[data-shell="android"][data-density="mobile"] .top,
html[data-shell="android"][data-density="mobile"] .stage-top {
  padding-top: 24px;
  padding-top: max(12px, env(safe-area-inset-top, 24px));
  padding-top: max(12px, env(safe-area-inset-top, 24px), var(--sat, 0px));
}

html.native-video-full,
html.native-video-full body,
html.native-video-active .player-viewport,
html.native-video-full .player-host,
html.native-video-full .stage,
html.native-video-full .player,
html.native-video-full .shell,
html.native-video-full .shell-body {
  background: transparent !important;
  background-image: none !important;
}
html.native-video-mini,
html.native-video-mini body {
  background: transparent !important;
  background-image: none !important;
}
html.native-video-mini #app {
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(255, 42, 42, 0.16), transparent 55%),
    radial-gradient(700px 480px at 100% 0%, rgba(217, 221, 227, 0.06), transparent 50%),
    var(--bg);
}
html.native-video-mini .player-host.is-mini,
html.native-video-full .player-host {
  background: transparent !important;
}
html.native-video-active .player-host.is-pending {
  background: #0B0D12 !important;
}
html.native-video-active .stage video,
html.native-video-active .player video,
html.native-video-active .player-host video {
  opacity: 0 !important;
  background: transparent !important;
}

/* WebView anterior ao Chrome 84/88: sem flex-gap e sem aspect-ratio. O vídeo nativo não depende disso. */
@supports not (gap: 1px) {
  .top > * + * { margin-left: 12px; }
  .home > * + * { margin-top: 18px; }
  .row > * + * { margin-left: 8px; }
  .field > * + * { margin-top: 6px; }
  .ch-row > * + * { margin-left: 4px; }
  .settings .menu > * + * { margin-top: 8px; }
  .tiles { margin: -6px; }
  .tiles > * { margin: 6px; }
  .cards { margin: -7px; }
  .cards > * { margin: 7px; }
  .pick-grid { margin: -6px; }
  .pick-grid > * { margin: 6px; }
}
@supports not (aspect-ratio: 1 / 1) {
  .poster-face,
  .cover-art,
  .skeleton-cover {
    position: relative;
    height: 0;
    padding-top: 150%;
  }
  .poster-face > *,
  .cover-art > * {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
}
