/* NextGen Cable's look (Themes.kt): the TV app's colours, sizes for a PC screen. theme.js replaces the colours
   with the playing channel's logo colours (AppThemes.fromColor), as on the TV. */
:root {
  --primary: #E53935; --secondary: #FFB300; --bg: #121218; --surface: #1E1E2E; --surface2: #2A2A3C;
  --text: #E6E1E5; --muted: #CACAD8; --accent: #0D1B3A; --accent-blue: #1565C0; --focus: #FFD600;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font: 15px 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; user-select: none; }
#app { position: fixed; inset: 0; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[data-focus] { outline: none; }
[data-focus]:focus { box-shadow: 0 0 0 3px var(--focus); }
.muted { color: var(--muted); }
.accent { color: var(--focus); font-weight: 700; }

.btn { background: var(--surface2); border-radius: 10px; padding: 9px 16px; font-weight: 700; }
.btn:hover { background: #34344a; }
.btn.icon { background: transparent; font-size: 20px; padding: 6px 10px; }
.btn.text { background: transparent; }
.btn.top { background: transparent; }
.btn.fav { color: var(--secondary); }

/* ---------- Main screen ---------- */
.home { position: absolute; inset: 0; display: flex; flex-direction: column; }
.home.bare { background: #000; }
.home.bare .topbar, .home.bare .chips, .home.bare .count, .home.bare .tickerband { display: none; }
.topbar { display: flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 64px; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brandline { display: flex; align-items: center; gap: 10px; }
.brandline.sub { justify-content: space-between; gap: 18px; font-size: 13px; color: var(--muted); font-weight: 500; }
.logo { width: 32px; height: 32px; filter: hue-rotate(var(--logo-turn, 0deg)); }
.logo.big { width: 72px; height: 72px; }
.title { font-size: 18px; font-weight: 700; }
.spacer { flex: 1; }
.search { flex: 1; max-width: 520px; background: var(--surface); color: var(--text); border: 2px solid var(--surface2); border-radius: 10px; padding: 10px 14px; font: inherit; outline: none; }
.search:focus { border-color: var(--focus); }
.chips { display: flex; gap: 8px; padding: 4px 14px 6px; overflow-x: auto; scrollbar-width: none; flex: none; }
.chip { background: var(--surface); border-radius: 18px; padding: 6px 14px; white-space: nowrap; font-weight: 600; }
.chip.on { background: var(--accent-blue); color: #fff; }
.count { padding: 0 16px; height: 22px; font-size: 12px; color: var(--muted); flex: none; }
.content { position: relative; flex: 1; min-height: 0; }
.home.bare .content { flex: 1; }

/* The "advertise with us" line along the bottom. */
.tickerband { position: relative; height: 34px; overflow: hidden; flex: none; }
.tickerband.on { background: rgba(0,0,0,.55); }
.tickerband .testtx { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 900; letter-spacing: .3em; white-space: pre; color: rgba(255,255,255,.22); font-size: 17px; pointer-events: none; }
.tickerband:not(.on) .testtx.withwords { display: none; }
.tickerband span { position: absolute; left: 0; top: 50%; margin-top: -0.65em; white-space: nowrap; font-weight: 700; color: #fff; font-size: 17px; }
.full-band { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; z-index: 5; }
.full-band span { font-size: 22px; }

/* ---------- Players ---------- */
.player { position: absolute; inset: 0; background: #000; overflow: hidden; }
.player video { width: 100%; height: 100%; object-fit: contain; display: block; }
.player.stretch video { object-fit: fill; }
.player webview { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 18px; color: #fff; font-weight: 600; }
.spinner { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 1+List */
.listmode { position: absolute; inset: 0; display: flex; gap: 14px; padding: 14px; }
.listmode .left { flex: 3; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.bigbox { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 100%; border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; }
.bigbox:focus { box-shadow: 0 0 0 3px var(--focus); }
.caption { padding: 8px 4px 0; font-weight: 700; color: var(--muted); }
.chlist { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 6px; min-width: 240px; }
.chrow { display: flex; align-items: center; background: var(--surface); border-radius: 8px; padding: 8px 10px; font-size: 13px; text-align: left; flex: none; }
.chrow.current { background: var(--accent-blue); color: #fff; }
.chrow .num { width: 44px; font-weight: 700; flex: none; }
.chrow .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chrow .star { color: var(--secondary); width: 16px; flex: none; }
/* The 1+List list: a heading over each block (NextgenCable Urdu ... MTA TV, Favorites, countries) and a small logo. */
.chhead { flex: none; padding: 8px 10px 2px; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--text); }
.chhead:first-child { padding-top: 0; }
.chrow .chlogo, .chrow .initials { width: 34px; height: 22px; margin-right: 8px; flex: none; border-radius: 4px; background: rgba(255,255,255,.06); object-fit: contain; }
.chrow .initials { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }

/* Separate TVs: 1×2, 2×2, 2×3, 3×3 */
.tiles { position: absolute; inset: 0; display: grid; gap: 4px; padding: 4px; background: #000; align-content: center; }
.tiles.t2 { grid-template-columns: 1fr 1fr; gap: 0; padding: 0; }
.tiles.t4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; align-content: stretch; }
.tiles.t6 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); align-content: stretch; }
.tiles.t9 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); align-content: stretch; }
.tile { position: relative; background: #000; overflow: hidden; cursor: pointer; min-height: 0; }
.tiles.t2 .tile { aspect-ratio: 16 / 9; }
.tile-hint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 6px 12px; border-radius: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: 13px; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; }
.tile:hover .tile-hint { opacity: 1; }
.tile.sound { box-shadow: inset 0 0 0 1px var(--focus); }
.tile:focus { box-shadow: inset 0 0 0 3px var(--focus); }
.speaker { position: absolute; right: 8px; top: 6px; font-size: 18px; z-index: 3; text-shadow: 0 1px 3px #000; }
.tile-label { position: absolute; left: 8px; bottom: 6px; z-index: 3; background: rgba(0,0,0,.6); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: 6px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.tile:focus .tile-label, .tile.show-label .tile-label, .tile:hover .tile-label { opacity: 1; }

/* ---------- Full screen ---------- */
.full { position: absolute; inset: 0; background: #000; overflow: hidden; container-type: inline-size; outline: none; }
.full .player { z-index: 0; }
.fbar { position: absolute; left: 0; right: 0; top: 0; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 8px 10px 26px;
  background: linear-gradient(rgba(0,0,0,.7), transparent); transition: opacity .3s; }
.fbar .btn { background: transparent; color: #fff; }
.ftitle { flex: 1; min-width: 0; }
.fname { font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.fgroup { font-size: 12px; color: rgba(255,255,255,.7); }
.fnumber { position: absolute; left: 16px; top: 16px; z-index: 6; background: rgba(0,0,0,.5); color: #fff; font-weight: 700; font-size: 18px; padding: 4px 10px; border-radius: 8px; }
.ftyped { position: absolute; right: 32px; top: 64px; z-index: 7; background: rgba(0,0,0,.6); color: #fff; font-weight: 700; font-size: 44px; padding: 8px 20px; border-radius: 12px; }
.ftip { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 6; max-width: 70%; background: rgba(0,0,0,.75); color: #fff; font-size: 17px; padding: 12px 20px; border-radius: 12px; text-align: center; }
.ferror { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7; background: rgba(0,0,0,.8); color: #fff; padding: 24px; border-radius: 12px; text-align: center; max-width: 60%; }
.fpad { position: absolute; right: 32px; top: 50%; transform: translateY(-50%); z-index: 8; display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; background: rgba(0,0,0,.8); padding: 12px; border-radius: 16px; }
.btn.pad { height: 64px; font-size: 22px; background: rgba(255,255,255,.12); color: #fff; }
.full .bug, .bigbox .bug { position: absolute; height: 12%; width: auto; max-width: 19.5%; object-fit: contain; opacity: .55; pointer-events: none; z-index: 2; }
.full .bug.tr, .bigbox .bug.tr { top: 3%; right: 2.5%; } .full .bug.tl, .bigbox .bug.tl { top: 3%; left: 2.5%; }
.full .bug.br, .bigbox .bug.br { bottom: 9%; right: 2.5%; } .full .bug.bl, .bigbox .bug.bl { bottom: 9%; left: 2.5%; }
.bigbox { container-type: inline-size; }
.bigbox .ownticker { font-size: clamp(11px, 2.4cqw, 20px); }
.ownticker { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: rgba(16,24,39,.9); color: #fff; font-weight: 700; overflow: hidden; white-space: nowrap; font-size: clamp(12px, 2vw, 22px); padding: .35em 0; }
.ownticker span { display: inline-block; padding-left: 100%; animation: crawl 28s linear infinite; }
@keyframes crawl { to { transform: translateX(-100%); } }

/* ---------- Ads ---------- */
.ad-full { position: absolute; inset: 0; z-index: 20; background: #000; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ad-full img, .ad-full video { height: 100%; max-width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.ad-full .ad-info { position: absolute; left: 0; right: 0; bottom: 54px; background: rgba(0,0,0,.6); padding: 6px 24px; font-weight: 700; font-size: 18px; }
.ad-full .visit { position: absolute; left: 0; right: 0; bottom: 28px; background: var(--focus); color: #000; font-weight: 700; padding: 4px 24px; font-size: 13px; }
.adbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; background: #000; padding: 4px 12px; font-size: 13px; font-weight: 700; color: var(--focus); }
.adbar .skip { color: rgba(255,255,255,.8); font-weight: 400; }
.adbar .skip.ready { background: #fff; color: #000; font-weight: 700; padding: 1px 8px; border-radius: 4px; }
.ad-card { position: absolute; right: 24px; bottom: 24px; z-index: 20; width: min(260px, 34%); border-radius: var(--radius); overflow: hidden; background: rgba(16,16,24,.9); cursor: pointer; }
.ad-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; display: block; }
.ad-card .ad-info { padding: 6px 10px; font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Boxes ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; }
.dialog { background: var(--surface); border-radius: 18px; padding: 20px 22px; min-width: 340px; max-width: 520px; max-height: 86vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.dialog.wide { max-width: 720px; width: 70vw; }
.dialog h2 { margin: 0 0 12px; font-size: 21px; }
.dialog p { color: var(--muted); line-height: 1.45; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.modes { display: flex; flex-direction: column; gap: 2px; }
.mode { position: relative; text-align: left; padding: 8px 12px; border-radius: 10px; }
.mode.on { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.mode.soon { opacity: .55; }
.mode-name { font-weight: 700; }
.mode-about { font-size: 12px; color: var(--muted); }
.mode .check { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--primary); font-weight: 700; }
.settings, .picklist { display: flex; flex-direction: column; gap: 4px; }
.setrow, .pick { text-align: left; padding: 10px 12px; border-radius: 10px; background: var(--surface2); }
.set-label { font-weight: 700; }
.set-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.packages .package { background: var(--surface2); border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
.packages .package.on { box-shadow: inset 0 0 0 2px var(--secondary); }
.pk-name { font-weight: 700; } .pk-has { font-size: 13px; color: var(--muted); }
.need { color: var(--text) !important; font-weight: 700; }
.progress { height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress .bar { height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.toast { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 60; background: rgba(20,20,30,.95); color: #fff; padding: 12px 20px; border-radius: 12px; max-width: 70vw; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.5); }

/* ---------- Start and sign-in ---------- */
.start, .signin { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 10px; background: var(--bg); }
.start-col { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 600px; }
.start p { margin: 0; line-height: 1.45; font-size: 17px; }
.start-pic { max-height: 300px; aspect-ratio: 16 / 9; object-fit: contain; border-radius: var(--radius); }
.contact { color: var(--focus); font-weight: 700; }
.visit-pill { background: var(--focus); color: #000; font-weight: 700; font-size: 14px; padding: 5px 14px; border-radius: 99px; }
.signin h1 { margin: 6px 0; font-size: 26px; }
.signin p { margin: 0; color: var(--muted); }
.signin a { color: var(--focus); }
.code { font-size: 46px; font-weight: 800; letter-spacing: .12em; color: #fff; margin: 8px 0; min-height: 56px; }
.notice { color: var(--secondary) !important; max-width: 520px; }
.field { width: 360px; background: var(--surface); color: var(--text); border: 2px solid var(--surface2); border-radius: 10px; padding: 11px 14px; font: inherit; outline: none; }
.field:focus { border-color: var(--focus); }
.links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* ---------- Iqra Quran (QuranSection.kt): Iqra Quran's screens in Cable TV's colours ---------- */
@font-face { font-family: 'Scheherazade'; src: url('shared/quran/scheherazade.ttf') format('truetype'); font-display: swap; }
.quran { position: absolute; inset: 0; z-index: 10; background: var(--bg); color: var(--text); display: flex; flex-direction: column;
  --q-size: 30px; --q-line: 1.9; --q-letter: #B8C6E0; --q-highlight: color-mix(in srgb, var(--surface2) 65%, var(--primary));
  --q-good: #43A047; --q-bad: #E53935; --q-gold: #F2C14E; }
.quran[lang=ur] { font-family: 'Segoe UI', 'Noto Nastaliq Urdu', 'Urdu Typesetting', system-ui, sans-serif; line-height: 1.6; }
.quran-screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.quran-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 48px 28px; display: flex; flex-direction: column; gap: 14px; }
.quran-ar { font-family: 'Scheherazade', serif; direction: rtl; text-align: right; font-size: var(--q-size); line-height: var(--q-line); color: var(--text); }
.quran-muted { color: var(--muted); font-size: 14px; }
.quran-accent { color: var(--secondary); }
.quran-center { text-align: center; justify-content: center; display: flex; }
.quran-h { margin: 6px 0 0; font-size: 18px; font-weight: 600; }
h2.quran-accent { margin: 6px 0 0; font-size: 22px; }
.quran-note { color: var(--secondary); margin: 0; }
.quran-note:empty { display: none; }
.quran-tip { color: var(--muted); font-size: 18px; margin: 0; }
.quran-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; gap: 60px; }
.quran-loading .spinner { position: static; margin: 0; }
.quran-error { background: var(--q-bad); color: #fff; text-align: center; padding: 8px; font-weight: 600; }
.quran-bad { color: var(--q-bad); font-weight: 600; }

/* The top bar (TopBar in Components.kt). */
.quran-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--accent); color: #fff; min-height: 64px; flex: none; }
.quran-bar-title { flex: 1; min-width: 0; font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quran-round { width: 46px; height: 46px; border-radius: 50%; background: var(--secondary); color: #111; font-size: 19px; font-weight: 700; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.quran-round.big { width: 72px; height: 72px; font-size: 28px; }
.quran-round.quran-back { background: transparent; color: #fff; font-size: 24px; }
.quran-home .quran-round.quran-back { color: var(--text); }
.quran[dir=rtl] .quran-back { transform: scaleX(-1); }
.quran-round:hover { filter: brightness(1.12); }
/* Yellow buttons get a dark gap inside the focus ring so the ring still shows. */
.quran .quran-round:focus, .quran .quran-choice.on:focus { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--focus); }

/* Home (HomeScreen.kt). */
.quran-head { display: flex; align-items: center; gap: 14px; }
.quran-logo { width: 72px; height: 72px; border-radius: 18px; }
.quran-head-text { flex: 1; }
.quran-title { font-size: 30px; font-weight: 700; color: var(--secondary); }
.quran-verse { text-align: center; color: var(--secondary); font-size: 30px; }
.quran-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.quran-chip { display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; padding: 10px 16px 10px 10px; background: var(--surface2); }
.quran[dir=rtl] .quran-chip { padding: 10px 10px 10px 16px; }
.quran-chip.on { color: #fff; font-weight: 700; }
.quran-dot { width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.quran-chip.on .quran-dot { background: #fff; }
.quran-add { width: 52px; height: 52px; padding: 0; justify-content: center; font-size: 26px; }
.quran-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quran-tile { position: relative; text-align: start; color: #fff; border-radius: 18px; padding: 18px; min-height: 190px; display: flex; flex-direction: column; gap: 6px; }
.quran-tile.wide { min-height: 0; width: 100%; }
.quran-tile:hover { filter: brightness(1.1); }
.quran-tile-icon { font-size: 38px; line-height: 1; }
.quran-tile-title { font-size: 22px; font-weight: 700; }
.quran-tile-sub { font-size: 15px; color: rgba(255,255,255,.88); }
.quran-stars { font-size: 22px; color: rgba(255,255,255,.6); letter-spacing: 2px; }
.quran-stars .on { color: var(--q-gold); }
.quran-bigstars .quran-stars { font-size: 64px; }

/* Qaida (QaidaScreens.kt). */
.quran-grid { display: grid; gap: 14px; }
.quran-grid.lessons { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.quran-grid.lessons .quran-tile { min-height: 150px; }
.quran-grid.letters { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.quran-grid.letters.wide { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.quran-letter { background: var(--q-letter); color: var(--bg); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; align-items: center; transition: background .2s; }
.quran-letter.on { background: var(--q-gold); }
.quran-letter .quran-ar { font-size: 40px; line-height: 1.9; color: var(--bg); text-align: center; width: 100%; }
.quran-letter-label { font-size: 14px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.quran-quiz { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 10px; }
.quran-ask { display: flex; align-items: center; gap: 16px; }
.quran-question { font-size: 24px; font-weight: 700; }
.quran-question.good { color: var(--q-good); }
.quran-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; width: 100%; }
.quran-option { aspect-ratio: 1.4; border-radius: 18px; background: var(--q-letter); display: flex; align-items: center; justify-content: center; }
.quran-option .quran-ar { font-size: 44px; color: var(--bg); text-align: center; }
.quran-option.good { background: var(--q-good); }
.quran-option.bad { background: var(--q-bad); }
.quran-big { font-size: 24px; margin: 0; }

/* Choices and steppers. */
.quran-choices { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.quran-choice { border-radius: 99px; padding: 10px 18px; background: var(--surface2); }
.quran-choice.on { background: var(--secondary); color: #111; font-weight: 700; }
.quran-choice:hover { filter: brightness(1.15); }
.quran-stepper { display: flex; align-items: center; gap: 12px; }
.quran-step-label { flex: 1; font-size: 18px; }
.quran-step { width: 48px; height: 48px; border-radius: 50%; background: var(--surface2); font-size: 26px; }
.quran-step-value { font-size: 22px; font-weight: 700; min-width: 44px; text-align: center; }
.quran-form { display: flex; flex-direction: column; gap: 14px; max-width: 900px; width: 100%; margin: 0 auto; }
.quran-sample { padding: 0 12px; }
.quran-options-panel { background: var(--surface2); padding: 12px 48px; display: flex; flex-direction: column; gap: 8px; flex: none; max-height: 45%; overflow-y: auto; }

/* Surahs and reading (ReadScreens.kt). */
.quran-list { display: flex; flex-direction: column; gap: 10px; }
.quran-surah { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: 18px; padding: 8px 14px; text-align: start; }
.quran-surah:hover, .quran-ayah:hover { background: var(--surface2); }
.quran-num { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--q-gold); font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.quran-surah-text { flex: 1; min-width: 0; }
.quran-surah-name { font-size: 19px; font-weight: 600; }
.quran-surah-ar { font-size: 26px; line-height: 1.6; color: var(--secondary); }
.quran-surah-head { background: var(--accent); color: #fff; border-radius: 18px; padding: 14px; text-align: center; }
.quran-head-ar { text-align: center; color: var(--q-gold); font-size: 30px; }
.quran-head-sub { font-size: 14px; color: rgba(255,255,255,.85); }
.quran-bismillah { text-align: center; color: #fff; font-size: 30px; }
.quran-ayah { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 18px; padding: 10px 14px; text-align: start; transition: background .2s; }
.quran-ayah.on { background: var(--q-highlight); }
.quran-ayah.on .quran-ar { color: var(--secondary); }
.quran-ayah .quran-ar { width: 100%; }
.quran-ur { width: 100%; text-align: right; font-size: 19px; line-height: 1.8; color: var(--muted); }
.quran-en { width: 100%; text-align: left; font-size: 17px; line-height: 1.5; color: var(--muted); }

/* Hifz (HifzScreens.kt). */
.quran-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 18px; padding: 10px; }
.quran-row-text { flex: 1; min-width: 0; }
.quran-juz { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.quran-juz-cell { aspect-ratio: 1.3; border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.quran-juz-cell.some, .quran-juz-cell.some small, .quran-juz-cell.full small { color: #fff; }
.quran-juz-cell.full b { color: var(--q-gold); }
.quran-juz-cell small { font-size: 11px; }
.quran-title-ar { font-size: 34px; color: var(--secondary); }
.quran-preview { background: var(--surface); border-radius: 18px; padding: 12px; font-size: 26px; max-height: 260px; overflow-y: auto; }
.quran-session { display: flex; flex-direction: column; align-items: stretch; gap: 16px; max-width: 1100px; width: 100%; margin: 0 auto; }
.quran-status { font-size: 20px; font-weight: 600; color: var(--secondary); text-align: center; }
.quran-progress { height: 8px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.quran-progress div { height: 100%; width: 0; background: var(--secondary); transition: width .3s; }
.quran-textbox { position: relative; background: var(--surface); border-radius: 18px; padding: 16px; display: flex; align-items: center; justify-content: center; }
.quran-session-ar { font-size: calc(var(--q-size) + 6px); text-align: center; width: 100%; }
.quran-session-ar.blurred { filter: blur(18px); opacity: .35; }
.quran-peek { position: absolute; color: var(--secondary); font-weight: 700; font-size: 18px; }

/* ---------- Namaz (PrayerScreens.kt) ---------- */
.quran-tiles { grid-template-columns: repeat(4, 1fr); }
.quran-round.quran-plain { background: transparent; color: #fff; }
.namaz { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.namaz-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.namaz-line { display: flex; flex-direction: column; --line: color-mix(in srgb, var(--muted) 60%, transparent); }
.namaz-row, .namaz-gap, .namaz-progress { display: flex; }
.namaz-row { height: 54px; align-items: center; color: var(--muted); }
.namaz-row.past { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.namaz-row.hl { color: var(--text); }
.namaz-side { width: 170px; flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-inline-end: 10px; position: relative; align-self: stretch; }
.namaz-time { font-size: 19px; font-weight: 500; }
.namaz-row.hl .namaz-time { font-size: 22px; font-weight: 700; }
.namaz-name { padding-inline-start: 12px; font-size: 22px; font-weight: 600; }
.namaz-row.hl .namaz-name { font-size: 26px; font-weight: 700; }
.namaz-node { width: 44px; flex: none; position: relative; align-self: stretch; }
.namaz-node::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--line); }
.namaz-gap.past .namaz-node::before { opacity: .4; }
.namaz-node i { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px; border-radius: 50%; border: 3px solid var(--line); background: var(--bg); box-sizing: border-box; }
.namaz-row.hl .namaz-node i { width: 30px; height: 30px; margin: -15px; border: 4px solid var(--text); }
.namaz-gap { height: 12px; }
.namaz-bell { width: 44px; height: 44px; border-radius: 50%; font-size: 20px; }
.namaz-bell.off { opacity: .55; }
.namaz-bell:hover { background: var(--surface2); }
.namaz-progress { height: 120px; font-weight: 700; font-size: 18px; }
.namaz-node.bar::before { width: 5px; margin-left: -2.5px; background: linear-gradient(#43A047 0 50%, #FFA726 50% 80%, #E53935 80% 100%); }
.namaz-node.bar b { position: absolute; left: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; }
.namaz-now-time, .namaz-now span { position: absolute; white-space: nowrap; }
.namaz-now-time { inset-inline-end: 10px; }
.namaz-now { flex: 1; position: relative; }
.namaz-now span { inset-inline-start: 8px; }
.namaz-after { text-align: center; color: var(--muted); }
.namaz-date { background: var(--surface2); border-radius: 24px; padding: 12px 20px; text-align: center; }
.namaz-weekday { font-size: 26px; font-weight: 700; }
.namaz-hijri { color: var(--secondary); font-size: 17px; font-weight: 600; }
.namaz-next { background: var(--accent); color: #fff; border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.namaz-next-label { opacity: .8; }
.namaz-next-name { font-size: 30px; font-weight: 700; }
.namaz-next-left { color: var(--q-gold); font-size: 20px; font-weight: 600; }
.namaz-mode-label { font-weight: 600; }
.namaz-credit { font-size: 13px; margin: 0; }

/* The Azan over everything, and the chime or message banner along the top (azan.js). */
.azan-full { position: fixed; inset: 0; z-index: 70; background: var(--bg); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px; text-align: center; }
.azan-akbar { font-family: 'Scheherazade', serif; font-size: 64px; color: var(--secondary); line-height: 1.6; }
.azan-title { font-size: 36px; font-weight: 700; }
.azan-time { font-size: 28px; color: var(--muted); }
.azan-stop { background: var(--secondary); color: #111; font-size: 20px; font-weight: 700; border-radius: 99px; padding: 14px 28px; }
.azan-stop:focus { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--focus); }
.azan-credit { font-size: 12px; color: var(--muted); }
.azan-banner { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 65; display: flex; align-items: center; gap: 14px; background: var(--accent); color: #fff; border-radius: 20px; padding: 16px 24px; box-shadow: 0 8px 30px rgba(0,0,0,.5); cursor: pointer; }
.azan-banner-icon { font-size: 30px; }
.azan-banner-title { font-size: 22px; font-weight: 700; }
.azan-banner-time { font-size: 17px; opacity: .85; }
/* Games (screens/games.js) */
.games { position: absolute; inset: 0; padding: 28px 36px; background: var(--bg, #0b0f1e); overflow-y: auto; }
.games-head { display: flex; align-items: baseline; gap: 18px; }
.games-head h1 { margin: 0; font-size: 30px; }
.games-sub { color: var(--muted); font-size: 15px; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin-top: 22px; }
.game-card { position: relative; border: 0; border-radius: 16px; padding: 22px 10px; background: var(--surface, #1d2238); color: var(--text); cursor: pointer; outline: none; }
.game-card:focus, .game-card:hover { box-shadow: 0 0 0 3px var(--focus); transform: scale(1.03); }
.game-icon { font-size: 50px; }
.game-name { font-size: 19px; font-weight: 700; margin-top: 8px; }
.game-rec { font-size: 14px; color: var(--muted); margin-top: 2px; }
.game-new { position: absolute; top: 8px; right: 8px; background: var(--focus); color: #000; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 6px; }
.games-more { color: var(--muted); margin-top: 26px; font-size: 14px; }
.game-frame { position: fixed; inset: 0; width: 100vw; height: 100vh; border: 0; z-index: 60; background: #000; }
.game-close { position: fixed; left: 12px; top: 12px; z-index: 61; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-weight: 700; font-size: 13px; opacity: .6; }
.game-close:hover { opacity: 1; }

/* Translation languages: the chosen ones on top, every other language in a grid that scrolls by itself. */
.quran-tr-picker { display: flex; flex-direction: column; gap: 10px; }
.quran-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 236px; overflow-y: auto; padding: 4px; scrollbar-color: var(--surface2) transparent; }
.quran-langs .quran-choice { text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Glass Cinema look (owner picked look A, 2026-10-22; same as the TV app's GlassLook) ----------
   See-through panels over a soft glow, round pills, and a solid white card on whatever the keyboard or
   remote is on. */
:root { --glass: rgba(255,255,255,.08); --glass-edge: rgba(255,255,255,.14); --glass-focus: #F4F4F8; --on-glass-focus: #121218; --radius: 16px; }
html, body { background: radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 55%),
  radial-gradient(ellipse at 90% 100%, color-mix(in srgb, var(--secondary) 25%, transparent), transparent 60%), var(--bg); }
#app { background: transparent; }
[data-focus]:focus, .bigbox:focus { box-shadow: 0 0 0 3px var(--glass-focus); }
.btn { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 999px; }
.btn:hover { background: rgba(255,255,255,.16); }
.btn.icon, .btn.text, .btn.top { border-color: transparent; }
.search { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 999px; }
.search:focus { border-color: var(--glass-focus); }
.chip { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 999px; padding: 6px 16px; }
.chip.on { background: var(--glass-focus); color: var(--on-glass-focus); border-color: var(--glass-focus); }
.chip:focus { background: var(--glass-focus); color: var(--on-glass-focus); }
.bigbox { border-radius: var(--radius); }
.chrow { background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 12px; transition: transform .12s; }
.chrow:hover { background: rgba(255,255,255,.14); }
.chrow.current { background: color-mix(in srgb, var(--primary) 32%, transparent); color: #fff; }
.chrow:focus { background: var(--glass-focus); color: var(--on-glass-focus); box-shadow: none; transform: scale(1.03); }
.chrow:focus .star { color: var(--on-glass-focus); }
.fbar { left: 16px; right: 16px; top: 12px; padding: 8px 12px; border-radius: 22px; background: rgba(0,0,0,.55);
  border: 1px solid var(--glass-edge); backdrop-filter: blur(18px); }
.dialog { background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--glass-edge); border-radius: 24px; backdrop-filter: blur(24px); }
.scrim { backdrop-filter: blur(6px); }

/* Right-click channel picker in the grid modes (2026-10-27). */
.pick { display: flex; flex-direction: column; gap: 10px; }
.pick-search { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35); color: inherit; }
.pick-list { max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.pick-row { text-align: left; font: inherit; padding: 8px 12px; border-radius: 8px; border: 0; background: rgba(255,255,255,.06); color: inherit; cursor: pointer; }
.pick-row:hover, .pick-row:focus { background: rgba(255,255,255,.18); outline: none; }

/* ======================================================================================================
   NextGen Cable 1.12.5's Glass look on PC (1.3.0): the same top bar, chips, channel list, colours and cards as the
   TV app (GlassLook in Glass.kt, focusGlow in Focus.kt, ChipRow, PlayerWithList and ModesMenu in ChannelListScreen.kt).
   ====================================================================================================== */
:root {
  /* Midnight's News and Home colours (Palette.panel, line, muted, soft, homeTop, homeBottom); theme.js replaces them
     with the playing channel's logo colours. */
  --panel: #0B1222; --line: #1E2C4A; --muted2: #8FA6CF; --soft: #B8C6E0; --home-top: #0B1022; --home-bottom: #1A1F45;
  --up: #4CD964; --down: #FF5A5F; --cp-red: #D71920; --cp-navy: #0A1A3A; --cp-sky: #2F6DB5; --cp-sky-dark: #173F7A; --cp-green: #1E8E3E;
}
/* The screen's background (GlassBackdrop): the theme's colours top to bottom, a big blurred copy of the playing
   channel's logo glowing through, darkened again so text on the panels stays easy to read. */
html, body { background: linear-gradient(var(--home-top), var(--bg), var(--home-bottom)) fixed; }
html::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--glow, none) center / cover no-repeat;
  opacity: .35; transform: scale(1.3); filter: blur(80px); }
html::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.55)); }
#app { z-index: 1; }

/* The remote's highlight everywhere (focusGlow): a soft white fill, a bright white ring, a little bigger. */
[data-focus]:focus { box-shadow: 0 0 0 3px var(--glass-focus); }
.btn:focus { background: rgba(244,244,248,.22); box-shadow: 0 0 0 3px var(--glass-focus); transform: scale(1.06); }

/* Top bar (TopAppBar): the logo and name with the clock and weather spread under them; the buttons on the right,
   each its icon with its name small under it (BarButton). */
.topbar { min-height: 64px; padding: 6px 12px 6px 16px; gap: 2px; }
.topbar .logo { width: 32px; height: 32px; border-radius: 10px; }
.brand { gap: 0; }
.brand .title { font-size: 18px; font-weight: 700; white-space: nowrap; }
.brandline.sub { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); }
.btn.bar { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; background: transparent; border: 0;
  border-radius: 10px; padding: 3px 5px; min-width: 44px; color: var(--text); transition: transform .12s; }
.btn.bar:hover { background: rgba(255,255,255,.10); }
.bar-icon { display: block; width: 22px; height: 22px; }
.bar-icon svg, .ico svg { display: block; width: 100%; height: 100%; }
.bar-label { font-size: 11px; font-weight: 700; line-height: 13px; white-space: nowrap; }
.bar-count { font-size: 10px; line-height: 10px; white-space: nowrap; opacity: .85; }
/* Buttons added to the bar the old way still sit in the same row and size. */
.topbar .btn.top, .topbar .btn.icon { border-radius: 10px; padding: 6px 8px; font-size: 13px; }

/* The filter row (ChipRow): round see-through pills 32 high, the picked one solid white; 1+List has the channel
   count at its right end, the other modes on a line under it. */
.chiprow { display: flex; align-items: center; flex: none; min-width: 0; }
.chiprow .chips { flex: 1; min-width: 0; padding: 6px 12px; gap: 10px; }
.chip { height: 32px; padding: 0 12px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 500;
  color: var(--text); flex: none; transition: transform .12s; }
.chip:focus { background: rgba(244,244,248,.22); color: var(--text); box-shadow: 0 0 0 3px var(--glass-focus); transform: scale(1.06); }
.chip.on:focus { background: var(--glass-focus); color: var(--on-glass-focus); }
.chiprow .count { height: auto; padding: 0 16px 0 8px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.home:not([data-mode=list]):not([data-mode=five]) .chiprow { flex-wrap: wrap; }
.home:not([data-mode=list]):not([data-mode=five]) .chiprow .count { flex-basis: 100%; height: 24px; display: flex; align-items: center; padding: 0 16px; }
/* Strip, News, CP24 and Dashboard: no count, and their own advertising line (the bottom band is theirs). */
.home[data-mode=strip] .count, .home[data-mode=news] .count, .home[data-mode=cp24] .count, .home[data-mode=home] .count,
.home[data-mode=strip] > .tickerband, .home[data-mode=news] > .tickerband, .home[data-mode=cp24] > .tickerband, .home[data-mode=home] > .tickerband { display: none !important; }
.home.bare .chiprow { display: none; }

/* 1+List (PlayerWithList): the list only as wide as a number and a name need (a fifth of the screen, 200 to 240),
   the picture everything else at its full height, stretched to fill it. */
.listmode { gap: 8px; padding: 4px 8px; }
.listmode .left { flex: 1; justify-content: stretch; }
.listmode .bigbox { flex: 1; height: 100%; aspect-ratio: auto; border-radius: 16px; }
.listmode .bigbox .player video { object-fit: fill; }
.listmode .bigbox:focus { box-shadow: 0 0 0 3px var(--glass-focus); }
.listmode .caption { display: none; }
.chlist { flex: none; width: clamp(200px, 20vw, 240px); min-width: 0; padding: 6px; gap: 6px; }
.chrow { padding: 8px 10px; border-radius: 12px; font-size: 13px; color: var(--text); }
.chrow .num { width: auto; min-width: 20px; margin-right: 8px; font-size: 13px; }
.chrow .chlogo, .chrow .initials { width: 34px; height: 22px; border-radius: 4px; }
.chrow:focus .chlogo { background: transparent; }
.chrow .star { color: var(--secondary); width: 16px; font-size: 14px; }
.chrow.current { color: #fff; }
.chrow:focus, .chrow.current:focus { transform: scale(1.04); background: var(--glass-focus); color: var(--on-glass-focus); }
.chlist { padding: 6px 10px; }
.chhead { font-size: 11px; letter-spacing: 1px; color: var(--text); padding: 6px 10px 2px; }

/* The Modes menu (ModesMenu): a dark see-through panel, 300 to 460 wide, each mode with its icon. */
.dialog { border-radius: 24px; }
.modes { gap: 2px; min-width: 300px; max-width: 460px; }
.mode { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 12px; transition: transform .12s; }
.mode:focus { background: rgba(244,244,248,.22); box-shadow: 0 0 0 3px var(--glass-focus); transform: scale(1.03); }
.mode-icon { width: 24px; height: 24px; flex: none; }
.mode-icon svg { display: block; width: 100%; height: 100%; }
.mode-text { flex: 1; min-width: 0; }
.mode-about { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode .check { position: static; transform: none; }

/* Separate TVs: the tile with the sound in the theme's highlight, the label as the TV draws it. */
.tile-label { font-size: 13px; border-radius: 12px; padding: 3px 10px; }

/* ---------- Strip (StripMode.kt) ---------- */
.strip { position: absolute; inset: 0; display: flex; flex-direction: column; background: #000; container-type: size; }
.strip-pic { position: relative; flex: 1; min-height: 0; background: #000; cursor: pointer; }
.strip-pic:focus { box-shadow: inset 0 0 0 4px #FFD54F; }
.strip-pic .player { z-index: 0; }
.strip-info { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 32px 36px; background: linear-gradient(rgba(0,0,0,.75), transparent); transition: opacity .5s; pointer-events: none; }
.strip-info.faded { opacity: 0; }
.strip-now { flex: 1; min-width: 0; }
.strip-title { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; }
.strip-num { color: #FFD54F; font-size: 26px; }
.strip-star { color: #FFD54F; }
.strip-details { color: rgba(255,255,255,.75); font-size: 13px; }
.strip-right { text-align: right; font-size: 13px; font-weight: 500; color: var(--muted); }
.strip-cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; display: none; background: #FFD54F; color: #000;
  font-weight: 700; font-size: 14px; padding: 6px 18px; border-radius: 99px; white-space: pre; }
.strip-pic:focus .strip-cue { display: block; }
.strip-band { position: relative; height: 40px; flex: none; background: #000; overflow: hidden; }
.strip-band span { position: absolute; left: 0; top: 50%; margin-top: -.65em; white-space: nowrap; font-weight: 700; color: #fff; font-size: 20px; }
.strip-bar { flex: none; height: 17cqh; min-height: 96px; display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: linear-gradient(var(--home-top), var(--home-bottom)); }
.strip-arrow { flex: none; align-self: center; width: 44px; height: 64%; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.strip-arrow:hover { background: rgba(255,255,255,.28); }
.strip-row { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; padding: 0 18px; }
.strip-btn, .strip-tile { flex: none; height: calc(max(17cqh, 96px) - 22px); border-radius: 8px; color: #fff; background: rgba(255,255,255,.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 10px; transition: transform .15s; position: relative; }
.strip-btn.strip-modes { width: calc((max(17cqh, 96px) - 22px) * 1.25); }
.strip-btn.group { width: calc((max(17cqh, 96px) - 22px) * 1.9); }
.strip-btn b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.strip-btn span { font-size: 12px; opacity: .75; margin-top: 4px; }
.strip-btn small { font-size: 11px; opacity: .75; }
.strip-icon { display: block; width: 26px; height: 26px; margin-bottom: 4px; }
.strip-icon svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.strip-tile { width: calc((max(17cqh, 96px) - 22px) * 16 / 9); background: rgba(255,255,255,.10); padding: 6px 8px; }
.strip-tile.live { background: rgba(255,255,255,.24); }
.strip-btn:focus, .strip-tile:focus { background: #FFD54F; color: #000; transform: scale(1.1); box-shadow: none; }
.strip-btn:focus { transform: scale(1.08); }
.strip-logo { height: 36%; width: 60%; display: flex; justify-content: center; margin-bottom: 3px; }
.strip-logo img, .strip-logo .initials { height: 100%; width: 100%; object-fit: contain; }
.strip-logo .initials { display: flex; align-items: center; justify-content: center; font-weight: 700; }
.strip-name { font-size: 12px; font-weight: 600; line-height: 14px; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.strip-name b { color: #FFD54F; }
.strip-tile:focus .strip-name b { color: #000; }
.strip-speaker, .strip-fav { position: absolute; top: 4px; font-size: 12px; display: none; }
.strip-speaker { left: 6px; } .strip-fav { right: 6px; display: block; color: #FFD54F; }
.strip-tile.live .strip-speaker { display: block; }
.strip-tile:focus .strip-fav { color: #000; }

/* ---------- News, CP24 and Dashboard (NewsMode.kt). Sizes in --u: the TV's layout is drawn for 960×540. ---------- */
.info { position: absolute; inset: 0; background: #000; overflow: hidden; }
.ilay { --u: 1px; position: absolute; inset: 0; display: flex; flex-direction: column; color: #fff; font-size: calc(var(--u) * 12); }
.ilay .soft { color: var(--soft); }
.ilay .muted2 { color: var(--muted2); }
.ilay .hi { color: var(--focus); }
.ilay .up { color: var(--up); } .ilay .down { color: var(--down); } .ilay .red { color: var(--cp-red); font-weight: 700; } .ilay .w { color: #fff; font-weight: 700; }
.wx { display: inline-block; vertical-align: middle; flex: none; }
.wx canvas { display: block; width: 100%; height: 100%; }
.ihead { color: var(--muted2); font-weight: 700; font-size: calc(var(--u) * 10); letter-spacing: calc(var(--u) * 1.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idiv { height: 1px; flex: none; background: var(--line); }

/* The live channel: LIVE, number and name bottom left, the sound top right, the menu chip top left. */
.ilive { position: relative; background: #000; overflow: hidden; cursor: pointer; flex: none; }
.ilive:focus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--focus) 70%, transparent); }
.ilive-pic { position: absolute; inset: 0; }
.ilive-chip { position: absolute; left: calc(var(--u) * 12); bottom: calc(var(--u) * 12); z-index: 3; display: flex; align-items: center; gap: calc(var(--u) * 6);
  background: rgba(0,0,0,.6); border-radius: 12px; padding: calc(var(--u) * 4) calc(var(--u) * 8); font-size: calc(var(--u) * 14); max-width: 80%; }
.ilive-chip:empty { display: none; }
.ilive-chip b { color: var(--focus); }
.ilive-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilive-tag { background: #E53935; color: #fff; font-weight: 700; font-size: calc(var(--u) * 10); border-radius: 12px; padding: calc(var(--u) * 1) calc(var(--u) * 5); margin-right: calc(var(--u) * 2); }
.ilive-sound { position: absolute; right: calc(var(--u) * 10); top: calc(var(--u) * 10); z-index: 3; background: rgba(0,0,0,.6); border-radius: 12px; padding: calc(var(--u) * 4); font-size: calc(var(--u) * 14); }
.ilive-menu { position: absolute; left: calc(var(--u) * 10); top: calc(var(--u) * 10); z-index: 4; background: rgba(0,0,0,.5); color: #fff; border-radius: 12px;
  padding: calc(var(--u) * 4) calc(var(--u) * 10); font-size: calc(var(--u) * 12); font-weight: 700; opacity: .75; }
.ilive-menu:hover { opacity: 1; background: rgba(0,0,0,.75); }
.ilive-hint { position: absolute; left: 50%; top: calc(var(--u) * 12); transform: translateX(-50%); z-index: 4; background: var(--focus); color: #000; font-weight: 700;
  font-size: calc(var(--u) * 12); border-radius: 12px; padding: calc(var(--u) * 5) calc(var(--u) * 12); white-space: nowrap; transition: opacity .5s; pointer-events: none; }
.ilive-hint.gone { opacity: 0; }

/* Panels. */
.ipanel { flex: none; min-height: 0; overflow: hidden; }
.cw { padding: calc(var(--u) * 8) 0 calc(var(--u) * 4); }
.cw-top { display: flex; align-items: flex-end; justify-content: space-between; gap: calc(var(--u) * 6); }
.cw-top > div:first-child { white-space: nowrap; }
.cw-time { font-size: calc(var(--u) * 34); line-height: calc(var(--u) * 36); font-weight: 700; }
.cw-ampm { font-size: calc(var(--u) * 13); font-weight: 700; }
.cw-now { display: flex; align-items: center; font-size: calc(var(--u) * 26); font-weight: 700; white-space: nowrap; }
.cw-sub { display: flex; justify-content: space-between; color: var(--soft); font-size: calc(var(--u) * 11); }
.cw-city { color: var(--focus); font-size: calc(var(--u) * 11); }
.cw-city:empty { display: none; }
.cw-days { display: flex; justify-content: space-between; padding-top: calc(var(--u) * 6); }
.cw-days.compact { padding-top: calc(var(--u) * 3); }
.cw-day { display: flex; flex-direction: column; align-items: center; font-size: calc(var(--u) * 13); font-weight: 700; }
.cw-day b { color: var(--soft); font-size: calc(var(--u) * 10); }
.cw-day i { font-style: normal; color: #7FB3FF; font-size: calc(var(--u) * 9); font-weight: 400; }
.cw-days.compact .cw-day { flex-direction: row; gap: calc(var(--u) * 2); font-size: calc(var(--u) * 11); }
.pr-panel { padding: calc(var(--u) * 4) 0; }
.pr-row { display: flex; justify-content: space-between; padding-top: calc(var(--u) * 3); }
.pr { display: flex; flex-direction: column; align-items: center; }
.pr span { color: var(--muted2); font-size: calc(var(--u) * 9); }
.pr b { font-size: calc(var(--u) * 12); }
.pr.next span, .pr.next b { color: var(--focus); }
.pr-extra { font-size: calc(var(--u) * 10); padding-top: calc(var(--u) * 4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-extra:empty { display: none; }
.traffic-box { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.traffic { position: relative; flex: 1; min-height: 0; background: #000; overflow: hidden; }
.tr-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: 0; transition: opacity .7s; animation: tr-drift 16s linear infinite alternate; }
.tr-img.on { opacity: 1; }
.tr-img.on + .tr-img:not(.on) { transition: none; }
@keyframes tr-drift { from { transform: scale(1); } to { transform: scale(1.07); } }
/* One line along the top, TRAFFIC then the name: Toronto's pictures carry their street name along the bottom (owner, 2026-10-27). */
.tr-top { position: absolute; left: 0; right: 0; top: 0; z-index: 1; display: flex; align-items: center; background: rgba(0,0,0,.65); font-weight: 700; font-size: calc(var(--u) * 15); line-height: 1.2; }
.tr-tag { flex: none; align-self: stretch; display: flex; align-items: center; background: #D32F2F; padding: 2px 6px; }
.tr-name { flex: 1; min-width: 0; padding: 2px 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.traffic-box > .ipanel, .traffic-box > .pbox { flex: 1; }
.hl { display: flex; align-items: center; min-height: 0; }
.hl-red { align-self: stretch; width: calc(var(--u) * 92); flex: none; background: #C62828; display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; font-size: calc(var(--u) * 12); line-height: calc(var(--u) * 13); }
.hl-text { flex: 1; min-width: 0; padding: 0 calc(var(--u) * 12); }
.hl-title { font-weight: 700; font-size: calc(var(--u) * 16); line-height: calc(var(--u) * 19); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hl-text .muted2 { font-size: calc(var(--u) * 10); }
.irow { display: flex; align-items: center; gap: 0; padding: 0 calc(var(--u) * 12); font-size: calc(var(--u) * 13); white-space: nowrap; overflow: hidden; min-height: 0; }
.irow > b:first-child { margin-right: calc(var(--u) * 14); }
.crawl { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 0; font-size: calc(var(--u) * 13); white-space: nowrap; }
.crawl-text { display: inline-block; padding-left: 100%; animation: crawl 60s linear infinite; }
.itick { position: relative; overflow: hidden; min-height: 0; background: var(--bg); }
.itick span { position: absolute; left: 0; top: 50%; margin-top: -.65em; white-space: nowrap; font-weight: 700; color: #fff; font-size: calc(var(--u) * 17); }

/* News: the channel top left (three quarters wide), the panels down the right, the lines along the bottom. */
.info-news .ilay { background: var(--panel); }
.news-top { display: flex; flex: none; }
.news-top .ilive { width: min(75cqw, calc(75cqh * 16 / 9)); aspect-ratio: 16 / 9; }
.info { container-type: size; }
.news-side { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--panel); padding: 0 calc(var(--u) * 12); }
.news-bottom { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--panel); }
.news-bottom > .hl { flex: 1.35; } .news-bottom > .irow { flex: 1; } .news-bottom > .crawl { flex: .8; padding: 0 calc(var(--u) * 12); } .news-bottom > .itick { flex: .9; }

/* CP24. */
.info-cp24 .ilay { background: #000; }
.c24-top { flex: 1; min-height: 0; display: flex; }
.c24-left { flex: none; display: flex; flex-direction: column; width: min(75cqw, calc((100cqh - var(--u) * 135) * 16 / 9)); }
.c24-left .ilive { width: 100%; aspect-ratio: 16 / 9; }
.c24-band { flex: 1; min-height: 0; background: var(--cp-navy); display: flex; }
.c24-story { flex: 1; display: flex; align-items: center; gap: calc(var(--u) * 10); padding: calc(var(--u) * 8) calc(var(--u) * 14); min-width: 0; }
.c24-sq { width: calc(var(--u) * 14); height: calc(var(--u) * 14); background: var(--cp-red); flex: none; }
.c24-story-title { font-size: calc(var(--u) * 19); line-height: calc(var(--u) * 23); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c24-col { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--cp-sky-dark); }
.c24-date { display: flex; align-items: center; background: var(--cp-red); padding: calc(var(--u) * 3) calc(var(--u) * 10); font-size: calc(var(--u) * 17); }
.c24-date > b { flex: 1; white-space: nowrap; }
.c24-now { display: flex; align-items: center; font-weight: 700; font-size: calc(var(--u) * 18); white-space: nowrap; }
.c24-clock { background: var(--cp-navy); padding: calc(var(--u) * 2) calc(var(--u) * 10); font-weight: 700; font-size: calc(var(--u) * 30); line-height: calc(var(--u) * 34); }
.c24-ampm { font-size: calc(var(--u) * 12); }
.c24-boxes { display: flex; flex-direction: column; height: calc(var(--u) * 150); background: linear-gradient(var(--cp-sky), var(--cp-sky-dark)); flex: none; }
.c24-slide-h { display: flex; align-items: center; padding: calc(var(--u) * 2) calc(var(--u) * 6); font-size: calc(var(--u) * 13); }
.c24-slide-h b { flex: 1; white-space: nowrap; overflow: hidden; }
.c24-slide-h span { font-size: calc(var(--u) * 8); opacity: .7; white-space: nowrap; }
.c24-slide { flex: 1; display: flex; align-items: center; min-height: 0; animation: c24-in .6s ease; }
@keyframes c24-in { from { opacity: 0; } to { opacity: 1; } }
.c24-says { width: 100%; padding: 0 calc(var(--u) * 8); font-size: calc(var(--u) * 17); font-weight: 700; line-height: 1.2; }
.c24-slide:has(.c24-says) { flex-direction: column; align-items: stretch; justify-content: space-evenly; }
.c24-says.warn { color: #ffd54f; }
.c24-emoji { font-size: calc(var(--u) * 26); line-height: 1.2; }
.c24-box.hi { color: var(--focus, #ffd54f); }
.c24-box strong.long { font-size: calc(var(--u) * 22); }
.c24-box b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c24-box { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 2); }
.c24-box b { font-size: calc(var(--u) * 16); }
.c24-box strong { font-size: calc(var(--u) * 30); line-height: 1.15; }
.c24-feels { display: flex; background: var(--cp-sky-dark); padding: calc(var(--u) * 3) calc(var(--u) * 4); font-size: calc(var(--u) * 18); font-weight: 700; white-space: nowrap; overflow: hidden; }
.c24-feels span { flex: 1; text-align: center; }
.c24-right-now { background: #fff; color: var(--cp-navy); font-weight: 700; font-size: calc(var(--u) * 15); padding: calc(var(--u) * 3) calc(var(--u) * 8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c24-big { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--panel); }
.c24-big > .traffic-box { flex: none; aspect-ratio: 16 / 9; max-height: calc(100% - var(--u) * 90); }
.c24-big > .pbox { flex: 1; }
.c24-rates { height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 calc(var(--u) * 10); }
.c24-rates .irow { flex-wrap: wrap; justify-content: center; }
.pbox { display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding: calc(var(--u) * 4) calc(var(--u) * 5); min-height: 0; overflow: hidden; text-align: center; }
.pbox-h { font-size: calc(var(--u) * 15); }
.pbox-pair { display: flex; gap: calc(var(--u) * 8); }
.pbox-green, .pbox-black { display: flex; flex-direction: column; align-items: center; border: calc(var(--u) * 2) solid #fff; border-radius: 12px; padding: calc(var(--u) * 4) calc(var(--u) * 14); }
.pbox-green { background: var(--cp-green); } .pbox-black { background: #000; }
.pbox-pair b { font-size: calc(var(--u) * 13); }
.pbox-green strong { font-size: calc(var(--u) * 26); } .pbox-black strong { font-size: calc(var(--u) * 22); }
.pbox .soft { font-size: calc(var(--u) * 15); white-space: nowrap; }
.pbox-all { display: flex; gap: calc(var(--u) * 3); width: 100%; }
.pbox-one { flex: 1; display: flex; flex-direction: column; align-items: center; background: #000; border: 1px solid rgba(255,255,255,.6); border-radius: 12px; padding: calc(var(--u) * 2) 0; }
.pbox-one.next { background: var(--cp-green); border: calc(var(--u) * 2) solid #fff; }
.pbox-one b { font-size: calc(var(--u) * 12); white-space: nowrap; } .pbox-one strong { font-size: calc(var(--u) * 21); white-space: nowrap; }
.pbox-in { font-size: calc(var(--u) * 16); }
.c24-line { display: flex; align-items: center; height: calc(var(--u) * 32); flex: none; background: #000; font-size: calc(var(--u) * 16); font-weight: 700; white-space: nowrap; overflow: hidden; }
.c24-line-label { align-self: stretch; display: flex; align-items: center; background: #E6E9F0; color: var(--cp-navy); font-size: calc(var(--u) * 13); padding: 0 calc(var(--u) * 8); }
.c24-line-label:empty { display: none; }
.c24-line-value { flex: 1; min-width: 0; padding: 0 calc(var(--u) * 8); overflow: hidden; text-overflow: ellipsis; }
.c24-line > b:last-child { padding-right: calc(var(--u) * 8); }
.c24-crawl { height: calc(var(--u) * 30); flex: none; background: var(--panel); display: flex; }
.c24-crawl .crawl { flex: 1; padding: 0 calc(var(--u) * 12); }
.c24-bottom { height: calc(var(--u) * 30); flex: none; display: flex; }
.c24-bottom .itick { flex: 1; }
.c24-num { width: calc(var(--u) * 56); background: var(--cp-red); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: calc(var(--u) * 18); }

/* Dashboard (Home): rounded glass cards round a big channel, on the theme's gradient. */
.info-home .ilay { background: linear-gradient(135deg, var(--home-top), var(--home-bottom)); padding: calc(var(--u) * 10); gap: calc(var(--u) * 10); }
.dash-top { display: flex; gap: calc(var(--u) * 10); flex: none; }
.dash-live { width: min(calc((100cqw - var(--u) * 30) * .825), calc((100cqh - var(--u) * 128) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: calc(var(--u) * 14); overflow: hidden; flex: none; position: relative; }
.dash-live .ilive { position: absolute; inset: 0; }
.dash-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--u) * 10); }
.dash-side > .card { flex: 1; } .dash-side > .card.tall { flex: 1.4; }
.dash-bottom { flex: 1; min-height: 0; display: flex; gap: calc(var(--u) * 10); }
.dash-bottom > .card { flex: 1; } .dash-bottom > .card.wide { flex: 2; }
.card { min-height: 0; overflow: hidden; border-radius: calc(var(--u) * 14); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.10); display: flex; flex-direction: column; justify-content: center; }
.dash-tick { height: calc(var(--u) * 24); flex: none; border-radius: calc(var(--u) * 14); overflow: hidden; background: rgba(0,0,0,.4); display: flex; }
.dash-tick .itick { flex: 1; background: transparent; } .dash-tick .itick span { font-size: calc(var(--u) * 14); }
.dash-remind { position: absolute; left: 50%; top: calc(var(--u) * 12); transform: translateX(-50%); z-index: 4; background: var(--focus); color: #000; font-weight: 700;
  font-size: calc(var(--u) * 14); border-radius: 99px; padding: calc(var(--u) * 6) calc(var(--u) * 16); white-space: nowrap; }
.dc, .dw, .dp, .ds { padding: calc(var(--u) * 8) calc(var(--u) * 14); min-height: 0; }
.dc-time { font-size: calc(var(--u) * 40); line-height: calc(var(--u) * 42); font-weight: 700; }
.dc-secs { font-size: calc(var(--u) * 18); font-weight: 700; color: var(--soft); }
.dc-ampm { font-size: calc(var(--u) * 14); font-weight: 700; color: var(--soft); }
.dc-day { font-size: calc(var(--u) * 12); }
.dc-hijri { font-size: calc(var(--u) * 11); color: var(--focus); }
.dw-now { display: flex; align-items: center; gap: calc(var(--u) * 8); font-size: calc(var(--u) * 12); }
.dw-temp { font-size: calc(var(--u) * 30); margin-right: calc(var(--u) * 2); }
.dw-now .soft { font-size: calc(var(--u) * 10); }
.dw-parts { display: flex; padding-top: calc(var(--u) * 4); }
.dw-parts > div { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: calc(var(--u) * 11); }
.dw-parts .soft { font-size: calc(var(--u) * 10); }
.dp { display: flex; flex-direction: column; justify-content: space-between; height: 100%; gap: calc(var(--u) * 4); }
.dp-top { display: flex; align-items: flex-end; justify-content: space-between; gap: calc(var(--u) * 6); font-size: calc(var(--u) * 14); }
.dp-name { font-size: calc(var(--u) * 20); white-space: nowrap; }
.dp-bar { height: calc(var(--u) * 5); border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.dp-bar i { display: block; height: 100%; background: var(--focus); }
.dp .pr span { font-size: calc(var(--u) * 9); } .dp .pr b { font-size: calc(var(--u) * 11); }
.ds { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.ds-head { display: flex; align-items: center; gap: calc(var(--u) * 6); }
.ds-dot { width: calc(var(--u) * 8); height: calc(var(--u) * 8); border-radius: 50%; background: var(--cp-red); flex: none; }
.ds-title { font-weight: 700; font-size: calc(var(--u) * 16); line-height: calc(var(--u) * 20); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ds-dots { display: flex; gap: calc(var(--u) * 4); }
.ds-dots i { width: calc(var(--u) * 5); height: calc(var(--u) * 5); border-radius: 50%; background: rgba(255,255,255,.2); }
.ds-dots i.on { background: var(--focus); }
.mk-panel { padding: calc(var(--u) * 6) calc(var(--u) * 12); height: 100%; display: flex; flex-direction: column; }
.mk-list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ilay .ihead { flex: none; }
.ds-title { flex: 0 1 auto; min-height: 0; -webkit-line-clamp: 2; }
.ds-dots { flex: none; }
.ilay .ihead { flex: none; }
.ds-title { flex: 0 1 auto; min-height: 0; -webkit-line-clamp: 2; }
.ds-dots { flex: none; }
.mk { display: flex; align-items: center; height: calc(var(--u) * 18); font-size: calc(var(--u) * 12); white-space: nowrap; }
.mk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mk-ch { width: calc(var(--u) * 56); padding-left: calc(var(--u) * 6); font-size: calc(var(--u) * 11); }

/* ---------- Video azan (AzanVideoPlayer.kt): the video over everything, the prayer and Stop along the bottom ---------- */
.azan-video { position: absolute; inset: 0; z-index: 2; background: #000; }
.azan-video-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.azan-video-cover { position: absolute; inset: 0; z-index: 1; }
.azan-video-bar { position: absolute; right: 24px; bottom: 24px; z-index: 2; display: flex; align-items: center; gap: 14px; background: rgba(0,0,0,.55);
  border-radius: 99px; padding: 6px 6px 6px 20px; color: #fff; font-size: 18px; font-weight: 600; }
.azan-video-bar .azan-stop { font-size: 16px; padding: 10px 18px; background: var(--accent); color: #fff; }

/* NextGen Remote's pairing code (RemoteCodeCard.kt): top right while a new phone waits. */
.remote-code { position: fixed; top: 32px; right: 32px; z-index: 70; background: var(--surface); border-radius: 16px; padding: 20px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.remote-code-app { color: var(--muted); font-size: 15px; }
.remote-code-digits { color: var(--secondary); font-size: 48px; font-weight: 700; letter-spacing: 8px; }
