/* Flash IPTV design system. Sizes are in rem: 24px on TV, 15px in browsers.
   Written for Chrome 53 (webOS 4): no CSS grid, flex gap, aspect-ratio or inset. */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: block; src: url("fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: block; src: url("fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: block; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: block; src: url("fonts/Inter-Bold.woff2") format("woff2"); }

:root {
  --bg: #07080c; --surface: #10121a; --elevated: #1a1e29; --raised: #272d3b;
  --line: #242936; --line-strong: #3b4254;
  --text: #f6f7f9; --text-2: #b3b9c8; --text-3: #7f879b; --inverse: #07080c;
  --accent: #e5242e; --accent-hover: #f23540; --accent-soft: #2d1219; --accent-text: #ff6168;
  --focus: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); }
body { font-family: "Inter", "LG Smart UI", sans-serif; font-weight: 400; line-height: 1.45; color: var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; color: inherit; line-height: inherit; }
button { border: 0; background: none; cursor: pointer; outline: 0; }
h1, h2 { line-height: 1.2; letter-spacing: -0.02em; }
.hidden { display: none !important; }
.screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; background: var(--bg); }
.headline { font-size: 2.2rem; font-weight: 700; word-wrap: break-word; }
.subline { margin-top: .6rem; color: var(--text-2); }

.icon { flex: none; width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.filled { fill: currentColor; }

.logo { display: block; flex: none; }
.logo-full { width: auto; height: 2.4rem; }
.logo-mark { width: auto; height: 2.6rem; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; height: 2.85rem; padding: 0 1.5rem; border-radius: .6rem;
  background: var(--elevated); font-weight: 600; white-space: nowrap; transition: background-color .12s, color .12s; }
.button .icon { margin-right: .5rem; }
.button.primary { background: var(--accent); color: #fff; }
.button.danger { color: var(--accent-text); }
.button.small { height: 2.2rem; padding: 0 1rem; font-size: .82rem; font-weight: 500; }
.button.focused { background: var(--focus); color: var(--inverse); }

/* Scrolling lists */
.vlist { position: relative; height: 100%; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.vlist-inner { position: relative; width: 100%; }
.cell { position: absolute; padding: .5rem; cursor: pointer; }
.row { display: flex; align-items: center; width: 100%; height: 100%; padding: 0 .9rem; border-radius: .55rem; color: var(--text-2); }
.row-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.row-count { margin-left: .75rem; font-size: .78rem; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.categories .cell { padding: .15rem 0; }
.categories .cell.selected .row { background: var(--elevated); color: var(--text); }
.categories .cell.focused .row { background: var(--focus); color: var(--inverse); }
.categories .cell.focused .row-count { color: var(--inverse); }

/* Cards */
.card { height: 100%; transition: transform .18s ease; }
.card-art { position: relative; padding-top: 56.25%; overflow: hidden; border-radius: .5rem; background: var(--elevated); }
.poster .card-art { padding-top: 150%; }
.art { overflow: hidden; }
.card-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.art-fallback { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; padding: .6rem; overflow: hidden;
  font-size: 2rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; text-align: center; word-break: break-word; color: rgba(255,255,255,.55); }
.poster .art-fallback { padding-bottom: 2.6rem; font-size: 1.05rem; color: rgba(255,255,255,.92); }
.art img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .25s; }
.art.loaded img { opacity: 1; }
.art.loaded .art-fallback { display: none; }
.is-live .art img { padding: 11% 18% 18%; object-fit: contain; }
.is-vod .art img { object-fit: cover; }
.card-caption { position: absolute; right: 0; bottom: 0; left: 0; padding: 1.6rem .65rem .5rem;
  background: -webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,.88)); background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.88)); }
.poster .card-caption { opacity: 0; transition: opacity .18s; }
.card-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .8rem; font-weight: 600; }
.card-favorite { position: absolute; top: .4rem; right: .4rem; display: flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: rgba(7,8,12,.78); color: var(--accent-text); font-size: .75rem; }
.card-progress { position: absolute; right: .65rem; bottom: .22rem; left: .65rem; height: .2rem; overflow: hidden; border-radius: .1rem; background: rgba(255,255,255,.28); }
.card-progress-fill { height: 100%; background: var(--accent); }
.cell.focused { z-index: 2; }
.cell.focused .card { transform: scale(1.07); }
.cell.focused .card-art { box-shadow: 0 0 0 .17rem var(--focus), 0 .9rem 2rem rgba(0,0,0,.75); }
.cell.focused .card-caption { opacity: 1; }
.grid .cell.focused .card { transform: scale(1.045); }

