@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Sora:wght@600;700&display=swap");

:root {
  --bg: #0E1116;
  --panel: #141922;
  --card: #1A1F28;
  --raised: #1F2530;
  --hover: #262D3A;
  --line: #222935;
  --line-strong: #343C4A;
  --text: #F2F4F7;
  --text-2: #C6CDD8;
  --muted: #A6AEBB;
  --accent: #F5A524;
  --on-accent: #0E1116;
  --ok-bg: #1D3B2E; --ok: #8FE3B5;
  --bad-bg: #3B1D22; --bad: #FFB3BD;
  --display: Sora, "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --radius: 14px;
  --rail: 208px;
  --base: 18px;
}
:root[data-size="large"] { --base: 21px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font: var(--base)/1.4 var(--body); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
img { display: block; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }


/* Focus: the one thing that must be obvious from the couch */
:focus { outline: none; }
:focus-visible, .focus-ring:focus { outline: 4px solid var(--accent); outline-offset: 2px; }
.card:focus, .row:focus, .poster:focus, .prog:focus, .navlink:focus, .group:focus, .tile:focus {
  outline: 4px solid var(--accent); outline-offset: 0; }

/* Buttons & inputs */
.btn { height: 52px; padding: 0 22px; border-radius: 12px; border: 2px solid var(--line-strong);
  background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 1em; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.btn.danger { border-color: #7A3440; color: var(--bad); }
.btn.small { height: 42px; padding: 0 14px; font-size: .9em; }
.btn.icon { width: 52px; padding: 0; }
.btn svg, .navlink svg { flex-shrink: 0; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { color: var(--text-2); font-size: .9em; }
.input, select.input { height: 56px; border-radius: 12px; border: 2px solid var(--line-strong);
  background: var(--raised); padding: 0 16px; width: 100%; }
.input:focus { border-color: var(--accent); outline: none; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.check input { width: 24px; height: 24px; accent-color: var(--accent); }
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 44px; padding: 0 18px; border-radius: 22px; border: 2px solid var(--line-strong); background: transparent;
  color: var(--text-2); flex-shrink: 0; white-space: nowrap; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: .8em; font-weight: 700;
  background: var(--hover); color: var(--text-2); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.bar { height: 5px; border-radius: 3px; background: #2E3644; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.empty { padding: 40px 0; color: var(--muted); }
.err { color: var(--bad); min-height: 1.4em; }

/* Layout shell */
.shell { display: flex; height: 100vh; }
.rail { width: var(--rail); flex-shrink: 0; background: var(--panel); padding: 28px 14px; display: flex;
  flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { font: 700 26px var(--display); padding: 0 14px 22px; display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; }
.navlink { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 14px; border-radius: 12px;
  color: var(--muted); text-decoration: none; }
.navlink.on { background: var(--hover); color: var(--text); font-weight: 700; }
.navlink:hover { color: var(--text); }
.who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--text-2); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: #3B4252; color: #fff; flex-shrink: 0; }
.main { flex: 1; min-width: 0; overflow-y: auto; padding: 32px 40px 60px; scroll-behavior: smooth; }
.page-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.9em; }
section + section { margin-top: 32px; }
section > h2 { font-size: 1.2em; margin-bottom: 14px; }

/* Channel logo tile */
.logo { width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  font: 700 16px var(--display); color: #fff; overflow: hidden; background: #2A3140; }
.logo img { width: 100%; height: 100%; object-fit: contain; background: #fff1; }
.logo.lg { width: 96px; height: 96px; font-size: 26px; border-radius: 16px; }

/* Home */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.card { border-radius: 18px; background: var(--card); padding: 24px; display: flex; flex-direction: column; gap: 10px;
  border: 0; text-align: left; min-height: 200px; justify-content: flex-end; color: var(--text); text-decoration: none; }
.hero + section { margin-top: 32px; }
.card.feature { background: #1D2733; }
.card .kicker { font-size: .78em; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.card .title { font: 700 1.5em var(--display); }
.strip { display: flex; gap: 16px; overflow-x: auto; padding: 6px 4px 14px; scrollbar-width: thin; }
.tile { width: 190px; flex-shrink: 0; border-radius: 14px; background: var(--card); padding: 16px; display: flex;
  flex-direction: column; gap: 10px; border: 0; text-align: left; }
.tile .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .sub { color: var(--muted); font-size: .85em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Live TV */
.main.flush { padding: 0; overflow: hidden; }
.live { display: grid; grid-template-columns: 240px minmax(0, 1fr) 380px; gap: 0; height: 100%; }
.groups { background: var(--panel); padding: 26px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.groups h1 { font-size: 1.35em; padding: 0 12px 14px; }
.group { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 50px; padding: 0 14px;
  border-radius: 10px; border: 0; background: transparent; color: var(--text-2); text-align: left; }
.group span:last-child { color: var(--muted); font-size: .85em; }
.group.on { background: var(--hover); color: var(--text); font-weight: 700; }
.chlist { padding: 22px 18px; overflow-y: auto; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 8px 14px; border-radius: 12px; border: 0;
  background: transparent; text-align: left; width: 100%; }
.row:hover { background: var(--card); }
.row.on { background: #1D2733; }
.row .num { width: 44px; text-align: right; color: var(--muted); font-size: .9em; flex-shrink: 0; }
.row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .now { color: var(--text-2); font-size: .88em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.star { color: var(--accent); flex-shrink: 0; }
.detail { padding: 26px 26px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.detail .when { color: var(--accent); font-weight: 700; font-size: .85em; }
.detail h2 { font-size: 1.4em; }
.detail p { margin: 0; color: var(--text-2); }
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 12px;
  background: var(--card); border: 2px solid transparent; margin-bottom: 8px; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 100%; }

/* Guide */
.guide-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.guide-info { min-height: 96px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.guide-info h2 { font-size: 1.35em; }
.grid { position: relative; overflow-x: auto; }
.grid-inner { position: relative; }
.times { display: flex; position: sticky; top: 0; z-index: 2; background: var(--bg); padding-bottom: 8px; }
.times div { flex-shrink: 0; color: var(--muted); font-weight: 700; font-size: .9em; }
.gr { display: flex; gap: 0; height: 66px; margin-bottom: 6px; }
.gch { position: sticky; left: 0; z-index: 1; width: 230px; flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; border-radius: 10px; background: var(--panel); margin-right: 6px; border: 0; text-align: left; }
.gch .name { font-weight: 700; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gch .logo { width: 40px; height: 40px; font-size: 12px; }
.lane { position: relative; flex-shrink: 0; }
.prog { position: absolute; top: 0; bottom: 0; border-radius: 10px; border: 0; background: #161A21; padding: 8px 12px;
  text-align: left; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.prog.live { background: #1F2633; }
.prog.past { opacity: .7; }
.prog .t { font-weight: 700; font-size: .88em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog .s { color: var(--muted); font-size: .75em; white-space: nowrap; }
.nowline { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--accent); border-radius: 2px; z-index: 1; pointer-events: none; }

/* Movies & series */
.vod { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 0; height: 100%; }
.vod-detail { background: var(--panel); padding: 36px 32px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.vod-detail h1 { font-size: 1.8em; line-height: 1.15; }
.vod-detail p { margin: 0; color: var(--text-2); }
.vod-detail .art { width: 100%; aspect-ratio: 2/3; max-height: 300px; border-radius: 14px; overflow: hidden; background: var(--card); }
.vod-detail .art img { width: 100%; height: 100%; object-fit: cover; }
.vod-list { padding: 30px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.poster { border: 0; padding: 0; background: transparent; text-align: left; display: flex; flex-direction: column; gap: 8px; border-radius: 12px; }
.poster .pic { aspect-ratio: 2/3; border-radius: 12px; overflow: hidden; display: flex; align-items: flex-end; padding: 12px;
  font: 700 1em/1.2 var(--display); color: #fff; position: relative; }
.poster .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster .cap { font-size: .85em; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episodes { display: flex; flex-direction: column; gap: 8px; }
.episode { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--card); border: 0; text-align: left; width: 100%; }
.episode .n { font-weight: 700; color: var(--muted); width: 64px; flex-shrink: 0; }
.episode .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

/* Lists (recordings, admin) */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; background: var(--card); flex-wrap: wrap; }
.item .info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item .title { font-weight: 700; }
.panel { border-radius: 16px; background: var(--panel); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > .wide { flex: 999 1 560px; min-width: 0; }
.cols > .narrow { flex: 1 1 340px; min-width: 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
.kv code { background: var(--raised); padding: 4px 8px; border-radius: 6px; word-break: break-all; font-size: .9em; }

/* Sign in */
.signin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 100vh; }
.signin .intro { background: var(--panel); padding: 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.signin .intro h1 { font-size: 2.8em; line-height: 1.1; }
.signin .intro p { color: var(--text-2); font-size: 1.15em; max-width: 30em; margin: 0; }
.signin form { padding: 64px; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 620px; }
.pair { display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.pair .code { font: 700 2em var(--display); letter-spacing: 4px; color: var(--accent); white-space: nowrap; }

/* Player */
#player { position: fixed; inset: 0; z-index: 50; background: #000; }
#player video { width: 100%; height: 100%; background: #000; }
.osd { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 48px 36px; background: rgba(14, 17, 22, .94);
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; transition: opacity .25s; }
.osd.hide { opacity: 0; pointer-events: none; }
.osd-top { display: flex; align-items: center; gap: 18px; }
.osd-top .info { flex: 1; min-width: 0; }
.osd-top .title { font: 700 1.5em var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline { display: flex; align-items: center; gap: 16px; color: var(--text-2); font-size: .9em; }
.timeline .track { flex: 1; height: 10px; border-radius: 5px; background: #2E3644; position: relative; cursor: pointer; }
.timeline .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); }
.osd .btns { justify-content: center; }
.round { width: 64px; height: 64px; border-radius: 50%; padding: 0; }
.status { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); padding: 12px 20px; border-radius: 12px;
  background: rgba(20, 25, 34, .95); color: var(--text); max-width: 80%; text-align: center; }
.spinner { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%;
  border: 5px solid #ffffff22; border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--bg);
  padding: 14px 22px; border-radius: 12px; font-weight: 700; max-width: 90vw; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: 18px; padding: 28px; width: min(560px, 92vw); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog form { display: flex; flex-direction: column; gap: 16px; }

/* Phones and small tablets */
@media (max-width: 860px) {
  body { --base: 16px; }
  .shell { flex-direction: column-reverse; }
  .rail { width: auto; height: 68px; flex-direction: row; padding: 0; gap: 0; justify-content: space-around; overflow: visible; border-top: 1px solid var(--line); }
  .rail .brand, .rail .who { display: none; }
  .navlink { flex-direction: column; gap: 3px; min-height: 0; padding: 8px 4px; font-size: 12px; justify-content: center; flex: 1; }
  .navlink.on { background: transparent; color: var(--accent); }
  .main { padding: 20px 16px 40px; }
  .main.flush { overflow-y: auto; }
  .live, .vod { display: flex; flex-direction: column; height: auto; }
  .groups { flex-direction: row; overflow-x: auto; padding: 14px 12px; }
  .groups h1 { display: none; }
  .group { flex-shrink: 0; min-height: 42px; border-radius: 21px; border: 2px solid var(--line-strong); }
  .group span:last-child { display: none; }
  .chlist { border-right: 0; padding: 8px 10px; }
  .detail { display: none; }
  .row .num { display: none; }
  .vod-detail { display: none; }
  .vod-list { padding: 16px; }
  .posters { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
  .hero { grid-template-columns: 1fr; }
  .signin { grid-template-columns: 1fr; }
  .signin .intro, .signin form { padding: 28px 20px; }
  .signin .intro h1 { font-size: 2em; }
  .gch { width: 130px; }
  .gch .logo { display: none; }
  .osd { padding: 18px 16px 22px; }
  .osd .btns .btn:not(.round) { padding: 0 14px; }
}

/* 24/7 movie channel cards and the country picker */
.poster .pic.chan { aspect-ratio: 16/10; align-items: center; justify-content: center; text-align: center; }
.poster .pic.chan img { object-fit: contain; padding: 14%; background: #00000022; }
.live-badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 6px; font: 700 .7em var(--body);
  background: #C62F35; color: #fff; letter-spacing: .5px; }
.poster .cap { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn.place { max-width: 100%; justify-content: flex-start; }
.btn.place span { overflow: hidden; text-overflow: ellipsis; }
.row.on { outline: 2px solid var(--line-strong); }
dialog .row { min-height: 52px; padding: 6px 14px; }
.brand { white-space: nowrap; font-size: 22px; }
.vod-list > *, .chlist > *, .groups > *, .detail > * { flex-shrink: 0; }

/* Phones: the menu is pinned to the bottom of the visible screen. 100vh on phones
   includes the area behind the browser's address bar, which pushed it off-screen. */
.shell { height: 100vh; height: 100dvh; }
@media (max-width: 860px) {
  .rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: auto; min-height: 64px;
    padding-bottom: env(safe-area-inset-bottom); background: var(--panel); }
  .main, .main.flush { padding-bottom: calc(84px + env(safe-area-inset-bottom)); height: 100%; overflow-y: auto; }
  .navlink.extra { display: flex !important; }
  .navlink span { font-size: 11px; }
  .navlink svg { width: 22px; height: 22px; }
}
.navlink span { white-space: nowrap; }
@media (max-width: 860px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs .chip { height: 40px; padding: 0 14px; }
}

/* Home: big banner and rows of posters and channels */
.banner { position: relative; border-radius: 22px; overflow: hidden; min-height: 400px; display: flex; align-items: stretch;
  background: #0B0E13; isolation: isolate; transition: opacity .35s; }
.banner.fade { opacity: .25; }
.banner-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(38px) saturate(1.3) brightness(.55);
  transform: scale(1.1); z-index: -2; }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10, 12, 16, .92) 0%, rgba(10, 12, 16, .7) 45%, rgba(10, 12, 16, .1) 100%); }
.banner-body { flex: 1; padding: 44px 48px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; max-width: 720px; }
.banner-body .kicker { font-size: .78em; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); }
.banner-body h1 { font-size: 2.6em; line-height: 1.05; text-shadow: 0 2px 24px #0008; }
.banner-body p { margin: 0; color: var(--text-2); max-width: 60ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.banner-body .btns { margin-top: 8px; }
.banner-art { width: 270px; flex-shrink: 0; padding: 32px 40px 32px 0; display: flex; align-items: center; }
.banner-art img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 16px; box-shadow: 0 24px 60px #000a; }
.btn.glass { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); }
.btn.glass:hover { background: rgba(255, 255, 255, .2); }
.btn.ghost { border-color: transparent; color: var(--muted); gap: 4px; }
.btn.ghost:hover, .btn.ghost:focus { color: var(--text); }
.dots { display: flex; gap: 8px; margin-top: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: #ffffff40; transition: width .3s; }
.dots i.on { width: 26px; background: var(--accent); }

.hrow { margin-top: 34px; }
.hrow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.hrow-head h2 { font-size: 1.25em; }
.hrow .strip { gap: 16px; padding: 8px 6px 16px; margin: 0 -6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hrow .strip::-webkit-scrollbar { display: none; }
.pcard, .ccard { flex-shrink: 0; border: 0; padding: 0; background: transparent; text-align: left; display: flex; flex-direction: column;
  gap: 8px; scroll-snap-align: start; border-radius: 14px; color: var(--text); transition: transform .18s ease; }
.pcard { width: 168px; }
.ccard { width: 260px; }
.pcard .pic, .ccard .pic { position: relative; border-radius: 14px; overflow: hidden; display: grid; place-items: center; }
.pcard .pic { aspect-ratio: 2/3; }
.ccard .pic { aspect-ratio: 16/9; background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--tint) 70%, #fff 0%), #11151c); }
.pcard .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ccard .pic img { width: 62%; height: 62%; object-fit: contain; filter: drop-shadow(0 4px 12px #0007); }
.pic .ph { padding: 12px; font: 700 1em var(--display); text-align: center; color: #fff; }
.pcard .pic .bar, .ccard > .bar { position: absolute; left: 10px; right: 10px; bottom: 10px; }
.ccard { position: relative; }
.ccard > .bar { position: static; margin-top: -2px; }
.pcard .cap { font-size: .88em; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard .cap { display: flex; flex-direction: column; gap: 2px; font-size: .9em; min-width: 0; }
.ccard .cap b, .ccard .cap span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .cap span { color: var(--muted); }
.ccard .flag { position: absolute; top: 8px; right: 10px; font-size: 1.2em; }
.pcard:hover, .ccard:hover, .pcard:focus, .ccard:focus { transform: scale(1.05); z-index: 1; }
.pcard:focus, .ccard:focus { outline: none; }
.pcard:focus .pic, .ccard:focus .pic { outline: 4px solid var(--accent); outline-offset: 0; }

/* "More info" dialog */
dialog:has(.tdlg) { width: min(820px, 94vw); }
.tdlg { display: flex; gap: 26px; }
.tdlg .art { width: 220px; flex-shrink: 0; }
.tdlg .art img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 14px; }
.tdlg-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tdlg-body p { margin: 0; color: var(--text-2); max-height: 40vh; overflow-y: auto; }

@media (max-width: 860px) {
  .banner { min-height: 0; border-radius: 18px; }
  .banner-art { display: none; }
  .banner-body { padding: 150px 20px 22px; }
  .banner-bg { filter: blur(0) brightness(.75); inset: 0; transform: none; }
  .banner::after { background: linear-gradient(0deg, rgba(10, 12, 16, .97) 25%, rgba(10, 12, 16, .3) 100%); }
  .banner-body h1 { font-size: 1.8em; }
  .hrow { margin-top: 26px; }
  .pcard { width: 120px; }
  .ccard { width: 200px; }
  .tdlg { flex-direction: column; }
  .tdlg .art { width: 140px; }
  .navlink.pc-only { display: none !important; }
}
@media (max-width: 860px) {
  .banner-body .btns { flex-wrap: nowrap; gap: 8px; }
  .banner-body .btn { height: 46px; padding: 0 14px; }
  .banner-body .btn.icon { width: 46px; padding: 0; }
}

/* Wordmark, splash screen and the phone top bar */
.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: -0.5px; }
.wordmark b { background: linear-gradient(135deg, #FFC233, #FF6A2B 55%, #E0245E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand img { border-radius: 9px; }

#splash { position: fixed; inset: 0; z-index: 100; background: #0B0D12; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; transition: opacity .55s ease, transform .55s ease; overflow: hidden; }
#splash.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
.splash-glow { position: absolute; width: 70vmin; height: 70vmin; border-radius: 50%; filter: blur(70px); opacity: .35;
  background: conic-gradient(from 0deg, #FFC233, #FF6A2B, #E0245E, #FFC233); animation: spin 6s linear infinite; }
.splash-logo { position: relative; width: clamp(96px, 18vmin, 160px); height: auto; border-radius: 24%;
  box-shadow: 0 20px 60px #FF6A2B55; animation: pop .7s cubic-bezier(.2, 1.4, .4, 1) both, float 3s ease-in-out .7s infinite; }
.splash-name { position: relative; font: 700 clamp(32px, 6vmin, 56px) var(--display); color: #F2F4F7; letter-spacing: -1px;
  animation: rise .6s ease .25s both; }
.splash-name b { background: linear-gradient(135deg, #FFC233, #FF6A2B 55%, #E0245E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.splash-bar { position: relative; width: clamp(140px, 22vmin, 220px); height: 4px; border-radius: 2px; background: #ffffff1a; overflow: hidden;
  animation: rise .6s ease .4s both; }
.splash-bar i { position: absolute; inset: 0; width: 40%; border-radius: 2px; background: linear-gradient(90deg, #FFC233, #FF6A2B, #E0245E);
  animation: slide 1.1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { #splash * { animation: none !important; } }

.topbar { display: none; }
@media (max-width: 860px) {
  .topbar { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 30; align-items: center; gap: 12px;
    height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0;
    background: rgba(14, 17, 22, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .topbar .brand { display: flex; padding: 0; font-size: 22px; text-decoration: none; color: var(--text); margin-right: auto; }
  .topbar .brand img { width: 32px; height: 32px; }
  .topbar .topbtn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--text-2); border-radius: 20px; }
  .topbar .avatar { width: 34px; height: 34px; text-decoration: none; font-size: 15px; }
  .main, .main.flush { padding-top: calc(58px + env(safe-area-inset-top)); }
  .main:not(.flush) { padding-top: calc(74px + env(safe-area-inset-top)); }
}
.placebtns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Film and show pages */
.tpage { position: relative; margin: -32px -40px 0; padding: 72px 40px 24px; isolation: isolate; min-height: 52vh; display: flex; align-items: flex-end; overflow: hidden; }
.tback { position: absolute; inset: 0 0 auto 0; height: 100%; background-size: cover; background-position: center 20%; z-index: -2; }
.tback.blur { filter: blur(40px) saturate(1.2) brightness(.6); transform: scale(1.15); }
.tpage::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 17, 22, .95) 0%, rgba(14, 17, 22, .75) 45%, rgba(14, 17, 22, .25) 100%),
              linear-gradient(0deg, var(--bg) 0%, rgba(14, 17, 22, 0) 40%); }
.thero { display: flex; gap: 36px; align-items: flex-end; width: 100%; }
.tposter { width: 240px; flex-shrink: 0; aspect-ratio: 2/3; border-radius: 16px; overflow: hidden; display: grid; place-items: center;
  box-shadow: 0 24px 60px #000b; }
.tposter img { width: 100%; height: 100%; object-fit: cover; }
.tinfo { display: flex; flex-direction: column; gap: 14px; max-width: 760px; min-width: 0; }
.tinfo .kicker { font-size: .85em; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.tinfo h1 { font-size: 2.8em; line-height: 1.05; text-shadow: 0 2px 24px #0009; }
.tchips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.small { height: 36px; padding: 0 14px; font-size: .85em; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
.tplot { margin: 0; color: var(--text-2); font-size: 1.05em; line-height: 1.55; }
.tcast { margin: 0; }
.tcast b { color: var(--text); margin-right: 6px; }
.tresume { display: flex; align-items: center; gap: 12px; max-width: 420px; }
.tresume .bar { flex: 1; }
.chips-label { align-self: center; color: var(--muted); font-size: .85em; margin-right: 4px; white-space: nowrap; flex-shrink: 0; }
@media (max-width: 860px) {
  .tpage { margin: -74px -16px 0; padding: 130px 16px 8px; min-height: 0; }
  .tpage::before { background: linear-gradient(0deg, var(--bg) 30%, rgba(14, 17, 22, .55) 75%, rgba(14, 17, 22, .2) 100%); }
  .thero { flex-direction: column; align-items: flex-start; gap: 18px; }
  .tposter { width: 120px; }
  .tinfo h1 { font-size: 1.9em; }
}

/* Clock and weather */
.home-head { align-items: flex-end; }
.nowbox { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bigclock { font: 700 2.2em var(--display); letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.wx { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px 8px; border-radius: 10px; color: var(--text); }
.wx:hover, .wx:focus-visible { background: var(--hover); }
.wx-icon { font-size: 1.3em; line-height: 1; }
.railclock { margin-top: auto; padding: 10px 14px 0; display: flex; flex-direction: column; gap: 2px; }
.railclock > span { font: 700 1.5em var(--display); font-variant-numeric: tabular-nums; }
.railclock .wx { padding: 2px 0; font-size: .9em; justify-content: flex-start; }
.railclock + .who { margin-top: 0; }
.topclock { color: var(--text-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.wx-now { display: flex; align-items: center; gap: 18px; }
.wx-big { font-size: 3.4em; line-height: 1; }
.wx-temp { font: 700 2.4em var(--display); }
.wx-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.wx-day { background: var(--card); border-radius: 12px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wx-rain { font-size: .8em; color: #8EC5FF; }
@media (max-width: 860px) {
  .railclock { display: none; }
  .bigclock { font-size: 1.6em; }
  .home-head .muted[data-clock] { font-size: .9em; }
}

/* Screensaver on TVs and computers after 5 minutes without input */
#saver { position: fixed; inset: 0; z-index: 90; background: #000; opacity: 0; transition: opacity 1.2s; cursor: none; }
#saver.in { opacity: 1; }
.saver-pic { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 2.5s ease;
  animation: drift 24s ease-in-out infinite alternate; }
.saver-pic.on { opacity: .75; }
@keyframes drift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.12) translate(-2%, -1%); } }
#saver::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, 0) 55%); }
.saver-info { position: absolute; left: 6vw; bottom: 7vh; z-index: 1; display: flex; flex-direction: column; gap: 8px; color: #fff; }
.saver-time { font: 700 clamp(64px, 11vw, 150px) var(--display); letter-spacing: -3px; line-height: 1; font-variant-numeric: tabular-nums; }
.saver-date { font-size: clamp(20px, 2.2vw, 30px); color: #ddd; }
.saver-wx { display: flex; align-items: center; gap: 10px; font-size: clamp(20px, 2vw, 28px); }
.saver-wx .muted { color: #ccc; }
.saver-brand { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 20px; opacity: .8; }
.saver-brand img { width: 28px; height: 28px; border-radius: 7px; }
.railclock .wx .muted { display: none; }
@media (max-width: 860px) {
  .home-head { flex-wrap: nowrap; }
  .home-head .bigclock { display: none; }
  .home-head .nowbox { align-self: center; }
  .home-head .wx { flex-direction: column; gap: 0; font-size: .9em; }
  .home-head .wx .muted { font-size: .8em; }
}
.shell.at-home .railclock { visibility: hidden; }
.pcard { position: relative; }
.inlist { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 8px #0008; }

/* "Who's watching?" */
button.who { border: 0; background: transparent; border-radius: 12px; text-align: left; font: inherit; color: var(--text-2); width: 100%; }
button.who:hover, button.who:focus-visible { background: var(--hover); color: var(--text); }
button.avatar { border: 0; cursor: pointer; }
.profiles { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; margin: 10px 0; }
.profile { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px; border-radius: 18px;
  color: var(--text-2); width: 140px; }
.profile .avatar.xl { width: 104px; height: 104px; border-radius: 26px; font: 700 44px var(--display); transition: transform .15s, box-shadow .15s; }
.profile:hover .avatar.xl, .profile:focus .avatar.xl { transform: scale(1.06); box-shadow: 0 0 0 4px var(--accent); }
.profile:focus { outline: none; color: var(--text); }
.profile.on .pname { color: var(--accent); font-weight: 700; }
.plock { font-size: .8em; margin-top: -6px; }
#whohere .profiles { justify-content: flex-start; }
#whohere .profile { width: 110px; }
#whohere .profile .avatar.xl { width: 80px; height: 80px; font-size: 34px; border-radius: 20px; }
dialog.whodlg { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; background: var(--bg); padding: 0; }
dialog.whodlg form { height: 100%; align-items: center; justify-content: center; gap: 30px; }
dialog.whodlg h1 { font-size: 2.6em; }
dialog.whodlg .brand { position: absolute; top: 36px; left: 40px; }

/* Player: see-through bars over the picture */
#player .osd { inset: 0; padding: 0; background: none; border: 0; gap: 0; justify-content: space-between; }
.osd-head { display: flex; align-items: flex-start; gap: 18px; padding: 32px 48px 80px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .45) 60%, rgba(0, 0, 0, 0) 100%); }
.osd-head .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.osd-head .kicker { font-size: .8em; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.osd-head .title { font: 700 1.9em var(--display); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 12px #000a; }
.osd-head .muted { color: #d4d8df; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osd-logo { width: 84px; height: 84px; border-radius: 16px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.osd-logo img { width: 80%; height: 80%; object-fit: contain; }
.osd-clock { font: 700 1.6em var(--display); font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px #000a; flex-shrink: 0; }
.live-dot { width: 10px; height: 10px; border-radius: 5px; background: #FF3B4E; box-shadow: 0 0 0 4px #ff3b4e33; display: inline-block; }
.osd-foot { padding: 90px 48px 40px; display: flex; flex-direction: column; gap: 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .55) 60%, rgba(0, 0, 0, 0) 100%); }
.osd-desc { margin: 0; color: #d4d8df; max-width: 70ch; }
#player .timeline { color: #e6e9ee; }
#player .timeline .track { height: 6px; background: rgba(255, 255, 255, .25); }
#player .timeline .track:hover { height: 10px; }
.round.big { width: 80px; height: 80px; }
@media (max-width: 860px) {
  .osd-head { padding: 16px 16px 50px; gap: 12px; }
  .osd-logo, .osd-clock, .osd-desc { display: none; }
  .osd-head .title { font-size: 1.3em; }
  .osd-foot { padding: 60px 16px 22px; }
  .round.big { width: 64px; height: 64px; }
  #player .osd .btns { gap: 8px; }
}

/* TV guide */
.guide-head { display: flex; gap: 24px; align-items: stretch; margin-bottom: 16px; }
.guide-info { flex: 1; min-width: 0; min-height: 150px; margin: 0; flex-direction: row; align-items: center; gap: 22px; padding: 20px 24px;
  border-radius: 18px; background: linear-gradient(120deg, #1C2230, #141922); }
.guide-info .logo.lg { width: 96px; height: 96px; }
.gi-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gi-text h2 { font-size: 1.5em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gi-text p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gi-text .kicker { font-size: .78em; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.guide-when { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 12px; }
.gday { font: 700 1.1em var(--display); }
.prog { overflow: hidden; }
.prog.live { background: #232B3A; box-shadow: inset 4px 0 0 var(--accent); }
.prog .pfill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(245, 165, 36, .12); pointer-events: none; }
.prog .t, .prog .s { position: relative; }
.prog:focus { background: var(--accent); color: var(--on-accent); }
.prog:focus .s { color: var(--on-accent); opacity: .8; }
.gch { gap: 12px; }
.gnum { color: var(--muted); font-size: .8em; font-weight: 700; width: 34px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .guide-head { flex-direction: column; gap: 10px; }
  .guide-info { min-height: 0; padding: 14px; }
  .guide-info .logo.lg { display: none; }
  .guide-when { flex-direction: row; justify-content: space-between; align-items: center; }
  .gday { font-size: .9em; }
  .gnum { display: none; }
}
.gch { width: 290px; }
@media (max-width: 860px) { .gch { width: 130px; } }
:root { --gchw: 296px; }
.gch { width: calc(var(--gchw) - 6px); }
@media (max-width: 860px) { :root { --gchw: 136px; } .gch { width: calc(var(--gchw) - 6px); } }
.topclock { white-space: nowrap; }
@media (max-width: 860px) {
  .topclock { font-size: .85em; }
  .topbar { gap: 6px; }
  .guide-when .btns { flex-wrap: nowrap; gap: 6px; }
  .guide-when .btn.small { padding: 0 10px; height: 38px; }
  .guide-when .btn svg { display: none; }
  .gday { white-space: nowrap; }
}
@media (max-width: 400px) { .guide-when { flex-direction: column; align-items: flex-start; } }

/* Channel list while watching, and Up next */
.chpanel { position: absolute; top: 0; bottom: 0; right: 0; width: min(460px, 92vw); z-index: 3; display: flex; flex-direction: column;
  background: rgba(10, 12, 16, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-left: 1px solid var(--line); }
.chpanel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px 20px 12px; font: 700 1.2em var(--display); }
.chpanel-list { flex: 1; overflow-y: auto; padding: 0 12px 20px; display: flex; flex-direction: column; gap: 4px; }
.chrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: var(--text); }
.chrow .logo { width: 44px; height: 44px; font-size: 12px; }
.chrow .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chrow .info b, .chrow .info .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chrow.on { background: rgba(245, 165, 36, .14); }
.chrow:hover, .chrow:focus { background: var(--hover); outline: 3px solid var(--accent); outline-offset: -3px; }
.upnext { position: absolute; right: 48px; bottom: 48px; z-index: 3; width: min(420px, 90vw); padding: 22px; border-radius: 18px;
  background: rgba(14, 17, 22, .94); border: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 10px; }
.upnext .kicker { font-size: .78em; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
@media (max-width: 860px) { .upnext { right: 16px; bottom: 16px; } }
@media (max-width: 860px) { .hide-phone { display: none; } }
video::cue { background: rgba(0, 0, 0, .72); color: #fff; font-family: var(--body); font-size: 1.1em; line-height: 1.35; }
.hrow.editing .pcard .pic, .hrow.editing .ccard .pic { outline: 2px dashed var(--bad); outline-offset: -2px; }
.hrow.editing .pcard::after, .hrow.editing .ccard::after { content: "✕"; position: absolute; top: 6px; left: 6px; width: 30px; height: 30px;
  border-radius: 15px; background: #C62F35; color: #fff; display: grid; place-items: center; font-weight: 700; }
.ccard { position: relative; }
.newbadge { position: absolute; top: 8px; right: 8px; padding: 3px 9px; border-radius: 10px; background: #C62F35; color: #fff; font-size: .75em; font-weight: 700; box-shadow: 0 2px 8px #0008; }

/* Recordings */
.recgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.reccard { display: flex; flex-direction: column; gap: 10px; }
.reccard .pic { position: relative; aspect-ratio: 16/9; border-radius: 14px; border: 0; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 120% at 30% 20%, var(--tint), #11151c); }
.reccard .pic img { width: 55%; height: 55%; object-fit: contain; filter: drop-shadow(0 4px 12px #0007); }
.reccard .pic:focus { outline: 4px solid var(--accent); }
.reccard.now .pic { box-shadow: inset 0 0 0 3px #C62F35; }
.playbadge { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 22px; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; }
.reccard .cap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.reccard .cap b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reccard .btns { align-items: center; }
.watchon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.watchon .chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.perr { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 5; width: min(520px, calc(100% - 32px));
  padding: 26px 28px; border-radius: 18px; background: rgba(20, 25, 34, .96); box-shadow: 0 20px 60px #000a; text-align: center; }
.perr h2 { margin: 0 0 8px; }
.perr .btns { justify-content: center; margin-top: 16px; }

/* Phone remote */
.remote { display: flex; flex-direction: column; gap: 16px; max-width: 420px; margin: 18px auto 0; }
.rrow { display: flex; gap: 10px; }
.rrow .rbtn { flex: 1; }
.rbtn { height: 60px; border-radius: 14px; border: 0; background: var(--card); color: var(--text); font: 700 1em var(--body); display: grid; place-items: center; }
.rbtn:active { background: var(--accent); color: var(--on-accent); transform: scale(.97); }
.rbtn.rpp { background: var(--accent); color: var(--on-accent); }
.dpad { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; gap: 10px; aspect-ratio: 1; max-width: 300px; margin: 0 auto; width: 100%; }
.dpad .rbtn { height: auto; border-radius: 18px; font-size: 1.1em; }
.dpad .up { grid-column: 2; grid-row: 1; } .dpad .left { grid-column: 1; grid-row: 2; } .dpad .ok { grid-column: 2; grid-row: 2; background: var(--raised); border: 2px solid var(--line-strong); }
.dpad .right { grid-column: 3; grid-row: 2; } .dpad .down { grid-column: 2; grid-row: 3; }
.rsearch { display: flex; gap: 10px; }
.rsearch .input { flex: 1; }

/* My TV: photo, colour, text size, simple mode */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.lookhead { display: flex; gap: 18px; align-items: flex-start; }
.lookhead > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lookhead .avatar.xl { width: 104px; height: 104px; border-radius: 26px; font: 700 44px var(--display); flex-shrink: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 40px; height: 40px; border-radius: 20px; border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.swatch.none { background: var(--raised); color: var(--muted); font-weight: 700; }
.swatch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
:root[data-size="huge"] { --base: 25px; }
:root[data-simple] { --base: 22px; --rail: 236px; }
:root[data-simple][data-size="large"] { --base: 24px; }
:root[data-simple][data-size="huge"] { --base: 28px; }
.bigtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 10px; }
.bigtile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px 24px; border-radius: 20px; background: var(--card);
  color: var(--text); text-decoration: none; min-height: 170px; justify-content: flex-end; }
.bigtile svg { color: var(--accent); }
.bigtile b { font: 700 1.5em var(--display); }
.bigtile:focus { outline: 4px solid var(--accent); outline-offset: 0; }
:root[data-simple] .navlink { min-height: 64px; font-size: 1.05em; }
:root[data-simple] .pcard { width: 190px; } :root[data-simple] .ccard { width: 300px; }
:root[data-simple] .hrow-head h2 { font-size: 1.4em; }
@media (max-width: 860px) { .lookhead { flex-direction: column; } .bigtiles { grid-template-columns: 1fr 1fr; } .bigtile { min-height: 120px; padding: 18px; } }

/* Recommendations and TV notices */
.cap .note { display: block; color: var(--accent); font-size: .85em; white-space: normal; }
#notice { position: fixed; top: 28px; right: 28px; z-index: 95; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px;
  background: rgba(20, 25, 34, .96); border: 1px solid var(--line-strong); box-shadow: 0 20px 60px #000a; max-width: min(520px, 90vw);
  transform: translateY(-20px); opacity: 0; transition: transform .35s, opacity .35s; }
#notice.in { transform: none; opacity: 1; }
#notice .ntext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#notice .ntext b { color: var(--accent); }
#notice .ntext span { font-size: 1.05em; }
.check.row .avatar { width: 34px; height: 34px; font-size: 14px; }
.searchrow { display: flex; gap: 10px; align-items: center; max-width: 800px; }
.searchrow .search { flex: 1; }
.btn.mic { flex-shrink: 0; color: var(--accent); }
.understood { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; color: var(--muted); }
.understood b { color: var(--text); }

/* Number entry, the mini player and the mini guide */
#numbox { position: fixed; top: 28px; left: 50%; transform: translateX(-50%); z-index: 96; padding: 14px 28px; border-radius: 16px;
  background: rgba(20, 25, 34, .95); border: 1px solid var(--line-strong); font: 700 2.2em var(--display); letter-spacing: 4px; font-variant-numeric: tabular-nums; }
#player.mini { inset: auto 24px 24px auto; width: min(420px, 40vw); aspect-ratio: 16/9; height: auto; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px #000c; border: 2px solid var(--line-strong); z-index: 45; cursor: pointer; }
#player.mini .osd, #player.mini .status, #player.mini .chpanel, #player.mini #miniguide { display: none; }
#player.mini .spinner { width: 32px; height: 32px; margin: -16px; }
.minix { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; }
#miniguide { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 60px 48px 28px; display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .7) 70%, rgba(0, 0, 0, 0) 100%); }
.mgrow { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; opacity: .75; }
.mgrow .logo { width: 44px; height: 44px; font-size: 12px; }
.mgrow .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mgrow .info b, .mgrow .info .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgrow.on { background: rgba(255, 255, 255, .14); opacity: 1; outline: 3px solid var(--accent); outline-offset: -3px; }
.mgrow.playing b { color: var(--accent); }
.numpad { display: grid; grid-template-columns: repeat(5, 1fr); }
.numpad .rbtn { height: 50px; }
@media (max-width: 860px) { #player.mini { inset: auto 12px calc(80px + env(safe-area-inset-bottom)) auto; width: 55vw; } #miniguide { padding: 40px 12px 12px; } }
#player.mini .perr { display: none; }

/* Notice board */
.board { margin-top: 26px; padding: 18px 22px; border-radius: 18px; background: linear-gradient(120deg, #2A2412, #1A1F28); border: 1px solid #3a3320; }
.board .hrow-head h2 { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.notes { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.noteitem { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.noteitem b { flex: 1; font-size: 1.05em; }
.noteitem .muted { white-space: nowrap; }

/* Usage */
.ulist { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.urow { display: grid; grid-template-columns: minmax(0, 1.2fr) 2fr auto; gap: 12px; align-items: center; }
.uname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ubar { height: 10px; border-radius: 5px; background: #2E3644; overflow: hidden; }
.ubar i { display: block; height: 100%; background: var(--accent); }
.hours { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin-top: 6px; }
.hours span { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.hours i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
@media (max-width: 860px) { .urow { grid-template-columns: 1fr auto; } .urow .ubar { display: none; } }

/* Subtitles: size and the dark box behind them (Settings → You → My TV) */
html[data-subs="large"] video::cue { font-size: 4.4vh; }
html[data-subs="huge"] video::cue { font-size: 6vh; }
html[data-subsbg="off"] video::cue { background: transparent; text-shadow: 0 0 4px #000, 0 0 3px #000, 0 2px 2px #000; }

/* Skip intro */
.skipintro { position: absolute; right: 48px; bottom: 140px; z-index: 6; font-size: 1.1rem; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
#player.mini .skipintro { display: none; }

/* TVmaze show info */
.showinfo { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2, rgba(255,255,255,.06)); }
.showinfo .kicker { margin-right: 6px; }
.showinfo img { width: 72px; border-radius: 8px; flex: none; }
.showinfo p { margin: 6px 0 0; }
.showinfo .tiny { font-size: .75rem; margin-top: 4px; opacity: .7; }
.showinfo.small { margin: 0; }

/* Multiview */
.mvgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mvtile { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; outline: 3px solid transparent; }
.mvtile video { width: 100%; height: 100%; object-fit: contain; display: block; }
.mvtile.sound { outline-color: var(--accent, #F5A524); }
.mvtile.dead::after { content: "Not working right now"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2, #A6AEBB); }
.mvmain { position: absolute; inset: 0; background: none; border: 0; color: inherit; display: flex; align-items: flex-end; padding: 0; cursor: pointer; }
.mvmain:focus-visible { outline: 4px solid var(--accent, #F5A524); outline-offset: -4px; }
.mvname { width: 100%; text-align: left; padding: 24px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.8)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mvtile.empty .mvmain { flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-2, #A6AEBB); border: 2px dashed rgba(255,255,255,.18); border-radius: 14px; }
.mvx { position: absolute; top: 8px; right: 8px; z-index: 2; }
.mvpick { max-height: 50vh; overflow: auto; }
.mvpick .item { width: 100%; text-align: left; }
@media (max-width: 860px) { .mvgrid { gap: 6px; } .mvname { font-size: .8rem; padding: 16px 8px 6px; } }

/* Ad breaks marked on the timeline */
.timeline .track .admark { position: absolute; top: 0; bottom: 0; background: #F2C94C; opacity: .85; border-radius: 2px; z-index: 1; }

/* Trailer */
dialog.wide { width: min(1100px, 94vw); }
.trailer { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* People */
.plink { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--text-2, #A6AEBB); }
.plink:hover, .plink:focus-visible { color: var(--accent); outline: none; border-bottom-color: var(--accent); }
.strip.people { gap: 14px; }
.person-card { flex: none; width: 128px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: inherit; text-decoration: none; padding: 8px 4px; border-radius: 14px; }
.person-card:focus-visible, .person-card:hover { background: rgba(255,255,255,.07); outline: 3px solid var(--accent); outline-offset: -3px; }
.person-card .ppic { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 2rem; font-weight: 700; color: #fff; }
.person-card .ppic img { width: 100%; height: 100%; object-fit: cover; }
.person-card b { font-size: .9rem; line-height: 1.2; }
.person-card .muted { font-size: .78rem; line-height: 1.2; }
.personhead { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 26px; }
.personhead .pbig { flex: none; width: 200px; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; display: grid; place-items: center; font-size: 4rem; font-weight: 700; color: #fff; }
.personhead .pbig img { width: 100%; height: 100%; object-fit: cover; }
.personhead h1 { margin: 4px 0 6px; }
.pbio { max-width: 820px; line-height: 1.55; color: var(--text-2, #A6AEBB); white-space: pre-line; }
.pcard.dim .pic { opacity: .75; }
.tiny { font-size: .78rem; }
@media (max-width: 860px) { .personhead { flex-direction: column; gap: 14px; } .personhead .pbig { width: 140px; } .person-card { width: 104px; } .person-card .ppic { width: 78px; height: 78px; } }

/* Usage → Right now */
.loadnums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.loadnums div { background: rgba(255,255,255,.05); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.loadnums b { font-size: 1.8rem; }
pre.code { background: rgba(0,0,0,.35); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: .82rem; line-height: 1.5; white-space: pre; }
ol.steps { margin: 10px 0 0; padding-left: 22px; line-height: 1.65; }
