/* Kino's thin UI: dark, calm, big type for a TV seen from the couch. Chromium 79 safe: no flex `gap`, no
   `aspect-ratio`, no `inset`, no :focus-visible (the remote focuses with the keyboard anyway). */
:root {
  /* Kino's default theme tokens (app/.../data/plugin/theme/KinoTokens.kt), so this page looks like the app. */
  --bg: #0e0e0e;
  --surface: #181818;
  --surface-2: #242424;
  --line: #3a3a3a;
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --accent: #e50914;
  --accent-soft: #3a1114;
  --accent-text: #ff6b6b;
  --ring: #ffffff;
  --on-ring: #000000;
  --tint-rgb: 245, 245, 247;
  --on-accent: #ffffff;
  --text-soft: #d0d0d8;
  --favorite: #ffc83d;
  --bg-rgb: 14, 14, 14;
  --r-card: calc(10 * var(--dp, 1.333px));
  --focus-zoom: 1.08;
  --card: 200px;
  --gutter: 48px;
}

@font-face { font-family: 'Inter'; font-weight: 200; src: url(fonts/inter-extralight.ttf) format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 300; src: url(fonts/inter-light.ttf) format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 400; src: url(fonts/inter-regular.ttf) format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 500; src: url(fonts/inter-medium.ttf) format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 600; src: url(fonts/inter-semibold.ttf) format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 700; src: url(fonts/inter-bold.ttf) format('truetype'); }


* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.4;
}

body { min-height: 100vh; overflow-x: hidden; background: var(--bg-fill, var(--bg)); background-attachment: fixed; }

#app { min-height: 100vh; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

button:focus, input:focus, .card:focus { outline: 4px solid var(--ring); outline-offset: 3px; }

.screen { padding: 24px var(--gutter) 64px; }

.logo { margin: 0; line-height: 0; }
.logo-img { height: 44px; width: auto; display: block; }

h1, h2, h3 { font-weight: 700; }
h2 { font-size: 34px; margin: 24px 0 16px; }

