/* RMC TV — one dark look for phones, tablets and TV screens (the remote's focus is a thick gold frame). */
:root {
  /* the RMC 1311 look: burgundy (#5a1530), the seal's gold (#e3b95c) and cream (#fafaf5), on a near-black ground for watching */
  --bg: #140a0f; --bg2: #1c0e15; --card: #26121c; --card2: #331824; --line: #4a2232;
  --ink: #fafaf5; --mute: #c9a9b4; --pri: #8a2448; --pri2: #5a1530; --gold: #e3b95c; --bad: #ff6b6b; --ok: #3ddc97;
  --r: 14px; --gap: 12px;
  font-size: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* the phone's safe edges (the notch, the home bar); drawn sideways on an upright iPhone (html.rot), they turn with it */
:root { --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom); --sal: env(safe-area-inset-left); --sar: env(safe-area-inset-right); }
html.rot { --sat: 0px; --sab: 0px; --sal: env(safe-area-inset-top); --sar: env(safe-area-inset-bottom); }
/* an iPhone held upright (Safari won't turn an app added to the home screen by itself): the app drawn sideways, so it is
   always the wide screen it's made for; the phone is just turned */
html.rot, html.rot body { overflow: hidden; height: 100%; }
html.rot body { position: fixed; top: 0; left: 0; width: var(--H); height: var(--W); min-height: 0; overflow: hidden; padding: 0; transform-origin: 0 0; transform: translateX(var(--W)) rotate(90deg); }
html.rot #app { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 var(--sar) 0 var(--sal); } /* the page scrolls in here; the player stays put over it */
html.rot #turn { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif; padding: var(--sat) var(--sar) var(--sab) var(--sal); }
body.tv { font-size: 20px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible, .tv :focus { outline: 4px solid var(--gold); outline-offset: 2px; }
img { display: block; }
[hidden] { display: none !important; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 14px 16px 40px; }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 48px; }
.top h1 { font-size: 1.35rem; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .logo { width: 40px; height: 40px; border-radius: 10px; }
.ibtn { flex: none; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 1.05rem; }
.ibtn:hover { background: var(--card2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--pri); color: #fff; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--pri2); }
.btn.alt { background: var(--card2); color: var(--ink); border: 1px solid var(--line); }
.btn.bad { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
.btn.wide { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mute { color: var(--mute); }
.small { font-size: .88rem; }
.err { color: var(--bad); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
h2 { font-size: 1.15rem; margin: 22px 0 10px; }

/* the first screen: the RMC TV seal */
.brand { display: grid; justify-items: center; gap: 6px; margin: 10px 0 22px; text-align: center; }
.brand img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.brand b { font-size: 1.8rem; letter-spacing: .12em; direction: ltr; }
.brand span { color: var(--mute); }

/* forms */
form.card { max-width: 560px; margin: 0 auto; display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-size: .92rem; color: var(--mute); }
input[type=text], input[type=url], input[type=password], input[type=search], input[type=number], select {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); font-size: 1rem; }
input:focus, select:focus { border-color: var(--gold); }
input[dir=ltr] { text-align: left; }
.check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1rem; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--pri); }

/* profiles */
.profiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.prof { display: flex; align-items: center; gap: 12px; text-align: start; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); min-height: 84px; }
.prof .av { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; background: var(--gold); color: var(--pri2); }
.prof b { display: block; }
.prof small { color: var(--mute); direction: ltr; unicode-bidi: plaintext; }

/* home */
.acct { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .92rem; color: var(--mute); margin-bottom: 14px; }
.acct b { color: var(--ink); font-weight: 600; }
.tiles { display: grid; gap: var(--gap); grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 150px; padding: 18px; text-align: start; border: 0; border-radius: 18px; color: #fff; font-size: 1.35rem; font-weight: 700; overflow: hidden; }
.tile span.em { position: absolute; top: 14px; inset-inline-start: 16px; font-size: 2.4rem; }
.tile small { font-size: .85rem; font-weight: 400; opacity: .85; }
.tile.live { background: linear-gradient(135deg, #b0304f, #5a1530); }
.tile.movie { background: linear-gradient(135deg, #8a2448, #3d0d20); }
.tile.series { background: linear-gradient(135deg, #c99a3e, #7a5414); }
.tiles.minor { grid-template-columns: repeat(4, 1fr); margin-top: var(--gap); }
.tiles.minor .tile { min-height: 84px; font-size: 1rem; background: var(--card); border: 1px solid var(--line); color: var(--ink); flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; }
.tiles.minor .tile span.em { position: static; font-size: 1.5rem; }
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr; } .tiles.minor { grid-template-columns: 1fr 1fr; }
  .tiles:not(.minor) .tile { min-height: 92px; justify-content: center; padding-inline-start: 84px; }
  .tiles:not(.minor) .tile span.em { top: 50%; transform: translateY(-50%); }
}

/* browse: categories beside the list (a scrolling row on phones) */
.browse { display: grid; grid-template-columns: 290px 1fr; gap: 16px; align-items: start; }
.cats { position: sticky; top: 10px; max-height: calc(100vh - 100px); overflow-y: auto; display: grid; gap: 4px; padding: 6px; background: var(--bg2); border-radius: var(--r); border: 1px solid var(--line); }
.cat { display: flex; justify-content: space-between; gap: 8px; text-align: start; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 0; background: transparent; }
.cat:hover { background: var(--card); }
.cat.on { background: var(--pri); color: #fff; }
.cat small { color: var(--mute); }
.cat.on small { color: #fff; }
@media (max-width: 760px) {
  .browse { grid-template-columns: 1fr; }
  .cats { position: static; display: flex; overflow-x: auto; overflow-y: hidden; max-height: none; scrollbar-width: none; }
  .cat { flex: none; white-space: nowrap; }
}
.tools { display: flex; gap: 10px; margin-bottom: 12px; }
.tools input { flex: 1; }
.subtabs { display: flex; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.subtabs .sub { min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--pri); background: transparent; color: var(--ink); }
.subtabs .sub small { color: var(--mute); margin-inline-start: 4px; }
.subtabs .sub.on { background: var(--gold); border-color: var(--gold); color: var(--pri2); font-weight: 700; }
.subtabs .sub.on small { color: var(--pri2); }
.count { color: var(--mute); font-size: .88rem; margin: 0 4px 8px; }

.chans { display: grid; gap: 6px; }
.chan { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 12px; text-align: start; border-radius: 12px; border: 1px solid transparent; background: var(--card); }
.chan:hover { border-color: var(--line); background: var(--card2); }
.chan .num { flex: none; width: 3em; color: var(--mute); font-size: .85rem; text-align: center; }
.chan .lg { flex: none; width: 64px; height: 44px; border-radius: 8px; background: var(--bg2); display: grid; place-items: center; overflow: hidden; font-weight: 700; color: var(--mute); }
.chan .lg img { width: 100%; height: 100%; object-fit: contain; }
.chan .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan .st { flex: none; color: var(--gold); }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tv .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.poster { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent; text-align: start; border-radius: 12px; }
.poster .im { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, var(--card2), var(--bg2)); display: grid; place-items: center; color: var(--mute); font-size: 2rem; font-weight: 700; }
.poster .im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster .rt { position: absolute; top: 6px; inset-inline-end: 6px; padding: 1px 7px; border-radius: 8px; background: rgba(0,0,0,.7); color: var(--gold); font-size: .78rem; }
.poster .pr { position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.2); }
.poster .pr i { display: block; height: 100%; background: var(--gold); }
.poster .nm { font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 0 2px; }
.poster:hover .im, .poster:focus .im { box-shadow: 0 0 0 3px var(--pri); }
.more { height: 40px; }
.empty { padding: 40px 10px; text-align: center; color: var(--mute); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 140px; gap: 12px; overflow-x: auto; padding: 4px 4px 10px; scrollbar-width: thin; }

/* details (movie, series) */
.detail { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.detail .cover { width: 100%; aspect-ratio: 2 / 3; border-radius: 16px; object-fit: cover; background: var(--card); }
.detail h1 { margin: 0 0 6px; font-size: 1.6rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--mute); font-size: .92rem; margin-bottom: 12px; }
.meta .gold { color: var(--gold); }
.plot { line-height: 1.8; margin: 12px 0; }
@media (max-width: 640px) { .detail { grid-template-columns: 1fr; } .detail .cover { max-width: 220px; margin: 0 auto; } }
.seasons { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.seasons .cat { flex: none; background: var(--card); }
.seasons .cat.on { background: var(--pri); color: #fff; }
.eps { display: grid; gap: 8px; }
.ep { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; padding: 6px 8px; text-align: start; border-radius: 12px; border: 1px solid transparent; background: var(--card); }
.ep:hover { background: var(--card2); }
.ep .th { position: relative; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--bg2); display: grid; place-items: center; color: var(--mute); }
.ep .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ep .th .pr { position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.2); }
.ep .th .pr i { display: block; height: 100%; background: var(--gold); }
.ep .ln { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; }
.ep .when { font-style: normal; font-size: .85em; color: var(--mute); }
.ep small { color: var(--mute); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* the player, over everything */
#player { position: fixed; inset: 0; z-index: 50; background: #000; display: grid; }
#player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
#player.fill video { object-fit: fill; }
#player.cover video { object-fit: cover; }
.pbar { position: absolute; inset-inline: 0; display: flex; align-items: center; gap: 8px; padding: 12px max(14px, var(--sar)) 12px max(14px, var(--sal)); transition: opacity .3s; }
.pbar.top { top: 0; padding-top: max(12px, var(--sat)); background: linear-gradient(rgba(0,0,0,.85), transparent); }
.pbar.bottom { bottom: 0; padding-bottom: max(12px, var(--sab)); background: linear-gradient(transparent, rgba(0,0,0,.85)); }
#player.idle .pbar { opacity: 0; pointer-events: none; }
#player.idle { cursor: none; }
.ptitle { flex: 1; min-width: 0; display: grid; }
.ptitle b, .ptitle small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptitle small { color: #ddd; }
.pbtn { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.2rem; }
.pbtn.big { width: 58px; height: 58px; font-size: 1.5rem; background: var(--gold); color: var(--pri2); min-height: 0; padding: 0; border-radius: 50%; box-shadow: none; } /* not the home screen's .big tiles */
.pbtn:hover { background: rgba(255,255,255,.28); }
#p-seek { flex: 1; min-width: 60px; accent-color: var(--gold); direction: ltr; }
#p-time { flex: none; font-size: .85rem; color: #ddd; font-variant-numeric: tabular-nums; }
#player.live #p-seek, #player.live #p-time, #player.live [data-p=back10], #player.live [data-p=fwd10] { display: none; }
#player.live .pbar.bottom { justify-content: center; }
/* the icons (drawn, the same on every phone: no emoji boxes) */
.pbtn { display: inline-grid; place-items: center; padding: 0; }
.pbtn svg { width: 24px; height: 24px; }
.pbtn.big svg { width: 30px; height: 30px; }
.pbtn .i-pause, #player.paused .pbtn .i-play { display: block; }
.pbtn .i-play, #player.paused .pbtn .i-pause { display: none; }
/* the tools: at the bottom, on the left (inline-end in Arabic), solid so they read over any picture */
.pbar.ptools { inset-inline: auto; inset-inline-end: 0; bottom: 0; padding: 12px max(14px, var(--sal)) max(12px, var(--sab)); background: none; gap: 8px; }
.pbar.ptools { z-index: 3; }
.pbar.bottom, .pbar.ptools { pointer-events: none; } .pbar.bottom > *, .pbar.ptools > * { pointer-events: auto; } /* (the bars' empty width never takes a tap meant for the other) */
#player.idle .pbar > * { pointer-events: none; }
.pbar.ptools .pbtn { background: rgba(38,18,28,.92); border: 1px solid rgba(255,255,255,.18); }
#player:not(.live) .pbar.ptools, .narrowp .pbar.ptools { bottom: calc(max(12px, var(--sab)) + 66px); padding-bottom: 0; }
@media (max-width: 700px) { #player .pbar.ptools { bottom: calc(max(12px, var(--sab)) + 66px); padding-bottom: 0; } }
@media (max-width: 560px) { #player [data-p=back10], #player [data-p=fwd10] { display: none; } }
/* a radio station's (or a recitation's) backgrounds, one fading into the next, slowly coming closer, with its name */
#p-art { position: absolute; inset: 0; pointer-events: none; overflow: hidden; background: #000; }
#p-art i { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 1.6s ease; transform: scale(1); }
#p-art i.on { opacity: 1; animation: artzoom 22s ease-out forwards; }
@keyframes artzoom { to { transform: scale(1.08); } }
/* the station's name and its flag: one line, up on the left, off the picture's middle */
#p-art .cap { position: absolute; left: max(20px, var(--sal)); top: max(16px, var(--sat)); display: block; max-width: 45%; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
#p-art .cap b { display: block; font-size: clamp(1rem, 2.2vw, 1.5rem); line-height: 1.3; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#p-art .cap small:empty { display: none; }
#p-art .cap.light { text-shadow: 0 1px 8px rgba(255,255,255,.9); } #p-art .cap.light b { color: #1a0c11; } /* a light picture: dark letters */
#p-art .cap.unk b { background: rgba(0,0,0,.42); padding: 2px 12px; border-radius: 10px; } /* a picture that can't be read: a soft band */
#p-art .cap b { transition: color .8s; }
#p-art .cap small { color: var(--gold); font-weight: 700; letter-spacing: .08em; direction: ltr; text-align: start; }
#p-art .credit { position: absolute; right: 12px; bottom: 6px; font-size: .7rem; color: rgba(255,255,255,.75); text-shadow: 0 1px 4px #000; max-width: 60%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bgs.small { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.bgt img.none { visibility: hidden; }
#player.art .pbar { background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); }
#player.art .pbar.bottom { background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.6)); }
.bgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 10px 0; }
.bgt { display: grid; gap: 6px; padding: 6px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); }
.bgt img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #000; }
.bgt span { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.bgt input { width: 20px; height: 20px; accent-color: var(--pri); }
.bgt.mine span { justify-content: space-between; }
.secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; margin: 8px 0; }
/* RMC's own mark in the picture's top corner (over the channel's, when it covers it) */
#p-logo { position: absolute; display: flex; align-items: center; justify-content: center; gap: .25em; direction: ltr; pointer-events: none; font-weight: 800; letter-spacing: .04em; color: var(--gold); line-height: 1; border-radius: 8px; }
#p-logo i { font-style: normal; color: #f6ead2; font-weight: 600; }
#p-logo.small { background: rgba(90,21,48,.55); opacity: .85; }
#p-logo.cover { background: #5a1530; border: 2px solid var(--gold); }
#p-ends { position: absolute; bottom: 92px; inset-inline-end: 24px; display: flex; gap: 10px; }
#p-stay { padding: 12px 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,.4); background: rgba(38,18,28,.85); color: #ddd; font: inherit; cursor: pointer; }
#p-stay:focus, #p-stay:hover { background: #f6ead2; color: #5a1530; outline: none; }
#p-skip { padding: 12px 22px; border-radius: 10px; border: 2px solid var(--gold); background: rgba(38,18,28,.92); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
#p-skip:focus, #p-skip:hover { background: var(--gold); color: #5a1530; outline: none; }
.sortb { flex: none; white-space: nowrap; }
#p-msg { position: absolute; inset: 0; margin: auto; width: min(560px, calc(100% - 32px)); height: max-content; padding: 20px; border-radius: 16px; background: rgba(38,18,28,.96); border: 1px solid var(--line); display: grid; gap: 12px; text-align: center; }
#p-msg .row { justify-content: center; }
.getapp ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 18px; }
.getapp li { display: grid; gap: 8px; } .getapp .btn { text-align: center; }
.apkbox { display: grid; gap: 6px; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.apkbox .row { margin: 0; }
#p-menu { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(380px, 86vw); overflow-y: auto; padding: max(12px, var(--sat)) 8px max(12px, var(--sab)); padding-inline-end: max(8px, var(--sal)); background: rgba(20,8,14,.97); border-inline-start: 1px solid var(--line); display: grid; align-content: start; gap: 4px; z-index: 5; } /* a column the screen's height, on the left */
#p-menu h3 { margin: 4px 8px 6px; font-size: 1rem; }
.pm-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: rgba(20,8,14,.97); z-index: 1; }
#p-menu .pm-head .pbtn { width: 38px; height: 38px; padding: 0; text-align: center; background: rgba(255,255,255,.14); border-radius: 50%; }
#p-menu button { text-align: start; padding: 10px 12px; border-radius: 10px; background: transparent; color: var(--ink); border: 0; font: inherit; cursor: pointer; }
#p-menu button.on, #p-menu button:hover, #p-menu button:focus-visible { background: var(--pri); }
#p-menu small { display: block; color: var(--mute); font-size: .8em; }
#p-spin { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; border: 5px solid rgba(255,255,255,.25); border-top-color: var(--gold); animation: spin 1s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 24px; inset-inline: 0; margin: auto; width: max-content; max-width: calc(100% - 32px); z-index: 80; padding: 10px 18px; border-radius: 12px; background: #000c; border: 1px solid var(--line); }
.loading { display: grid; place-items: center; padding: 60px 0; color: var(--mute); gap: 10px; }
.loading::before { content: ""; width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--gold); animation: spin 1s linear infinite; }
.help li { margin: 6px 0; }
.help b { color: var(--gold); }

/* ---------- the Smarters-like layout: a top bar, big tiles, panes ---------- */
.home, .sect { min-height: 100vh; display: flex; flex-direction: column; padding: 10px clamp(12px, 3vw, 40px) 14px; }
.bar { display: flex; align-items: center; gap: 12px; min-height: 60px; margin-bottom: 12px; }
.bar .logo { width: 44px; height: 44px; border-radius: 11px; }
.bar .brandname { font-size: 1.45rem; letter-spacing: .1em; direction: ltr; white-space: nowrap; }
.bar .sep { width: 2px; height: 26px; background: var(--line); }
.bar .ttl { font-size: 1.25rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .grow { flex: 1; }
.clk { display: grid; text-align: center; line-height: 1.2; margin-inline: 8px; }
.clk b { font-size: 1.2rem; } .clk small { color: var(--mute); font-size: .8rem; }
.clk small b.city { font-size: .85rem; color: var(--ink); font-weight: 800; }
.bar .ibtn { background: transparent; border-color: transparent; font-size: 1.35rem; min-width: 48px; height: 48px; }
.bar .ibtn:hover, .bar .ibtn:focus { background: var(--card); }

.board { flex: 1; display: grid; gap: 18px; grid-template-columns: 1.15fr 1fr 1fr 1fr; grid-template-rows: 1fr auto; align-content: center; max-height: 560px; margin: auto 0; width: 100%; }
.big { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 190px; padding: 18px; border: 0; border-radius: 18px; color: #fff; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: transform .15s; }
.big:hover, .big:focus { transform: scale(1.03); }
.big .ico svg { width: 92px; height: 92px; }
.big b { font-size: 1.7rem; letter-spacing: .02em; }
.big small { font-size: .95rem; opacity: .9; background: rgba(0,0,0,.25); padding: 2px 12px; border-radius: 99px; }
.big.live { grid-row: 1 / span 2; background: linear-gradient(160deg, #c4405f, #5a1530 70%); }
.big.live .ico svg { width: 130px; height: 130px; }
.big.movie { background: linear-gradient(160deg, #e3b95c, #9a6a1c); color: #2a0b16; }
.big.movie small { background: rgba(255,255,255,.35); }
.big.series { background: linear-gradient(160deg, #8a2448, #3d0d20); }
.big.sport { background: linear-gradient(160deg, #2f7a4a, #123d26); }
.minis { grid-column: 2 / span 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.mini { min-height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); font-weight: 600; font-size: 1.02rem; }
.mini:hover, .mini:focus { background: var(--pri); }
footer.acct { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 12px 6px 0; margin: 0; font-size: .95rem; }

.panes { flex: 1; display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 14px; min-height: 0; }
.panes.three { grid-template-columns: minmax(220px, 290px) minmax(0, 1fr) minmax(260px, 36%); }
.panes .cats { position: sticky; top: 10px; max-height: calc(100vh - 100px); align-content: start; grid-auto-rows: max-content; }
.cat small { flex: none; min-width: 2.2em; text-align: end; font-variant-numeric: tabular-nums; }
.mid { min-width: 0; }
.prev { position: sticky; top: 10px; align-self: start; min-height: 300px; border-radius: 16px; background: #000; border: 1px solid var(--line); display: grid; }
.pv-empty { margin: auto; text-align: center; font-size: 1.2rem; color: var(--mute); padding: 20px; }
.pv { display: grid; gap: 12px; justify-items: center; padding: 22px 18px; text-align: center; }
.pv .lg { width: 140px; height: 96px; border-radius: 12px; background: var(--bg2); display: grid; place-items: center; overflow: hidden; font-size: 2rem; font-weight: 700; color: var(--mute); }
.pv .lg img { width: 100%; height: 100%; object-fit: contain; }
.pv b { font-size: 1.25rem; }
.epg { width: 100%; display: grid; gap: 6px; text-align: start; }
.ep-row { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--card); }
.ep-row small { flex: none; color: var(--gold); min-width: 4.5em; }
.ep-row.now { background: var(--pri2); }
.chan.sel { background: var(--pri); color: #fff; }
.chan.sel .num { color: #fff; }

@media (max-width: 1000px) { .panes.three { grid-template-columns: minmax(200px, 260px) 1fr; } .prev { display: none; } }
@media (max-width: 760px) {
  .home, .sect { padding: 8px 12px 14px; }
  .bar .brandname, .bar .sep { display: none; }
  .board { grid-template-columns: 1fr 1fr; grid-template-rows: auto; max-height: none; }
  .big.live { grid-row: auto; grid-column: 1 / span 2; min-height: 170px; }
  .big { min-height: 150px; } .big .ico svg { width: 64px; height: 64px; } .big.live .ico svg { width: 90px; height: 90px; } .big b { font-size: 1.3rem; }
  .minis { grid-column: 1 / span 2; }
  .big.sport { grid-column: 1 / span 2; min-height: 120px; }
  .panes, .panes.three { grid-template-columns: 1fr; }
  .panes .cats { position: static; display: flex; overflow-x: auto; max-height: none; }
}
/* phones held sideways, like Smarters: everything on one screen */
@media (max-height: 500px) and (orientation: landscape) {
  .home, .sect { padding: 4px 18px 8px; } .bar { min-height: 48px; margin-bottom: 6px; }
  .board { grid-template-columns: 1.15fr 1fr 1fr 1fr; gap: 12px; }
  .big { min-height: 120px; } .big .ico svg { width: 56px; height: 56px; } .big.live .ico svg { width: 84px; height: 84px; } .big b { font-size: 1.25rem; }
  .big.live { grid-row: 1 / span 2; grid-column: auto; } .big.sport { grid-column: auto; } .minis { grid-column: 2 / span 3; } .mini { min-height: 44px; }
  .panes { grid-template-columns: minmax(180px, 240px) 1fr; } .panes.three { grid-template-columns: minmax(180px, 230px) minmax(0, 1fr) minmax(220px, 34%); }
  .panes .cats { position: sticky; display: grid; max-height: calc(100vh - 70px); } .prev { display: grid; min-height: 220px; }
  .chan { min-height: 50px; }
}

.brand .ver, .ver { color: var(--mute); font-size: .8rem; direction: rtl; }
/* the «a new version» bar: over everything on the page's screens (the tiles are tall and were covering it) */
#upd { position: relative; z-index: 20; }
.updbar { display: block; width: 100%; font: inherit; border: 0; cursor: pointer; margin: 0 0 8px; padding: 12px 16px; border-radius: 12px; background: var(--gold); color: var(--pri2); font-weight: 700; text-decoration: none; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.45); }

/* ---------- left to right, like Smarters (Arabic names still read right to left inside their boxes) ---------- */
.home, .sect { direction: ltr; }
.home [dir=auto], .sect [dir=auto] { unicode-bidi: plaintext; }
.sect .mid, .sect .prev, .sect .cats { text-align: left; }
.sect input[type=search] { direction: rtl; text-align: right; }
.home footer.acct, .home .big b, .home .big small, .bar .ttl, .clk { direction: rtl; }
.sect .cat { text-align: left; }
.sect .cat span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- more on one screen ---------- */
.sect .grid { gap: 10px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.tv .sect .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.poster .cap { position: absolute; inset-inline: 0; bottom: 0; padding: 22px 6px 6px; background: linear-gradient(transparent, rgba(0,0,0,.88)); color: #fff; font-size: .82rem; line-height: 1.3; text-align: center; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; z-index: 1; }
.poster .rt { inset-inline-end: auto; left: 6px; z-index: 1; background: #2a7de1; color: #fff; }
.poster .pr { z-index: 2; }
.poster .yr { position: absolute; top: 6px; right: 6px; z-index: 1; padding: 1px 7px; border-radius: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
body[data-grid=s] .sect .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
body[data-grid=s].tv .sect .grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
body[data-grid=s].tv .sect .panes:not(.three) { grid-template-columns: minmax(190px, 240px) 1fr; }
body[data-grid=s] .poster .cap { font-size: .7rem; padding: 16px 4px 4px; }
body[data-grid=s] .poster .rt, body[data-grid=s] .poster .yr { font-size: .66rem; padding: 0 5px; top: 4px; }
body[data-grid=l] .sect .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
body[data-grid=l].tv .sect .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.sect .chans { gap: 4px; }
.sect .chan { min-height: 52px; padding: 4px 10px; border-radius: 8px; }
.sect .chan .lg { width: 58px; height: 38px; }
.sect .count { display: none; }
.sect .tools { margin-bottom: 8px; }
.sect .tools input { min-height: 42px; }
.sect .cat { min-height: 46px; font-size: 1.02rem; }
@media (max-height: 500px) and (orientation: landscape) {
  .sect .grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .poster .cap { font-size: .74rem; }
  .sect .chan { min-height: 44px; } .sect .chan .lg { width: 50px; height: 32px; } .sect .cat { min-height: 40px; font-size: .95rem; padding: 6px 10px; }
  .sect .tools input { min-height: 38px; }
}

/* the clock: the day and date, then the time */
.clk { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.clk small { font-size: .85rem; }
@media (max-width: 560px) { .clk small { display: none; } }
/* «RMC» at the top of each big tile */
.big .rmc { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-family: Georgia, "Times New Roman", serif; font-size: .82rem; letter-spacing: .4em; padding-left: .4em; opacity: .85; direction: ltr; }
.big.movie .rmc { color: #2a0b16; }
/* nothing may push out of its pane (long names, big fonts) */
.panes > * { min-width: 0; }
.panes .cats { overflow-x: hidden; }
.cat, .chan { min-width: 0; max-width: 100%; }
.cat small { flex: none; padding-inline-start: 8px; }
.chan .nm { overflow: hidden; text-overflow: ellipsis; }
/* English: the forms and settings read left to right too */
body.en .wrap { direction: ltr; }
body.en .home footer.acct, body.en .home .big b, body.en .home .big small, body.en .bar .ttl, body.en .clk, body.en .sect input[type=search] { direction: ltr; text-align: left; }
.big { padding-top: 36px; }
body.en .home .big b, body.en .home .big small { text-align: center; }

/* ---------- 1.7: screens that stay put (each pane scrolls on its own), names that show ---------- */
textarea { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); font: inherit; resize: vertical; }
@media (orientation: landscape), (min-width: 761px) {
  .home, .sect { height: 100vh; min-height: 0; overflow: hidden; }
  .home .board { flex: 1; min-height: 0; max-height: none; margin: 0; align-content: stretch; }
  .home .big { min-height: 0; }
  .sect .panes { flex: 1; min-height: 0; }
  .sect .panes > * { height: 100%; max-height: none; overflow-y: auto; overscroll-behavior: contain; position: static; }
  .sect .mid .tools { position: sticky; top: 0; z-index: 3; background: var(--bg); padding-bottom: 6px; margin-bottom: 0; }
  .sect .prev { align-self: stretch; }
  footer.acct { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
  footer.acct span { overflow: hidden; text-overflow: ellipsis; }
}
/* the tile's refresh line, like Smarters' «Last updated» */
.big .tref { font-size: .8rem; opacity: .85; padding: 3px 10px; border-radius: 99px; background: rgba(0,0,0,.22); cursor: pointer; white-space: nowrap; }
.big .tref:hover { background: rgba(0,0,0,.4); }
.big.movie .tref { background: rgba(255,255,255,.3); }
/* channel rows: a small number and logo, so the name has the room */
.sect .chan { gap: 8px; padding: 4px 8px; }
.sect .chan .num { width: 2.1em; font-size: .78rem; }
.sect .chan .lg { width: 46px; height: 32px; border-radius: 6px; }
.sect .chan .nm { font-size: .95rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.panes.three { grid-template-columns: minmax(170px, 23%) minmax(0, 1fr) minmax(200px, 30%); }
@media (max-height: 500px) and (orientation: landscape) {
  .panes.three { grid-template-columns: minmax(160px, 24%) minmax(0, 1fr) minmax(180px, 28%); }
  .sect .chan .lg { width: 40px; height: 28px; } .sect .chan .num { width: 1.9em; }
  .big { padding-top: 26px; gap: 4px; } .big .ico svg { width: 46px; height: 46px; } .big.live .ico svg { width: 70px; height: 70px; } .big .rmc { top: 8px; }
}
.acctinfo { display: grid; gap: 6px; }
@media (max-width: 900px) { .sect .bar .brandname, .sect .bar .sep { display: none; } }

/* ---------- 1.8.1: a wider category column (names on up to two lines); logos over their letter ---------- */
.panes.three { grid-template-columns: minmax(200px, 30%) minmax(0, 1fr) minmax(180px, 26%); }
.panes { grid-template-columns: minmax(200px, 28%) 1fr; }
@media (max-height: 500px) and (orientation: landscape) {
  .panes.three { grid-template-columns: minmax(190px, 30%) minmax(0, 1fr) minmax(170px, 26%); }
  .panes { grid-template-columns: minmax(190px, 28%) 1fr; }
}
.sect .cat { align-items: center; padding: 6px 10px; }
.sect .cat span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; font-size: .95rem; }
.sect .cat small { align-self: center; }
.chan .lg, .pv .lg { position: relative; }
.chan .lg img, .pv .lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg2); }

/* the RMC mark keeps its own room at the top of each tile (it no longer sits over the icon), and the counts stay on one line */
.big .rmc { position: static; transform: none; margin: 0 0 2px; flex: none; }
.big { padding-top: 14px; justify-content: center; }
.big small { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 500px) and (orientation: landscape) { .big { padding-top: 10px; } .big small { font-size: .82rem; } }
.big > * { flex-shrink: 0; }
.big .ico { flex-shrink: 1; min-height: 0; display: grid; place-items: center; }
.big .ico svg { max-height: 100%; }
.mini { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
.bar .ibtn.lang { font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; border: 1px solid var(--line); min-width: 48px; }
@media (max-width: 900px) {
  .bar { gap: 6px; }
  .bar .ibtn { min-width: 40px; height: 42px; padding: 0 6px; font-size: 1.15rem; }
  .bar .brandname { font-size: 1.15rem; letter-spacing: .06em; }
  .clk { gap: 6px; margin-inline: 4px; } .clk small { font-size: .78rem; } .clk b { font-size: 1.05rem; }
}
.bigcode { font-size: 3.2rem; font-weight: 800; letter-spacing: .18em; color: var(--gold); text-align: center; margin: 8px 0; font-variant-numeric: tabular-nums; }

/* radio and podcasts */
.chan.radio { padding: 0 6px 0 0; gap: 4px; }
.chan .rplay { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 12px; border: 0; background: transparent; color: inherit; text-align: start; }
.chan .nm small { display: block; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan .rfav { flex: none; }
.detail.pod .cover { aspect-ratio: 1; }
#eps { margin-top: 18px; }
#eps .chan .nm { white-space: normal; }
/* the owner's devices */
.devrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.devrow small { display: block; margin-top: 2px; }
.devrow.me { border: 2px solid var(--gold, #e3b95c); border-radius: 14px; padding: 10px 12px; margin-bottom: 6px; background: rgba(227, 185, 92, .08); }
.devrow em { display: block; font-style: normal; font-size: .85em; font-weight: 700; margin-bottom: 2px; }
.devrow em.here { color: var(--gold, #e3b95c); }
.devrow em.now { color: #6fcf7f; }
.devrow .linkbtn[data-name] { padding: 0 4px; }
/* the main screen: RMC TV, RMC Radio, RMC Podcast */
.board.hub { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; max-height: 460px; gap: 14px; }
.board.hub .big { min-height: 260px; }
.board.hub .big .ico svg { width: 110px; height: 110px; }
/* the names stay on one line and shrink with the tile; the line under them may take two lines, never cut */
.board.hub .big { gap: 10px; padding: 16px 14px; justify-content: center; }
.board.hub .big b { font-size: clamp(1.05rem, 2.5vw, 1.9rem); white-space: nowrap; direction: ltr; line-height: 1.1; }
.board.hub .big small { opacity: .92; font-size: clamp(.78rem, 1.6vw, 1rem); white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; text-align: center; max-width: 95%; padding: 4px 14px; border-radius: 14px; }
.board.hub .big .ico svg { width: clamp(56px, 18vh, 110px); height: clamp(56px, 18vh, 110px); }
.board.hub .big .rmc { position: static; transform: none; margin: 0; }
.big.hub-tv { background: linear-gradient(160deg, #c4405f, #5a1530 70%); }
.big.hub-radio { background: linear-gradient(160deg, #f0cf7d, #b8862f 75%); color: #3a0d1f; }
.big.hub-pod { background: linear-gradient(160deg, #7a2a4c, #2e0a18 75%); }
@media (max-width: 720px) { .board.hub { grid-template-columns: repeat(2, 1fr); max-height: none; } .board.hub .big { min-height: 150px; } .board.hub .big .ico svg { width: 64px; height: 64px; } }
.ibtn.asks { position: relative; }
.ibtn.asks i { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--gold); color: var(--pri2); font: 700 .75rem/20px system-ui; font-style: normal; text-align: center; }
.linkbtn { display: block; margin: 14px auto 0; border: 0; background: transparent; color: var(--mute); text-decoration: underline; font-size: .9rem; }
.note { padding: 12px 14px; margin: 0 0 12px; border-radius: 12px; background: rgba(227,185,92,.12); border: 1px solid rgba(227,185,92,.4); }
.devrow .row { flex-wrap: nowrap; gap: 8px; margin: 0; }
.card .btn.wide + .btn.wide { margin-top: 10px; }

/* a phone held upright: ask for it sideways (the app's layout is made for that) */
#turn { display: none; }
@media (orientation: portrait) and (max-width: 600px) and (hover: none) {
  #turn { display: flex; position: fixed; inset: 0; z-index: 9999; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px; text-align: center; background: var(--bg); color: var(--ink); }
  #turn b { font-size: 1.5rem; } #turn small { color: var(--mute); line-height: 1.6; }
}

/* a station: logo, then its name and what it is under it, both from the logo's side */
.chan.radio .nm, .chan.radio .nm small { text-align: left; }
.chan.radio .lg { font-size: 1.5rem; }
body.en .chan.radio .nm, body.en .chan.radio .nm small { text-align: left; }
#rkind { margin-top: -2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#rkind::-webkit-scrollbar { display: none; }
#rkind .sub { flex: none; white-space: nowrap; }

.big.hub-su { background: linear-gradient(160deg, #3d1a52, #160a22 80%); }
/* RMC Stand-Up: videos (16:9), and YouTube's player full size */
.grid.vids { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.poster.vid { display: flex; flex-direction: column; gap: 6px; text-align: start; background: transparent; border: 0; padding: 0; }
.poster.vid .im { aspect-ratio: 16 / 9; width: 100%; position: relative; border-radius: 12px; overflow: hidden; background: var(--card); }
.poster.vid .im img { width: 100%; height: 100%; object-fit: cover; }
.poster.vid .cap { position: static; background: none; padding: 0 2px; font-size: .92rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster.vid small { padding: 0 2px; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster.vid .fv { position: absolute; top: 6px; inset-inline-start: 6px; }
.ytp { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: #000; }
.ytbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg); }
.ytbar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytbox { flex: 1; position: relative; overflow: hidden; background: #000; }
#yframe { width: 100%; height: 100%; border: 0; background: #000; }

.board.hub .big small { white-space: nowrap; font-size: clamp(.7rem, 1.3vw, .98rem); }
#who { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#who::-webkit-scrollbar { display: none; }
#who .sub { flex: none; white-space: nowrap; }

/* ▦ the live list's multi-screen button (between the title and the clock), and the multi-screen page */
.mscr { display: grid; justify-items: center; gap: 0; padding: 4px 14px; min-height: 48px; border-radius: 12px; border: 2px solid var(--gold); background: rgba(227,185,92,.12); color: var(--gold); line-height: 1.05; }
.mscr b { font-size: 1.35rem; }
.mscr small { font-size: .72rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
/* ⚽ today's matches: three tabs (now · coming · finished); under each competition a short line a match:
   home · score (or time) · away, and the channel under them */
.mt-tabs { display: flex; gap: 8px; margin: 4px 0 6px; position: sticky; top: 0; z-index: 2; padding: 6px 0; background: var(--bg, #140b10); }
.mt-tab { flex: 1; padding: 8px 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: var(--ink); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; }
.mt-tab small { opacity: .75; font-weight: 600; }
.mt-tab.on { border-color: var(--gold); background: rgba(227,185,92,.16); color: var(--gold); }
.mt-tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.mt-days { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
.mt-days .mt-day { flex: 1 1 14em; } .mt-days #mtq { flex: 1 1 10em; }
.mt-today { white-space: nowrap; padding: 9px 14px; }
.mt-d { font-size: 1.2rem; }
.mt-day { min-width: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--gold); background: rgba(227,185,92,.10); color: var(--gold); font: inherit; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.mt-day:focus-visible, .mt-day:hover { outline: 3px solid var(--gold); outline-offset: 1px; }
#mtq { min-width: 0; }
.mt-dh { margin: 16px 2px 2px; font-weight: 800; color: var(--ink); border-bottom: 1px solid rgba(227,185,92,.35); padding-bottom: 4px; }

.mt-h { margin: 10px 4px 4px; font-size: .82rem; font-weight: 700; color: var(--gold); opacity: .9; }
.mt-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0 10px; width: 100%; margin: 0 0 5px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.035); color: var(--ink); font: inherit; cursor: pointer; }
.mt-row:focus-visible, .mt-row:hover { outline: 3px solid var(--gold); outline-offset: 0; background: rgba(227,185,92,.10); }
.mt-t { font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-a { text-align: end; } .mt-b { text-align: start; }
.mt-sc, .mt-tm { font-size: .95rem; min-width: 3.8em; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.35); text-align: center; }
.mt-tm { direction: ltr; }
.mt-sc { display: inline-flex; justify-content: center; gap: 6px; } /* (the page's own direction: the first goals by the first team) */
.mt-sc i { font-style: normal; opacity: .8; }
.mt-ch { grid-column: 1 / -1; font-size: .76rem; color: var(--gold); font-weight: 700; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-st { font-style: normal; color: var(--ink); opacity: .75; font-weight: 600; }
.mt-now { border-color: rgba(224,51,74,.7); background: rgba(224,51,74,.10); }
.mt-now .mt-sc { background: #e0334a; color: #fff; }
.mt-finish { opacity: .7; }
.mt-line { display: grid; grid-template-columns: 1fr; gap: 6px; }
.mt-line.g { grid-template-columns: 1fr auto; }
.mt-goals { display: grid; justify-items: center; align-content: center; margin: 0 0 5px; padding: 4px 10px; min-width: 4.2em; border-radius: 10px; border: 1px solid var(--gold); background: rgba(227,185,92,.12); color: var(--gold); font: inherit; font-size: 1.05rem; cursor: pointer; }
.mt-goals small { font-size: .7rem; font-weight: 700; color: var(--ink); }
.mt-goals:focus-visible, .mt-goals:hover { outline: 3px solid var(--gold); outline-offset: 0; background: rgba(227,185,92,.22); }
.gl-head { cursor: default; opacity: 1; margin-bottom: 12px; }
.gl-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; width: 100%; margin: 0 0 5px; padding: 5px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.gl-row img, .gl-wait { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.gl-row:focus-visible, .gl-row:hover { outline: 3px solid var(--gold); outline-offset: 0; background: rgba(227,185,92,.10); }
.gl-row.none { cursor: default; opacity: .6; }
.gl-all { border-color: rgba(227,185,92,.55); background: rgba(227,185,92,.08); }
.gl-wait { display: grid; place-items: center; background: rgba(0,0,0,.35); font-size: 1rem; }
.gl-t { font-weight: 700; font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-by { color: var(--gold); font-weight: 700; font-size: .8rem; white-space: nowrap; max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
.gl-row.none .gl-by { color: var(--ink); opacity: .75; font-weight: 600; }
.mscr:hover, .mscr:focus { background: var(--gold); color: var(--pri2); outline: none; }
.mscr:hover small, .mscr:focus small { color: var(--pri2); }
.multi { position: fixed; inset: 0; background: #000; display: grid; grid-template-rows: auto 1fr; z-index: 5; }
.mbar { display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: #120a0f; flex-wrap: wrap; }
.mlays { display: flex; gap: 8px; }
.mlay { position: relative; width: 52px; height: 34px; padding: 0; border-radius: 4px; border: 2px solid #777; background: #888; }
.mlay i { position: absolute; box-sizing: border-box; border: 2px solid #888; background: #161616; }
.mlay.on { border-color: var(--gold); background: var(--gold); } .mlay.on i { border-color: var(--gold); }
.mlay:focus { outline: 3px solid #fff; }
.mgrid { position: relative; }
.mcell { position: absolute; box-sizing: border-box; border: 2px solid #2a2a2a; background: #000; overflow: hidden; outline: none; }
.mcell.on { border: 4px solid var(--gold); z-index: 1; }
.mcell video { width: 100%; height: 100%; object-fit: contain; display: none; }
.mcell.full video { display: block; }
.mcell .mlab { position: absolute; top: 6px; inset-inline-start: 6px; padding: 2px 10px; border-radius: 6px; background: rgba(0,0,0,.7); font-size: .85rem; max-width: 90%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mcell:not(.full) .mlab { display: none; }
.mcell .mplus { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); font-size: 1.2rem; font-weight: 700; }
.mcell.full .mplus { display: none; }
.mcell.bad::after { content: "مش شغالة"; position: absolute; inset: auto 0 10px; text-align: center; color: #f88; font-size: .9rem; }
.mpick { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.6); display: grid; place-items: center; }
.mpick .card { width: min(520px, 92vw); max-height: 86vh; display: grid; grid-template-rows: auto 1fr auto; gap: 8px; }
.mpick .chans { overflow-y: auto; }

/* the live list on a television: slimmer rows, so many more channels show at once */
.tv .sect .chans { gap: 3px; }
.tv .sect .chan { min-height: 34px; padding: 1px 8px; gap: 8px; border-radius: 7px; }
.tv .sect .chan .lg { width: 40px; height: 26px; }
.tv .sect .chan .num { width: 2.2em; font-size: .78rem; }
.tv .sect .chan .nm { font-size: .88rem; -webkit-line-clamp: 1; }
.tv .sect .cat { min-height: 34px; padding: 3px 10px; font-size: .9rem; }

/* a television: the live list keeps its side pane (the small screen), the first OK plays there */
.tv .sect .panes.three { grid-template-columns: minmax(170px, 210px) minmax(0, 1fr) minmax(250px, 37%); }
.tv .sect .prev { display: grid; }
.tv .pv { padding: 12px; gap: 8px; }
/* the small screen in the live list's side pane (16:9; the Android app's own player sits over it) */
.pvv { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; display: grid; place-items: center; }
.pvv .lg { width: 40%; height: 50%; }
.pvv.on .lg { display: none; }
.pvv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pvv.bad::after { content: "مش شغالة هنا · دوس تاني للشاشة الكاملة"; position: absolute; inset: auto 0 8px; text-align: center; color: #f99; font-size: .8rem; }
.tv .pv b { font-size: 1rem; } .tv .pv .ep-row { padding: 4px 8px; font-size: .85rem; } .tv .pv .btn { min-height: 38px; padding: 4px 14px; font-size: .9rem; }