/* Banner */
.hero { position: relative; flex: none; height: 21.5rem; overflow: hidden; }
.hero-art { position: absolute; top: 0; right: 0; bottom: 0; width: 68%; overflow: hidden; }
.hero-art img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .4s; object-fit: cover; }
.hero-art.loaded img { opacity: 1; }
.logo-art .hero-art img { top: 18%; left: 40%; width: 42%; height: 56%; object-fit: contain; }
.poster-art .hero-art { width: 40%; }
.poster-art .hero-art img { object-position: center 20%; }
.hero-shade { position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: -webkit-linear-gradient(left, #07080c 31%, rgba(7,8,12,.72) 52%, rgba(7,8,12,0) 85%);
  background: linear-gradient(to right, #07080c 31%, rgba(7,8,12,.72) 52%, rgba(7,8,12,0) 85%), linear-gradient(to top, #07080c 0, rgba(7,8,12,0) 45%); }
.poster-art .hero-shade { background: linear-gradient(to right, #07080c 58%, rgba(7,8,12,.55) 74%, rgba(7,8,12,0) 100%), linear-gradient(to top, #07080c 0, rgba(7,8,12,0) 40%); }
.hero-content { position: absolute; bottom: 1.1rem; left: 1.5rem; width: 33rem; max-width: 62%; }
.hero-kicker { margin-bottom: .6rem; }
.hero-kicker .live-badge { margin-bottom: 0; }
.kind-badge { display: inline-block; padding: .1rem .55rem; border: 1px solid rgba(255,255,255,.35); border-radius: .3rem; font-size: .68rem; font-weight: 700; letter-spacing: .14em; color: var(--text-2); }
.hero-title { display: -webkit-box; max-height: 2.4em; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 2.9rem; font-weight: 700; line-height: 1.12; letter-spacing: -.035em; text-shadow: 0 .15rem 1.2rem rgba(0,0,0,.55); }
.hero-title.long { font-size: 2.1rem; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; min-height: 1.4rem; margin-top: .55rem; font-size: .85rem; font-weight: 500; color: var(--text-2); }
.hero-meta span { margin-right: 1rem; }
.hero-meta .rating { color: #f5c451; font-weight: 600; }
.hero-plot { display: -webkit-box; height: 2.9em; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin-top: .35rem; font-size: .85rem; color: var(--text-2); }
.hero-actions { display: flex; margin-top: .85rem; }
.hero-actions .button { height: 2.65rem; margin-right: .65rem; background: rgba(255,255,255,.14); }
.hero-actions .button.primary { min-width: 8rem; background: var(--accent); }
.hero-actions .button.focused { background: var(--focus); color: var(--inverse); }

/* Rows */
.discover { padding: 0; }
.shelves { position: relative; flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.shelves-inner { position: relative; width: 100%; }
.shelf { position: absolute; left: 0; width: 100%; }
.shelf-title { display: flex; align-items: baseline; height: 2.1rem; padding: 0 1.5rem; font-size: 1.1rem; font-weight: 600; white-space: nowrap; }
.shelf-count { margin-left: .65rem; font-size: .75rem; font-weight: 500; color: var(--text-3); }
.shelf-track { position: relative; height: -webkit-calc(100% - 2.1rem); height: calc(100% - 2.1rem); margin: 0 0 0 1rem; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-inner { position: relative; height: 100%; }
.shelf .cell { top: 0; padding: .55rem .5rem; }
.shelf-arrow { position: absolute; top: 2.65rem; bottom: .95rem; z-index: 3; display: flex; align-items: center; justify-content: center; width: 2.6rem; background: rgba(7,8,12,.72); font-size: 1.5rem; opacity: 0; transition: opacity .2s; }
.shelf-arrow.previous { left: 0; border-radius: 0 .5rem .5rem 0; }
.shelf-arrow.next { right: 0; border-radius: .5rem 0 0 .5rem; }
.discover-empty { padding: 2rem 1.8rem; }
.discover-empty .empty { margin-top: .6rem; }

/* Welcome and playlists */
.profiles { background: radial-gradient(ellipse at 50% 0, #2a0f17 0, rgba(7,8,12,0) 60%), var(--bg); }
.profiles-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 2rem; text-align: center; }
.profiles-inner > .logo { height: 3.6rem; margin-bottom: 2.4rem; }
.profile-list { display: flex; flex: none; width: 100%; margin-top: 1.8rem; padding: 1rem .5rem; overflow-x: auto; overflow-y: hidden; }
.profile { display: flex; flex: none; flex-direction: column; align-items: center; width: 10.8rem; margin: 0 .85rem; }
.profile:first-child { margin-left: auto; }
.profile:last-child { margin-right: auto; }
.profile-tile { display: flex; align-items: center; justify-content: center; width: 10.8rem; height: 10.8rem; border: 1px solid var(--line); border-radius: 1.15rem; background: var(--elevated);
  font-size: 3.4rem; font-weight: 700; color: #fff; transition: transform .16s, box-shadow .16s; }
.profile-tile.add { border: 2px dashed var(--line-strong); background: var(--surface); color: var(--text-2); }
.profile-tile .icon { stroke-width: 1.6; }
.profile-tile.focused { transform: scale(1.07); box-shadow: 0 0 0 .22rem var(--focus), 0 1rem 2.5rem rgba(0,0,0,.6); }
.profile-name { width: 100%; margin-top: 1rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.profile-type { font-size: .78rem; color: var(--text-3); }
.profile .button { margin-top: .8rem; }
.disclaimer { margin-top: 1.5rem; font-size: .75rem; color: var(--text-3); }
.loading-overlay { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; background: rgba(10,11,15,.94); }
.loading-overlay .button { margin-top: 1.5rem; }

/* Form */
.form-screen { overflow-y: auto; background: radial-gradient(circle at 0 0, #1f0d13 0, rgba(10,11,15,0) 45%), var(--bg); }
.form-layout { display: flex; align-items: flex-start; justify-content: space-between; max-width: 72rem; margin: 0 auto; padding: 4rem 4rem 2rem; }
.form-intro { width: 23rem; margin-right: 2rem; }
.form-intro .logo { height: 3rem; margin-bottom: 3rem; }
.form-panel { width: 36rem; max-width: 100%; padding: 1.8rem 2rem 2rem; border: 1px solid var(--line); border-radius: 1.15rem; background: var(--surface); }
.segmented { display: flex; padding: .25rem; border-radius: .75rem; background: var(--bg); }
.segment { display: flex; flex: 1; align-items: center; justify-content: center; height: 2.5rem; border-radius: .55rem; font-weight: 500; color: var(--text-2); }
.segment.chosen { background: var(--accent); color: #fff; }
.segment.focused { background: var(--focus); color: var(--inverse); }
.field { display: block; margin-top: 1.1rem; }
.field-label { display: block; margin-bottom: .4rem; font-size: .8rem; font-weight: 500; color: var(--text-2); }
.field input { width: 100%; height: 2.85rem; padding: 0 1rem; border: 2px solid transparent; border-radius: .6rem; background: var(--elevated); outline: 0; font-weight: 500; }
.field input::-webkit-input-placeholder { color: var(--text-3); font-weight: 400; }
.field input::placeholder { color: var(--text-3); font-weight: 400; }
.field input:focus { border-color: var(--accent); }
.field.focused input { border-color: var(--focus); background: var(--raised); }
.field.focused .field-label { color: var(--text); }
.form-actions { display: flex; flex-wrap: wrap; margin-top: 1.6rem; }
.form-actions .button { margin-right: .65rem; }
.form-actions .danger { margin-left: auto; margin-right: 0; }

/* Main screen */
.menu { position: absolute; z-index: 5; display: flex; }
.menu .logo { display: none; }
.nav-item { display: flex; flex: none; align-items: center; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: background-color .12s, color .12s; }
.content { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.panel { display: flex; flex-direction: column; height: 100%; padding: 2rem 1.8rem 0; }
.panel.discover { padding: 0; }
.page-head { flex: none; margin-bottom: 1.1rem; }
.page-title { font-size: 1.8rem; font-weight: 700; letter-spacing: -.03em; }
.page-sub { flex: none; min-height: 1.45em; font-size: .8rem; color: var(--text-3); }
.empty { color: var(--text-2); }
.grid-screen .panel { padding-top: 2rem; }
.browse-body { display: flex; flex: 1; min-height: 0; }
.browse-body .categories { flex: none; width: 14rem; margin-right: 1.1rem; }
.browse-body .grid { flex: 1; min-width: 0; margin: -.5rem -.5rem 0 0; }
.category-select { display: none; }

/* Search */
.search-box { display: flex; flex: none; align-items: center; height: 3.6rem; margin-bottom: .6rem; padding: 0 1.15rem; border: 2px solid transparent; border-radius: .75rem; background: var(--elevated); cursor: text; }
.search-box .icon { margin-right: .85rem; font-size: 1.15rem; color: var(--text-2); }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 1.15rem; font-weight: 500; -webkit-appearance: none; }
.search-box.focused { border-color: var(--focus); }
.search .results { flex: 1; min-height: 0; margin: .4rem -.4rem 0; }
.results .cell { padding: .3rem .4rem; }
.results .row { padding: 0 .75rem; background: var(--surface); }
.result-image { position: relative; flex: none; width: 5rem; height: 3.4rem; margin-right: 1rem; border-radius: .4rem; }
.result-image img { object-fit: contain; }
.result-image .art-fallback { padding: 0; font-size: 1.15rem; }
.result-text { flex: 1; min-width: 0; }
.result-text .row-name { color: var(--text); }
.result-kind { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .75rem; color: var(--text-3); }
.results .cell.focused .row { background: var(--focus); }
.results .cell.focused .row-name, .results .cell.focused .result-kind { color: var(--inverse); }

/* Settings */
.settings-body { display: flex; flex: 1; align-items: flex-start; min-height: 0; overflow-y: auto; padding: .2rem .2rem 2rem; }
.setting-list { flex: 1; max-width: 41rem; }
.setting { display: flex; align-items: center; width: 100%; min-height: 4.35rem; margin-bottom: .55rem; padding: .75rem 1.2rem; border: 2px solid transparent; border-radius: .7rem; background: var(--surface); text-align: left; }
.setting-text { flex: 1; margin-right: 1rem; }
.setting-title { display: block; font-weight: 600; }
.setting-description { display: block; font-size: .78rem; color: var(--text-3); }
.setting.focused { border-color: var(--focus); background: var(--raised); }
.switch { position: relative; flex: none; width: 3rem; height: 1.7rem; border-radius: .85rem; background: var(--line-strong); transition: background-color .15s; }
.switch-knob { position: absolute; top: .18rem; left: .18rem; width: 1.34rem; height: 1.34rem; border-radius: 50%; background: #fff; transition: transform .15s; }
.on .switch { background: var(--accent); }
.on .switch-knob { transform: translateX(1.3rem); }
.about { flex: none; width: 21rem; margin-left: 1.1rem; padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface); }
.about-title { margin-bottom: .8rem; font-size: 1.15rem; font-weight: 600; word-wrap: break-word; }
.about-line { margin-bottom: .45rem; font-size: .8rem; color: var(--text-2); word-wrap: break-word; }

/* Profile pictures */
.profile-tile { position: relative; }
.profile-tile img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 1.1rem; }
.picture-button { display: flex; align-items: center; width: 100%; margin-top: 2rem; padding: .7rem; border: 2px solid transparent; border-radius: 1rem; background: var(--surface); text-align: left; }
.picture-frame { position: relative; display: block; flex: none; width: 5.4rem; height: 5.4rem; margin-right: 1.1rem; overflow: hidden; border-radius: .75rem; background: var(--elevated); }
.picture-frame img { display: block; width: 100%; height: 100%; }
.picture-text { display: block; min-width: 0; }
.picture-title { display: block; font-weight: 600; }
.picture-name { display: block; font-size: .82rem; color: var(--text-2); }
.picture-button.focused { border-color: var(--focus); background: var(--raised); }
.avatar-screen { display: flex; flex-direction: column; padding: 2.4rem 4rem 0; text-align: center; }
.avatar-surprise { flex: none; margin-top: 1.1rem; }
.avatar-grid { display: flex; flex-wrap: wrap; align-content: flex-start; flex: 1; min-height: 0; margin-top: .8rem; padding: .6rem 0 1.5rem; overflow-y: auto; }
.avatar { display: block; flex: none; width: 12.5%; padding: .45rem .6rem; border-radius: 1rem; text-align: center; transition: transform .14s; }
.avatar-picture { display: block; overflow: hidden; border: .2rem solid transparent; border-radius: 1.1rem; transition: border-color .12s; }
.avatar-picture img { display: block; width: 100%; height: auto; }
.avatar-name { display: block; margin-top: .25rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .75rem; color: var(--text-3); }
.avatar.chosen .avatar-picture { border-color: var(--accent); }
.avatar.focused { transform: scale(1.08); }
.avatar.focused .avatar-picture { border-color: var(--focus); box-shadow: 0 .75rem 1.6rem rgba(0,0,0,.65); }
.avatar.focused .avatar-name { color: var(--text); }

/* TV guide: cards, banner, player */
.card-now { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .68rem; color: var(--text-2); }
.card-live { height: .18rem; margin-top: .3rem; overflow: hidden; border-radius: .09rem; background: rgba(255,255,255,.25); }
.card-live-fill, .epg-fill { height: 100%; background: var(--accent); }
.card.has-guide .card-caption { padding-bottom: .4rem; }
.card.has-guide .card-progress { display: none; }
.card.is-live.has-guide .art img { padding-bottom: 24%; }
.card.is-live.has-guide .art-fallback { padding-bottom: 2.2rem; }
.epg-now, .epg-next { display: flex; align-items: baseline; min-width: 0; white-space: nowrap; }
.epg-now { font-weight: 600; }
.epg-time { flex: none; margin-right: .7rem; font-size: .85em; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.epg-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.epg-bar { max-width: 24rem; height: .26rem; margin: .35rem 0 .45rem; overflow: hidden; border-radius: .13rem; background: rgba(255,255,255,.2); }
.epg-next { font-size: .82rem; color: var(--text-2); }
.epg-label { flex: none; margin-right: .55rem; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.hero-epg { margin-top: .45rem; }
.hero.with-guide .hero-title { max-height: 1.2em; -webkit-line-clamp: 1; font-size: 2.1rem; }
.player-epg { max-width: 44rem; margin-top: .55rem; }

/* TV Guide screen */
.guide-screen { display: flex; flex-direction: column; padding: 1.5rem 2rem 0; background: radial-gradient(circle at 0 0, #1f0d16 0, rgba(7,8,12,0) 40%), var(--bg); }
.guide-head { display: flex; flex: none; align-items: center; padding-right: 4rem; }
.guide-category { min-width: 0; margin: 0 1rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; color: var(--text-2); }
.guide-pick { flex: none; margin-left: auto; }
.guide-detail { flex: none; height: 9.4rem; margin-top: .7rem; overflow: hidden; }
.guide-detail-channel { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.guide-detail-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 1.65rem; font-weight: 700; }
.guide-detail-meta { display: flex; align-items: center; height: 1.8rem; font-size: .85rem; font-weight: 500; color: var(--text-2); }
.guide-detail-progress { display: flex; align-items: center; margin-left: 1rem; }
.guide-detail-progress .live-badge { margin: 0 .8rem 0 0; }
.guide-detail-progress .epg-bar { width: 12rem; margin: 0; }
.guide-detail-text { display: -webkit-box; max-width: 52rem; max-height: 2.9em; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: .85rem; color: var(--text-2); }
.guide-times { display: flex; flex: none; align-items: stretch; height: 2rem; border-bottom: 1px solid var(--line); }
.guide-corner { flex: none; align-self: center; width: 14rem; font-size: .75rem; font-weight: 600; color: var(--text-3); }
.guide-ruler { position: relative; flex: 1; margin-left: .3rem; }
.guide-tick { position: absolute; top: .45rem; padding-left: .45rem; border-left: 1px solid var(--line-strong); font-size: .74rem; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.guide-now-line { position: absolute; top: 0; bottom: 0; width: .14rem; background: var(--accent); }
.guide-rows { flex: 1; min-height: 0; margin-top: .3rem; }
.guide-rows .cell { padding: .15rem 0; }
.guide-row { display: flex; height: 100%; }
.guide-name { display: flex; flex: none; align-items: center; width: 14rem; padding: 0 .55rem; border-radius: .5rem; background: var(--surface); font-size: .85rem; cursor: pointer; }
.cell.selected .guide-name { background: var(--raised); }
.cell .channel-focused .guide-name { background: var(--focus); color: var(--inverse); }
.guide-logo { position: relative; flex: none; width: 3.5rem; height: 2.5rem; margin-right: .65rem; border-radius: .35rem; }
.guide-logo img { object-fit: contain; }
.guide-logo .art-fallback { padding: 0; font-size: 1rem; }
.guide-track { position: relative; flex: 1; min-width: 0; margin-left: .3rem; overflow: hidden; }
.programme { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 0 .6rem; border-right: .18rem solid var(--bg); border-radius: .5rem; background: var(--surface); cursor: pointer; }
.programme.on-now { background: var(--elevated); box-shadow: inset 0 -.14rem 0 var(--accent); }
.programme-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .85rem; font-weight: 600; }
.programme-time { overflow: hidden; white-space: nowrap; font-size: .68rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.programme.focused { background: var(--focus); color: var(--inverse); box-shadow: none; }
.programme.focused .programme-time { color: var(--inverse); }
.empty-programme { color: var(--text-3); }
.empty-programme .programme-title { font-weight: 400; }
.category-screen { display: flex; flex-direction: column; padding: 2rem 4rem 0; }
.category-list { flex: 1; width: 100%; max-width: 48rem; min-height: 0; margin-top: 1.2rem; }

/* Audio language filter */
.language-screen { display: flex; flex-direction: column; padding: 3rem 4rem 0; text-align: center; }
.language-grid { display: flex; flex-wrap: wrap; align-content: flex-start; flex: 1; min-height: 0; margin-top: 1.8rem; padding: .3rem 0 2rem; overflow-y: auto; }
.language { display: flex; flex: none; align-items: center; justify-content: space-between; width: -webkit-calc(25% - .8rem); width: calc(25% - .8rem); height: 3.6rem; margin: 0 .4rem .8rem; padding: 0 1.1rem; border: 2px solid transparent; border-radius: .7rem; background: var(--surface); text-align: left; }
.language-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.language-count { margin-left: .6rem; font-size: .8rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.language.chosen { border-color: var(--accent); background: var(--accent-soft); }
.language.focused { border-color: var(--focus); background: var(--focus); color: var(--inverse); }
.language.focused .language-count { color: var(--inverse); }

/* Series */
.series { display: flex; flex-direction: column; padding: 2.5rem 4rem 0; }
.series-backdrop { position: absolute; top: 0; right: 0; width: 70%; height: 26rem; overflow: hidden; }
.series-backdrop img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.series-backdrop.loaded img { opacity: .65; }
.series-backdrop.soft.loaded img { opacity: .22; }
.series-backdrop:after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(to right, #07080c 0, rgba(7,8,12,0) 55%), linear-gradient(to top, #07080c 0, rgba(7,8,12,0) 60%); }
.back-button { position: absolute; top: 1.2rem; right: 1.5rem; z-index: 4; }
.series-hero { position: relative; display: flex; flex: none; align-items: flex-end; margin-bottom: 1.4rem; }
.series-poster { position: relative; flex: none; width: 8.8rem; height: 13.2rem; margin-right: 2rem; border-radius: .6rem; box-shadow: 0 1rem 2.5rem rgba(0,0,0,.6); }
.series-poster img { object-fit: cover; }
.series-info { min-width: 0; max-width: 44rem; }
.series .headline { font-size: 2.7rem; letter-spacing: -.035em; }
.series-plot { display: -webkit-box; max-height: 4.4em; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; margin-top: .6rem; font-size: .85rem; color: var(--text-2); }
.series-actions { display: flex; flex-wrap: wrap; margin-top: 1.1rem; }
.series-actions .button { margin: 0 .65rem .3rem 0; }
.series-status { position: relative; margin-top: 3rem; text-align: center; color: var(--text-2); }
.series-body { position: relative; display: flex; flex: 1; min-height: 0; }
.series-body .seasons { flex: none; width: 14rem; margin-right: 1.3rem; }
.series-body .episodes { flex: 1; min-width: 0; }
.episodes .cell { padding: .2rem 0; }
.episode { background: var(--surface); }
.episode-number { flex: none; width: 2.2rem; font-size: 1rem; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.episode-image { position: relative; flex: none; width: 7.4rem; height: 4.2rem; margin-right: 1.1rem; border-radius: .35rem; }
.episode-image img { object-fit: cover; }
.episode-image .art-fallback { font-size: 1.2rem; }
.episode .row-name { color: var(--text); }
.episode .icon { margin-left: 1rem; color: var(--text-3); }
.episodes .cell.focused .row { background: var(--focus); }
.episodes .cell.focused .row-name, .episodes .cell.focused .result-kind, .episodes .cell.focused .episode-number, .episodes .cell.focused .row > .icon { color: var(--inverse); }

/* Player */
.player { background: #000; }
.player.idle { cursor: none; }
.video-surface, .video-surface video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; }
.video-surface video { object-fit: contain; }
.player > .loading { position: absolute; top: 50%; left: 0; width: 100%; margin-top: -2rem; pointer-events: none; }
.player-ui { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity .25s; }
.player-ui.faded { opacity: 0; }
.icon-button.player-close { position: absolute; top: 1.5rem; left: 1.5rem; pointer-events: auto; background: rgba(0,0,0,.6); }
.player-bottom { position: absolute; bottom: 0; left: 0; width: 100%; padding: 7rem 4rem 1.8rem; pointer-events: auto;
  background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0, rgba(0,0,0,.75) 45%, rgba(0,0,0,.94) 100%);
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,.75) 45%, rgba(0,0,0,.94) 100%); }
.faded .icon-button.player-close, .faded .player-bottom { pointer-events: none; }
.live-badge { display: inline-block; margin-bottom: .5rem; padding: .1rem .6rem; border-radius: .3rem; background: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.player-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 2.1rem; font-weight: 700; }
.player-subtitle { margin-top: .15rem; color: var(--text-2); }
.player-progress { display: flex; align-items: center; margin-top: .9rem; }
.bar { flex: 1; margin: 0 .9rem; padding: .55rem 0; cursor: pointer; }
.bar-track { height: .32rem; overflow: hidden; border-radius: .16rem; background: rgba(255,255,255,.22); }
.bar-fill { width: 0; height: 100%; background: var(--accent); }
.player-time { min-width: 3.2rem; font-size: .8rem; font-weight: 500; text-align: center; font-variant-numeric: tabular-nums; }
.player-controls { display: flex; align-items: center; margin-top: .9rem; }
.spacer { flex: 1; }
.icon-button { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 1rem; transition: background-color .12s; }
.icon-button:hover { background: rgba(255,255,255,.24); }
.icon-button.disabled { opacity: .35; cursor: default; }
.icon-button.on { color: var(--accent-text); }
.player-controls .icon-button { margin-right: .6rem; }
.player-controls .icon-button:last-child { margin-right: 0; }
.player-controls .large { width: 3.4rem; height: 3.4rem; background: #fff; color: var(--inverse); font-size: 1.2rem; }
.player-controls .large:hover { background: #dfe1e6; }
.player-hints { display: flex; margin-top: 1rem; }
.hint { display: flex; align-items: center; margin-right: 1.5rem; font-size: .75rem; color: var(--text-2); }
.hint-key { margin-right: .5rem; padding: .05rem .5rem; border-radius: .3rem; background: rgba(255,255,255,.15); font-weight: 600; color: var(--text); }
.player-error { position: absolute; top: 0; left: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--bg); }

/* Dialogs, loading, messages */
.dialog-backdrop { position: absolute; top: 0; left: 0; z-index: 10; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: rgba(0,0,0,.76); }
.dialog { width: 36rem; max-width: 92%; padding: 2rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: 0 1.5rem 4rem rgba(0,0,0,.6); text-align: center; }
.dialog-title { font-size: 1.45rem; font-weight: 700; line-height: 1.25; }
.dialog-message { margin-top: .65rem; color: var(--text-2); }
.dialog-buttons { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 1.6rem; }
.dialog-buttons .button { margin: .25rem .35rem; }
.loading { text-align: center; }
.spinner { display: inline-block; width: 2.8rem; height: 2.8rem; border: .28rem solid rgba(255,255,255,.14); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
.loading-label { margin-top: .75rem; color: var(--text-2); }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: absolute; top: 1.4rem; right: 1.4rem; z-index: 20; max-width: 30rem; margin-left: 1.4rem; padding: .85rem 1.2rem; border: 1px solid var(--line-strong); border-radius: .65rem; background: var(--raised);
  box-shadow: 0 .75rem 2rem rgba(0,0,0,.5); font-size: .88rem; font-weight: 500; opacity: 0; transform: translateY(-.5rem); pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: none; }

/* Subtitles */
.subtitle-layer { position: absolute; right: 6%; bottom: 14rem; left: 6%; text-align: center; pointer-events: none; transition: bottom .25s; }
.player.idle .subtitle-layer { bottom: 3.5rem; }
.subtitle-layer span { display: inline; padding: .08em .4em; border-radius: .2em; background: rgba(0,0,0,.74); font-weight: 500; line-height: 1.55; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.subtitle-layer.size-small { font-size: 1.3rem; }
.subtitle-layer.size-medium { font-size: 1.75rem; }
.subtitle-layer.size-large { font-size: 2.35rem; }
.subtitle-menu { position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; display: flex; flex-direction: column; width: 22rem; max-width: 100%; padding: 2rem 1.4rem 1.6rem; border-left: 1px solid var(--line); background: #0c0e14; }
.subtitle-head { display: flex; flex: none; align-items: center; margin-bottom: 1.1rem; }
.subtitle-close { margin-right: .8rem; }
.subtitle-title { font-size: 1.35rem; font-weight: 700; }
.subtitle-list { flex: 0 1 auto; min-height: 3rem; overflow-y: auto; }
.subtitle-heading { margin: .9rem .2rem .45rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.subtitle-heading:first-child { margin-top: 0; }
.subtitle-option { display: flex; flex: none; align-items: center; width: 100%; height: 2.8rem; margin-bottom: .3rem; padding: 0 .9rem; border-radius: .55rem; text-align: left; color: var(--text-2); }
.subtitle-option .icon { margin-left: .75rem; color: var(--accent-text); }
.subtitle-option.chosen { background: var(--elevated); color: var(--text); }
.subtitle-option.focused { background: var(--focus); color: var(--inverse); }
.subtitle-option.focused .icon { color: var(--inverse); }
.subtitle-note { margin: 0 .2rem .3rem; font-size: .8rem; color: var(--text-3); }
.subtitle-menu .field-label { flex: none; margin-top: auto; padding-top: 1rem; }
.subtitle-menu .segmented { flex: none; }
.setting-value { font-weight: 600; color: var(--accent-text); }

/* Privacy policy, terms and licences */
.document-screen { display: flex; flex-direction: column; padding: 2rem 2.5rem 0; }
.document-screen .page-title { flex: none; margin-bottom: 1rem; padding-right: 4rem; }
.document-body { flex: 1; min-height: 0; max-width: 52rem; overflow-y: auto; padding-bottom: 2.5rem; }
.document-date { margin-bottom: 1.2rem; font-size: .85rem; color: var(--text-3); }
.document-section { margin-bottom: 1.4rem; }
.document-heading { margin-bottom: .4rem; font-size: 1.1rem; font-weight: 600; }
.document-text { margin-bottom: .5rem; font-size: .92rem; line-height: 1.55; color: var(--text-2); word-wrap: break-word; }