.note { color: var(--muted); }
.notice { color: var(--text); background: var(--accent-soft); border-left: 6px solid var(--accent); padding: 12px 16px; border-radius: 6px; }
.detail { color: var(--muted); font-size: 20px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 8px 22px;
  margin: 0 12px 12px 0;
  border-radius: 999px;
  background: var(--surface-2);
  border: 2px solid var(--line);
}
.btn:focus { background: var(--text); color: var(--bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:focus { background: var(--text); color: var(--bg); }
.btn:disabled { opacity: 0.5; }

.actions { margin-top: 24px; }

/* ---------------------------------------------------------------- top bar */
.bar { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.bar .logo { margin-right: 24px; margin-bottom: 12px; }
.bar .spacer { flex: 1 1 auto; }
.who .dot, .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c, #455A64);
  color: #fff;
  font-weight: 800;
}
.who .dot { width: 36px; height: 36px; margin-right: 12px; font-size: 18px; }

/* ---------------------------------------------------------------- loading: a turning ring and its words */
.load-spin { display: flex; align-items: center; padding: calc(28 * var(--dp)) 0; color: var(--muted); font: var(--t-title-medium); }
.load-spin p { margin: 0; }
.spin-ring { flex: none; width: calc(44 * var(--dp)); height: calc(44 * var(--dp)); margin-right: calc(16 * var(--dp)); box-sizing: border-box; border-radius: 50%; border: calc(4 * var(--dp)) solid rgba(var(--tint-rgb), 0.18); border-top-color: var(--accent); animation: sk-rot 0.9s linear infinite; }
.load-spin-small { padding: calc(12 * var(--dp)) 0; font: var(--t-body-medium); }
.load-spin-small .spin-ring { width: calc(24 * var(--dp)); height: calc(24 * var(--dp)); border-width: calc(3 * var(--dp)); margin-right: calc(12 * var(--dp)); }

/* ---------------------------------------------------------------- message screens */
.message { max-width: 900px; }
.message h2 { margin-top: 48px; }

/* ---------------------------------------------------------------- profiles */
.profiles { text-align: center; }
.profiles .logo { text-align: left; }
.profile-grid { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 32px; }
.profile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 220px;
  margin: 0 20px 32px;
  padding: 16px;
  border-radius: 16px;
  text-align: center;
}
.profile .avatar { width: 160px; height: 160px; font-size: 72px; border-radius: 24px; margin-bottom: 14px; }
.profile:focus { background: var(--surface-2); }
.profile:focus .avatar { box-shadow: 0 0 0 5px var(--ring); }
.profile-name { font-size: 26px; word-break: break-word; }

/* ---------------------------------------------------------------- rows and cards */
.row { margin-top: 20px; }
.row-title { font-size: 26px; margin: 0 0 10px; }
.row-plugin { color: var(--muted); font-weight: 400; font-size: 20px; margin-left: 14px; }
.row-cards {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 10px 16px;
  margin: 0 -10px;
  scrollbar-width: none;
}
.row-cards::-webkit-scrollbar { display: none; }

.card {
  cursor: pointer;
  text-align: left;
  flex: 0 0 auto;
  width: var(--card);
  margin-right: 22px;
  border-radius: 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.card-wide { width: calc(var(--card) * 1.7); }
.card:focus { outline: none; }
.card:focus .art { box-shadow: 0 0 0 4px var(--ring); }

.art {
  position: relative;
  width: 100%;
  padding-top: 150%; /* 2:3 poster, no aspect-ratio before Chromium 88 */
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.art.wide { padding-top: 56.25%; }
.art img, .art-letter span {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}
.art img { object-fit: cover; }
.art-letter { background: linear-gradient(160deg, var(--surface-2), var(--accent-soft)); }
.art-letter span { display: flex; align-items: center; justify-content: center; font-size: 72px; font-weight: 800; color: var(--muted); }

.card-title {
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { color: var(--muted); font-size: 18px; }
.progress { display: block; height: 6px; background: var(--line); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }

.failures ul { color: var(--muted); font-size: 20px; margin: 0; padding-left: 24px; }

/* ---------------------------------------------------------------- search */
.search-form { display: flex; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.search-input {
  flex: 1 1 320px;
  min-width: 0;
  min-height: 60px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 8px 18px;
  margin: 0 16px 12px 0;
}
.search-form .btn { margin-bottom: 12px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card), 1fr));
  grid-gap: 26px 22px;
  padding: 10px 0;
}
.grid .card { width: auto; margin-right: 0; }
.more { margin-top: 20px; }

/* ---------------------------------------------------------------- title page */
.title-head { display: flex; align-items: flex-start; margin-top: 12px; }
.title-head > .art { flex: 0 0 auto; width: 260px; padding-top: 390px; }
.title-head > .art.wide { width: 420px; padding-top: 236px; }
.title-info { flex: 1 1 auto; min-width: 0; margin-left: 36px; }
.title-info h1 { font-size: 40px; margin: 0 0 8px; line-height: 1.15; }
.facts { color: var(--muted); }
.overview { max-width: 60ch; }
.episode-title { font-weight: 600; }

.seasons { margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; }
.chip.on { border-color: var(--accent); }

.episodes { margin-top: 28px; }
.episode {
  display: flex;
  align-items: flex-start;
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--surface);
}
.episode:focus { background: var(--surface-2); }
.episode .still { flex: 0 0 auto; width: 240px; height: 135px; object-fit: cover; border-radius: 8px; margin-right: 20px; background: var(--surface-2); }
.episode-text { display: flex; flex-direction: column; min-width: 0; }
.episode-overview { color: var(--muted); font-size: 20px; margin-top: 4px; }

/* ---------------------------------------------------------------- phone width */
@media (max-width: 700px) {
  :root { --gutter: 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-gap: 20px 14px; }
  html, body { font-size: 20px; }
  h2 { font-size: 28px; }
  .profile { width: 150px; margin: 0 8px 20px; }
  .profile .avatar { width: 110px; height: 110px; font-size: 52px; }
  .title-head { display: block; }
  .title-head > .art { width: 180px; padding-top: 270px; }
  .title-head > .art.wide { width: 100%; padding-top: 56.25%; }
  .title-info { margin-left: 0; margin-top: 16px; }
  .title-info h1 { font-size: 30px; }
  .episode .still { width: 120px; height: 68px; margin-right: 12px; }
}

/* The player: the video fills the screen; the bar shows only while a button has focus, the status only while the video is getting ready. */
.screen.player { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #000; padding: 0; z-index: 5; }
.screen.player .video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-title { color: var(--text); font-size: 22px; }
.player-status { position: absolute; left: 0; right: 0; bottom: 12%; text-align: center; color: var(--text); font-size: 24px; text-shadow: 0 1px 6px #000; }
/* Loading: a ring over the middle of the video while it gets ready or refills; pointer-events none so a tap still reaches the video. */
.pl-spinner { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; box-sizing: border-box; border-radius: 50%; border: 6px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: sk-rot 0.9s linear infinite; pointer-events: none; z-index: 2; }
.screen.player .video::cue { background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 34px; line-height: 1.25; }
.screen.player.sub-60 .video::cue { font-size: 20px; }
.screen.player.sub-80 .video::cue { font-size: 27px; }
.screen.player.sub-100 .video::cue { font-size: 34px; }
.screen.player.sub-120 .video::cue { font-size: 41px; }
.screen.player.sub-140 .video::cue { font-size: 48px; }
.screen.player.sub-160 .video::cue { font-size: 54px; }
.screen.player.sub-180 .video::cue { font-size: 61px; }
.screen.player.sub-200 .video::cue { font-size: 68px; }

/* The adult-content number pad: one centered card, three equal keys a row, the typed digits as big dots, an error line only when there is an error. */
.adults-code { display: flex; flex-direction: column; align-items: center; padding-top: 40px; }
.adults-code h2 { font-size: 30px; font-weight: 600; margin: 0 0 6px; }
.code-shown { font-size: 56px; line-height: 1; letter-spacing: 14px; min-height: 72px; margin: 4px 0 0; padding-left: 14px; color: var(--text); }
.adults-code .notice { background: transparent; border: 0; color: #ff7a7a; font-size: 20px; min-height: 28px; width: auto; text-align: center; margin: 0 0 18px; padding: 0; }
.pad { display: grid; grid-template-columns: repeat(3, 116px); grid-gap: 14px; justify-content: center; margin: 0 0 22px; }
.adults-code .pad-key { width: 116px; height: 84px; padding: 0; font-size: 34px; border-radius: 22px; justify-content: center; align-items: center; text-align: center; }
.adults-code .pad-key.text { font-size: 22px; }
.adults-code .actions { margin: 0; }

/* The subtitle panel over the player: tracks, sync and size. */
.subs-panel { position: absolute; right: 32px; top: 96px; z-index: 6; min-width: 380px; max-width: 520px; padding: 20px 24px; border-radius: 18px; background: rgba(20, 20, 20, 0.96); border: 1px solid #333; }
.subs-panel h3 { margin: 0 0 12px; font-size: 22px; }
.subs-panel .chips { display: flex; flex-wrap: wrap; margin-bottom: 14px; }
.subs-panel .chips .btn { margin: 0 8px 8px 0; }
.subs-panel .step { display: flex; align-items: center; margin-bottom: 14px; }
.subs-panel .step-label { width: 110px; font-size: 20px; color: var(--muted, #aaa); }
.subs-panel .step-btn { width: 56px; height: 52px; padding: 0; justify-content: center; align-items: center; text-align: center; font-size: 26px; }
.subs-panel .val { min-width: 88px; text-align: center; font-size: 22px; }

/* ---------------------------------------------------------------- the menu: the TV's side rail (TvSideRail.kt), measure for measure
   1 dp = var(--dp) (1.333 px: a TV's density on a 1080p screen). Closed: an 80 dp strip, black at 55 % fading out to the right, round icons, the red
   accent on the focused one. Open: a floating 232 dp panel (#1A1A1D, a 1 dp line of the text colour at 8 %, 20 dp corners) over the content. */
:root { --dp: 1.333px; --rail-panel: #1a1a1d; }
.shell .content { margin-left: 0; }
.shell .screen { padding-left: calc(var(--gutter) + 28 * var(--dp)); }
.rail { position: fixed; top: 0; left: 0; bottom: 0; z-index: 4; width: calc(80 * var(--dp)); display: flex; align-items: center;
  background: linear-gradient(to right, rgba(var(--bg-rgb), 0.55) 0%, rgba(var(--bg-rgb), 0.55) 50%, rgba(var(--bg-rgb), 0) 100%); transition: width 0.2s ease; }
.rail.open, .rail:hover { width: calc(232 * var(--dp)); background: none; }
.rail-panel { width: 100%; max-height: 100vh; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; box-sizing: border-box; padding: 0; border: 1px solid transparent; border-radius: calc(20 * var(--dp)); transition: margin 0.2s ease; }
.rail.open .rail-panel, .rail:hover .rail-panel { width: calc(100% - 16 * var(--dp)); margin: 0 calc(8 * var(--dp)); padding: calc(16 * var(--dp)) 0;
  background: var(--rail-panel); border-color: rgba(245, 245, 245, 0.08); }
.rail-col { padding: 0 calc(20 * var(--dp)) 0 calc(8 * var(--dp)); }
.rail-brand { position: relative; display: block; width: 100%; height: calc(36 * var(--dp)); padding: 0; border-radius: calc(14 * var(--dp)); }
.rail-brand:focus { outline: none; background: var(--accent); }
.rail-mark { position: absolute; left: calc(11 * var(--dp) - 1px); top: calc(3 * var(--dp)); width: calc(30 * var(--dp)); height: calc(30 * var(--dp)); opacity: 1; transition: opacity 0.15s ease; }
.rail-mark svg { width: 100%; height: 100%; display: block; }
.rail-wordmark { position: absolute; left: calc(12 * var(--dp)); top: calc(2 * var(--dp)); height: calc(32 * var(--dp)); width: auto; opacity: 0; transition: opacity 0.15s ease; }
.rail.open .rail-mark, .rail:hover .rail-mark { opacity: 0; }
.rail.open .rail-wordmark, .rail:hover .rail-wordmark { opacity: 1; }
.rail-sepbox { height: calc(24 * var(--dp)); display: flex; align-items: center; }
.rail-sepline { width: 100%; height: 1px; margin: 0 calc(12 * var(--dp)); background: rgba(245, 245, 245, 0.10); opacity: 0; transition: opacity 0.15s ease; }
.rail.open .rail-sepline, .rail:hover .rail-sepline { opacity: 1; }
.rail-item { height: calc(52 * var(--dp)); margin-bottom: calc(4 * var(--dp)); display: flex; align-items: center; }
.rail-btn { display: flex; align-items: center; justify-content: center; width: calc(52 * var(--dp)); height: calc(52 * var(--dp)); padding: 0; border-radius: 999px; color: var(--text); white-space: nowrap; overflow: hidden; transition: background 0.12s ease; }
.rail.open .rail-btn, .rail:hover .rail-btn { width: 100%; height: calc(44 * var(--dp)); padding-left: calc(16 * var(--dp)); justify-content: flex-start; border-radius: calc(14 * var(--dp)); }
.rail-btn:focus, .rail-btn:active { outline: none; background: var(--accent); color: var(--on-accent); }
.rail-icon { flex: 0 0 auto; width: calc(40 * var(--dp)); height: calc(40 * var(--dp)); display: flex; align-items: center; justify-content: center; }
.rail.open .rail-icon, .rail:hover .rail-icon { width: calc(32 * var(--dp)); height: calc(32 * var(--dp)); }
.rail-icon svg { width: calc(20 * var(--dp)); height: calc(20 * var(--dp)); display: block; }
.rail-label { max-width: 0; margin-left: 0; font-size: calc(16 * var(--dp)); line-height: 1; opacity: 0; transition: opacity 0.12s ease; overflow: hidden; text-overflow: ellipsis; }
.rail.open .rail-label, .rail:hover .rail-label { max-width: 400px; margin-left: calc(16 * var(--dp)); opacity: 1; }
.rail-avatar { width: calc(26 * var(--dp)); height: calc(26 * var(--dp)); border-radius: 50%; background: var(--c, var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: calc(13 * var(--dp)); }

.hero { position: relative; height: 46vh; min-height: 340px; margin: -24px calc(-1 * var(--gutter)) 8px calc(-1 * (var(--gutter) + 28 * var(--dp))); overflow: hidden; }
.hero-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, rgba(var(--bg-rgb), 0.92) 0%, rgba(var(--bg-rgb), 0.55) 45%, rgba(var(--bg-rgb), 0) 80%), linear-gradient(to top, var(--bg) 0%, rgba(var(--bg-rgb), 0) 45%); }
.hero-text { position: absolute; left: calc(var(--gutter) + 28 * var(--dp)); bottom: 40px; max-width: 46%; }
.hero-title { margin: 0 0 6px; font-size: 44px; line-height: 1.1; }
.hero-meta { margin: 0 0 8px; color: var(--muted); font-size: 22px; }
.hero-overview { margin: 0 0 16px; font-size: 20px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-btn { display: inline-flex; align-items: center; height: 56px; padding: 0 28px 0 18px; border-radius: 28px; font-size: 22px; }
.hero-btn svg { margin-right: 8px; }
.rail-panel::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------------- type scale
   The app's own TV scale (ui/theme/Theme.kt TvTypeScale, "the bigger the lighter"): weight, size in dp and line height in dp per Material role, with Inter's tracking
   for the size in em (rsms's dynamic metrics; a light text of 30 dp and up takes 80 % of it). webui/test/typography.test.mjs keeps these numbers equal to Theme.kt.
   Buttons are SemiBold (the one TV exception: weight says "press me"); a label that is not pressable is Medium. */
:root {
  --t-display-large: 200 calc(57 * var(--dp)) / calc(64 * var(--dp)) Inter;   --ls-display-large: -0.0178em;
  --t-display-medium: 200 calc(45 * var(--dp)) / calc(52 * var(--dp)) Inter;  --ls-display-medium: -0.0178em;
  --t-display-small: 300 calc(36 * var(--dp)) / calc(44 * var(--dp)) Inter;   --ls-display-small: -0.0176em;
  --t-headline-large: 300 calc(32 * var(--dp)) / calc(40 * var(--dp)) Inter;  --ls-headline-large: -0.0173em;
  --t-headline-medium: 400 calc(28 * var(--dp)) / calc(36 * var(--dp)) Inter; --ls-headline-medium: -0.0209em;
  --t-headline-small: 400 calc(24 * var(--dp)) / calc(32 * var(--dp)) Inter;  --ls-headline-small: -0.0195em;
  --t-title-large: 500 calc(22 * var(--dp)) / calc(28 * var(--dp)) Inter;     --ls-title-large: -0.0183em;
  --t-title-medium: 500 calc(18 * var(--dp)) / calc(24 * var(--dp)) Inter;    --ls-title-medium: -0.0143em;
  --t-title-small: 500 calc(16 * var(--dp)) / calc(22 * var(--dp)) Inter;     --ls-title-small: -0.0110em;
  --t-body-large: 400 calc(17 * var(--dp)) / calc(24 * var(--dp)) Inter;      --ls-body-large: -0.0128em;
  --t-body-medium: 400 calc(15 * var(--dp)) / calc(20 * var(--dp)) Inter;     --ls-body-medium: -0.0088em;
  --t-body-small: 400 calc(14 * var(--dp)) / calc(18 * var(--dp)) Inter;      --ls-body-small: -0.0062em;
  --t-label-large: 600 calc(16 * var(--dp)) / calc(22 * var(--dp)) Inter;     --ls-label-large: -0.0110em;
  --t-label-medium: 500 calc(14 * var(--dp)) / calc(18 * var(--dp)) Inter;    --ls-label-medium: -0.0062em;
  --t-label-small: 500 calc(13 * var(--dp)) / calc(18 * var(--dp)) Inter;     --ls-label-small: -0.0032em;
}
html, body { font: var(--t-body-medium); letter-spacing: var(--ls-body-medium); }
button { letter-spacing: inherit; }
h1, h2, h3 { font: var(--t-headline-medium); letter-spacing: var(--ls-headline-medium); }
h2 { margin: 24px 0 16px; }
.detail { font: var(--t-body-medium); letter-spacing: var(--ls-body-medium); }
.btn, .hero-btn { font: var(--t-label-large); letter-spacing: var(--ls-label-large); }
.profile-name { font: var(--t-title-large); letter-spacing: var(--ls-title-large); }
.row-title { font: var(--t-title-large); letter-spacing: var(--ls-title-large); }
.row-plugin { font: var(--t-body-small); letter-spacing: var(--ls-body-small); }
.card-title { font: var(--t-body-medium); letter-spacing: var(--ls-body-medium); line-height: 1.33; }
.card-meta { font: var(--t-label-small); letter-spacing: var(--ls-label-small); }
.failures ul, .episode-overview { font: var(--t-body-medium); letter-spacing: var(--ls-body-medium); }
.episode-title { font: var(--t-title-medium); letter-spacing: var(--ls-title-medium); }
.title-info h1 { font: var(--t-headline-large); letter-spacing: var(--ls-headline-large); margin: 0 0 8px; }
.hero-title { font: var(--t-display-small); letter-spacing: var(--ls-display-small); }
.hero-meta { font: var(--t-title-small); letter-spacing: var(--ls-title-small); }
.hero-overview { font: var(--t-body-large); letter-spacing: var(--ls-body-large); }
.player-title { font: var(--t-title-medium); letter-spacing: var(--ls-title-medium); }
.player-status { font: var(--t-body-large); letter-spacing: var(--ls-body-large); }
.adults-code h2 { font: var(--t-headline-small); letter-spacing: var(--ls-headline-small); margin: 0 0 6px; }
.code-shown { font: var(--t-display-medium); letter-spacing: 0.25em; }
.adults-code .notice { font: var(--t-body-medium); letter-spacing: var(--ls-body-medium); }
.adults-code .pad-key { font: var(--t-headline-medium); letter-spacing: var(--ls-headline-medium); }
.adults-code .pad-key.text { font: var(--t-label-large); letter-spacing: var(--ls-label-large); }
.subs-panel h3 { font: var(--t-title-large); letter-spacing: var(--ls-title-large); }
.subs-panel .step-label, .subs-panel .val { font: var(--t-body-medium); letter-spacing: var(--ls-body-medium); }
.subs-panel .step-btn { font: var(--t-label-large); letter-spacing: var(--ls-label-large); }
.rail-label { font: var(--t-title-small); letter-spacing: var(--ls-title-small); line-height: 1; }
@media (max-width: 700px) {
  h2, .title-info h1 { font-size: calc(24 * var(--dp)); }
}

/* ---------------------------------------------------------------- Home as the TV draws it (TvHomeScreen): a fixed hero over rows that come up to the top as focus moves */
.screen.home { padding: 0; position: relative; height: 100vh; overflow: hidden; }
.shell .screen.home { padding-left: 0; }
.hero { position: absolute; top: 0; left: 0; right: 0; height: 54vh; margin: 0; overflow: hidden; }
.hero.empty .hero-text { display: none; }
.hero-art { position: absolute; top: 0; right: 0; width: 66%; height: 100%; overflow: hidden; }
.hero-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 450ms ease; }
.hero-img.on { opacity: 1; animation: heroDrift 14s ease-in-out infinite alternate; }
@keyframes heroDrift { from { transform: scale(1); } to { transform: scale(1.12); } }
.hero-shade { position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, var(--bg) 0%, var(--bg) 34%, rgba(var(--bg-rgb), 0) 64%), linear-gradient(to top, var(--bg) 0%, rgba(var(--bg-rgb), 0) 45%); }
.hero-text { position: absolute; left: calc(76 * var(--dp)); bottom: calc(18 * var(--dp)); width: 55%; max-width: none; }
.hero-logo { display: block; max-width: 80%; max-height: calc(84 * var(--dp)); margin: 0 0 calc(14 * var(--dp)); object-fit: contain; object-position: left bottom; }
.hero-title { margin: 0 0 6px; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8); }
.hero-title.wait { visibility: hidden; }
.hero-facts { margin: 0 0 6px; font: var(--t-title-small); letter-spacing: var(--ls-title-small); }
.hero-extra { margin: 0 0 6px; font: var(--t-title-small); letter-spacing: var(--ls-title-small); }
.hero-extra:empty, .hero-facts:empty { display: none; }
.hero-overview { margin: 0; color: var(--muted); font: var(--t-body-medium); letter-spacing: var(--ls-body-medium); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* A mouse wheel or a touchpad moves the rows too (desktop, a phone's finger); the remote moves them by focus. No visible bars. */
.home-rows { position: absolute; top: 56vh; left: 0; right: 0; bottom: 0; overflow-x: hidden; overflow-y: auto; padding-left: calc(76 * var(--dp)); scrollbar-width: none; }
.home-rows::-webkit-scrollbar, .tv-cards::-webkit-scrollbar { display: none; }
.home-rows > .note { margin-top: 24px; }
.tv-row { margin: 0 0 calc(10 * var(--dp)); }
.tv-row .row-title { margin: 0 0 calc(8 * var(--dp)); color: var(--muted); }
.tv-cards { white-space: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: calc(14 * var(--dp)) calc(12 * var(--dp)); margin: calc(-8 * var(--dp)) 0 calc(-8 * var(--dp)) calc(-12 * var(--dp)); }
.tv-card { position: relative; display: inline-block; vertical-align: top; margin-right: calc(16 * var(--dp)); border-radius: var(--r-card); }
.tv-card:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.sk-title-card { flex: 0 0 auto; display: flex; flex-direction: column; }
.sk-title-card > .tv-card { margin-right: 0; }
.sk-title-cap { margin: calc(8 * var(--dp)) 0 0; font: var(--t-body-medium); color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sk-tabs-busy .sk-tab.on { opacity: 0.7; }
.tv-card .art { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding-top: 0; border-radius: var(--r-card); overflow: hidden; }
.tv-card .progress { position: absolute; left: 0; right: 0; bottom: 0; height: calc(4 * var(--dp)); margin: 0; border-radius: 0; background: rgba(255, 255, 255, 0.3); }
.tv-row-tail { height: 60vh; }
.tv-cardwrap { display: inline-block; vertical-align: top; margin-right: calc(16 * var(--dp)); white-space: normal; }
.tv-cardwrap > .tv-card { display: block; margin-right: 0; }
.tv-cardcap { margin: calc(6 * var(--dp)) 0 0; font: var(--t-body-medium); color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- sources of a title (the TV's search results for a Home card) */
.sources h2 { margin: 0 0 calc(12 * var(--dp)); }
.src-tabs { margin-bottom: calc(16 * var(--dp)); white-space: nowrap; overflow: hidden; }
.src-tab { display: inline-block; margin-right: calc(24 * var(--dp)); padding: calc(6 * var(--dp)) calc(4 * var(--dp)); color: var(--muted); font: var(--t-title-small); letter-spacing: var(--ls-title-small); border-bottom: calc(3 * var(--dp)) solid transparent; }
.src-tab.on { color: var(--text); border-bottom-color: var(--muted); }
.src-tab:focus { outline: none; color: var(--text); border-bottom-color: var(--text); }
.src-grid { grid-template-columns: repeat(auto-fill, calc(146 * var(--dp))); grid-gap: calc(14 * var(--dp)); }
.shell .screen.sources { padding-left: calc(76 * var(--dp)); }

/* ---------------------------------------------------------------- title page as the TV draws it (no menu: Back returns) */
.shell.no-rail .rail { display: none; }
.shell.no-rail .screen.tv-title { padding: 0; }
.tv-title .title-hero { position: relative; height: 100vh; overflow: hidden; }
.title-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.title-bg-img { width: 100%; height: 100%; object-fit: cover; }
.title-shade { position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, rgba(var(--bg-rgb), 0.92) 0%, rgba(var(--bg-rgb), 0.7) 40%, rgba(var(--bg-rgb), 0.25) 100%), linear-gradient(to top, rgba(var(--bg-rgb), 0.95) 0%, rgba(var(--bg-rgb), 0) 55%); }
.title-back { position: absolute; top: calc(18 * var(--dp)); left: calc(48 * var(--dp)); margin: 0; }
.title-body { position: absolute; left: calc(48 * var(--dp)); bottom: calc(30 * var(--dp)); width: 72%; }
.title-kicker { margin: 0 0 calc(8 * var(--dp)); color: var(--muted); font: var(--t-title-small); letter-spacing: var(--ls-title-small); }
.title-logo { display: block; max-width: 60%; max-height: calc(100 * var(--dp)); margin: 0 0 calc(14 * var(--dp)); object-fit: contain; object-position: left bottom; }
.title-name { margin: 0 0 calc(10 * var(--dp)); font: var(--t-display-small); letter-spacing: var(--ls-display-small); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8); }
.title-facts { margin: 0 0 calc(8 * var(--dp)); color: var(--muted); font: var(--t-body-large); letter-spacing: var(--ls-body-large); }
.title-facts:empty, .title-credits:empty { display: none; }
.title-overview { margin: 0 0 calc(10 * var(--dp)); max-width: calc(620 * var(--dp)); font: var(--t-body-large); letter-spacing: var(--ls-body-large); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.title-credits { margin: 0 0 calc(14 * var(--dp)); color: var(--muted); font: var(--t-body-small); letter-spacing: var(--ls-body-small); }
.title-actions .btn { margin-bottom: 0; }
.title-more { padding: calc(24 * var(--dp)) calc(48 * var(--dp)) 64px; }

/* a series' page: the focused episode behind and in the text, the seasons and the episodes row at the bottom (the TV's) */
.tv-title { height: 100vh; overflow: hidden; }
.tv-title .title-hero { height: 100%; }
.tv-title.series .title-body { bottom: calc(240 * var(--dp)); }
.tv-title.series.seasons-on .title-body { bottom: calc(300 * var(--dp)); }
.tv-title.series .title-name { font: var(--t-headline-large); font-weight: 600; letter-spacing: var(--ls-headline-large); }
.tv-title .title-more { position: absolute; left: calc(48 * var(--dp)); right: 0; bottom: calc(16 * var(--dp)); padding: 0; }
.tv-title .title-more .row-title { margin: 0 0 calc(6 * var(--dp)); color: var(--muted); }
.tv-title .seasons { margin-bottom: calc(6 * var(--dp)); }
.ep-row { white-space: nowrap; overflow: hidden; padding: calc(6 * var(--dp)); margin-left: calc(-6 * var(--dp)); }
.ep-card { display: inline-block; vertical-align: top; width: calc(168 * var(--dp)); margin-right: calc(16 * var(--dp)); padding: calc(4 * var(--dp)) calc(4 * var(--dp)) calc(8 * var(--dp)); background: rgba(34, 34, 34, 0.92); border-radius: calc(10 * var(--dp)); }
.ep-card:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.ep-still { display: block; width: 100%; height: calc(94 * var(--dp)); object-fit: cover; border-radius: calc(8 * var(--dp)); background: var(--surface-2); }
.ep-label { display: block; margin: calc(6 * var(--dp)) calc(4 * var(--dp)) 0; font: var(--t-label-medium); letter-spacing: var(--ls-label-medium); }
/* a series' header: its backdrop to the right (as the Home's hero), the text on top; a focused episode takes the whole screen (.ep-mode) */
.tv-title.series:not(.ep-mode) .title-bg { left: 34%; }
.tv-title.series:not(.ep-mode) .title-shade { background: linear-gradient(to right, var(--bg) 0%, var(--bg) 34%, rgba(var(--bg-rgb), 0) 64%), linear-gradient(to top, rgba(var(--bg-rgb), 0.95) 0%, rgba(var(--bg-rgb), 0) 40%); }
.tv-title.series:not(.ep-mode) .title-body { top: calc(48 * var(--dp)); bottom: auto; }
.ep-title { display: block; margin: calc(2 * var(--dp)) calc(4 * var(--dp)) 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--t-label-medium); letter-spacing: var(--ls-label-medium); }
.ep-when { display: block; margin: calc(2 * var(--dp)) calc(4 * var(--dp)) 0; color: var(--muted); font: var(--t-label-small); letter-spacing: var(--ls-label-small); }
.ep-when:empty { display: none; }

/* the title page's heart and add-to-list buttons (round, next to Reproducir) and the lists picker */
.btn.round { width: calc(52 * var(--dp)); height: calc(52 * var(--dp)); min-height: 0; padding: 0; border-radius: 50%; justify-content: center; margin-left: calc(4 * var(--dp)); }
.btn.round.on svg { color: var(--on-accent); }
.screen.lists { padding-left: calc(48 * var(--dp)); }
.lists-pick { margin: 0 0 calc(12 * var(--dp)); max-width: calc(560 * var(--dp)); }
.list-row { display: flex; width: 100%; margin: 0 0 calc(8 * var(--dp)); border-radius: calc(14 * var(--dp)); }
.list-row.on { border-color: var(--accent); }
.list-check { width: calc(28 * var(--dp)); color: var(--accent-text); }
.list-name { flex: 1 1 auto; }
.list-count { color: var(--muted); }

/* ---------------------------------------------------------------- the player's overlay, as the TV's: logo and title above, the bar with its times and the buttons below; hidden until a key or the mouse */
.screen.player .video { object-fit: contain; }
.screen.player:not(.ui-on) { cursor: none; }
.pl-top, .pl-bottom { position: absolute; left: 0; right: 0; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.screen.player.ui-on .pl-top, .screen.player.ui-on .pl-bottom { opacity: 1; pointer-events: auto; }
.pl-top { top: 0; padding: calc(56 * var(--dp)) calc(60 * var(--dp)) calc(60 * var(--dp)); background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%); }
.pl-bottom { bottom: 0; padding: calc(80 * var(--dp)) calc(60 * var(--dp)) calc(28 * var(--dp)); background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); }
.player-back { position: absolute; top: calc(18 * var(--dp)); right: calc(48 * var(--dp)); margin: 0; }
.player-logo { display: block; max-width: 40%; max-height: calc(70 * var(--dp)); margin: 0 0 calc(10 * var(--dp)); object-fit: contain; object-position: left bottom; }
.player-title { margin: 0; max-width: 60%; color: rgba(255, 255, 255, 0.85); font: var(--t-title-large); letter-spacing: var(--ls-title-large); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.pl-seekrow { display: flex; align-items: center; margin-bottom: calc(14 * var(--dp)); }
.pl-time { flex: 0 0 auto; min-width: calc(40 * var(--dp)); font: var(--t-label-large); letter-spacing: var(--ls-label-large); }
.pl-seek { position: relative; flex: 1 1 auto; height: calc(6 * var(--dp)); margin: 0 calc(14 * var(--dp)); background: rgba(255, 255, 255, 0.28); border-radius: calc(3 * var(--dp)); cursor: pointer; }
.pl-fill { position: absolute; top: 0; left: 0; bottom: 0; width: 0; background: #fff; border-radius: calc(3 * var(--dp)); }
.pl-thumb { position: absolute; top: calc(-9 * var(--dp)); width: calc(4 * var(--dp)); height: calc(24 * var(--dp)); margin-left: calc(-2 * var(--dp)); background: #fff; border-radius: calc(2 * var(--dp)); }
.pl-seek:focus { outline: none; }
.pl-seek:focus .pl-thumb { background: #2f8cff; }
.pl-buttons { display: flex; align-items: center; }
.pl-btn { display: flex; align-items: center; justify-content: center; width: calc(52 * var(--dp)); height: calc(52 * var(--dp)); margin-right: calc(16 * var(--dp)); border-radius: 50%; color: #fff; }
.pl-btn:focus { outline: none; background: var(--accent); }
.pl-sep { width: 1px; height: calc(32 * var(--dp)); margin: 0 calc(24 * var(--dp)) 0 calc(8 * var(--dp)); background: rgba(255, 255, 255, 0.35); }

/* night mode, zoom and language panels above the buttons, the night veil and the little message in the middle */
.pl-veil { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #000; opacity: 0; pointer-events: none; }
.pl-hud { position: absolute; top: 12%; left: 50%; margin: 0; padding: calc(8 * var(--dp)) calc(18 * var(--dp)); transform: translateX(-50%); background: rgba(0, 0, 0, 0.75); border-radius: calc(20 * var(--dp)); font: var(--t-title-small); letter-spacing: var(--ls-title-small); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.pl-hud.on { opacity: 1; }
.pl-bottom { z-index: 2; }
.pl-top { z-index: 2; }
.pl-mini { position: absolute; right: calc(60 * var(--dp)); bottom: calc(120 * var(--dp)); max-width: calc(100% - 120 * var(--dp)); flex-wrap: wrap; justify-content: flex-end; display: flex; padding: calc(8 * var(--dp)); background: rgba(0, 0, 0, 0.88); border-radius: calc(28 * var(--dp)); }
.pl-mini-btn { min-width: calc(48 * var(--dp)); height: calc(44 * var(--dp)); margin: 0 calc(4 * var(--dp)); padding: 0 calc(16 * var(--dp)); border-radius: calc(22 * var(--dp)); color: #fff; background: rgba(255, 255, 255, 0.12); font: var(--t-label-large); letter-spacing: var(--ls-label-large); white-space: nowrap; text-align: center; }
.pl-mini-btn:focus { outline: none; background: var(--accent); }
.pl-btn.lit svg { color: var(--accent-text); }

/* ---------------------------------------------------------------- En vivo: the TV's live guide (TvLiveGuideScreen): tabs and two round buttons, a 220 dp rail, the channel list, a 340 dp panel */
.screen.live { padding: 0; height: 100vh; overflow: hidden; background: linear-gradient(var(--bg), var(--surface)); }
.shell .screen.live { padding-left: calc(76 * var(--dp)); padding-right: calc(48 * var(--dp)); }
.live-header { display: flex; align-items: center; justify-content: space-between; height: calc(52 * var(--dp)); margin-top: calc(27 * var(--dp)); }
.live-tabs { display: flex; align-items: center; }
.live-title { margin: 0; }
.live-tab { display: inline-flex; align-items: center; margin-right: calc(32 * var(--dp)); padding: calc(6 * var(--dp)) calc(4 * var(--dp)); color: var(--muted); font: var(--t-title-small); letter-spacing: var(--ls-title-small); border-bottom: calc(3 * var(--dp)) solid transparent; }
.live-tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--muted); }
.live-tab:focus { outline: none; box-shadow: 0 0 0 calc(2 * var(--dp)) var(--ring); border-radius: calc(8 * var(--dp)); }
.live-pdot { display: inline-block; width: calc(10 * var(--dp)); height: calc(10 * var(--dp)); margin-right: calc(10 * var(--dp)); border-radius: 50%; }
.live-hbtns { display: flex; }
.live-ibtn { display: flex; align-items: center; justify-content: center; width: calc(44 * var(--dp)); height: calc(44 * var(--dp)); margin-left: calc(12 * var(--dp)); border-radius: 50%; background: var(--surface); color: var(--text); }
.live-ibtn:focus { outline: none; background: var(--surface-2); box-shadow: 0 0 0 calc(2 * var(--dp)) var(--ring); }
.live-body { display: flex; height: calc(100vh - 52 * var(--dp) - 27 * var(--dp) - 16 * var(--dp)); margin-top: calc(16 * var(--dp)); }
.live-col-rail { flex: 0 0 calc(220 * var(--dp)); overflow: hidden; }
.live-col-list { flex: 1 1 auto; min-width: 0; margin: 0 calc(16 * var(--dp)); overflow: hidden; }
.live-rail { height: 100%; overflow: hidden; padding: calc(4 * var(--dp)); margin: calc(-4 * var(--dp)); }
.live-rhead { margin: calc(14 * var(--dp)) 0 calc(2 * var(--dp)) calc(4 * var(--dp)); color: var(--muted); font: var(--t-label-small); text-transform: uppercase; letter-spacing: 0.1em; }
.live-rrow { display: flex; align-items: center; width: 100%; height: calc(44 * var(--dp)); margin-bottom: calc(4 * var(--dp)); padding: 0 calc(12 * var(--dp)); color: var(--muted); font: var(--t-body-large); letter-spacing: var(--ls-body-large); position: relative; border-radius: calc(8 * var(--dp)); }
.live-rrow.gap { margin-top: calc(12 * var(--dp)); }
.live-rrow.on { color: var(--text); font-weight: 600; }
.live-rrow.on:before { content: ''; position: absolute; left: 0; top: calc(12 * var(--dp)); width: calc(3 * var(--dp)); height: calc(20 * var(--dp)); background: var(--accent); border-radius: 2px; }
.live-rrow svg { margin-right: calc(10 * var(--dp)); flex: 0 0 auto; }
.live-rlabel { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-rcount { flex: 0 0 auto; margin-left: calc(8 * var(--dp)); font: var(--t-label-medium); color: var(--muted); }
.live-rrow:focus { outline: none; background: var(--surface-2); box-shadow: 0 0 0 calc(2 * var(--dp)) var(--ring); color: var(--text); }
.live-searchcol { display: none; }
.screen.live.searching .live-col-rail { overflow: visible; }
.screen.live.searching .live-rail { display: none; }
.screen.live.searching .live-searchcol { display: block; }
.live-search-input { width: 100%; height: calc(44 * var(--dp)); padding: 0 calc(12 * var(--dp)); border: 0; border-radius: calc(8 * var(--dp)); background: var(--surface); color: var(--text); font: var(--t-body-medium); }
.live-search-input:focus { outline: none; box-shadow: 0 0 0 calc(2 * var(--dp)) var(--ring); }
.live-clear { display: block; margin-top: calc(10 * var(--dp)); height: calc(44 * var(--dp)); padding: 0 calc(16 * var(--dp)); border-radius: calc(22 * var(--dp)); background: var(--surface); color: var(--text); font: var(--t-label-large); }
.live-clear:focus { outline: none; box-shadow: 0 0 0 calc(2 * var(--dp)) var(--ring); }
.live-note { white-space: pre-line; margin: 0 0 calc(8 * var(--dp)); color: var(--muted); font: var(--t-body-small); }
.live-note:empty { display: none; }
.live-list { height: 100%; overflow: hidden; padding: calc(4 * var(--dp)); margin: calc(-4 * var(--dp)); }
.live-msg { margin: calc(40 * var(--dp)) 0 0; text-align: center; color: var(--muted); font: var(--t-title-medium); }
.live-row { display: flex; align-items: center; height: calc(60 * var(--dp)); margin-bottom: calc(4 * var(--dp)); padding: 0 calc(12 * var(--dp)); border-radius: calc(8 * var(--dp)); background: transparent; }
.live-row:focus { outline: none; background: var(--surface-2); box-shadow: 0 0 0 calc(2 * var(--dp)) var(--ring); }
.live-logo { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: calc(44 * var(--dp)); height: calc(44 * var(--dp)); margin-right: calc(16 * var(--dp)); border-radius: calc(6 * var(--dp)); background: rgba(var(--tint-rgb), 0.06); overflow: hidden; }
.live-logo.has-logo, .lv-logo.has-logo { background: var(--logo-plate, rgba(var(--tint-rgb), 0.06)); }
.lv-logo.has-logo { background: var(--logo-plate, var(--surface)); }
.live-logo img { width: calc(32 * var(--dp)); height: calc(32 * var(--dp)); object-fit: contain; }
.live-init { color: var(--muted); font: var(--t-label-large); }
.live-cname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--t-title-medium); letter-spacing: var(--ls-title-medium); color: var(--text); }
.live-row svg { flex: 0 0 auto; margin-left: calc(8 * var(--dp)); color: #ffc107; }
.live-badge { flex: 0 0 auto; max-width: calc(96 * var(--dp)); margin-left: calc(8 * var(--dp)); padding: 0 calc(8 * var(--dp)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: calc(10 * var(--dp)); background: rgba(var(--tint-rgb), 0.08); color: var(--muted); font: var(--t-label-small); }
.live-num { flex: 0 0 auto; min-width: calc(28 * var(--dp)); margin-left: calc(12 * var(--dp)); text-align: right; color: var(--muted); font: var(--t-label-large); }
.live-panel { flex: 0 0 calc(340 * var(--dp)); padding-top: calc(8 * var(--dp)); }
.live-mini { height: calc(191 * var(--dp)); padding: calc(4 * var(--dp)); border-radius: calc(12 * var(--dp)); background: #000; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); }
.live-mini:focus { outline: none; box-shadow: 0 0 0 calc(2 * var(--dp)) var(--ring), 0 4px 16px rgba(0, 0, 0, 0.5); }
.live-poster { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: calc(8 * var(--dp)); background: linear-gradient(var(--surface), var(--bg)); }
.live-poster img { max-width: calc(120 * var(--dp)); max-height: calc(90 * var(--dp)); object-fit: contain; }
.live-pinit { color: var(--muted); font: var(--t-headline-medium); }
.live-onair { display: flex; align-items: center; margin: calc(12 * var(--dp)) 0 calc(4 * var(--dp)); color: var(--accent); font: var(--t-label-medium); font-weight: 700; }
.live-dot { display: inline-block; width: calc(8 * var(--dp)); height: calc(8 * var(--dp)); margin-right: calc(8 * var(--dp)); border-radius: 50%; background: var(--accent); }
.live-name { margin: 0 0 calc(4 * var(--dp)); font: var(--t-title-large); font-weight: 600; letter-spacing: var(--ls-title-large); color: var(--text); }
.live-meta { margin: 0 0 calc(16 * var(--dp)); color: var(--muted); font: var(--t-body-medium); }
.live-hint { margin: 0; color: var(--muted); font: var(--t-body-medium); min-height: calc(20 * var(--dp)); }

/* ---------------------------------------------------------------- the live player: no bar; the channel card bottom-left, a 560 dp drawer on the left, an options sheet on the right */
.screen.livep { padding: 0; position: relative; height: 100vh; overflow: hidden; background: #000; }
.screen.livep .video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.lv-card { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; padding: calc(60 * var(--dp)) calc(48 * var(--dp)) calc(30 * var(--dp)); background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0)); opacity: 0; transition: opacity 0.25s ease; pointer-events: none; }
.lv-card.on { opacity: 1; }
.lv-logo { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: calc(52 * var(--dp)); height: calc(52 * var(--dp)); margin-right: calc(16 * var(--dp)); border-radius: calc(8 * var(--dp)); background: var(--surface); overflow: hidden; }
.lv-logo img { width: calc(40 * var(--dp)); height: calc(40 * var(--dp)); object-fit: contain; }
.lv-init { color: var(--muted); font: var(--t-label-large); }
.lv-text { display: flex; flex-direction: column; }
.lv-name { font: var(--t-title-medium); font-weight: 600; letter-spacing: var(--ls-title-medium); color: #fff; }
.lv-now { margin-top: calc(2 * var(--dp)); font: var(--t-body-medium); color: var(--text-soft); }
.lv-now:empty { display: none; }
.lv-hint { margin-top: calc(4 * var(--dp)); font: var(--t-body-small); color: var(--muted); }
.lv-spinner { position: absolute; top: 50%; left: 50%; margin: 0; transform: translate(-50%, -50%); padding: calc(10 * var(--dp)) calc(22 * var(--dp)); border-radius: calc(24 * var(--dp)); background: rgba(0, 0, 0, 0.7); font: var(--t-title-small); }
.lv-message { position: absolute; top: 45%; left: 50%; max-width: 70%; margin: 0; transform: translate(-50%, -50%); padding: calc(10 * var(--dp)) calc(22 * var(--dp)); border-radius: calc(24 * var(--dp)); background: rgba(0, 0, 0, 0.75); text-align: center; font: var(--t-title-small); }
.lv-drawer { position: absolute; top: 0; bottom: 0; left: 0; width: calc(560 * var(--dp)); padding: calc(24 * var(--dp)) calc(24 * var(--dp)) calc(16 * var(--dp)); background: rgba(10, 10, 14, 0.92); transform: translateX(-100%); transition: transform 0.2s ease; display: flex; flex-direction: column; }
.lv-drawer.on { transform: translateX(0); }
.lv-dtitle { margin: 0 0 calc(12 * var(--dp)); font: var(--t-title-large); color: var(--text); }
.lv-dlist { flex: 1 1 auto; overflow: hidden; }
.lv-drow { display: flex; align-items: center; width: 100%; height: calc(48 * var(--dp)); margin-bottom: calc(4 * var(--dp)); padding: 0 calc(12 * var(--dp)); border-radius: calc(8 * var(--dp)); color: var(--text-soft); font: var(--t-body-large); }
.lv-drow.on { color: #fff; font-weight: 600; }
.lv-drow:focus { outline: none; background: var(--surface-2); box-shadow: 0 0 0 calc(2 * var(--dp)) var(--ring); }
.lv-dnum { flex: 0 0 calc(44 * var(--dp)); color: var(--muted); }
.lv-dname { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-dlive { flex: 0 0 auto; margin-left: calc(8 * var(--dp)); color: var(--accent); font: var(--t-label-medium); font-weight: 700; }
.lv-dhint { margin: calc(8 * var(--dp)) 0 0; color: var(--muted); font: var(--t-body-small); }
.lv-options { position: absolute; top: 0; bottom: 0; right: 0; width: calc(372 * var(--dp)); padding: calc(24 * var(--dp)); border-top: calc(3 * var(--dp)) solid var(--accent); background: rgba(10, 10, 14, 0.94); transform: translateX(100%); transition: transform 0.2s ease; }
.lv-options.on { transform: translateX(0); }
.lv-otitle { margin: 0 0 calc(16 * var(--dp)); font: var(--t-title-large); color: var(--text); }
.lv-obtn { display: block; width: 100%; height: calc(48 * var(--dp)); margin-bottom: calc(16 * var(--dp)); border-radius: calc(24 * var(--dp)); background: var(--surface-2); color: #fff; font: var(--t-label-large); text-align: center; }
.lv-obtn.sm { display: inline-block; width: calc(56 * var(--dp)); margin: 0 calc(8 * var(--dp)); }
.lv-obtn:focus { outline: none; background: var(--accent); }
.lv-obright { display: flex; align-items: center; color: var(--text-soft); font: var(--t-body-medium); }
.lv-obright span:first-child { flex: 1 1 auto; }
.lv-oval { min-width: calc(64 * var(--dp)); text-align: center; }

/* The pointer's way into what the remote's arrows do: back, find a channel, options */
.lv-topbar { position: absolute; top: calc(20 * var(--dp)); left: calc(24 * var(--dp)); right: calc(24 * var(--dp)); display: flex; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.lv-topbar.on { opacity: 1; pointer-events: auto; }
.lv-topgap { flex: 1 1 auto; }
.lv-top { margin-left: calc(10 * var(--dp)); height: calc(40 * var(--dp)); padding: 0 calc(18 * var(--dp)); border-radius: calc(20 * var(--dp)); background: rgba(30, 30, 38, 0.75); color: #fff; font: var(--t-label-large); }
.lv-top.lv-back { margin-left: 0; }
.lv-top:hover, .lv-top:focus { outline: none; background: var(--accent); }

.live-pv { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: calc(8 * var(--dp)); background: #000; }

/* The TV's red Apps button (top right of the Home) and its plugins modal */
.home-apps { position: absolute; top: calc(24 * var(--dp)); right: calc(48 * var(--dp)); z-index: 5; width: calc(48 * var(--dp)); height: calc(48 * var(--dp)); border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.home-apps:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.pm-back { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; }
.pm-panel { width: calc(880 * var(--dp)); max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column; padding: calc(28 * var(--dp)) 0; border-radius: calc(16 * var(--dp)); background: var(--surface); }
.pm-title { margin: 0 calc(32 * var(--dp)) calc(16 * var(--dp)); font: var(--t-headline-small); color: var(--text); }
.pm-input { margin: 4px calc(32 * var(--dp)) calc(12 * var(--dp)); height: calc(52 * var(--dp)); padding: 0 calc(16 * var(--dp)); border: 1px solid rgba(var(--tint-rgb), 0.12); border-radius: calc(8 * var(--dp)); background: var(--surface); color: var(--text); font: var(--t-body-large); }
.pm-input:focus { outline: none; border-color: var(--accent); }
.pm-note { margin: 0 calc(32 * var(--dp)) calc(8 * var(--dp)); color: var(--muted); font: var(--t-body-medium); }
.pm-note:empty { display: none; }
.pm-grid { display: flex; flex-wrap: wrap; padding: calc(8 * var(--dp)) calc(32 * var(--dp)); overflow: hidden; }
.pm-tile { width: calc(132 * var(--dp)); margin: 0 calc(6 * var(--dp)) calc(12 * var(--dp)); padding: calc(10 * var(--dp)) calc(8 * var(--dp)); border-radius: calc(16 * var(--dp)); display: flex; flex-direction: column; align-items: center; color: var(--text); }
.pm-tile:focus { outline: none; background: rgba(var(--tint-rgb), 0.06); }
.pm-icon { display: flex; align-items: center; justify-content: center; width: calc(64 * var(--dp)); height: calc(64 * var(--dp)); border-radius: calc(16 * var(--dp)); background: var(--surface-2); overflow: hidden; border: calc(3 * var(--dp)) solid transparent; box-sizing: content-box; }
.pm-tile:focus .pm-icon { border-color: var(--ring); }
.pm-icon img { width: 100%; height: 100%; object-fit: cover; }
.pm-init { color: #fff; font: var(--t-title-large); font-weight: 600; }
.pm-name { margin-top: calc(8 * var(--dp)); font: var(--t-label-large); text-align: center; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-tile:focus .pm-name { font-weight: 700; }

/* A plugin's own screen: the SDK's widgets drawn in the TV's look. Role colours are the app's (dark theme). */
.sk { --sk-primary: var(--accent); --sk-secondary: var(--muted); --sk-surface: var(--surface); --sk-muted: var(--muted); --sk-warning: #ffb300; --sk-error: #ff5252; --sk-onPrimary: var(--on-accent); --sk-primaryContainer: var(--accent-soft); --sk-surfaceVariant: var(--surface-2); --sk-onSurface: var(--text); --sk-outline: rgba(var(--tint-rgb), 0.2); color: var(--sk-onSurface); }
.screen.plugin-screen { padding: calc(24 * var(--dp)) calc(48 * var(--dp)); position: relative; height: 100vh; overflow-y: auto; box-sizing: border-box; }
.sk-screen { position: relative; min-height: 100%; }
.sk-col, .sk-row, .sk-box, .sk-line, .sk-scroll { display: flex; box-sizing: border-box; }
.sk-col, .sk-scroll { flex-direction: column; }
.sk-row, .sk-line { flex-direction: row; }
.sk-col > * + * { margin-top: var(--sk-gap, 0); }
.sk-row > * + *, .sk-line > * + * { margin-left: var(--sk-gap, 0); }
.sk-columns > .sk-line + .sk-line { margin-top: var(--sk-gap, 0); }
/* A flowing row: the whole width, lines that wrap; the gap goes after each child and under it (no flex gap before Chromium 84). */
.sk-flow { flex-wrap: wrap; align-self: stretch; width: 100%; margin-bottom: calc(-1 * var(--sk-gap, 0px)); }
.sk-flow > *, .sk-flow > * + * { margin-left: 0; margin-right: var(--sk-gap, 0); margin-bottom: var(--sk-gap, 0); }
.sk-box { display: grid; }
.sk-box > * { grid-area: 1 / 1; }
.sk-cell { box-sizing: border-box; min-width: 0; }
.sk-hscroll { flex-direction: row; overflow-x: auto; }
.sk-hscroll > * { flex: 0 0 auto; }
.sk-grid { display: grid; grid-gap: var(--sk-gap, 0); }
.sk-spacer { flex: 1 1 auto; min-height: calc(8 * var(--dp)); }
.sk-divider { height: 1px; align-self: stretch; background: var(--sk-outline); }
.sk-text { margin: 0; }
.sk-icon { display: inline-flex; align-items: center; justify-content: center; }
.sk-image { position: relative; overflow: hidden; }
.sk-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sk-ratio { width: 100%; height: 0; }
.sk-ratio img, .sk-ratio > * { position: absolute; top: 0; left: 0; }
.sk-badge { display: inline-block; padding: calc(2 * var(--dp)) calc(10 * var(--dp)); border-radius: 9999px; background: var(--sk-primary); color: var(--sk-onPrimary); font: var(--t-label-medium); }
.sk-progress-wrap { display: block; }
.sk-progress { height: calc(6 * var(--dp)); border-radius: 9999px; background: var(--sk-surfaceVariant); overflow: hidden; }
.sk-bar { display: block; height: 100%; background: var(--sk-primary); }
.sk-indeterminate .sk-bar { width: 40%; animation: sk-slide 1.2s ease-in-out infinite; }
@keyframes sk-slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.sk-loading { display: flex; align-items: center; color: var(--sk-muted); font: var(--t-body-large); }
.sk-spin { width: calc(22 * var(--dp)); height: calc(22 * var(--dp)); margin-right: calc(12 * var(--dp)); border-radius: 50%; border: calc(3 * var(--dp)) solid var(--sk-surfaceVariant); border-top-color: var(--sk-primary); animation: sk-rot 0.9s linear infinite; }
@keyframes sk-rot { to { transform: rotate(360deg); } }
.sk-card { display: flex; flex-direction: column; align-items: flex-start; box-sizing: border-box; padding: calc(16 * var(--dp)); border-radius: calc(12 * var(--dp)); background: var(--sk-surface); }
.sk-card-outlined { background: transparent; border: 1px solid var(--sk-outline); }
.sk-card-filled { background: var(--sk-surfaceVariant); }
.sk-card.sk-flush { padding: 0; overflow: hidden; }
.sk-card > * + * { margin-top: var(--sk-gap, 0); }
.sk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: calc(48 * var(--dp)); padding: 0 calc(24 * var(--dp)); border-radius: calc(24 * var(--dp)); font: var(--t-label-large); color: #fff; }
.sk-btn > * + * { margin-left: calc(8 * var(--dp)); }
.sk-btn-primary { background: var(--sk-primary); color: var(--sk-onPrimary); }
.sk-btn-secondary { background: var(--sk-surfaceVariant); color: var(--sk-onSurface); }
.sk-btn-text { background: transparent; color: var(--sk-primary); padding: 0 calc(12 * var(--dp)); }
.sk-btn-icon { background: transparent; color: var(--sk-onSurface); width: calc(48 * var(--dp)); padding: 0; }
.sk-btn:focus, .sk-trailing:focus, .sk-chip:focus, .sk-tab:focus, .sk-radio:focus, .sk-switch:focus, .sk-tap:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.sk-btn[disabled], .sk-disabled { opacity: 0.45; }
.sk-field { display: block; box-sizing: border-box; }
.sk-label { display: block; margin-bottom: calc(6 * var(--dp)); font: var(--t-label-large); color: var(--sk-onSurface); }
.sk-hint { display: block; margin: calc(4 * var(--dp)) 0 0; font: var(--t-body-small); color: var(--sk-muted); }
.sk-error { margin: calc(4 * var(--dp)) 0 0; font: var(--t-body-small); color: var(--sk-error); }
.sk-input { width: 100%; box-sizing: border-box; min-height: calc(52 * var(--dp)); padding: calc(10 * var(--dp)) calc(16 * var(--dp)); border: 1px solid var(--sk-outline); border-radius: calc(8 * var(--dp)); background: var(--surface); color: var(--sk-onSurface); font: var(--t-body-large); }
.sk-input:focus { outline: none; border-color: var(--sk-primary); box-shadow: 0 0 0 calc(2 * var(--dp)) var(--sk-primary); }
.sk-input-row { display: flex; align-items: center; }
.sk-input-row .sk-input { flex: 1 1 auto; }
.sk-trailing { margin-left: calc(8 * var(--dp)); width: calc(48 * var(--dp)); height: calc(48 * var(--dp)); border-radius: 50%; color: var(--sk-onSurface); }
.sk-toggle { display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; }
.sk-toggle-text { display: block; }
.sk-switch { position: relative; flex: 0 0 auto; width: calc(56 * var(--dp)); height: calc(32 * var(--dp)); border-radius: 9999px; background: var(--sk-surfaceVariant); }
.sk-switch.on { background: var(--sk-primary); }
.sk-knob { position: absolute; top: calc(4 * var(--dp)); left: calc(4 * var(--dp)); width: calc(24 * var(--dp)); height: calc(24 * var(--dp)); border-radius: 50%; background: #fff; transition: left 0.15s ease; }
.sk-switch.on .sk-knob { left: calc(28 * var(--dp)); }
.sk-check { width: calc(32 * var(--dp)); border-radius: calc(6 * var(--dp)); }
.sk-check.on .sk-knob { left: calc(4 * var(--dp)); background: #fff; }
.sk-radios { display: block; }
.sk-radio { display: flex; align-items: center; padding: calc(8 * var(--dp)) 0; color: var(--sk-onSurface); font: var(--t-body-large); }
.sk-dot { width: calc(22 * var(--dp)); height: calc(22 * var(--dp)); margin-right: calc(12 * var(--dp)); border-radius: 50%; border: calc(2 * var(--dp)) solid var(--sk-muted); box-sizing: border-box; }
.sk-radio.on .sk-dot { border-color: var(--sk-primary); background: radial-gradient(var(--sk-primary) 45%, transparent 50%); }
.sk-range-row { display: flex; align-items: center; }
.sk-range { flex: 1 1 auto; }
.sk-range-value { margin-left: calc(12 * var(--dp)); min-width: calc(48 * var(--dp)); text-align: right; font: var(--t-body-large); }
.sk-chips { display: flex; flex-wrap: wrap; }
.sk-chip { margin: 0 calc(8 * var(--dp)) calc(8 * var(--dp)) 0; padding: calc(8 * var(--dp)) calc(16 * var(--dp)); border-radius: 9999px; background: var(--sk-surfaceVariant); color: var(--sk-onSurface); font: var(--t-label-large); }
.sk-chip.on { background: var(--sk-primary); color: var(--sk-onPrimary); }
.sk-tabs { display: flex; border-bottom: 1px solid var(--sk-outline); }
.sk-tab { padding: calc(12 * var(--dp)) calc(20 * var(--dp)); color: var(--sk-muted); font: var(--t-label-large); border-bottom: calc(3 * var(--dp)) solid transparent; }
.sk-tab.on { color: var(--sk-onSurface); border-bottom-color: var(--sk-primary); }
.sk-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(32 * var(--dp)); color: var(--sk-muted); }
.sk-state-error { color: var(--sk-error); }
.sk-state-title { margin: calc(8 * var(--dp)) 0 0; font: var(--t-title-large); color: var(--sk-onSurface); }
.sk-state-text { margin: calc(8 * var(--dp)) 0 0; font: var(--t-body-large); }
.sk-banner { display: flex; align-items: center; box-sizing: border-box; padding: calc(12 * var(--dp)) calc(16 * var(--dp)); border-radius: calc(8 * var(--dp)); background: var(--sk-surfaceVariant); }
.sk-banner-body { flex: 1 1 auto; }
.sk-banner-title { margin: 0; font: var(--t-label-large); }
.sk-banner-text { margin: 0; font: var(--t-body-large); }
.sk-banner-warning { border-left: calc(4 * var(--dp)) solid var(--sk-warning); }
.sk-banner-error { border-left: calc(4 * var(--dp)) solid var(--sk-error); }
.sk-banner-success { border-left: calc(4 * var(--dp)) solid #4caf50; }
.sk-banner-info { border-left: calc(4 * var(--dp)) solid var(--sk-primary); }
.sk-toast { position: fixed; left: 50%; bottom: calc(48 * var(--dp)); transform: translateX(-50%); display: none; align-items: center; padding: calc(12 * var(--dp)) calc(24 * var(--dp)); border-radius: calc(24 * var(--dp)); background: var(--surface-2); color: var(--text); font: var(--t-body-large); z-index: 60; }
.sk-toast.on { display: flex; }
.sk-sentinel { height: 1px; }
.sk-loading-more { text-align: center; color: var(--sk-muted); font: var(--t-body-medium); }
.pm-confirm { width: calc(560 * var(--dp)); padding: calc(28 * var(--dp)) calc(32 * var(--dp)); }
.pm-ask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 70; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; }
.pm-confirm-actions { justify-content: flex-end; }
.pm-confirm-actions .sk-btn + .sk-btn { margin-left: calc(12 * var(--dp)); }
/* Wide things fill their column (the app's fields, cards, banners and lists take the width); buttons, text, icons and badges wrap their content. */
.sk-col > .sk-field, .sk-col > .sk-banner, .sk-col > .sk-tabs, .sk-col > .sk-progress-wrap, .sk-col > .sk-divider, .sk-col > .sk-list, .sk-col > .sk-card, .sk-col > .sk-toggle, .sk-col > .sk-state, .sk-col > .sk-ratio, .sk-col > .sk-grid, .sk-col > .sk-columns { align-self: stretch; }
.sk-cell > * { width: 100%; box-sizing: border-box; }
.sk-cell { display: flex; }
.sk-cell > .sk-card { flex: 1 1 auto; }
.sk-col > .sk-form, .sk-card > .sk-field, .sk-card > .sk-banner, .sk-card > .sk-tabs, .sk-card > .sk-progress-wrap, .sk-card > .sk-divider, .sk-card > .sk-list, .sk-card > .sk-toggle, .sk-card > .sk-state, .sk-form > .sk-field, .sk-form > .sk-toggle { align-self: stretch; }
.sk-popup-back { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 55; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; }
.sk-popup { max-width: 80vw; max-height: 80vh; overflow-y: auto; box-sizing: border-box; padding: calc(24 * var(--dp)) calc(28 * var(--dp)); border-radius: calc(16 * var(--dp)); background: var(--surface); min-width: calc(420 * var(--dp)); }
.sk-popup-sheet { align-self: flex-end; width: 100%; max-width: 100vw; border-radius: calc(16 * var(--dp)) calc(16 * var(--dp)) 0 0; }
.sk-popup-back:has(.sk-popup-sheet) { align-items: flex-end; }
.sk-popup-title { margin: 0 0 calc(16 * var(--dp)); font: var(--t-title-large); color: var(--sk-onSurface); }
.sk-popup-actions { display: flex; justify-content: flex-end; margin-top: calc(16 * var(--dp)); }
.sk-popup-actions > * + * { margin-left: calc(8 * var(--dp)); }
.sk-menu-item { display: flex; align-items: center; width: 100%; padding: calc(12 * var(--dp)) calc(8 * var(--dp)); color: var(--sk-onSurface); font: var(--t-body-large); text-align: left; border-radius: calc(8 * var(--dp)); }
.sk-menu-item > * + * { margin-left: calc(12 * var(--dp)); }
.sk-menu-item:focus { outline: none; background: rgba(var(--tint-rgb), 0.08); box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.pm-note-toast { position: fixed; left: 50%; bottom: calc(48 * var(--dp)); transform: translateX(-50%); padding: calc(12 * var(--dp)) calc(24 * var(--dp)); border-radius: calc(24 * var(--dp)); background: var(--surface-2); color: var(--text); font: var(--t-body-large); z-index: 60; }

/* Plugin screens, phase 2: scaffold, app bar, pages, hero, title rails */
.sk-scaffold { display: flex; flex-direction: column; align-items: stretch; box-sizing: border-box; }
.sk-appbar { display: flex; align-items: center; box-sizing: border-box; padding: calc(8 * var(--dp)) 0; }
.sk-appbar > * + * { margin-left: calc(12 * var(--dp)); }
.sk-pageview { position: relative; align-self: stretch; }
.sk-pages { display: block; }
.sk-dots { display: flex; justify-content: center; margin-top: calc(8 * var(--dp)); }
.sk-dot-btn { width: calc(10 * var(--dp)); height: calc(10 * var(--dp)); margin: 0 calc(5 * var(--dp)); border-radius: 50%; background: var(--sk-surfaceVariant); }
.sk-dot-btn.on { background: var(--sk-primary); }
.sk-dot-btn:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.sk-hero { position: relative; display: flex; align-items: flex-end; box-sizing: border-box; min-height: calc(240 * var(--dp)); border-radius: calc(12 * var(--dp)); overflow: hidden; background: var(--sk-surface); }
.sk-hero-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.sk-hero-shade { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.1)); }
.sk-hero-copy { position: relative; padding: calc(24 * var(--dp)) calc(32 * var(--dp)); max-width: 70%; }
.sk-hero-title { margin: 0; font: var(--t-headline-medium); font-weight: 700; color: #fff; }
.sk-hero-text { margin: calc(6 * var(--dp)) 0 0; font: var(--t-body-large); color: var(--text-soft); }
.sk-hero-actions { display: flex; margin-top: calc(14 * var(--dp)); }
.sk-hero-actions > * + * { margin-left: calc(10 * var(--dp)); }
.sk-rail { display: block; align-self: stretch; }
.sk-rail-head { display: flex; align-items: center; margin-bottom: calc(10 * var(--dp)); }
.sk-rail-title { margin: 0; flex: 1 1 auto; font: var(--t-title-large); color: var(--sk-onSurface); }
.sk-rail-row { display: flex; overflow-x: auto; padding: calc(6 * var(--dp)); margin: calc(-6 * var(--dp)); }
.sk-rail-row > * { flex: 0 0 auto; margin-right: calc(12 * var(--dp)); }
.sk-title-grid > * { justify-self: start; }
.sk-avatar { display: flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; background: var(--sk-surfaceVariant); color: var(--sk-onSurface); font: var(--t-label-large); flex: 0 0 auto; }
/* The whole picture inside the circle: a square photo fills it as before, a wide channel logo keeps its ends. */
.sk-avatar img { width: 86%; height: 86%; object-fit: contain; }
.sk-title-fallback { padding: calc(12 * var(--dp)); border-radius: calc(8 * var(--dp)); background: var(--sk-surface); color: var(--sk-onSurface); }
.sk-hero-logo { display: block; max-width: calc(320 * var(--dp)); max-height: calc(90 * var(--dp)); object-fit: contain; }
.sk-appbar-title { margin: 0; font: var(--t-title-large); color: var(--sk-onSurface); }
.sk-tile { display: flex; align-items: center; box-sizing: border-box; padding: calc(12 * var(--dp)) calc(8 * var(--dp)); }
.sk-tile > * + * { margin-left: calc(16 * var(--dp)); }
.sk-tile-text { flex: 1 1 auto; min-width: 0; }
.sk-tile-title { margin: 0; font: var(--t-body-large); color: var(--sk-onSurface); }
.sk-tile-sub { margin: calc(2 * var(--dp)) 0 0; font: var(--t-body-medium); color: var(--sk-muted); }
.sk-navbar { position: sticky; bottom: 0; display: flex; justify-content: space-around; background: var(--sk-surface); padding: calc(8 * var(--dp)) 0; }
.sk-nav { display: flex; flex-direction: column; align-items: center; padding: calc(6 * var(--dp)) calc(16 * var(--dp)); border-radius: calc(16 * var(--dp)); color: var(--sk-muted); font: var(--t-label-medium); }
.sk-nav.on { color: var(--sk-onSurface); background: var(--sk-surfaceVariant); }
.sk-nav:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.sk-fab { position: fixed; right: calc(48 * var(--dp)); bottom: calc(48 * var(--dp)); display: flex; align-items: center; min-height: calc(56 * var(--dp)); padding: 0 calc(20 * var(--dp)); border-radius: calc(28 * var(--dp)); background: var(--sk-primary); color: var(--sk-onPrimary); font: var(--t-label-large); z-index: 40; }
.sk-fab > * + * { margin-left: calc(8 * var(--dp)); }
.sk-fab:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
/* A sideways scroll is as wide as the space it is given, never as wide as its content; the page itself never scrolls sideways. */
.sk-hscroll, .sk-rail, .sk-rail-row { max-width: 100%; min-width: 0; }
.sk-col > .sk-hscroll { align-self: stretch; }
.sk-col, .sk-scaffold, .sk-row, .sk-pageview, .sk-pages { min-width: 0; }
.screen.plugin-screen { overflow-x: hidden; }
.sk-hscroll { padding: calc(6 * var(--dp)); margin-left: calc(-6 * var(--dp)); margin-right: calc(-6 * var(--dp)); }
.sk-col, .sk-row, .sk-box, .sk-card, .sk-scaffold, .sk-scroll, .sk-pageview, .sk-pages, .sk-rail, .sk-grid, .sk-field, .sk-banner, .sk-appbar, .sk-form { max-width: 100%; box-sizing: border-box; }
.sk { max-width: 100%; overflow-x: hidden; }
/* Inside a sideways scroll the content keeps its own width (the scroll moves it): nothing shrinks to fit. */
.sk-hscroll > * { flex: 0 0 auto; max-width: none; }
.sk-hscroll .sk-row { max-width: none; width: max-content; }
.sk-hscroll .sk-row > * { flex: 0 0 auto; }
.sk-hscroll, .sk-rail-row { scrollbar-width: none; }
.sk-hscroll::-webkit-scrollbar, .sk-rail-row::-webkit-scrollbar { display: none; }
.sk-center > .sk-text { text-align: center; max-width: 100%; }
/* The screen fills the TV's height like the app: a scaffold keeps its bar still and only its body (a vertical scroll) moves.
   Chromium 79 (the LG) gives a weighted child of an auto-height column no height at all, so every height is definite here. */
.screen.plugin-screen { height: 100vh; overflow: hidden; }
.sk-screen { height: 100%; }
.sk { height: 100%; overflow-x: hidden; overflow-y: auto; }
.sk-scaffold { height: 100%; }
.sk-scaffold > .sk-appbar { flex: 0 0 auto; }
.sk-scaffold > * { min-height: 0; }
.sk-scroll:not(.sk-hscroll) { overflow-y: auto; overflow-x: hidden; min-height: 0; }
.sk-scroll:not(.sk-hscroll), .sk-scaffold .sk-col { scrollbar-width: none; }
.sk-scroll:not(.sk-hscroll)::-webkit-scrollbar, .sk::-webkit-scrollbar { display: none; }
.sk-scaffold > :not(.sk-appbar):not(.sk-navbar):not(.sk-fab) { flex: 1 1 0; min-height: 0; }
/* A column's children keep their height (a scroll moves them; nothing squeezes to fit), unless the plugin weighted one. */
.sk-col > *, .sk-scroll:not(.sk-hscroll) > *, .sk-card > * { flex-shrink: 0; }

/* Pairing by the phone's 5-digit code */
.pair-label { display: block; margin-top: calc(24 * var(--dp)); color: var(--muted); font: var(--t-label-large); }
.pair-form { margin-top: calc(8 * var(--dp)); }
.pair-input { width: calc(320 * var(--dp)); height: calc(64 * var(--dp)); padding: 0 calc(20 * var(--dp)); border: 1px solid rgba(var(--tint-rgb), 0.2); border-radius: calc(10 * var(--dp)); background: var(--surface); color: var(--text); font: var(--t-headline-medium); letter-spacing: 0.3em; }
.pair-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 calc(2 * var(--dp)) var(--accent); }
.pair-note { margin-top: calc(14 * var(--dp)); color: var(--text); font: var(--t-body-large); min-height: 1.2em; }
.message.pair { max-width: calc(1400 * var(--dp)); }
.message.pair h2 { margin-top: calc(20 * var(--dp)); }
/* What to do with no code yet: three steps side by side, each with its picture (all of it fits a 1080 TV with no scrolling) */
.pair-steps { margin-top: calc(14 * var(--dp)); padding-top: calc(16 * var(--dp)); border-top: 1px solid rgba(var(--tint-rgb), 0.12); }
.pair-steps h3 { margin: 0; font: var(--t-title-large); color: var(--text); }
.pair-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(24 * var(--dp)); margin: calc(16 * var(--dp)) 0 0; padding: 0; list-style: none; }
.pair-step { display: flex; flex-direction: column; padding: calc(18 * var(--dp)); border-radius: calc(14 * var(--dp)); background: var(--surface); }
.pair-step-head { display: flex; align-items: center; }
.pair-step-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: calc(34 * var(--dp)); height: calc(34 * var(--dp)); margin-right: calc(12 * var(--dp)); border-radius: 50%; background: var(--accent); color: #fff; font: var(--t-title-medium); }
.pair-step h4 { margin: 0; font: var(--t-title-medium); color: var(--text); }
.pair-step p { margin: calc(8 * var(--dp)) 0 calc(14 * var(--dp)); color: var(--muted); font: var(--t-body-medium); }
.pair-shot { display: block; height: calc(172 * var(--dp)); width: auto; max-width: 100%; margin-top: auto; align-self: center; object-fit: contain; border-radius: calc(10 * var(--dp)); }
.pair-qr { padding: calc(10 * var(--dp)); background: #fff; }
.pair-wifi { margin-top: calc(16 * var(--dp)); color: var(--muted); font: var(--t-body-medium); }
@media (max-width: 700px) {
  .pair-grid { grid-template-columns: minmax(0, 1fr); }
  .pair-shot { height: auto; width: 100%; max-width: 320px; }
  .pair-qr { width: 200px; }
}
/* Chrome's local-network question hangs under the address bar, top left: the arrow points at it */
.lna-hint { display: flex; align-items: flex-start; max-width: calc(720 * var(--dp)); margin: 0 0 calc(20 * var(--dp)); }
.lna-text { margin: calc(36 * var(--dp)) 0 0; padding: calc(14 * var(--dp)) calc(18 * var(--dp)); border-radius: calc(12 * var(--dp)); background: var(--accent); color: #fff; font: var(--t-title-medium); box-shadow: 0 calc(6 * var(--dp)) calc(24 * var(--dp)) rgba(0, 0, 0, 0.45); }
.lna-arrow { flex: none; width: calc(96 * var(--dp)); height: calc(96 * var(--dp)); margin-right: calc(8 * var(--dp)); animation: lna-nudge 1.1s ease-in-out infinite; }
.lna-kind-text { position: static; margin-top: calc(24 * var(--dp)); max-width: none; }
.lna-kind-text .lna-text { margin-top: 0; }
@keyframes lna-nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(calc(-8 * var(--dp)), calc(-8 * var(--dp))); } }
@media (prefers-reduced-motion: reduce) { .lna-arrow { animation: none; } }

/* Plugin screens: accordion, skeleton, stepper, table, steps, load more */
.sk-accordion { display: block; align-self: stretch; }
.sk-acc-item { border-bottom: 1px solid var(--sk-outline); }
.sk-acc-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: calc(14 * var(--dp)) calc(8 * var(--dp)); color: var(--sk-onSurface); font: var(--t-title-medium); text-align: left; border-radius: calc(8 * var(--dp)); }
.sk-acc-head:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.sk-acc-body { padding: 0 calc(8 * var(--dp)) calc(14 * var(--dp)); }
.sk-acc-body > * + * { margin-top: calc(8 * var(--dp)); }
.sk-skeleton { display: block; align-self: stretch; }
.sk-skel { display: block; background: var(--sk-surfaceVariant); animation: sk-pulse 1.3s ease-in-out infinite; }
.sk-skel-line { height: calc(14 * var(--dp)); border-radius: calc(7 * var(--dp)); margin-bottom: calc(10 * var(--dp)); }
.sk-skel-line.last { width: 60%; }
.sk-skel-block { height: calc(120 * var(--dp)); border-radius: calc(12 * var(--dp)); }
.sk-skel-circle { width: calc(64 * var(--dp)); height: calc(64 * var(--dp)); border-radius: 50%; }
.sk-skel-card { width: calc(160 * var(--dp)); height: calc(240 * var(--dp)); border-radius: calc(12 * var(--dp)); }
@keyframes sk-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.sk-stepper { display: flex; align-items: center; }
.sk-step-btn { width: calc(48 * var(--dp)); height: calc(48 * var(--dp)); border-radius: 50%; background: var(--sk-surfaceVariant); color: var(--sk-onSurface); display: flex; align-items: center; justify-content: center; }
.sk-step-btn:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.sk-step-btn[disabled] { opacity: 0.4; }
.sk-step-value { min-width: calc(80 * var(--dp)); text-align: center; font: var(--t-title-large); color: var(--sk-onSurface); }
.sk-table { display: block; align-self: stretch; border: 1px solid var(--sk-outline); border-radius: calc(8 * var(--dp)); overflow: hidden; }
.sk-tr { display: grid; }
.sk-tr + .sk-tr { border-top: 1px solid var(--sk-outline); }
.sk-tr.head { background: var(--sk-surfaceVariant); font-weight: 600; }
.sk-table.zebra .sk-tr:nth-child(even) { background: rgba(var(--tint-rgb), 0.04); }
.sk-td { padding: calc(10 * var(--dp)) calc(12 * var(--dp)); font: var(--t-body-medium); color: var(--sk-onSurface); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sk-steps { display: block; align-self: stretch; }
.sk-step { display: flex; align-items: flex-start; padding: calc(8 * var(--dp)) 0; }
.sk-step-mark { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: calc(32 * var(--dp)); height: calc(32 * var(--dp)); margin-right: calc(14 * var(--dp)); border-radius: 50%; background: var(--sk-surfaceVariant); color: var(--sk-onSurface); font: var(--t-label-large); }
.sk-step-done .sk-step-mark, .sk-step-current .sk-step-mark { background: var(--sk-primary); color: var(--sk-onPrimary); }
.sk-step-upcoming .sk-step-title { color: var(--sk-muted); }
.sk-step-title { margin: calc(4 * var(--dp)) 0 0; font: var(--t-title-small); color: var(--sk-onSurface); }
.sk-sentinel-h { display: inline-block; width: 1px; height: 1px; flex: 0 0 1px; }
.sk-more-spin { display: inline-flex; align-items: center; padding: 0 calc(16 * var(--dp)); }

/* Steps (the phone's shape), QR, the browse screen */
.sk-step { display: block; padding: calc(6 * var(--dp)) 0; }
.sk-step-head { display: flex; align-items: flex-start; width: 100%; text-align: left; color: var(--sk-onSurface); border-radius: calc(8 * var(--dp)); }
.sk-step-press:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.sk-step-pending .sk-step-title { color: var(--sk-muted); }
.sk-step-body { margin: calc(8 * var(--dp)) 0 0 calc(46 * var(--dp)); }
.sk-step-body > * + * { margin-top: calc(8 * var(--dp)); }
.sk-qr { display: flex; flex-direction: column; align-items: center; }
.sk-qr-img { width: calc(240 * var(--dp)); height: calc(240 * var(--dp)); background: #fff; padding: calc(12 * var(--dp)); border-radius: calc(12 * var(--dp)); }
.sk-qr-missing { display: flex; flex-direction: column; align-items: center; padding: calc(24 * var(--dp)); border: 1px dashed var(--sk-outline); border-radius: calc(12 * var(--dp)); color: var(--sk-muted); }
.sk-qr-label { margin: calc(10 * var(--dp)) 0 0; font: var(--t-body-large); color: var(--sk-onSurface); }
.screen.browse { padding: calc(32 * var(--dp)) calc(48 * var(--dp)); height: 100vh; overflow-y: auto; box-sizing: border-box; }
.browse-head { display: flex; align-items: center; margin-bottom: calc(20 * var(--dp)); }
.browse-head > * + * { margin-left: calc(20 * var(--dp)); }
.browse-title { margin: 0; font: var(--t-headline-small); color: var(--text); }
.browse-grid { display: flex; flex-wrap: wrap; padding: calc(6 * var(--dp)); margin: calc(-6 * var(--dp)); }
.browse-grid > * { margin: 0 calc(14 * var(--dp)) calc(14 * var(--dp)) 0; }

/* The catalog screens of the menu (Mi biblioteca, Categorías, Colecciones): the browse grid beside the rail, tabs over it. */
.shell .screen.catalog { padding-left: calc(76 * var(--dp)); }
.cat-tabs { overflow-x: auto; scrollbar-width: none; padding-top: calc(4 * var(--dp)); }
/* The channel guide: a row per channel, its name on the left and its programmes in a line (now first, highlighted). */
.guide-row { display: flex; align-items: stretch; margin-bottom: calc(8 * var(--dp)); padding: calc(8 * var(--dp)); border-radius: calc(10 * var(--dp)); background: var(--surface); cursor: pointer; }
.guide-row:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.guide-ch { display: flex; align-items: center; flex: 0 0 calc(260 * var(--dp)); min-width: 0; }
.guide-num { flex: 0 0 auto; margin-right: calc(10 * var(--dp)); color: var(--muted); font: var(--t-body-small); }
.guide-name { flex: 1 1 auto; min-width: 0; font: var(--t-title-small); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-progs { display: flex; flex: 1 1 auto; min-width: 0; overflow: hidden; align-items: center; }
.guide-prog { flex: 0 0 calc(220 * var(--dp)); margin-left: calc(8 * var(--dp)); padding: calc(6 * var(--dp)) calc(10 * var(--dp)); border-radius: calc(8 * var(--dp)); background: rgba(var(--tint-rgb), 0.04); min-width: 0; }
.guide-prog.on { background: rgba(var(--tint-rgb), 0.12); }
.guide-hours { display: block; font: var(--t-body-small); color: var(--muted); }
.guide-title { display: block; font: var(--t-body-medium); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-none { margin-left: calc(12 * var(--dp)); color: var(--muted); font: var(--t-body-medium); }
/* A Stremio collection's addons: a grid of cards, the logo beside the name, its state and its description. */
.coll-lists { margin-bottom: calc(12 * var(--dp)); }
.coll-notice { margin: 0 0 calc(12 * var(--dp)); }
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(340 * var(--dp)), 1fr)); grid-gap: calc(14 * var(--dp)); }
.coll-card { display: flex; align-items: flex-start; padding: calc(12 * var(--dp)); border-radius: calc(12 * var(--dp)); background: var(--surface); cursor: pointer; min-width: 0; }
.coll-card:focus { outline: none; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring); }
.coll-logo { flex: 0 0 auto; width: calc(56 * var(--dp)); height: calc(56 * var(--dp)); margin-right: calc(12 * var(--dp)); }
.coll-text { flex: 1 1 auto; min-width: 0; }
.coll-text > p { margin: 0; }
.coll-name { font: var(--t-title-small); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll-status { font: var(--t-body-small); color: var(--muted); }
.coll-status.on { color: var(--text); }
.coll-desc { margin-top: calc(4 * var(--dp)) !important; font: var(--t-body-small); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-section { margin-bottom: calc(18 * var(--dp)); }
.cat-section > .row-title { margin: 0 0 calc(10 * var(--dp)); }
.cat-meta { margin: calc(2 * var(--dp)) 0 0; font: var(--t-body-small); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- the cards' focus and pointer effect (owner, 2026-11-07: TV, phone and every other)
   A card in focus (the remote, the keyboard) or under a mouse grows by the theme's focus zoom and lifts on a soft shadow. Only the
   size is animated (the GPU's cheap part); the shadow appears at once, so a TV box does no per-frame shadow work. A touch screen gets
   it from the focus only (no hover there). */
.tv-card, .card .art, .ep-card, .pm-icon { transition: transform 0.16s ease-out; }
.tv-card:focus, .ep-card:focus { transform: scale(var(--focus-zoom, 1.08)); z-index: 2; box-shadow: 0 0 0 calc(3 * var(--dp)) var(--ring), 0 calc(10 * var(--dp)) calc(26 * var(--dp)) rgba(0, 0, 0, 0.45); }
.card:focus .art { transform: scale(var(--focus-zoom, 1.08)); box-shadow: 0 0 0 4px var(--ring), 0 calc(10 * var(--dp)) calc(26 * var(--dp)) rgba(0, 0, 0, 0.45); }
.pm-tile:focus .pm-icon { transform: scale(var(--focus-zoom, 1.08)); box-shadow: 0 calc(8 * var(--dp)) calc(20 * var(--dp)) rgba(0, 0, 0, 0.4); }
@media (hover: hover) and (pointer: fine) {
  .tv-card:hover, .ep-card:hover { transform: scale(var(--focus-zoom, 1.08)); z-index: 2; box-shadow: 0 calc(10 * var(--dp)) calc(26 * var(--dp)) rgba(0, 0, 0, 0.45); }
  .card:hover .art { transform: scale(var(--focus-zoom, 1.08)); box-shadow: 0 calc(10 * var(--dp)) calc(26 * var(--dp)) rgba(0, 0, 0, 0.45); }
  .pm-tile:hover .pm-icon { transform: scale(var(--focus-zoom, 1.08)); }
}
/* A touch screen: the page's own focus shows nothing (the app shows no selected card on a phone); a finger pressing a card zooms it. */
html.touch .tv-card:focus, html.touch .ep-card:focus, html.touch .card:focus .art, html.touch .pm-tile:focus .pm-icon { transform: none; box-shadow: none; }
html.touch .tv-card:focus, html.touch .ep-card:focus, html.touch .card:focus, html.touch .pm-tile:focus { outline: none; }
html.touch .tv-card:active, html.touch .ep-card:active { transform: scale(var(--focus-zoom, 1.08)); z-index: 2; box-shadow: 0 calc(10 * var(--dp)) calc(26 * var(--dp)) rgba(0, 0, 0, 0.45); }
html.touch .card:active .art, html.touch .pm-tile:active .pm-icon { transform: scale(var(--focus-zoom, 1.08)); }
@media (prefers-reduced-motion: reduce) {
  .tv-card, .card .art, .ep-card, .pm-icon { transition: none; }
}

/* ---------------------------------------------------------------- phone and tablet, as the Kino app (owner, 2026-11-07)
   Narrow screens: a smaller dp (cards, type and spacing follow it), a top bar with the menu, the logo and search, the side menu
   hidden until the menu button opens it as a floating panel, the hero full width with its text at the bottom, rows under it. */
.phone-bar, .phone-back { display: none; }
@media (max-width: 1023px) {
  :root { --dp: 1px; --gutter: 16px; }
  /* The menu as a floating panel: the panel slides in from the left while the page behind it dims and blurs in place over the whole
     screen (the rail itself never moves, so its backdrop stays put); a tap on the backdrop closes it. */
  .rail { z-index: 40; width: 0; overflow: visible; background: none; transition: none; }
  .rail:hover { width: 0; }
  .rail.open { width: 0; }
  .rail:before { content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; opacity: 0; pointer-events: none;
    background: rgba(0, 0, 0, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity 0.2s ease; }
  .rail.open:before { opacity: 1; pointer-events: auto; }
  .rail .rail-panel, .rail:hover .rail-panel, .rail.open .rail-panel { flex: 0 0 auto; width: calc(216 * var(--dp)); margin: 0 calc(8 * var(--dp)); padding: calc(16 * var(--dp)) 0;
    background: var(--rail-panel); border-color: rgba(245, 245, 245, 0.08); transform: translateX(calc(-100% - 12px)); transition: transform 0.2s ease; }
  .rail.open .rail-panel, .rail.open:hover .rail-panel { transform: none; }
  .shell .screen { padding-left: var(--gutter); padding-right: var(--gutter); }
  .shell .screen.home, .shell .screen.live, .shell.no-rail .screen.tv-title { padding-left: 0; padding-right: 0; }
  .shell .screen.catalog { padding-left: var(--gutter); }
  .coll-grid { grid-template-columns: 1fr; }
  /* The guide on a phone: the channel over its programmes, which slide sideways. */
  .guide-row { display: block; }
  .guide-ch { margin-bottom: 6px; }
  .guide-progs { overflow-x: auto; scrollbar-width: none; }
  .guide-prog { flex: 0 0 180px; margin: 0 8px 0 0; }
  .phone-bar { display: flex; align-items: center; position: absolute; top: 0; left: 0; right: 0; z-index: 5; height: 56px; padding: 0 calc(72 * var(--dp)) 0 8px; }
  .phone-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text); }
  .phone-btn:focus { outline: none; box-shadow: 0 0 0 2px var(--ring); }
  .phone-logo { height: 26px; width: auto; margin: 0 auto 0 6px; }
  .home-apps { top: 8px; right: 12px; width: 40px; height: 40px; }
  .phone-back { display: flex; margin: 0 0 4px -8px; }
  .screen.has-phone-back { padding-top: 8px; }
  /* En vivo: providers and categories as sliding rows of chips over the channel list; no side panel (a tap plays). */
  /* Pinned to the visible screen: a phone browser's 100vh counts its address bar, and the page would scroll the header away. */
  .screen.live { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: auto; padding: 8px 0 0; }
  .screen.live .phone-back { margin-left: 8px; }
  .live-header { flex: 0 0 auto; height: auto; margin: 0; padding: 0 var(--gutter); }
  .live-tabs { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .live-tab { flex: 0 0 auto; white-space: nowrap; margin-right: 18px; }
  .live-ibtn { width: 40px; height: 40px; margin-left: 6px; }
  .live-body { flex: 1 1 auto; min-height: 0; height: auto; flex-direction: column; margin-top: 8px; }
  .live-col-rail { flex: 0 0 auto; overflow: visible; padding: 0 var(--gutter); }
  .live-rail { display: flex; height: auto; overflow-x: auto; scrollbar-width: none; padding: 4px 0; margin: 0; }
  .live-rhead { display: none; }
  .live-rrow { flex: 0 0 auto; width: auto; height: 36px; margin: 0 8px 0 0; padding: 0 14px; white-space: nowrap; border-radius: 18px; background: var(--surface); font: var(--t-body-medium); }
  .live-rrow.gap { margin-top: 0; }
  .live-rrow.on { background: var(--accent-soft, var(--surface-2)); }
  .live-rrow.on:before { display: none; }
  .live-rrow .live-rcount { margin-left: 8px; }
  .live-col-list { flex: 1 1 auto; min-height: 0; margin: 8px 0 0; padding: 0 var(--gutter); display: flex; flex-direction: column; }
  .live-list { flex: 1 1 auto; height: auto; overflow-y: auto; scrollbar-width: none; margin: 0 -4px; padding-bottom: 24px; }
  .live-panel { display: none; }
  .screen.live.searching .live-searchcol { display: flex; }
  /* A plugin's hero: the copy fits the slide (the text cut to three lines, the title smaller). */
  .sk-hero-copy { max-width: 100%; padding: 14px 16px; }
  .sk-hero-title { font: var(--t-title-large); font-weight: 700; }
  .sk-hero-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font: var(--t-body-medium); }
  .sk-hero-logo { max-width: 60%; max-height: 56px; }
  .sk-appbar > .sk-row { flex: 1 1 auto; min-width: 0; justify-content: flex-start; }
  /* Icon buttons and the plugin's logo keep their size (squeezed, a round button turned into a cut oval and the logo vanished);
     only the tabs give way, sliding sideways. */
  .sk-appbar > .sk-btn-icon, .sk-appbar > .sk-row > .sk-image { flex: 0 0 auto; }
  .sk-appbar > .sk-row > .sk-image img { max-height: 28px; width: auto; }
  .sk-appbar .sk-tabs { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .sk-tabs { overflow-x: auto; scrollbar-width: none; }
  .sk-tabs > * { flex: 0 0 auto; white-space: nowrap; }
  /* One page that scrolls, hero and rows together, as the app's Home. */
  .screen.home { height: auto; min-height: 100vh; overflow: visible; }
  .hero { position: relative; height: 62vw; max-height: 60vh; }
  .hero-art { width: 100%; }
  .hero-shade { background: linear-gradient(to top, var(--bg) 0%, rgba(var(--bg-rgb), 0.55) 22%, rgba(var(--bg-rgb), 0) 48%); }
  .hero-text { left: var(--gutter); right: var(--gutter); width: auto; bottom: 4px; }
  .hero-overview { display: none; }
  .home-rows { position: relative; top: 0; bottom: auto; overflow: visible; padding: 8px 0 32px var(--gutter); }
  .tv-row-tail { height: 0; }
  /* The app's top bar: solid, over everything (a zoomed card scrolls under it), the hero starting below it. */
  .phone-bar { position: fixed; z-index: 30; background: var(--bg); }
  .screen.home { padding-top: 56px; }
  .home-apps { position: fixed; z-index: 31; }
  /* Type as the phone app's (Android sizes text in sp: it does not shrink with the smaller dp): section titles 20, names 14. */
  .tv-row .row-title { font: 600 20px/26px Inter; letter-spacing: -0.015em; color: var(--text); margin-bottom: 4px; }
  .tv-cardcap, .sk-title-cap { font: 500 14px/19px Inter; }
  .hero-title { font-size: 30px; line-height: 36px; }
  .hero-facts, .hero-extra { font: 500 14px/20px Inter; }
  .screen h2 { font-size: 22px; line-height: 28px; }
}
@media (max-width: 599px) {
  :root { --dp: 0.86px; }
  .hero { height: 78vw; }
}
