:root {
  --bg: #0b0f14; --panel: #151b24; --panel2: #1d2632; --text: #eef3f9; --muted: #8fa1b5;
  --accent: #4da3ff; --good: #54d38a; --bad: #ff6b6b; --radius: 16px;
  --nav-w: 220px; --gap: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 17px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
button, a, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* focus ring - the thing that makes it usable from a TV remote */
.f { outline: none; transition: transform .12s, box-shadow .12s, background .12s; }
body.kb .f:focus { box-shadow: 0 0 0 4px var(--accent), 0 8px 28px rgba(0,0,0,.5); transform: scale(1.04); z-index: 2; position: relative; }

#app { display: flex; height: 100%; }
#nav { width: var(--nav-w); padding: 28px 14px; background: #0e131a; display: flex; flex-direction: column; gap: 6px; flex: none; }
#nav h2 { margin: 0 12px 18px; font-size: 22px; letter-spacing: .3px; }
#nav button { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: transparent; border: 0; border-radius: 12px; text-align: left; font-size: 19px; color: var(--muted); }
#nav button .ic { width: 26px; text-align: center; font-size: 22px; }
#nav button.on { color: var(--text); background: var(--panel); }
#nav .clock { margin-top: auto; padding: 12px 16px; color: var(--muted); font-size: 15px; }
#view { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 28px 36px 60px; scroll-behavior: smooth; outline: none; }

h1.title { margin: 0 0 4px; font-size: 34px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.row-title { margin: 26px 0 12px; font-size: 22px; display: flex; align-items: baseline; gap: 12px; }
.row-title small { color: var(--muted); font-size: 15px; font-weight: 400; }
.row { display: flex; gap: var(--gap); overflow-x: auto; padding: 10px 8px 18px; margin: 0 -8px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.grid { display: grid; gap: var(--gap); padding: 8px; margin: 0 -8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* app tiles */
.tile { flex: none; width: 190px; height: 120px; border: 0; border-radius: var(--radius); display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 14px; font-weight: 700; font-size: 20px; color: #fff; text-align: left; background: var(--c, #333); position: relative; overflow: hidden; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.tile::before { content: attr(data-letter); position: absolute; top: -6px; right: 8px; font-size: 76px; opacity: .22; font-weight: 800; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 18px; }
.grid .tile { width: auto; }

/* video cards */
.card { flex: none; width: 280px; background: var(--panel); border: 0; border-radius: var(--radius); padding: 0; text-align: left; overflow: hidden; display: block; }
.grid .card { width: auto; }
.card .th { aspect-ratio: 16/9; background: #222 center/cover; display: block; }
.card .th.ph { display: flex; align-items: center; justify-content: center; font-size: 42px; background: linear-gradient(135deg, #2b3b55, #151c28); }
.card .tx { padding: 10px 12px 12px; display: block; }
.card .t { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card .m { color: var(--muted); font-size: 14px; margin-top: 4px; display: block; }

/* buttons & chips */
button.primary, a.primary { background: var(--accent); color: #05101d; border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 700; }
.chip { background: var(--panel); border: 0; border-radius: 999px; padding: 9px 16px; color: var(--muted); }
.chip.on { background: var(--accent); color: #05101d; font-weight: 700; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 6px 4px; }
.btn { background: var(--panel2); border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600; }
.btn.small { padding: 7px 12px; font-size: .85em; border-radius: 9px; }
.empty { background: var(--panel); border-radius: var(--radius); padding: 22px; color: var(--muted); max-width: 640px; }
.empty b { color: var(--text); }
.empty code { background: #0b0f14; padding: 2px 6px; border-radius: 6px; color: #cfe3ff; }

/* sports fixtures */
.day { margin: 18px 0 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .8em; }
.fxgrid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.fx { background: var(--panel); border: 0; border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; text-align: left; min-width: 0; }
.row .fx { flex: none; width: 300px; }
.fx.live { background: linear-gradient(135deg, #3a1a1d, #1d2632); }
.fx.final { opacity: .8; }
.fx-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fx-comp { color: var(--muted); font-size: .82em; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; min-width: 0; }
.fx-top { flex-wrap: wrap; }
.fx-state { display: flex; align-items: center; gap: 8px; flex: none; font-size: .88em; }
.fd { color: var(--muted); }
.fx-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fx-team img, .fx-team i { width: 30px; height: 30px; object-fit: contain; flex: none; }
.fx-team .n { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-team .sc { font-size: 1.35em; font-variant-numeric: tabular-nums; }
.fx-foot { color: var(--muted); font-size: .85em; min-height: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.cd.soon { color: #ffb454; }
.badge { font-size: .72em; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; background: #2b3b4d; color: var(--text); }
.badge.live { background: var(--bad); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.badge.off { background: #5a4a1d; color: #ffd98a; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .badge.live { animation: none; } }

/* posters, search, title detail */
.muted { color: var(--muted); }
.small { font-size: .85em; }
.search { display: flex; gap: 12px; margin: 22px 0 6px; max-width: 640px; }
.search input { flex: 1; min-width: 0; padding: 13px 16px; border-radius: 12px; border: 2px solid var(--panel2); background: var(--panel); }
.poster { flex: none; width: 160px; background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.grid.posters { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid.posters .poster { width: auto; }
.poster .pi { aspect-ratio: 2/3; border-radius: 12px; background: var(--panel2) center/cover; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px; overflow: hidden; }
.poster .pn { color: var(--muted); font-weight: 600; }
.poster .rate { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.78); color: #ffd166; font-weight: 800; font-size: .85em; padding: 3px 8px; border-radius: 8px; }
.poster .pt { font-weight: 600; font-size: .95em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster .pm { color: var(--muted); font-size: .85em; }
.detail { flex: 1; overflow-y: auto; background: var(--bg); }
.hero { background: var(--panel) center/cover; padding: 28px 36px 18px; }
.hin { display: flex; gap: 24px; align-items: flex-end; max-width: 1100px; margin: 0 auto; }
.hposter { width: 170px; aspect-ratio: 2/3; border-radius: 14px; background: var(--panel2) center/cover; flex: none; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
.htxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.htxt h2 { margin: 0; font-size: 2em; line-height: 1.1; }
.meta { color: var(--muted); }
.score { color: #ffd166; font-size: 1.15em; }
.cert { border: 1px solid var(--muted); border-radius: 6px; padding: 0 6px; font-size: .85em; }
.when { background: rgba(0,0,0,.45); padding: 8px 12px; border-radius: 10px; }
.ov { margin: 0; max-width: 70ch; line-height: 1.5; }
.dbody { padding: 0 36px 40px; max-width: 1172px; margin: 0 auto; }
.wbtns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 6px 4px; }
.wbtns .primary { display: inline-flex; align-items: center; gap: 8px; }
#overlayBody .detail img { flex: none; width: 24px; height: 24px; object-fit: contain; border-radius: 5px; background: none; }
.prov { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); padding: 9px 14px; border-radius: 12px; }
@media (max-width: 760px) {
  .hero { padding: 18px 16px 14px; } .hin { flex-direction: column; align-items: flex-start; } .hposter { width: 110px; }
  .htxt h2 { font-size: 1.5em; } .dbody { padding: 0 16px 30px; } .poster { width: 130px; }
}

/* services, live tv, watch progress */
.svcs { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 16px; }
.svc { background: var(--panel); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.svc.off { opacity: .6; }
.svc .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.svc-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.svc-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.svcform { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.svcform input, .svcform select { padding: 12px 14px; border-radius: 12px; border: 2px solid var(--panel2); background: var(--panel); }
.svcform input[type=color] { height: 46px; padding: 4px; }
.addsrc { margin: 10px 0 30px; }
.addsrc summary, .seas summary { cursor: pointer; padding: 10px 14px; border-radius: 12px; background: var(--panel); display: inline-block; }
/* tiles you can edit, logos, cast */
.pickgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 4px; }
#sheetBox .pick { padding: 12px 10px; font-size: 16px; text-align: left; }
#sheetBox .pick.on { background: var(--accent); color: #05101d; font-weight: 700; }
.tile .tn { position: relative; }
.tile.hasicon { background: var(--panel2); box-shadow: inset 0 5px 0 var(--c); }
.tile.hasicon::before { display: none; }
.tile.hasicon img { height: calc(100% - 30px); padding: 14px 14px 4px; }
.tile.hasicon .tn { font-size: .85em; text-shadow: none; }
.tile small { font-weight: 500; opacity: .75; font-size: .65em; position: relative; }
.tile.addtile { background: transparent; border: 2px dashed var(--muted); color: var(--muted); align-items: center; justify-content: center; text-shadow: none; }
.tile.addtile::before { display: none; }
.tilewrap { position: relative; flex: none; }
.grid .tilewrap { flex: initial; }
.xbtn { position: absolute; top: -8px; right: -8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #c0392b; color: #fff; font-weight: 800; z-index: 3; padding: 0; }
.sicon { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; background: #fff; flex: none; }
.tabic { font-size: 1.4em; width: 34px; text-align: center; flex: none; }
.tabname { width: 150px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--panel2); background: var(--panel); }
.tabicon { width: 64px; text-align: center; padding: 8px 6px; border-radius: 10px; border: 2px solid var(--panel2); background: var(--panel); }
#overlayCast { padding: 10px 14px; border-radius: 10px; background: var(--panel2); border: 0; color: var(--text); flex: none; }
.addsrc summary.primary { background: var(--accent); color: #05101d; font-weight: 700; }
.chcard { position: relative; }
.row .chcard { flex: none; width: 250px; }
.ch-edit-bar { display: flex; gap: 6px; padding: 8px; background: var(--panel2); border-radius: 0 0 var(--radius) var(--radius); margin-top: -8px; }
.ch-edit-bar button { flex: 1; }
.btn.warn { background: #5a1d1d; color: #ffb4b4; }
.chcard .card { width: 100%; }
.star { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #ffd166; font-size: 1.3em; line-height: 1; padding: 0; }
.star.on { background: rgba(0,0,0,.85); }
.seas { margin: 10px 0; }
.eps { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.ep { display: flex; gap: 12px; align-items: center; background: var(--panel); border-radius: 12px; padding: 8px 12px; flex-wrap: wrap; }
.epn { color: var(--muted); font-weight: 700; width: 42px; flex: none; }
.ept { flex: 1 1 160px; min-width: 0; }
.epa { display: flex; gap: 8px; flex-wrap: wrap; }
.ep .btn { padding: 8px 12px; font-size: .9em; }

/* lights */
.light { background: var(--panel); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.light.on { background: linear-gradient(135deg, #3a3012, #1d2632); }
.light .top { display: flex; align-items: center; gap: 12px; }
.light .bulb { font-size: 30px; filter: grayscale(1) opacity(.5); }
.light.on .bulb { filter: none; }
.light .nm { font-weight: 700; font-size: 19px; flex: 1; }
.light .st { color: var(--muted); font-size: 14px; }
.tgl { background: var(--panel2); border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 700; min-width: 76px; }
.light.on .tgl { background: #f5c451; color: #1c1500; }
.dim { display: flex; align-items: center; gap: 10px; }
.dim .btn { padding: 8px 16px; font-size: 20px; line-height: 1; }
.dim .bar { flex: 1; height: 10px; border-radius: 6px; background: #0b0f14; overflow: hidden; }
.dim .bar i { display: block; height: 100%; background: #f5c451; }

/* cameras */
.cam { background: var(--panel); border: 0; border-radius: var(--radius); padding: 0; overflow: hidden; display: block; text-align: left; }
.cam img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #000; }
.cam .nm { padding: 10px 14px; font-weight: 600; display: flex; justify-content: space-between; }
.cam .live { color: var(--good); font-size: 13px; font-weight: 700; }

/* remote */
.remote { max-width: 420px; margin: 0 auto; }
.seg { display: flex; background: var(--panel); border-radius: 14px; padding: 4px; margin-bottom: 22px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 12px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.seg button.on { background: var(--accent); color: #05101d; }
.dpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0 22px; }
.dpad button, .rbtns button { height: 78px; border: 0; border-radius: 18px; background: var(--panel2); font-size: 28px; }
.dpad .ok { background: var(--accent); color: #05101d; font-weight: 800; font-size: 22px; }
.rbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rbtns button { height: 64px; font-size: 20px; }
.rbtns span { display: block; font-size: 12px; color: var(--muted); }
.tvmode { margin-top: 30px; color: var(--muted); font-size: 15px; background: var(--panel); border-radius: var(--radius); padding: 16px; }

/* overlay player */
#overlay { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; flex-direction: column; }
#overlayBar { display: flex; gap: 16px; align-items: center; padding: 12px 16px; background: #0b0f14; }
#overlayTitle { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#overlayLink { color: var(--muted); padding: 10px 14px; border-radius: 10px; }
#overlayBody { flex: 1; min-height: 0; display: flex; }
#overlayBody iframe, #overlayBody video, #overlayBody img { flex: 1; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }

/* sheet (choose where to open an app) */
#sheet { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
#sheetBox { background: var(--panel); width: min(480px, 100%); border-radius: 22px 22px 0 0; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
#sheetBox h3 { margin: 0 0 6px; }
#sheetBox button { padding: 16px; font-size: 18px; border: 0; border-radius: 14px; background: var(--panel2); }
#sheetBox button.primary { background: var(--accent); color: #05101d; font-weight: 700; }

#toast { position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 20px); background: #fff; color: #0b0f14; padding: 12px 20px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

#login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); z-index: 100; }
#loginForm { display: flex; flex-direction: column; gap: 14px; width: min(340px, 90vw); text-align: center; }
#loginForm input { padding: 16px; border-radius: 12px; border: 2px solid var(--panel2); background: var(--panel); text-align: center; font-size: 24px; letter-spacing: 6px; }
.err { color: var(--bad); min-height: 1.3em; margin: 0; }

/* ---------- phones: bottom tab bar ---------- */
@media (max-width: 760px) {
  html, body { font-size: 16px; }
  #app { flex-direction: column-reverse; }
  #nav { width: 100%; flex-direction: row; padding: 4px 4px max(4px, env(safe-area-inset-bottom)); gap: 0; justify-content: space-around; }
  #nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  #nav h2, #nav .clock { display: none; }
  #nav button { flex-direction: column; gap: 2px; padding: 8px 6px; font-size: 11px; flex: 0 0 auto; min-width: 66px; align-items: center; justify-content: center; }
  #nav button .ic { font-size: 22px; }
  #view { padding: 18px 16px 24px; }
  h1.title { font-size: 26px; }
  .tile { width: 140px; height: 92px; font-size: 16px; }
  .card { width: 230px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .grid.fxgrid { grid-template-columns: 1fr; }
  .row .fx { width: 270px; }
  body.kb .f:focus { transform: none; }
}
/* big TVs: scale everything up */
@media (min-width: 1700px) { html, body { font-size: 22px; } :root { --nav-w: 280px; } .tile { width: 250px; height: 150px; } .card { width: 360px; } }

/* Android phone tab */
.and-wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.and-screenbox { flex: none; max-width: 100%; }
.and-screen { display: block; height: 74vh; max-height: 900px; width: auto; max-width: 100%; object-fit: contain; border-radius: 22px; background: #000; border: 6px solid #222; touch-action: none; cursor: pointer; user-select: none; }
.and-side { flex: 1; min-width: 260px; }
.and-keys, .and-apps { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.and-pad { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 12px 0; width: max-content; }
.and-pad > div { display: flex; gap: 6px; }
.and-pad .f { min-width: 64px; }
.and-note { margin-top: 14px; font-size: 0.85em; }
@media (max-width: 700px) { .and-screen { height: auto; width: 100%; } }


/* ---------- TV 10-foot screen mode (/tv) ---------- */
body.tv-mode { font-size: 20px; --nav-w: 260px; --gap: 24px; }
body.tv-mode #nav { padding: 34px 18px; gap: 10px; border-right: 1px solid rgba(255,255,255,.06); }
body.tv-mode #nav h2 { font-size: 26px; margin-bottom: 22px; }
body.tv-mode #nav button { padding: 16px 20px; font-size: 21px; border-radius: 14px; }
body.tv-mode #view { padding: 34px 48px 80px; scroll-padding: 60px; }
body.tv-mode h1.title { font-size: 40px; }
body.tv-mode .row-title { font-size: 25px; margin: 32px 0 14px; }
body.tv-mode .row { padding: 14px 12px 24px; margin: 0 -12px; scroll-snap-type: x proximity; }
body.tv-mode .row > * { scroll-snap-align: start; }
body.tv-mode .tile { width: 235px; height: 142px; font-size: 22px; border-radius: 18px; }
body.tv-mode .card { width: 330px; border-radius: 18px; }
body.tv-mode .poster { width: 195px; }
body.tv-mode .row .fx { width: 350px; }
body.tv-mode .row .chcard { width: 290px; }
body.tv-mode .chip { padding: 11px 20px; font-size: 18px; }
body.tv-mode .btn, body.tv-mode button.primary { padding: 14px 24px; font-size: 19px; }
body.tv-mode .f:focus { box-shadow: 0 0 0 5px var(--accent), 0 12px 34px rgba(0,0,0,.75); transform: scale(1.06); }
body.tv-mode .tv-hide { display: none !important; }
/* TV: the content was drawn at computer size next to a TV-size menu, so it looked tiny and the menu huge.
   Scale the content (pages, panels, the player's info) up as one, and keep the menu in proportion. */
body.tv-mode { --nav-w: 230px; }
body.tv-mode #view { zoom: 1.3; }
body.tv-mode #sheetBox { zoom: 1.3; max-height: calc(100vh / 1.3 - 30px); overflow-y: auto; }
body.tv-mode #overlayBody .lp-info, body.tv-mode #overlayBar { zoom: 1.3; }
body.tv-mode #nav { padding: 28px 14px; }
body.tv-mode #nav .v2brand { font-size: 24px; }
body.tv-mode #nav button[data-nav] { font-size: 20px; padding: 13px 16px; }
/* small print that was too small to read from the couch */
body.tv-mode .cp-a, body.tv-mode .rate, body.tv-mode .newtag, body.tv-mode .v2cp, body.tv-mode .vssp, body.tv-mode .v2cn, body.tv-mode .pc-ch, body.tv-mode .tb, body.tv-mode .v2comp, body.tv-mode .gt, body.tv-mode #view small, body.tv-mode #sheetBox small { font-size: max(1em, 13px); }
body.tv-mode .badge { font-size: 12px; }
/* TV: the picture fills the screen under the top bar; press Down to bring up what's on, the buttons and the other channels */
body.tv-mode #overlayBody { display: block; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
body.tv-mode #overlayBody .lp { height: auto; }
body.tv-mode #overlayBody .lp-vid { flex: none; height: calc(100vh - var(--obar, 82px)); }
body.tv-mode #overlayBody .lp-info { max-height: none; overflow: visible; padding: 24px 40px 40px; grid-template-columns: minmax(0, 1fr); }
body.tv-mode #overlayBody .lp-info > * { min-width: 0; }

/* Sports channels: "on now" line and the channel guide panel */
.np { display: block; font-size: 12px; margin-top: 2px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np:empty { display: none; }
#sheetBox .gnow { text-align: left; margin: 10px 0 4px; }
#sheetBox .gscroll { max-height: 46vh; overflow-y: auto; text-align: left; margin: 8px 0; padding-right: 4px; }
#sheetBox .gi { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px solid rgba(128,128,128,.2); }
#sheetBox .gi.on { font-weight: 600; }
#sheetBox .gt { flex: 0 0 76px; opacity: .8; font-variant-numeric: tabular-nums; }
#sheetBox .gn { min-width: 0; overflow-wrap: anywhere; }

/* ---------- phones: compact sizes (loaded last so it wins) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 760px) {
  html, body { font-size: 14px; line-height: 1.3; }
  #view { padding: 14px 14px 20px; }
  h1.title { font-size: 21px; }
  .sub { font-size: 13px; margin: 0 0 12px; }
  .row-title { font-size: 16px; margin: 16px 0 8px; gap: 8px; flex-wrap: wrap; align-items: center; }
  .row-title small { font-size: 12px; }
  .row-title .chip, .row-title .btn, .row-title .badge { font-size: 12px; }
  .chip { padding: 6px 11px; font-size: 13px; }
  .chips { gap: 6px; margin: 0 0 10px; padding: 2px 0; }
  .btn { padding: 9px 13px; font-size: 14px; }
  button.primary, a.primary { padding: 10px 16px; font-size: 14px; }
  .tile { width: 112px; height: 72px; font-size: 13px; padding: 9px; border-radius: 12px; }
  .tile::before { font-size: 48px; top: -4px; right: 6px; }
  .row { gap: 10px; padding: 6px 6px 12px; margin: 0 -6px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .card { width: 176px; border-radius: 12px; }
  .card .t { font-size: 13px; min-height: 2.6em; }
  .card .m { font-size: 11.5px; }
  .card .tx { padding: 8px 10px 10px; }
  .card .th.ph { font-size: 30px; }
  .poster { width: 112px; }
  .row .fx { width: 240px; }
  .empty { padding: 14px; font-size: 13px; }
  .day { margin: 12px 0 6px; font-size: .75em; }
  #nav button { font-size: 10px; min-width: 56px; padding: 6px 4px; }
  #nav button .ic { font-size: 19px; }
  #sheetBox button { padding: 12px; font-size: 15px; }
  .star { width: 34px; height: 34px; top: 6px; right: 6px; }
}

/* Channel browser: scrolling chip rows, search, health marks */
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; white-space: nowrap; }
.chip small { opacity: .7; margin-left: 3px; font-size: .85em; }
.cbtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; }
.cbq { flex: 1 1 180px; min-width: 0; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--panel2); background: var(--panel); color: var(--text); }
.hs { display: block; font-size: 11.5px; margin-top: 2px; }
.hs:empty { display: none; }
.hs.ok { color: var(--good); }
.hs.bad { color: var(--bad); }
.chcard.hidebad { display: none; }
#sheetBox .warnline { color: var(--bad); font-size: .9em; }
.hs.idle { color: var(--muted); }
@media (max-width: 760px) {
  .chcard .th { aspect-ratio: 2.6 / 1; background-size: contain; }
  .chcard .card .tx { padding: 7px 9px 9px; }
  .chcard .card .t { min-height: 2.5em; }
  .hs, .np { font-size: 11px; }
}

/* Sports guide: event cards */
.ev { background: var(--panel); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; display: grid; gap: 6px; }
.ev.now { background: linear-gradient(135deg, #2a1c22, var(--panel) 70%); box-shadow: inset 3px 0 0 var(--bad); }
.ev-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: .85em; }
.ev-when { font-variant-numeric: tabular-nums; }
.ev-sport { margin-left: auto; text-transform: uppercase; letter-spacing: .05em; font-size: .8em; }
.ev-title { font-weight: 700; font-size: 1.05em; line-height: 1.25; overflow-wrap: anywhere; }
.ev-desc { color: var(--muted); font-size: .85em; }
.ev-opts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.chip.opt { font-size: .9em; padding: 7px 12px; }
.chip.opt.feed { background: #1d3a5c; color: #fff; }
.chip.opt.app { background: #2b3b2b; color: #dff5df; }
.chip.opt.off { background: transparent; border: 1px dashed var(--panel2); color: var(--muted); }
.badge.on { background: #2b4a3a; }
details.fxwrap { margin: 18px 0 8px; background: var(--panel); border-radius: 14px; padding: 4px 14px 10px; }
details.fxwrap > summary { padding: 10px 0; font-weight: 600; cursor: pointer; list-style: none; }
details.fxwrap > summary::-webkit-details-marker { display: none; }
details.fxwrap > summary::after { content: ' \25BE'; color: var(--muted); }
@media (max-width: 760px) { .ev { padding: 10px 12px; } .chip.opt { font-size: 13px; padding: 6px 10px; } }
.ev-go { width: 100%; padding: 14px 16px; font-size: 1.02em; text-align: left; border-radius: 12px; margin-top: 4px; }
.ev-go small { opacity: .75; font-weight: 500; }
.ev-or { color: var(--muted); font-size: .8em; align-self: center; }

/* Home: sports run sideways like the other rows, so more categories fit on one screen */
.row.evrow { align-items: stretch; }
.evrow .ev { flex: none; width: 300px; margin: 0; align-content: start; }
.evrow .ev-desc { display: none; }
.evrow .ev-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 1em; }
.evrow .ev-go { padding: 11px 14px; }
@media (max-width: 760px) { .evrow .ev { width: 272px; } }
.evrow .ev { gap: 5px; padding: 10px 12px; }
.evrow .ev-opts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 0; padding-bottom: 2px; }
.evrow .ev-opts::-webkit-scrollbar { display: none; }
.evrow .ev-or { display: none; }
.evrow .chip.opt { flex: none; white-space: nowrap; font-size: 12.5px; padding: 6px 10px; }
.evrow .ev-go { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95em; padding: 10px 12px; }
.evrow .ev-top { font-size: .8em; }

/* =====================================================================================================================
   Design system v2 (loaded last so it wins). One accent colour, red only for LIVE, one type scale, one card style,
   section headers that are a title and a quiet "See all" link, rows that swipe sideways.
   ===================================================================================================================== */
:root {
  --bg: #0a0d12; --panel: #11161d; --panel2: #19202a; --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.14);
  --text: #f2f5f9; --muted: #8b98a9; --accent: #4f9dff; --accent-ink: #04101f; --live: #ff5a64; --good: #43d199; --bad: #ff6b6b;
  --radius: 14px; --gap: 12px;
}
html, body { background: var(--bg); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
#nav { background: #0c1016; }
h1.title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 4px; }
.sub { color: var(--muted); font-size: 13.5px; }
.note { color: var(--muted); font-size: 13px; margin: 24px 0 8px; }

/* section headers: a title, a quiet note, and a link on the right */
.sec-h, .row-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 28px 0 10px; }
.sec-h h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.row-title { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.sec-sub, .row-title small { color: var(--muted); font-size: 13px; font-weight: 400; }
.sec-actions { display: flex; gap: 14px; margin-left: auto; }
.sec-h > .link { margin-left: auto; }
.link, .sec-h .chip, .row-title .chip { background: none !important; border: 0 !important; padding: 0 !important; color: var(--accent) !important; font-size: 13px; font-weight: 600; box-shadow: none; }
.row-title .chip { margin-left: auto; }

/* rows swipe sideways and snap */
.row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 8px; margin: 0 -16px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
@media (min-width: 761px) { .row { padding-left: 8px; padding-right: 8px; margin: 0 -8px; } }

/* chips: neutral, accent only when selected */
.chip { background: var(--panel2); border: 1px solid var(--line); color: rgba(242,245,249,.88); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 500; line-height: 1.2; }
.chip small { opacity: .6; margin-left: 3px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.chip.on small { opacity: .75; }
.chips { gap: 8px; margin: 0 0 12px; padding: 0; }
.chips.scroll { margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; }

.btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; font-weight: 600; font-size: 14px; }
button.primary, a.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px; font-weight: 650; padding: 12px 18px; }
.empty { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-size: 13.5px; }

/* app tiles: calm dark cards with a small coloured mark instead of big coloured blocks */
.tile { width: 112px; height: 86px; padding: 11px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-shadow: none; justify-content: flex-end; font-size: 13px; font-weight: 600; line-height: 1.2; }
.tile::before { content: attr(data-letter); position: absolute; top: 11px; left: 11px; right: auto; width: 28px; height: 28px; border-radius: 8px; background: var(--c); color: #fff; opacity: 1; font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.tile small { font-size: 11px; color: var(--muted); opacity: 1; font-weight: 400; }
.tile.hasicon::before { display: none; }
.tile.hasicon img { position: absolute; inset: auto; top: 9px; left: 9px; width: 30px; height: 30px; padding: 0; object-fit: contain; }
.tile.addtile { background: transparent; border: 1px dashed var(--line2); color: var(--muted); align-items: center; justify-content: center; text-align: center; font-weight: 500; }
.tile.addtile::before { display: none; }

/* "on now" programme card: channel logo, what is on, until when */
.pc { flex: none; width: 172px; min-height: 112px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 7px; color: var(--text); }
.pc-top { display: flex; align-items: center; gap: 7px; min-height: 22px; }
.pc-logo { width: 22px; height: 22px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; flex: none; }
.pc-ch { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-t { font-weight: 600; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-m { font-size: 12px; color: var(--muted); margin-top: auto; }

/* sports event cards */
.ev { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
.ev.now { background: var(--panel); border-color: rgba(255,90,100,.38); box-shadow: none; }
.badge { border-radius: 6px; padding: 2px 7px; font-size: .68em; letter-spacing: .08em; background: var(--panel2); color: var(--muted); }
.badge.live { background: var(--live); color: #fff; }
.badge.on { background: rgba(67,209,153,.16); color: var(--good); }
.ev-go { background: var(--accent); color: var(--accent-ink); border-radius: 11px; font-weight: 650; }
.chip.opt, .chip.opt.feed, .chip.opt.app { background: var(--panel2); border: 1px solid var(--line); color: rgba(242,245,249,.92); }
.chip.opt.off { background: transparent; border: 1px dashed var(--line2); color: var(--muted); }
.chip.opt small { color: var(--muted); opacity: 1; }

/* other cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.card .th.ph { background: linear-gradient(135deg, #1b2431, #10151c); }
details.fxwrap { background: var(--panel); border: 1px solid var(--line); }

/* bottom bar on phones */
@media (max-width: 760px) {
  #view { padding: 14px 16px 24px; }
  #nav { background: rgba(10,13,18,.95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-top: 2px; }
  #nav button { position: relative; min-width: 62px; gap: 3px; font-size: 10.5px; color: var(--muted); padding: 8px 4px 6px; background: none; }
  #nav button .ic { font-size: 20px; filter: grayscale(1) brightness(1.15); opacity: .78; }
  #nav button.on { color: var(--text); background: none; }
  #nav button.on .ic { filter: none; opacity: 1; }
  #nav button.on::before { content: ''; position: absolute; top: -2px; left: 24%; right: 24%; height: 2px; border-radius: 0 0 2px 2px; background: var(--accent); }
  .tile { width: 108px; height: 82px; }
  .pc { width: 164px; }
}


/* v2 fixes: rows start at the page margin, programme cards use a letter mark (channel logos were mostly blank) */
.row { scroll-padding-left: 16px; }
@media (min-width: 761px) { .row { scroll-padding-left: 8px; } }
.pc-dot { width: 22px; height: 22px; border-radius: 7px; background: var(--panel2); border: 1px solid var(--line2); color: var(--text); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.pc-m { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; white-space: nowrap; }
.pc-m b { color: var(--accent); font-weight: 600; font-size: 11.5px; }
.ev-go { text-align: left; }


/* v2 sports: "Or watch on" options swipe sideways in one line (shorter cards) */
@media (max-width: 760px) {
  .ev-opts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 2px -14px 0; padding: 0 14px 2px; }
  .ev-opts::-webkit-scrollbar { display: none; }
  .ev-opts > * { flex: none; white-space: nowrap; }
}

/* v2 channels: compact row cards - logo (or letter) on the left, name and what's on to the right */
.grid .chcard .card.chan, .chcard .card.chan { display: flex; align-items: center; gap: 12px; padding: 10px 12px; width: 100%; min-height: 72px; }
.chcard .card.chan .th { position: relative; flex: none; width: 54px; height: 54px; aspect-ratio: 1; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; font-size: 20px; }
.chcard .card.chan .th b { font-size: 20px; font-weight: 700; color: var(--muted); }
.chcard .card.chan .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 5px; }
.chcard .card.chan .tx { padding: 0; min-width: 0; flex: 1; }
.chcard .card.chan .t { min-height: 0; font-size: 14.5px; -webkit-line-clamp: 1; padding-right: 30px; }
.chcard .card.chan .m { font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.chcard .card.chan .np { display: block; font-size: 12.5px; color: var(--text); margin-top: 3px; line-height: 1.25; }
.chcard .star { top: 8px; right: 8px; }
.row .chcard { width: 280px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; gap: 8px; } }
/* many channel logos are white on transparent: sit them on a mid slate, not white */
.chcard .card.chan .th img { background: #3b4554; padding: 6px; }

/* v2 live tv: feeds and tidy-up tucked into one closed panel so the channels come first */
.feedwrap { margin: 10px 0 14px; padding: 0; border-radius: 14px; }
.feedwrap > summary { padding: 12px 14px; cursor: pointer; list-style: none; font-size: 14px; }
.feedwrap > summary::-webkit-details-marker { display: none; }
.feedwrap > summary::after { content: "\25BE"; float: right; color: var(--muted); }
.feedwrap[open] > summary::after { content: "\25B4"; }
.feedwrap > :not(summary) { margin-left: 14px; margin-right: 14px; }
.feedwrap > .wbtns { margin-bottom: 14px; }
.feedwrap > .svcs { margin-top: 2px; }
/* live tv category chips swipe sideways instead of making a tall wall */
#liveChips .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; align-items: center; }
#liveChips .chips::-webkit-scrollbar { display: none; }
#liveChips .chips > * { flex: none; white-space: nowrap; }

/* v2 live player: picture on top, status over it, what is on / what is next underneath */
#overlayBar { background: rgba(10,13,18,.96); border-bottom: 1px solid var(--line); }
#overlayClose { background: var(--panel2) !important; color: var(--text) !important; border: 1px solid var(--line2) !important; }
.lp { display: flex; flex-direction: column; width: 100%; min-height: 0; background: var(--bg); }
.lp-vid { position: relative; flex: 1; min-height: 0; background: #000; display: flex; }
.lp-st { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(0,0,0,.72); color: #fff; text-align: center; padding: 20px; pointer-events: none; }
.lp-st[hidden] { display: none; }
.lp-st button { pointer-events: auto; margin-top: 8px; }
.lp-st b { font-size: 17px; }
.lp-st small { color: var(--muted); font-size: 13px; }
.lp-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--accent); animation: lpspin .9s linear infinite; margin-bottom: 6px; }
@keyframes lpspin { to { transform: rotate(360deg); } }
.lp-info { flex: none; padding: 14px 16px 18px; display: grid; gap: 10px; max-height: 46vh; overflow: auto; }
.lp-h { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.lp-cur { display: grid; gap: 3px; }
.lp-cur b { font-size: 16px; line-height: 1.25; }
.lp-k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--live); font-weight: 700; }
.lp-bar { height: 4px; border-radius: 4px; background: var(--panel2); overflow: hidden; margin-top: 4px; }
.lp-bar i { display: block; height: 100%; background: var(--accent); }
.lp-up { display: grid; gap: 4px; font-size: 13.5px; margin-top: 6px; }
.lp-up .muted { display: inline-block; min-width: 62px; font-variant-numeric: tabular-nums; }
.lp-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.lp-btns .btn { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; padding: 10px 12px; }
@media (max-width: 760px) and (orientation: portrait) { .lp-vid { flex: none; aspect-ratio: 16 / 9; } .lp-info { flex: 1; max-height: none; } }
@media (orientation: landscape) and (max-height: 520px) { .lp { flex-direction: row; } .lp-info { width: 34%; max-height: none; } }
.lp { height: 100%; }
.lp-info { align-content: start; grid-auto-rows: min-content; }
.lp-btns .btn { flex: 1 1 30%; }

/* v2 search + result rows */
.find { margin: 6px 0 4px; }
.find input { width: 100%; box-sizing: border-box; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-size: 15px; }
.find input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.svc.fr { flex-direction: column; align-items: flex-start; gap: 8px; }
.fr-btns { display: flex; flex-wrap: wrap; gap: 7px; }

/* v2 catalogue: poster rows and grid, title sheet */
.cp { flex: none; width: 128px; display: flex; flex-direction: column; gap: 4px; text-align: left; background: none; border: 0; padding: 0; color: var(--text); }
.cp-i { position: relative; display: grid; place-items: center; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--panel2); border: 1px solid var(--line); }
.cp-i b { font-size: 34px; color: var(--muted); }
.cp-i img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cp .rate { position: absolute; left: 6px; bottom: 6px; z-index: 1; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.7); color: #ffd36b; }
.cp-t { font-size: 13.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-m { font-size: 12px; color: var(--muted); }
.cp-a { font-size: 11.5px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-sk { aspect-ratio: 2 / 3; border-radius: 12px; background: linear-gradient(90deg, var(--panel) 0%, var(--panel2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: cpsk 1.4s linear infinite; }
@keyframes cpsk { to { background-position: -200% 0; } }
.cgrid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.cgrid .cp { width: auto; }
.ct-h { display: flex; gap: 14px; align-items: flex-start; }
.ct-p { width: 86px; border-radius: 10px; flex: none; }
.ct-h h3 { margin: 0 0 4px; font-size: 19px; }
.ct-d { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 10px 0 6px; max-height: 7.2em; overflow: auto; }
.crail .sec-h { margin-top: 20px; }

.mine { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 10px 0 14px; }
.mine-i { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.mine-i input { width: 18px; height: 18px; accent-color: var(--accent); }

.pc-m { flex-wrap: wrap; row-gap: 3px; white-space: normal; }

.chips.jump { margin-top: 6px; }

/* v2 touch sizes and overflow fixes: tap targets at least ~36px on phones; grid items may shrink so long names never push the page wide */
.grid > *, .chcard, .chcard .card.chan { min-width: 0; }
@media (max-width: 760px) {
  .chip { min-height: 36px; display: inline-flex; align-items: center; }
  .chip.opt { min-height: 40px; }
  .link, .sec-h .link { padding: 10px 4px !important; min-height: 36px; display: inline-flex; align-items: center; }
  .ev-go { min-height: 48px; }
  .btn { min-height: 42px; }
}
.chcard .card.chan .np { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* v2 Home loading placeholders */
.sk-wide, .sk-card { flex: none; border-radius: 14px; background: linear-gradient(90deg, var(--panel) 0%, var(--panel2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: cpsk 1.4s linear infinite; }
.sk-wide { width: 300px; height: 170px; }
.sk-card { width: 172px; height: 112px; }

/* your library (movies and series from your TV feed) */
.vod-eps .vod-poster{float:right;width:120px;max-width:30%;border-radius:10px;margin:0 0 8px 12px}
.vod-list{display:flex;flex-direction:column;gap:8px;clear:both;margin-top:10px}
.vod-list .btn{text-align:left;justify-content:flex-start;min-height:48px}
.vod-list .btn b{display:inline-block;min-width:2em;opacity:.7}

/* "Casting now" bar: above the player, below the menus */
#castBar{position:fixed;left:10px;right:10px;bottom:12px;z-index:55;display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:16px;background:#14202e;border:1px solid #2f4a68;box-shadow:0 8px 28px rgba(0,0,0,.5)}
#castBar[hidden]{display:none}
#castBar .cb-t{flex:1;min-width:0;display:flex;flex-direction:column}
#castBar .cb-t b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#castBar .cb-t small{opacity:.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#castBar .btn{min-height:44px;padding:0 14px}
#castBar .btn.warn{background:#b42318;color:#fff;border-color:#b42318}
#toast{z-index:70}
body:has(#castBar:not([hidden])) #view{padding-bottom:90px}

/* where to watch: which feed each option is from */
.src{display:inline-block;margin:0 6px;padding:2px 8px;border-radius:999px;background:#1d4ed8;color:#fff;font-size:12px;font-weight:700;vertical-align:middle}
.src.alt{background:#6d28d9}
.gw{flex-direction:column;align-items:stretch}
.gw .f{text-align:left;min-height:48px}

/* multiview: up to 4 screens, sound on the one tapped */
#mvBox{height:calc(100vh - 64px);padding:6px;box-sizing:border-box}
.mv{display:grid;gap:6px;height:100%;grid-template-columns:1fr;grid-auto-rows:1fr}
.mv.m3,.mv.m4{grid-template-columns:1fr 1fr}
@media (min-width:700px){.mv.m2{grid-template-columns:1fr 1fr}}
.mv-t{position:relative;background:#000;border:2px solid #2a3442;border-radius:12px;overflow:hidden;min-height:0}
.mv-t.on{border-color:#3b82f6}
.mv-t video{width:100%;height:100%;object-fit:contain;background:#000}
.mv-bar{position:absolute;left:0;right:0;top:0;display:flex;align-items:center;gap:6px;padding:4px 6px;background:linear-gradient(#000c,#0000);font-size:12px}
.mv-bar b{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mv-x{min-height:30px;padding:0 10px}
.mv-st{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:10px;background:#000a;font-size:13px}
.mv-st[hidden]{display:none}
.mv-add{border:2px dashed #3b4a5f;border-radius:12px;background:#0d1520;font-size:16px;min-height:0}
.mvbtn{font-size:13px;opacity:.9}
/* multiview on a phone: screens stacked, each a proper widescreen box; on a big screen: 2 x 2 */
@media (max-width:699px){
  #mvBox{height:auto;min-height:calc(100vh - 64px);overflow:auto}
  .mv,.mv.m3,.mv.m4{grid-template-columns:1fr;grid-auto-rows:auto;height:auto}
  .mv-t{aspect-ratio:16/9}
  .mv-add{min-height:64px}
}
@media (min-width:700px){
  .mv.m2,.mv.m3,.mv.m4{grid-template-columns:1fr 1fr}
  .mv-t{aspect-ratio:auto}
}

/* ---- layout tidy-up: section headers on one line, no empty gaps in cards, compact finished list ---- */
.sec-h{flex-wrap:nowrap;align-items:baseline;gap:8px;margin:22px 0 8px}
.sec-h h2{flex:none;white-space:nowrap}
.sec-sub{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sec-h > .link,.sec-h .sec-actions{flex:none;margin-left:auto;white-space:nowrap}
.pc{min-height:0}
.pc-m{margin-top:6px}
.fins{display:flex;flex-direction:column;gap:8px;margin:8px 0 14px}
.fin{display:flex;align-items:center;gap:10px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.fin-main{flex:1;min-width:0}
.fin-main b{font-size:14px;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.fin-main span{display:block;font-size:12px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fin .btn{flex:none;min-height:38px;padding:0 14px;font-size:13px}

/* filter chips: smaller on a phone so the page is not all buttons */
@media (max-width:760px){
  .chips .chip{padding:6px 12px;font-size:13.5px;min-height:34px}
  .chips.scroll{gap:6px;margin:6px 0}
  .chips .chip small{font-size:11px}
}

/* live scores and followed teams */
.score{display:block;font-size:13px;margin-top:4px;color:var(--text);font-variant-numeric:tabular-nums}
.score small{color:var(--muted);margin-left:4px}
.score.live b{color:#fff}
.score.live small{color:#ff7b86;font-weight:700}
.score-big{margin:2px 0 8px}
.score-big .score{font-size:17px}

/* reminder banner */
#remBar{position:fixed;left:10px;right:10px;top:10px;z-index:75;display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:14px;background:#2a1520;border:1px solid #ff5a64;box-shadow:0 8px 28px rgba(0,0,0,.55)}
#remBar[hidden]{display:none}
#remBar .rb-t{flex:1;min-width:0;display:flex;flex-direction:column}
#remBar .rb-t b{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#remBar .rb-t small{opacity:.75}
#remBar .btn{min-height:40px;padding:0 14px}

/* TV Guide grid */
.gscrollx{overflow:auto;border:1px solid var(--line);border-radius:12px;background:var(--panel);max-height:calc(100vh - 230px);position:relative}
.gin{position:relative}
.grow{display:flex;align-items:stretch;border-bottom:1px solid var(--line);min-height:54px}
.gch{position:sticky;left:0;z-index:3;width:132px;flex:none;background:#0f151d;border-right:1px solid var(--line);display:flex;align-items:center;gap:2px;padding:2px 2px 2px 4px}
.gname{flex:1;min-width:0;display:flex;align-items:center;gap:6px;background:none;border:0;color:var(--text);text-align:left;padding:4px;min-height:46px}
.gl{width:28px;height:28px;flex:none;border-radius:7px;background:#1b2634;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;overflow:hidden}
.gl img{width:100%;height:100%;object-fit:contain;background:#fff}
.gn{font-size:12px;line-height:1.2;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.gn small{display:block;color:var(--muted);font-size:10.5px}
.gdots{flex:none;min-width:30px;min-height:40px;background:none;border:0;color:var(--muted);font-size:20px;padding:0 4px}
.gline{position:relative;flex:none;height:54px}
.gb{position:absolute;top:3px;height:48px;box-sizing:border-box;background:#182231;border:1px solid #263449;border-radius:8px;color:var(--text);text-align:left;padding:4px 7px;overflow:hidden;display:flex;flex-direction:column;justify-content:center;min-height:0}
.gb b{font-size:12px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.gb small{font-size:10.5px;color:var(--muted)}
.gb.now{background:#1d3557;border-color:#3b82f6}
.gb.none{background:transparent;border-style:dashed;color:var(--muted);font-size:12px;justify-content:center;display:flex}
.ghead{position:sticky;top:0;z-index:4;background:#0c1118;min-height:32px}
.ghead .gch{background:#0c1118;min-height:32px}
.ghead .gline{height:32px}
.gt{position:absolute;top:8px;font-size:11px;color:var(--muted);transform:translateX(-50%)}
.gnow{position:absolute;top:0;bottom:0;width:2px;background:#ff5a64;z-index:2;pointer-events:none}
/* the channel panel's "On now" text shares the class name with the guide's red now-line: undo the line styling there */
/* the panel scrolls as a whole: never squash its sections into little scroll boxes (that showed as empty bars on short screens like a TV) */
#sheetBox > * { flex-shrink: 0; }
/* Recordings */
.reccard { flex: none; width: 300px; display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 14px; background: #152036; border: 1px solid #22304A; color: inherit; }
.reccard .rc-l { flex: none; width: 56px; height: 56px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.reccard .rc-l img { max-width: 86%; max-height: 86%; object-fit: contain; }
.reccard .rc-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reccard .rc-t b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reccard .rc-t small { color: var(--muted, #93A1B8); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reccard .rc-s .badge { font-size: 10px; padding: 1px 6px; }
.recgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.recgrid .reccard { width: auto; }
.reccard .warn { color: #ff8a8a; }
/* the guide's programme rows are buttons now: press one to record it */
#sheetBox button.gi { display: flex; width: 100%; align-items: center; gap: 10px; text-align: left; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.06); padding: 7px 4px; color: inherit; font: inherit; border-radius: 6px; }
#sheetBox button.gi .gn { flex: 1; min-width: 0; }
#sheetBox button.gi .grec { flex: none; font-size: 12px; color: #ff6b6b; opacity: 0; }
#sheetBox button.gi:hover .grec, #sheetBox button.gi:focus .grec, #sheetBox button.gi.recon .grec { opacity: 1; }
#sheetBox .recon { box-shadow: inset 3px 0 0 #ff4d4d; }
/* the big Play button on a title's page */
#sheetBox .tp-play { width: 100%; min-height: 58px; font-size: 19px; font-weight: 800; margin: 10px 0 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
#sheetBox .tp-play small { font-weight: 500; opacity: .85; font-size: 14px; }
#sheetBox .tp-dl { width: 100%; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; margin: 0 0 6px; }
#sheetBox .tp-dl small { font-weight: 500; opacity: .8; font-size: 13px; }
#sheetBox .tp-none { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06); color: var(--muted, #93A1B8); font-size: 15px; }
/* the channel banner over the picture (TV): what's on, fades after a few seconds */
.lp-bn { display: none; }
body.tv-mode .lp-bn { position: absolute; left: 4%; right: 4%; bottom: 6%; display: flex; align-items: center; gap: 22px; padding: 18px 26px; border-radius: 18px; background: linear-gradient(90deg, rgba(11,18,32,.94), rgba(11,18,32,.82)); color: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.6); opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s; pointer-events: none; zoom: 1.3; }
body.tv-mode .lp-bn[hidden] { display: none; }
body.tv-mode .lp-bn.on { opacity: 1; transform: none; }
.lp-bn-l { flex: none; width: 76px; height: 76px; border-radius: 14px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.lp-bn-l img { max-width: 86%; max-height: 86%; object-fit: contain; }
.lp-bn-t { flex: 1; min-width: 0; }
.lp-bn-t > b { font-size: 24px; display: block; }
.lp-bn-now { font-size: 17px; margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.lp-bn-c { font-weight: 700; }
.lp-bn-time, .lp-bn-next { color: #A9B6CC; }
.lp-bn-next { flex-basis: 100%; font-size: 15px; }
.lp-bn-bar { display: block; flex-basis: 100%; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.lp-bn-bar i { display: block; height: 100%; background: var(--accent, #3B9BFF); }
.lp-bn-k { flex: none; font-size: 14px; color: #A9B6CC; }
/* inside the TV app there is no point casting the TV to itself */
html.tvapp #overlayCast, html.tvapp #nav [data-v2="cast"] { display: none !important; }
/* game alerts on the TV: bigger, and reachable with the remote */
body.tv-mode #remBar { zoom: 1.4; left: 20%; right: 20%; }
/* the PIN screen a TV away from home sees first: big enough to read and use with the remote */
html.tvapp #login { zoom: 1.9; }
html.tvapp #login .f:focus { box-shadow: 0 0 0 4px var(--accent); }
/* "a new TV app is ready" banner (Home Hub TV app) */
.tvupd { display: flex; align-items: center; gap: 20px; justify-content: space-between; margin: 18px 0 8px; padding: 18px 22px; border-radius: 16px; background: linear-gradient(90deg, #1d4ed8, #7c3aed); color: #fff; }
.tvupd b { display: block; font-size: 20px; margin-bottom: 4px; }
.tvupd span { font-size: 15px; opacity: .95; }
.tvupd .btn { flex: none; }
/* Apps on this TV (Home Hub TV app) */
.tvapp-tile { flex: none; width: 256px; display: flex; flex-direction: column; gap: 8px; padding: 0; background: none; border: 0; text-align: left; color: inherit; }
.tvapp-tile .tva-art { width: 256px; height: 144px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: #1B2740; }
.tvapp-tile .tva-art b { font-size: 22px; padding: 0 12px; text-align: center; }
.tvapp-tile .tva-art img { width: 100%; height: 100%; object-fit: cover; }
.tvapp-tile .tva-art.is-icon img { width: 96px; height: 96px; object-fit: contain; }
.tvapp-tile .tva-n { font-size: 16px; color: var(--muted, #93A1B8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.tv-mode .tvapp-tile.f:focus { transform: scale(1.06); box-shadow: none; }
body.tv-mode .tvapp-tile.f:focus .tva-art { box-shadow: 0 0 0 5px var(--accent), 0 12px 34px rgba(0,0,0,.75); }
#sheet .gnow{position:static;width:auto;background:none;z-index:auto;pointer-events:auto;text-align:left;margin:10px 0 4px}
.gch{width:150px}
@media (max-width:760px){ .gl{display:none} .gn{font-size:12.5px;-webkit-line-clamp:3} .gname{padding-left:6px} }

/* empty lists take one line, not a big box */
#catWl .empty,#homeWl .empty,#myCh .empty{padding:10px 14px;font-size:13px}

.ordrow{display:flex;align-items:center;gap:8px;width:100%}
.ordrow span{flex:1;font-size:14px}
.ordrow .btn{min-height:38px;padding:0 12px;font-size:13px}

/* What's on list */
.won{display:flex;flex-direction:column;gap:6px;margin:6px 0 12px}
.wrow{display:flex;align-items:stretch;gap:4px;background:var(--panel);border:1px solid var(--line);border-radius:12px}
.wmain{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;background:none;border:0;color:var(--text);text-align:left;padding:9px 6px 9px 12px;min-height:56px}
.wn{font-weight:650;font-size:14px;line-height:1.2}
.wn small{display:block;color:var(--muted);font-size:11px;font-weight:400;margin-top:1px}
.wnow{font-size:13px;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.wnow i{color:var(--muted);font-style:normal;font-size:12px}
.wnow.none{color:var(--muted);font-size:12px}
.wnext{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wrow .gdots{align-self:center;min-height:44px}

/* channel strip under the player */
.lp-sw{margin-top:10px;border-top:1px solid var(--line);padding-top:8px}
.lp-row{padding:4px 0 8px;margin:0;gap:8px}
.lpc{flex:none;width:132px;display:flex;flex-direction:column;gap:4px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:8px;text-align:left;color:var(--text);min-height:0}
.lpc-l{width:30px;height:30px;border-radius:8px;background:#1b2634;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;overflow:hidden}
.lpc-l img{width:100%;height:100%;object-fit:contain;background:#fff}
.lpc-n{font-size:12.5px;font-weight:650;line-height:1.2;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.lpc-np{font-size:11px;color:var(--muted);line-height:1.2;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.lp-btns{flex-wrap:wrap}

/* the strip must not make the player page wider than the screen */
.lp,.lp-info,.lp-sw,.lp-now{min-width:0;max-width:100%;box-sizing:border-box}
.lp-row{max-width:100%;overflow-x:auto}
.lp-btns .btn{flex:1 1 auto}

.wn small{white-space:normal}
/* nothing on the guide page may be wider than the phone (larger phone text sizes used to push rows off the right edge) */
#view{overflow-x:hidden}
.won,.wrow,.wmain{min-width:0;max-width:100%;box-sizing:border-box}
.wmain{overflow:hidden}
.wn,.wnow,.wnext{max-width:100%;overflow-wrap:anywhere}
.wnext{white-space:normal;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}

/* ---------- look polish ---------- */
.rowx { position: relative; }
.rowarr { position: absolute; top: calc(50% - 22px); z-index: 5; width: 38px; height: 44px; border: 1px solid var(--line2); background: rgba(10,13,18,.86); color: var(--text); font-size: 26px; line-height: 1; border-radius: 12px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s, background .15s; backdrop-filter: blur(6px); padding: 0 0 3px; }
.rowarr.l { left: -6px; } .rowarr.r { right: -6px; }
.rowx:hover .rowarr { opacity: 1; } .rowarr:hover { background: var(--accent); color: var(--accent-ink); }
@media (hover: none) { .rowarr { display: none; } }
.sub.skel { color: transparent; height: 14px; width: min(320px, 60%); border-radius: 7px; overflow: hidden; background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shim 1.2s infinite linear; margin: 14px 0; }
@keyframes shim { from { background-position: 200% 0; } to { background-position: -200% 0; } }
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; padding: 0; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--bg) inset; }
#ytLive .card.chan { width: 232px; }
#ytLive .card .th { position: relative; overflow: hidden; }
#ytLive .card .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
#ytLive .card .t { min-height: 0; -webkit-line-clamp: 1; }
#ytLive .card .m { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }

#view #ytLive .row .card.chan { width: 216px !important; flex: none; }
#ytLive .card .th { aspect-ratio: 16/9; background: #1b222d; }

/* ---------- profiles ---------- */
#profPick { position: fixed; inset: 0; z-index: 400; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 24px; text-align: center; }
#profPick[hidden] { display: none !important; }
.pp-box { width: min(760px, 100%); margin: auto; }
.pp-box h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 26px; }
.pp-grid { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.pp { background: transparent; border: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; width: 130px; color: var(--muted); }
.pp:hover, .pp:focus { color: var(--text); background: var(--panel); }
.pp-av { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 22px; font-size: 40px; font-weight: 700; color: #04101f; flex: none; }
.pp-av.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; border: 0; padding: 0; }
.pp-av.lg { width: 110px; height: 110px; font-size: 48px; margin-bottom: 14px; }
.pp-plus { background: var(--panel2); color: var(--muted); font-weight: 300; font-size: 54px; }
.pp-n { font-size: 17px; font-weight: 600; color: inherit; }
.pp-lock { font-size: 12px; color: var(--muted); }
.pp-box input { width: min(300px, 100%); text-align: center; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); font-size: 17px; }
.pp-box .err { color: var(--bad); min-height: 1.3em; }
.homehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; flex: none; }
.profchip-n { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav .navprof { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; margin: -6px 0 10px; font-size: 15px; background: var(--panel); border: 1px solid var(--line); }
#nav .navprof .navprof-sw { margin-left: auto; font-size: 12px; color: var(--muted); }
#nav .navprof span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { #nav .navprof { display: none; } .pp { width: 104px; } .pp-av { width: 80px; height: 80px; font-size: 32px; } }
.pm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pm-btns { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }

.pp-kid { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #04101f; background: var(--good); border-radius: 6px; padding: 1px 7px; }
.pp-kids { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; font-size: 14px; text-align: left; }
.pp-kids input { width: 20px; height: 20px; }

.qrbox { width: 132px; height: 132px; background: #fff; border-radius: 10px; padding: 4px; display: flex; align-items: center; justify-content: center; }
.qrbox svg { width: 100%; height: 100%; display: block; }

/* ---------- my week ---------- */
.wkteams { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; }
.wkq { flex: 1; min-width: 180px; max-width: 320px; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); font-size: 14px; }
.wk-day { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.wk { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.wk-t { flex: none; width: 74px; font-weight: 700; font-size: 14px; }
.wk-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wk-m b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.wk-m small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-sc { color: var(--live); }
.wk .btn { flex: none; padding: 8px 12px; font-size: 13.5px; }
@media (max-width: 700px) { .wk { flex-wrap: wrap; } .wk-t { width: auto; } .wk .btn { margin-left: auto; } }

/* ---------- channels by country ---------- */
.ctiles { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.ctiles::-webkit-scrollbar { display: none; }
.ctile { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 118px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; text-align: left; }
.ctile.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.ct-f { font-size: 28px; line-height: 1.1; }
.ct-n { font-size: 14.5px; font-weight: 650; }
.ct-c { font-size: 12.5px; color: var(--muted); }
.gpin { flex: none; width: 40px; background: transparent; border: 0; font-size: 22px; color: var(--muted); }
.gpin.on { color: #f5b83d; }
.rord { display: flex; gap: 4px; flex: none; align-items: center; }
.rord .btn { padding: 6px 9px; min-width: 34px; font-size: 13px; }

@media (max-width: 760px) { .wrow { flex-wrap: wrap; } .wrow .wmain { flex: 1 1 calc(100% - 56px); min-width: 0; } .wrow .rord { flex: 1 1 100%; justify-content: flex-end; padding: 0 8px 8px; } .wrow .rord .btn { flex: 1; max-width: 64px; } }

/* ==================== Prime Video style theme ==================== */
:root { --bg: #0f171e; --panel: #1a242f; --panel2: #243241; --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.18); --text: #ffffff; --muted: #8197a4; --accent: #1a98ff; --accent-ink: #ffffff; --radius: 10px; }
html, body, #view { background: var(--bg); }
#nav { background: #0b1219; }
@media (min-width: 761px) {
  body:not(.tv-mode) #app { flex-direction: column; }
  body:not(.tv-mode) #nav { width: 100%; height: 62px; flex: none; flex-direction: row; align-items: center; padding: 0 28px; gap: 0; background: linear-gradient(#0a1017, rgba(15,23,30,.97)); border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; z-index: 20; }
  body:not(.tv-mode) #nav::-webkit-scrollbar { display: none; }
  body:not(.tv-mode) #nav h2 { margin: 0 22px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--accent); flex: none; white-space: nowrap; }
  body:not(.tv-mode) #nav button[data-nav] { flex: none; flex-direction: row; align-items: center; height: 62px; padding: 0 12px; border-radius: 0; font-size: 14.5px; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; gap: 0; white-space: nowrap; }
  body:not(.tv-mode) #nav button[data-nav] .ic { display: none; }
  body:not(.tv-mode) #nav button[data-nav]:hover { color: #fff; }
  body:not(.tv-mode) #nav button[data-nav].on { color: #fff; background: transparent; border-bottom-color: var(--accent); }
  body:not(.tv-mode) #nav .navprof { order: 99; margin: 0 0 0 auto; flex: none; height: 42px; padding: 4px 14px 4px 4px; border-radius: 999px; }
  body:not(.tv-mode) #nav .navprof .navprof-sw { display: none; }
  body:not(.tv-mode) #nav .clock { display: none; }
  body:not(.tv-mode) .homehead { display: none; }
  body:not(.tv-mode) #view { padding: 0 40px 70px; }
  body:not(.tv-mode) #view > h1.title { margin-top: 26px; }
}
/* rows and cards */
.sec-h, .row-title { margin: 30px 0 10px; }
.sec-h h2, .row-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.pc, .cp, .card, .ev, .tile { transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.pc { background: var(--panel); border: 0; border-radius: 10px; }
.pc:hover, .cp:hover, .ev:hover, .tile:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 28px rgba(0,0,0,.55); z-index: 2; }
.cp { border-radius: 10px; }
.cp-i, .cp img { border-radius: 10px; }
.btn { background: rgba(255,255,255,.1); border: 0; border-radius: 6px; }
.btn:hover { background: rgba(255,255,255,.18); }
.primary, .f.primary { background: var(--accent); color: #fff; border: 0; border-radius: 6px; font-weight: 700; }
.primary:hover { filter: brightness(1.1); }
.chip { background: rgba(255,255,255,.08); border: 0; }
.chip.on { background: #fff; color: #0f171e; }
.find input, #findQ { background: #1a242f; border: 1px solid transparent; border-radius: 8px; }
.find input:focus, #findQ:focus { border-color: var(--accent); outline: none; }
.badge.live { background: #e50914; }
/* featured banner */
.phero { position: relative; overflow: hidden; margin: 0 -40px 8px; min-height: min(52vh, 440px); background: #0b1219; }
.hslide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .7s ease; display: flex; align-items: center; }
.hslide.on { opacity: 1; pointer-events: auto; position: relative; min-height: min(52vh, 440px); }
.hero-bg { position: absolute; inset: -30px; background-size: cover; background-position: center 20%; filter: blur(34px) brightness(.55) saturate(1.2); transform: scale(1.1); }
.hero-bg.live { background: radial-gradient(900px 400px at 75% 40%, #1b4f86 0%, #0f2a47 45%, #0b1219 100%); filter: none; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,30,.96) 0%, rgba(15,23,30,.72) 42%, rgba(15,23,30,.15) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(15,23,30,0) 38%); }
.hero-in { position: relative; z-index: 2; padding: 40px 40px 56px; max-width: min(640px, 62%); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.hero-tag { font-size: 12.5px; font-weight: 800; letter-spacing: .09em; color: var(--accent); }
.hero-tag.live { color: #ff5a64; }
.hero-in h2 { margin: 0; font-size: clamp(26px, 3.4vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.hero-meta { color: #cfd9e0; font-size: 14px; font-weight: 600; }
.hero-d { margin: 0; color: #d3dde4; font-size: 15.5px; line-height: 1.45; max-width: 560px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.hero-btns .f { padding: 13px 22px; font-size: 15.5px; border-radius: 6px; }
.hero-poster { position: absolute; right: 7%; top: 50%; transform: translateY(-50%); height: 82%; max-height: 360px; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.65); z-index: 1; }
.hero-icon { position: absolute; right: 12%; top: 50%; transform: translateY(-50%); font-size: clamp(90px, 14vw, 190px); z-index: 1; filter: drop-shadow(0 12px 40px rgba(0,0,0,.6)); }
.hero-dots { position: absolute; left: 40px; bottom: 18px; display: flex; gap: 8px; z-index: 5; }
.hdot { width: 26px; height: 4px; border-radius: 2px; border: 0; padding: 0; background: rgba(255,255,255,.3); }
.hdot.on { background: #fff; }
@media (max-width: 760px) {
  .phero { margin: 0 -16px 6px; min-height: 360px; }
  .hslide.on { min-height: 360px; align-items: flex-end; }
  .hero-in { max-width: 100%; padding: 24px 18px 46px; }
  .hero-poster { right: 14px; top: 18px; transform: none; height: 150px; }
  .hero-icon { right: 16px; top: 14px; transform: none; font-size: 52px; opacity: .85; }
  .hero-shade { background: linear-gradient(0deg, rgba(15,23,30,.97) 0%, rgba(15,23,30,.78) 48%, rgba(15,23,30,.2) 100%); }
  .hero-d { -webkit-line-clamp: 2; font-size: 14px; }
  .hero-dots { left: 18px; }
  .hero-btns .f { padding: 11px 16px; font-size: 14.5px; }
}
body.tv-mode .phero { margin: 0 -48px 10px; }

/* the phone's own play button would sit on top of the Connecting spinner */
.lp-vid video::-webkit-media-controls-overlay-play-button { display: none; }

/* ==================== colour ==================== */
body { --vc: #1a98ff; --vc2: #6c5cff; }
body[data-view="home"] { --vc: #1a98ff; --vc2: #6c5cff; }
body[data-view="live"] { --vc: #ff4d5a; --vc2: #ff8a3d; }
body[data-view="guide"] { --vc: #8b6cff; --vc2: #1a98ff; }
body[data-view="movies"] { --vc: #c05cff; --vc2: #ff5ca8; }
body[data-view="tvshows"] { --vc: #19c3b1; --vc2: #1a98ff; }
body[data-view="sports"] { --vc: #ff7a3d; --vc2: #ff3d6e; }
body[data-view="free"] { --vc: #3ddc84; --vc2: #19c3b1; }
body[data-view="livetv"] { --vc: #ffb02e; --vc2: #ff7a3d; }
body[data-view="history"] { --vc: #8fa7b5; --vc2: #5aa9ff; }
body[data-view="services"], body[data-view="tabs"], body[data-view="remote"], body[data-view="android"] { --vc: #5aa9ff; --vc2: #8b6cff; }
#view { background: radial-gradient(1100px 340px at 50% -140px, color-mix(in srgb, var(--vc) 24%, transparent), transparent 70%), radial-gradient(700px 300px at 100% 0, color-mix(in srgb, var(--vc2) 14%, transparent), transparent 70%), var(--bg); }
h1.title { background: linear-gradient(90deg, #fff 30%, var(--vc)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-h h2, .row-title { position: relative; padding-left: 14px; }
.sec-h h2::before, .row-title::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 1.05em; border-radius: 3px; background: linear-gradient(var(--vc), var(--vc2)); }
.row-title { display: flex; align-items: center; }
.row-title::before { position: static; transform: none; margin-right: 10px; flex: none; }
@media (min-width: 761px) { body:not(.tv-mode) #nav button[data-nav].on { border-bottom-color: var(--vc); } }
body:not(.tv-mode) #nav h2 { background: linear-gradient(90deg, #4cc3ff, #8b6cff 60%, #ff5ca8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.primary, .f.primary { background: linear-gradient(135deg, var(--accent), #5b7cff); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.chip.on { background: linear-gradient(135deg, var(--vc), var(--vc2)); color: #fff; }
.pc { background: linear-gradient(160deg, color-mix(in srgb, var(--vc) 9%, var(--panel)), var(--panel) 60%); }
.pc-dot { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--panel2); }
.ctile { background: linear-gradient(150deg, color-mix(in srgb, var(--vc) 16%, var(--panel)), var(--panel) 70%); border-color: color-mix(in srgb, var(--vc) 25%, transparent); }
.ctile.on { background: linear-gradient(150deg, color-mix(in srgb, var(--vc) 38%, var(--panel)), color-mix(in srgb, var(--vc2) 22%, var(--panel))); border-color: var(--vc); }
.won .wrow, .wk, .ev { border-left: 3px solid color-mix(in srgb, var(--vc) 55%, transparent); }
.badge.live { background: linear-gradient(135deg, #ff3b4a, #ff7a3d); }
.phero .hero-shade { background: linear-gradient(90deg, rgba(15,23,30,.94) 0%, rgba(15,23,30,.66) 42%, rgba(15,23,30,.1) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(15,23,30,0) 38%), radial-gradient(700px 360px at 85% 20%, color-mix(in srgb, var(--vc2) 30%, transparent), transparent); }
.hero-tag.title { color: var(--vc2); }
.hero-bg.live { background: radial-gradient(800px 420px at 78% 40%, #ff5a3d55 0%, transparent 60%), radial-gradient(900px 420px at 20% 90%, #6c5cff55 0%, transparent 60%), linear-gradient(120deg, #0f2a47, #1d1b4d 60%, #3a1b3f); }
.cp:hover, .pc:hover { box-shadow: 0 14px 30px rgba(0,0,0,.55), 0 0 0 1px color-mix(in srgb, var(--vc) 45%, transparent); }
.swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #fff; }

/* ---------- movies & TV pages like a streaming service ---------- */
.cp-i { position: relative; }
.newtag { position: absolute; left: 6px; top: 6px; background: linear-gradient(135deg, var(--vc), var(--vc2)); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; }
#catHero .phero { margin-top: 0; }
.crail .sec-h { margin-top: 22px; }
.crail .row { gap: 14px; }
.row .cp, .row .cp-sk { flex: none; width: 150px; }
@media (min-width: 761px) { .row .cp, .row .cp-sk { width: 168px; } }

.ctbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }

/* ==================== Version 2 design ==================== */
:root { --bg: #0B1220; --panel: #121A2B; --panel2: #1A2438; --line: #1E2A40; --line2: #2A3754; --text: #EAF0F7; --muted: #93A1B8; --accent: #3B9BFF; --accent-ink: #04101F; --radius: 12px; }
html, body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1.title, .sec-h h2, .row-title, .v2ttl, .v2brand, .hero-in h2 { font-family: "Space Grotesk", Inter, system-ui, sans-serif; }
#view { background: var(--bg); }
h1.title { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text); font-size: 28px; letter-spacing: -.02em; margin: 18px 0 6px; }
.sec-h h2::before, .row-title::before { display: none; }
.sec-h h2, .row-title { padding-left: 0; font-size: 19px; }
.v2ib { width: 40px; height: 40px; border-radius: 12px; background: #141C2E; border: 0; display: inline-grid; place-items: center; color: var(--text); flex: none; padding: 0; }
.v2ib.on { background: #3A2A06; color: #F5B83D; }
.v2av { width: 40px; height: 40px; border-radius: 12px; border: 0; color: #06101F; font-weight: 800; font-size: 16px; flex: none; padding: 0; }
/* top bar (phone) and menu bar (computer) */
#topbar { display: none; }
@media (min-width: 761px) {
  body:not(.tv-mode) #nav { gap: 2px; }
  body:not(.tv-mode) #nav .v2brand { font-size: 22px; font-weight: 700; color: #fff; margin-right: 24px; flex: none; background: none; -webkit-background-clip: border-box; background-clip: border-box; }
  body:not(.tv-mode) #nav .v2acts { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }
  body:not(.tv-mode) #nav .v2acts .v2mob { display: none; }
  body:not(.tv-mode) #nav button[data-nav].on { border-bottom-color: var(--vc, #3B9BFF); }
}
@media (max-width: 760px) {
  body:not(.tv-mode) #app { flex-direction: column; }
  body:not(.tv-mode) #topbar { order: 0; display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 16px 8px; background: var(--bg); flex: none; }
  body:not(.tv-mode) #topbar .v2ttl { flex: 1; font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body:not(.tv-mode) #view { order: 1; padding-top: 0; }
  body:not(.tv-mode) #nav { order: 2; justify-content: space-around; background: #0E1626; border-top: 1px solid #1E2A40; overflow: hidden; }
  body:not(.tv-mode) #nav .v2brand, body:not(.tv-mode) #nav .v2dk, body:not(.tv-mode) #nav .v2acts { display: none; }
  body:not(.tv-mode) #nav button[data-nav] { min-width: 0; flex: 1; font-size: 11px; font-weight: 600; color: #93A1B8; gap: 3px; padding: 8px 2px; background: none; }
  body:not(.tv-mode) #nav button[data-nav] .ic { font-size: 0; height: 22px; display: flex; justify-content: center; }
  body:not(.tv-mode) #nav button[data-nav].on { color: var(--vc, #fff); background: none; }
  body:not(.tv-mode) h1.title { display: none; }
  body:not(.tv-mode) .v2head h1.title { display: none; }
}
body.tv-mode #topbar { display: none; }
body.tv-mode #nav .v2acts { display: flex; gap: 8px; margin-top: auto; padding: 8px 12px; }
body.tv-mode #nav .v2brand { margin: 0 12px 18px; font-size: 24px; font-weight: 700; }
#nav button[data-nav] .ic svg { display: block; }
/* page head row */
.v2head { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; }
.v2head h1.title { margin: 0; flex: 1; }
/* Live now tiles */
.v2lt { flex: none; width: 236px; background: none; border: 0; padding: 0; text-align: left; color: var(--text); display: flex; flex-direction: column; }
.v2art { height: 133px; border-radius: 12px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 12px; }
.v2art .badge { position: absolute; left: 10px; top: 10px; }
.v2big { font-family: "Space Grotesk", sans-serif; font-size: 26px; font-weight: 700; color: rgba(255,255,255,.92); line-height: 1; }
.v2bar { height: 3px; background: #2A3754; border-radius: 2px; margin-top: 8px; display: block; }
.v2bar i { display: block; height: 3px; border-radius: 2px; background: #FF4D5E; }
.v2t { font-weight: 700; font-size: 14px; margin-top: 8px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v2m { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 761px) { .v2lt { width: 300px; } .v2art { height: 169px; } .v2big { font-size: 30px; } }
/* channel logo tiles */
.v2ch { flex: none; width: 88px; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; color: #C9D3E3; padding: 2px 0; }
.v2logo { width: 66px; height: 66px; border-radius: 18px; display: grid; place-items: center; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 22px; color: #fff; background: #1A2438; overflow: hidden; }
.v2logo img { width: 78%; height: 78%; object-fit: contain; }
.v2logo.sm { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; flex: none; }
.v2cn { font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.2; max-width: 88px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v2cp { font-size: 10.5px; color: var(--muted); text-align: center; max-width: 88px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Top 10 */
.v2top { flex: none; display: flex; align-items: flex-end; width: 168px; background: none; border: 0; padding: 0; color: var(--text); }
.v2num { font-family: "Space Grotesk", sans-serif; font-size: 104px; font-weight: 700; line-height: .78; color: var(--bg); -webkit-text-stroke: 2px #5B6A85; width: 62px; margin-right: -12px; position: relative; z-index: 1; text-align: right; }
.v2top .cp-i { width: 112px; flex: none; }
/* Live Sport cards */
.v2ev { background: var(--panel); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.v2comp { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; color: var(--muted); flex-wrap: wrap; }
.v2teams { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; font-family: "Space Grotesk", sans-serif; font-size: 18px; font-weight: 700; line-height: 1.2; }
.v2sc { margin-top: 6px; }
.v2st { font-size: 12px; color: var(--muted); margin-top: 6px; }
.v2ev .v2bar { margin: 10px 0 12px; }
.v2ways { display: flex; flex-wrap: wrap; gap: 6px; }
.v2go { min-height: 42px; padding: 0 16px; border-radius: 10px; border: 0; background: #3B9BFF; color: #04101F; font-weight: 800; font-size: 13.5px; box-shadow: none; }
.v2w { min-height: 36px; padding: 0 11px; border-radius: 9px; border: 1px solid #26344F; background: #0E1626; color: #DCE4F0; font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.v2w b { font-size: 10px; font-weight: 800; color: var(--muted); }
.v2lr { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #1A2438; }
.v2tm { width: 72px; flex: none; font-weight: 800; font-size: 13px; }
.v2lrm { flex: 1; min-width: 0; background: none; border: 0; padding: 4px 0; color: var(--text); text-align: left; display: flex; flex-direction: column; gap: 2px; }
.v2lrm b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2lrm small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) { #lvOn { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; align-items: start; } #lvOn > .sec-h, #lvOn > .empty { grid-column: 1 / -1; } #lvOn .v2ev { margin: 0; } }
/* Sports hub */
.v2lg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
@media (min-width: 761px) { .v2lg { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.v2lgt { height: 76px; border-radius: 12px; border: 0; color: #fff; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 15px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 10px 11px; text-align: left; }
.v2lgt small { font-family: Inter, sans-serif; font-size: 11px; font-weight: 700; opacity: .85; }
.v2seg { display: flex; background: var(--panel); border-radius: 12px; padding: 4px; gap: 4px; }
.v2seg .f { flex: 1; min-height: 36px; border: 0; border-radius: 9px; background: none; color: #C9D3E3; font-weight: 700; font-size: 13px; }
.v2seg .f.on { background: var(--vc, #3B9BFF); color: #0B1220; }
.v2seg.big { flex: 1; max-width: 420px; }
.v2seg.big .f { min-height: 40px; font-size: 14.5px; }
.v2cr { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid #1A2438; }
.v2crm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 10px 0; color: var(--text); text-align: left; }
.v2crm span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2crm b { font-size: 14px; }
.v2crm small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2skel { height: 120px; border-radius: 14px; margin: 12px 0; background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shim 1.2s infinite linear; }
/* profile menu */
.v2ph { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.v2ph .pp-av.lg { width: 64px; height: 64px; font-size: 28px; margin: 0; border-radius: 18px; }
.v2mlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.v2mi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px !important; }
.v2mi b { font-size: 15px; }
.v2mi small { font-size: 12px; color: var(--muted); font-weight: 500; }
/* cards and rows: calmer than before */
.pc { background: var(--panel); }
.ctile { background: var(--panel); border-color: var(--line); }
.won .wrow, .wk, .ev { border-left: 0; }
.primary, .f.primary { background: #3B9BFF; color: #04101F; box-shadow: none; }
.chip.on { background: var(--vc, #3B9BFF); color: #0B1220; }
.badge.live { background: #FF4D5E; }
body[data-view="live"] { --vc: #FF4D5E; } body[data-view="sports"] { --vc: #FF8A3D; } body[data-view="movies"] { --vc: #A57CFF; } body[data-view="tvshows"] { --vc: #2FD1C0; } body[data-view="home"] { --vc: #3B9BFF; } body[data-view="guide"] { --vc: #8B6CFF; } body[data-view="search"] { --vc: #3B9BFF; }
/* player buttons */
.lp-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.lp-btns .btn { background: var(--panel); border-radius: 12px; font-size: 12.5px; padding: 10px 12px; }
/* title page: the details sheet fills the screen */
#sheet.titlepage { align-items: stretch; justify-content: stretch; padding: 0; }
#sheet.titlepage #sheetBox { width: 100%; max-width: 760px; margin: 0 auto; max-height: none; height: 100%; border-radius: 0; overflow-y: auto; padding: 0 18px 30px; background: var(--bg); }
.tp-top { position: relative; margin: 0 -18px 0; height: 260px; overflow: hidden; }
.tp-bg { position: absolute; inset: -40px; background-size: cover; background-position: center 25%; filter: blur(30px) brightness(.5) saturate(1.2); }
.tp-shade { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, rgba(11,18,32,.2) 70%); }
.tp-close { position: absolute; left: 14px; top: 14px; z-index: 2; }
#sheet.titlepage .ct-h { margin-top: -120px; position: relative; z-index: 1; align-items: flex-end; }
#sheet.titlepage .ct-p { width: 120px; border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.6); }
#sheet.titlepage .ct-h h3 { font-family: "Space Grotesk", sans-serif; font-size: 26px; line-height: 1.1; margin: 0 0 4px; }

.v2pillrow { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; }
.v2pillrow .chips { flex: 1; min-width: 0; margin: 0; }

#nav .v2acts .v2ib, #nav .v2acts .v2av { padding: 0 !important; width: 40px; height: 40px; min-width: 40px; display: inline-grid; place-items: center; }
#nav .v2acts .v2ib { color: #EAF0F7; background: #141C2E; border-radius: 12px; }

.v2logo.lt-tile, .gl.lt-tile, .pc-dot.lt-tile, .lpc-l.lt-tile, .chl.lt-tile { background: #E8EEF6 !important; }

/* team colours and badges */
.tb { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: "Space Grotesk", Inter, sans-serif; font-weight: 700; font-size: 11px; letter-spacing: -.02em; flex: none; overflow: hidden; margin-right: 10px; vertical-align: middle; }
.tb img { width: 78%; height: 78%; object-fit: contain; }
.tb.big { width: 64px; height: 64px; font-size: 19px; margin: 0; box-shadow: 0 6px 18px rgba(0,0,0,.35) !important; }
.v2art.vs { flex-direction: column; justify-content: center; align-items: center; gap: 8px; }
.vsrow { display: flex; align-items: center; gap: 14px; }
.vsv { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 16px; color: #fff; background: rgba(0,0,0,.45); border-radius: 999px; padding: 3px 9px; }
.vssp { position: absolute; left: 10px; bottom: 9px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.4); padding: 2px 7px; border-radius: 6px; }
.v2tl { display: flex; align-items: center; }
@media (min-width: 761px) { .tb.big { width: 74px; height: 74px; font-size: 22px; } }

.badge.soon { background: rgba(11,18,32,.75); color: #fff; }
.v2art .badge.soon { position: absolute; left: 10px; top: 10px; }

/* auto-record */
.arbox { display: grid; gap: 8px; margin-bottom: 18px; max-width: 760px; }
.rc-auto { color: var(--accent, #4f9dff); }
.recpower.on b { color: #ff5a6a; }
.recpower.off { opacity: .85; border-style: dashed; }
.arbox .v2mi { background: #152036; border: 1px solid #22304A; border-radius: 14px; color: var(--text, #e8eefc); width: 100%; }
.arbox .v2mi:hover, .arbox .v2mi:focus-visible { border-color: #4f9dff; }
.recset { margin: 0 0 16px; max-width: 760px; }
.setrow { display: grid; gap: 6px; padding: 10px 12px; background: #152036; border: 1px solid #22304A; border-radius: 14px; }
.setrow span { display: flex; flex-wrap: wrap; gap: 6px; }
.setrow small { color: var(--muted); }
/* Record and delete: big, coloured, always visible */
.rec-red { background: #e5334b !important; border-color: #e5334b !important; color: #fff !important; font-weight: 700; }
.rec-red small { color: rgba(255,255,255,.85) !important; }
.rec-red:hover, .rec-red:focus-visible { background: #ff4560 !important; }
#sheetBox button.gi .grec { opacity: 1; background: #e5334b; color: #fff; border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.reccardw { display: flex; flex-direction: column; gap: 6px; }
.reccardw .reccard { width: auto; }
.recbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.recb { flex: 1 1 auto; min-width: 84px; padding: 9px 12px !important; font-weight: 700; text-align: center; justify-content: center; }
.recb.play { background: #2f7df6 !important; border-color: #2f7df6 !important; color: #fff !important; }
.recb.del { background: #e5334b !important; border-color: #e5334b !important; color: #fff !important; }
.recb { background: #22304A; border: 1px solid #34466b; color: #fff; }
.recb.play { background: #2f7df6 !important; }
.recb.del { background: #e5334b !important; }
.recb:hover, .recb:focus-visible { filter: brightness(1.15); outline: 2px solid #fff; outline-offset: 1px; }
.recfind { display: grid; gap: 8px; margin: 6px 0 12px; max-width: 760px; }
.recfind input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #22304A; background: #152036; color: #fff; font-size: 15px; }
.recchips { display: flex; flex-wrap: wrap; gap: 6px; }
.recstore { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 12px; color: var(--muted, #93A1B8); }
.recstore b { color: #fff; }
.recweek { margin: 8px 0 12px; padding: 12px 14px; max-width: 760px; border-radius: 14px; background: #152036; border: 1px solid #22304A; display: grid; gap: 4px; }
.recweek small { color: var(--muted, #93A1B8); }
.recweek .warn { color: #ff8a8a; }
.lp-vid { position: relative; }
.recnext { position: absolute; right: 16px; bottom: 64px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: min(560px, 90%); padding: 12px 14px; border-radius: 14px; background: rgba(10,16,28,.94); border: 1px solid #34466b; color: #fff; }
.recnext span { flex: 1 1 100%; font-weight: 700; }
.recnext small { flex: 1 1 100%; color: #aeb9cc; }
.recnext .f:not(.primary) { background: #22304A; border: 1px solid #34466b; color: #fff; }
.recskip { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.recskip .recb { flex: 1 1 90px; }
.sharebox { display: grid; gap: 8px; margin: 8px 0; }
.sharebox input { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #34466b; background: #0e1626; color: #fff; font-size: 14px; }
.setrow b { word-break: break-all; }
.tvapp-tile .tva-art img.bsicon { object-fit: contain; width: auto; max-width: 100%; background: transparent; }
.fd-side { display: inline-block; margin: 0 6px 0 2px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #34466b; color: #fff; }
.fd-side.home { background: #1f7a4d; } .fd-side.away { background: #a35a1a; } .fd-side.game { background: #2f7df6; }
.fd-st { display: inline-block; margin-right: 6px; font-size: 12px; font-weight: 700; color: #93A1B8; }
.fd-st.ok { color: #43d199; } .fd-st.bad { color: #ff6b6b; } .fd-st.warn { color: #f5b83d; }
.cc-tag { display: inline-block; padding: 0 5px; border-radius: 4px; background: #34466b; color: #fff; font-size: 10px; font-weight: 800; }
.ltgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.ltile { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px; background: #152036; border: 1px solid #22304A; color: inherit; }
.ltile .lt-l { flex: none; width: 54px; height: 54px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.ltile .lt-l img { max-width: 88%; max-height: 88%; object-fit: contain; }
.ltile .lt-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ltile .lt-t b { font-size: 15px; } .ltile .lt-t em { font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: #2f7df6; border-radius: 999px; padding: 1px 8px; align-self: flex-start; }
.ltile .lt-t small { color: var(--muted, #93A1B8); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltile:hover, .ltile:focus-visible { border-color: #4f9dff; }
.updrow { display: grid; gap: 2px; padding: 12px 14px; margin: 8px 0; border-radius: 14px; background: #152036; border: 1px solid #22304A; }
.updrow span { color: var(--muted, #93A1B8); font-size: 13.5px; }
.updrow.ok { border-color: #1f7a4d; } .updrow.ok b { color: #43d199; }
.updrow.warn { border-color: #a35a1a; } .updrow.warn b { color: #f5b83d; }
.updrow.bad { border-color: #8a2a36; } .updrow.bad b { color: #ff6b6b; }
