/* ULYTAU TV — site styles. Dark by default; html[data-theme="light"] switches tokens. */
:root {
  --page: #0b0c10; --bg: #0b0c10; --panel: #121419; --panel2: #1a1c22; --footer: #08090c;
  --text: #f2f3f5; --text2: #c9cdd4; --muted: #9aa0ab; --nav: #b8bdc6; --line: rgba(255,255,255,.08);
  --accent: #ff4b3e; --accent-soft: rgba(255,75,62,.14); --accent-ink: #ff8a80; --teal: #2ec4d6; --gold: #ffd166; --green: #1f8f5a;
  --ph: #1a1d25; --radius: 6px; --wrap: 1392px;
  color-scheme: dark;
}
html[data-theme="light"] {
  --page: #f4f5f7; --bg: #f4f5f7; --panel: #ffffff; --panel2: #e9ebef; --footer: #e9ebef;
  --text: #14161b; --text2: #3d424c; --muted: #5c6270; --nav: #3d424c; --line: rgba(0,0,0,.09);
  --accent-ink: #d63a2e; --teal: #0a7f8f; --ph: #dde0e6;
  color-scheme: light;
}
/* areas drawn over video/imagery stay dark in both themes */
.dz { --bg: #0b0c10; --panel: #121419; --panel2: #1a1c22; --text: #f2f3f5; --text2: #c9cdd4; --muted: #9aa0ab; --nav: #c9cdd4; --line: rgba(255,255,255,.1); --ph: #1a1d25; --accent-ink: #ff8a80; color: var(--text); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 500 16px/1.55 Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif; transition: background-color .3s, color .3s; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
img, video { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }
.ph { background-color: var(--ph); background-image: repeating-linear-gradient(135deg, rgba(127,127,127,.06) 0 2px, transparent 2px 14px); }
.img { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ph); }
.img > img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
a:hover .img > img { transform: scale(1.04); }
.rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* ---------- buttons, chips, badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 700; font-size: 16px; white-space: nowrap; transition: transform .15s, background .2s, filter .2s; }
.btn:active { transform: translateY(1px); }
.btn--red { background: var(--accent); color: #fff; box-shadow: 0 14px 34px rgba(255,75,62,.3); }
.btn--red:hover { color: #fff; filter: brightness(1.08); }
.btn--glass { background: rgba(40,42,48,.85); color: #f2f3f5; }
.btn--glass:hover { color: #fff; background: rgba(60,62,70,.9); }
.btn--soft { background: var(--panel2); color: var(--text); }
.btn--lg { height: 60px; padding: 0 30px; font-size: 17px; }
.ibtn { width: 52px; height: 52px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; background: rgba(40,42,48,.85); color: #f2f3f5; cursor: pointer; flex-shrink: 0; }
.ibtn:hover { background: rgba(60,62,70,.95); color: #fff; }
.ibtn--sm { width: 40px; height: 40px; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--panel2); color: var(--text); font-weight: 600; font-size: 14px; border: 0; cursor: pointer; }
.chip.on, .chip[aria-current] { background: var(--text); color: var(--bg); }
.chip--x { height: 32px; padding: 0 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 800; line-height: 1.4; color: #fff; background: rgba(11,12,16,.78); }
.badge--red { background: var(--accent); }
.badge--green { background: var(--green); }
.badge--pill { border-radius: 999px; padding: 6px 12px; letter-spacing: .06em; text-transform: uppercase; }
.badge--outline { background: transparent; border: 1px solid rgba(255,255,255,.3); }
.badge--glass { background: rgba(255,255,255,.14); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; display: inline-block; }
.dot--live { background: var(--accent); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,75,62,.55); } 70% { box-shadow: 0 0 0 8px rgba(255,75,62,0); } 100% { box-shadow: 0 0 0 0 rgba(255,75,62,0); } }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--accent-ink); text-transform: uppercase; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.2); }
.bar > span { display: block; height: 100%; background: var(--accent); }

/* ---------- header ---------- */
.hdr { position: relative; z-index: 30; padding: 18px 0; background: var(--bg); }
.hdr--over { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(180deg, rgba(11,12,16,.75), rgba(11,12,16,0)); }
.hdr__in { display: flex; align-items: center; gap: 20px; }
.logo { flex: 0 0 auto; display: inline-flex; }
.logo img { height: 30px; width: auto; max-width: none; filter: brightness(0) invert(1); }
.nav { min-width: 0; }
html[data-theme="light"] .hdr:not(.dz) .logo img { filter: none; }
.nav { display: flex; flex-wrap: nowrap; gap: 4px 18px; flex: 1 1 auto; margin-left: 4px; }
.nav a { white-space: nowrap; padding: 8px 2px; border-bottom: 2px solid transparent; color: var(--nav); font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); font-weight: 700; border-color: var(--accent); }
.hdr__tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search { display: flex; align-items: center; gap: 8px; width: 240px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); font-size: 14px; }
.search kbd { font: 600 11px Montserrat, sans-serif; padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; }
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(127,127,127,.18); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.theme-btn .moon { display: none; }
.lang-btn { height: 40px; min-width: 40px; padding: 0 12px; border-radius: 999px; background: rgba(127,127,127,.18); color: var(--text); font-weight: 700; font-size: 13px; letter-spacing: .04em; display: inline-flex; align-items: center; justify-content: center; }
.lang-btn:hover { background: rgba(127,127,127,.3); }
html[data-theme="light"] .theme-btn .moon { display: block; }
html[data-theme="light"] .theme-btn .sun { display: none; }
.live-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }
.live-btn:hover { color: #fff; filter: brightness(1.08); }
.burger { display: none; }
.drawer { position: fixed; inset: 0; z-index: 60; display: none; }
.drawer.open { display: block; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.drawer__panel { position: absolute; top: 0; left: 0; bottom: 0; width: min(330px, 88vw); background: var(--panel); padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.drawer__panel a { padding: 12px 6px; font-weight: 700; border-bottom: 1px solid var(--line); }
.drawer__panel h4 { margin: 18px 6px 4px; font-size: 12px; letter-spacing: .14em; color: var(--muted); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: clamp(640px, 86vh, 900px); display: flex; align-items: flex-end; overflow: hidden; background: #0b0c10; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.slide.on { opacity: 1; visibility: visible; }
.slide__media, .slide__media img, .slide__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide__media video { opacity: 0; transition: opacity .9s ease; }
.slide__media video.ready { opacity: 1; }
.hero__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(11,12,16,.95) 0%, rgba(11,12,16,.7) 38%, rgba(11,12,16,.1) 72%), linear-gradient(0deg, var(--page) 0%, rgba(11,12,16,0) 42%); }
.hero__num { position: absolute; right: 48px; top: 140px; font-weight: 900; font-size: 180px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.18); pointer-events: none; }
.hero__body { position: relative; width: 100%; padding-bottom: 60px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px; }
.hero__copy { flex: 1 1 520px; max-width: 640px; display: flex; flex-direction: column; gap: 18px; }
.slide-copy { display: none; flex-direction: column; gap: 18px; }
.slide-copy.on { display: flex; animation: fadeUp .6s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
/* sized so the longest Kazakh words («бағдарламасы») fit the 640 px copy column and are never split */
.hero h1, .hero .h1 { font-size: clamp(36px, 5vw, 72px); line-height: 1.02; overflow-wrap: break-word; text-wrap: balance; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--text2); font-size: 15px; }
.meta .sq { padding: 1px 8px; border-radius: 6px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 700; }
.hero__desc { color: var(--text2); font-size: 17px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dots { display: flex; gap: 8px; align-items: center; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 8px; background: rgba(255,255,255,.35); cursor: pointer; transition: width .3s, background .3s; }
.dots button.on { width: 34px; background: #f2f3f5; }
.hero__arrow { position: absolute; top: 46%; z-index: 3; width: 52px; height: 52px; border: 0; background: transparent; color: #f2f3f5; cursor: pointer; }
.hero__arrow--l { left: 12px; } .hero__arrow--r { right: 12px; }
.hero__arrow .ico { width: 30px; height: 30px; stroke-width: 1.6; }
.hero__ctrl { position: absolute; right: 24px; top: 104px; z-index: 3; display: none; gap: 10px; }
.hero__ctrl.on { display: flex; }
.hero__next { flex: 1 1 520px; max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.hero__next-h { font-size: 12px; font-weight: 700; letter-spacing: .18em; color: #9aa0ab; }
.hero__thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.thumb { display: flex; flex-direction: column; gap: 8px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: #9aa0ab; }
.thumb .img { aspect-ratio: 16/10; border: 2px solid transparent; }
.thumb.on .img { border-color: #f2f3f5; }
.thumb.on { color: #f2f3f5; }
.thumb__bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.thumb__bar span { display: block; height: 100%; width: 0; background: var(--accent); }
.thumb.on .thumb__bar span { animation: grow var(--dur, 10s) linear forwards; }
@keyframes grow { to { width: 100%; } }
.thumb__t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- sections ---------- */
main { display: block; }
.sections { display: flex; flex-direction: column; gap: 80px; padding-top: 24px; padding-bottom: 96px; }
.sec { display: flex; flex-direction: column; gap: 22px; }
.sec__h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.sec__h h2 { font-size: clamp(28px, 3.2vw, 42px); }
.sec__h h2.sm { font-size: 26px; }
.sec__h .more { font-weight: 600; color: var(--text2); }
.sec__h .more:hover { color: var(--text); }
.sec__h .sub { color: var(--muted); font-size: 15px; margin-left: 12px; font-weight: 500; }

/* landscape card with remaining time + progress (today on air, continue watching) */
.lcard { flex: 0 0 300px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.lcard .img { aspect-ratio: 16/9; }
.lcard__tl { position: absolute; top: 10px; left: 10px; }
.lcard__br { position: absolute; right: 10px; bottom: 12px; font-size: 13px; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.lcard__info { display: flex; gap: 10px; align-items: flex-start; }
.chan { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: var(--panel2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--teal); }
.lcard__g { font-size: 12px; color: var(--muted); }
.lcard__t { font-size: 15px; font-weight: 700; line-height: 1.3; }
.lcard__x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(11,12,16,.75); color: #f2f3f5; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lcard__x .ico { width: 14px; height: 14px; stroke-width: 2.6; }

/* live strip */
.livebox { display: flex; flex-wrap: wrap; border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.livebox__media { flex: 1 1 420px; min-height: 240px; position: relative; display: flex; align-items: center; justify-content: center; }
/* the muted live stream site.js plays in the box: no controls, the badge stays above it,
   the play button only shows on hover once the picture is running */
.livebox__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.livebox__media.is-playing { background: #000; }
.livebox__media.is-playing .livebox__video { opacity: 1; }
.livebox__media > span { position: relative; z-index: 1; }
.livebox__media.is-playing .livebox__play { opacity: 0; transform: scale(.85); transition: opacity .25s, transform .25s; }
.livebox__media.is-playing:hover .livebox__play, .livebox__media.is-playing:focus-visible .livebox__play { opacity: 1; transform: none; }
.livebox__play { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 16px 40px rgba(255,75,62,.35); color: #fff; }
.livebox__body { flex: 2 1 560px; padding: 32px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.livebox h2 { font-size: 32px; margin-top: 6px; }
.prog { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.prog__track { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.prog__track span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s; }
.nextgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.nextgrid > div { padding: 12px 14px; border-radius: var(--radius); background: var(--panel2); }
.nextgrid b { display: block; font-size: 13px; color: var(--gold); }
html[data-theme="light"] .nextgrid b { color: #a3650a; }

/* collections */
.pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 12px; height: 72px; padding: 0 30px 0 20px; border-radius: 999px; background: var(--panel2); font-size: 17px; font-weight: 700; }
.pill i { width: 34px; height: 34px; border-radius: 50%; background: rgba(46,196,214,.16); color: var(--teal); display: inline-flex; align-items: center; justify-content: center; font-style: normal; }

/* news */
.news { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.news__lead { grid-row: span 2; display: flex; flex-direction: column; gap: 14px; }
.news__lead .img { aspect-ratio: 16/10; }
.news__lead h3 { font-size: 28px; line-height: 1.2; }
.ncat { font-size: 13px; color: var(--teal); font-weight: 700; }
.nrow { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; }
.nrow .img { aspect-ratio: 4/3; }
.nrow h3 { font-size: 17px; font-weight: 700; line-height: 1.35; margin-top: 4px; }

/* top 10 */
.top { gap: 8px; padding-bottom: 8px; }
.top a { flex: 0 0 auto; display: flex; align-items: flex-end; }
.top__n { font-weight: 900; font-size: 150px; line-height: .8; color: transparent; -webkit-text-stroke: 1.5px rgba(127,127,127,.55); margin-right: -26px; }
.top .img { width: 160px; aspect-ratio: 2/3; box-shadow: 0 20px 40px rgba(0,0,0,.45); }

/* film cards 01–04 */
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 20px; }
.fcard { display: flex; flex-direction: column; gap: 10px; }
.fcard .img { aspect-ratio: 16/9; }
.fcard__n { position: absolute; left: 16px; bottom: 12px; font-weight: 900; font-size: 52px; line-height: 1; color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.fcard__b { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.fcard h3 { font-size: 18px; font-weight: 700; }

/* poster grid */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 28px 18px; }
.pcard { display: flex; flex-direction: column; gap: 10px; }
.pcard .img { aspect-ratio: 2/3; }
.pcard__b { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.pcard__pick { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 5px 8px; border-radius: 999px; background: rgba(11,12,16,.8); border: 1px solid rgba(255,255,255,.2); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-align: center; color: #fff; }
.pcard h3 { font-size: 15px; font-weight: 700; line-height: 1.3; }
.pcard p { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* article grid (lists) */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 32px 24px; }
.acard { display: flex; flex-direction: column; gap: 12px; }
.acard .img { aspect-ratio: 16/10; }
.acard h3 { font-size: 19px; line-height: 1.3; }
.acard p { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* page heads */
.phead { padding: 40px 0 8px; display: flex; flex-direction: column; gap: 14px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.phead h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1; }
.phead .lead { max-width: 640px; color: var(--text2); font-size: 18px; }
.phead__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius); background: var(--panel); }
.filters .sp { flex: 1; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--panel2); }
.seg a { padding: 8px 14px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--text2); }
.seg a.on { background: var(--text); color: var(--bg); }
.found { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.found b { color: var(--text); }
.found a.clear { color: var(--text2); text-decoration: underline; }
.searchbar { display: flex; gap: 10px; max-width: 640px; }
.searchbar input { flex: 1; min-width: 0; height: 52px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); outline: none; }
.searchbar input:focus { border-color: var(--accent); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pager a { min-width: 44px; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); background: var(--panel2); font-weight: 700; }
.pager a.on { background: var(--accent); color: #fff; }
.empty { padding: 64px 16px; text-align: center; color: var(--muted); border-radius: var(--radius); background: var(--panel); }
.empty .ico { width: 40px; height: 40px; margin: 0 auto 12px; opacity: .6; }

/* ---------- article ---------- */
.article { max-width: 900px; margin: 0 auto; padding: 40px 0 24px; display: flex; flex-direction: column; gap: 22px; }
.article h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.12; }
.article__lead { font-size: 20px; line-height: 1.55; color: var(--text2); font-weight: 500; }
.article__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px; }
.article__meta span { display: inline-flex; align-items: center; gap: 6px; }
.article__cover { aspect-ratio: 16/9; }
.prose { font-size: 18px; line-height: 1.8; color: var(--text2); font-weight: 500; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 28px; color: var(--text); margin-top: 1.6em; }
.prose h3 { font-size: 22px; color: var(--text); margin-top: 1.4em; }
.prose a { color: var(--teal); text-decoration: underline; }
.prose strong, .prose b { color: var(--text); }
.prose img { border-radius: var(--radius); }
.prose figure { margin: 1.6em 0; }
.prose figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }
.prose blockquote { margin: 1.6em 0; padding: 20px 24px; border-radius: var(--radius); background: var(--accent-soft); color: var(--text); font-weight: 600; }
.prose iframe, .embed { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: var(--radius); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 18px 20px; border-radius: var(--radius); background: var(--panel); }
.share span { margin-right: auto; color: var(--muted); font-size: 14px; }
.share a, .share button { width: 44px; height: 44px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--panel2); color: var(--text); cursor: pointer; font-weight: 800; font-size: 13px; }
.share a:hover, .share button:hover { background: var(--accent); color: #fff; }
.share .done { background: var(--green); color: #fff; }

/* ---------- VOD (program / film) ---------- */
.vhero { position: relative; min-height: clamp(640px, 88vh, 920px); display: flex; align-items: flex-end; overflow: hidden; background: #0b0c10; }
.vhero__bg { position: absolute; inset: 0; }
.vhero__bg img { width: 100%; height: 100%; object-fit: cover; }
.vhero__body { position: relative; width: 100%; padding-bottom: 64px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 48px; }
.vhero__poster { flex: 0 0 290px; aspect-ratio: 2/3; box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.vhero__copy { flex: 1 1 520px; max-width: 700px; display: flex; flex-direction: column; gap: 18px; }
.vhero h1 { font-size: clamp(40px, 5.6vw, 84px); line-height: 1.02; }
.tabs { position: sticky; top: 0; z-index: 20; display: flex; gap: 0 28px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); background: var(--page); }
.tabs a { flex: 0 0 auto; padding: 16px 2px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--nav); font-weight: 600; }
.tabs a.on, .tabs a:hover { color: var(--text); }
.tabs a.on { border-color: var(--accent); font-weight: 700; }
.player { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #9aa0ab; }
.player__now { display: flex; align-items: baseline; gap: 12px; font-size: 15px; color: var(--muted); }
.player__now b { color: var(--text); font-size: 18px; }
.ecard { flex: 0 0 230px; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 2px solid transparent; cursor: pointer; text-align: left; padding: 0; color: var(--text); }
.ecard.on { border-color: var(--accent); }
.ecard .img { aspect-ratio: 16/9; border-radius: 0; }
.ecard__b { position: absolute; top: 8px; right: 8px; }
.ecard__t { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.ecard__t small { font-size: 12px; color: var(--accent-ink); font-weight: 700; }
.ecard__t b { font-size: 14px; line-height: 1.35; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.facts > div { padding: 18px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.facts b { display: block; margin-top: 4px; font-weight: 600; }

/* ---------- live page ---------- */
.livewrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.lplayer { flex: 999 1 640px; min-width: 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.lplayer__screen { position: relative; aspect-ratio: 16/9; background: #0d0f14; }
.lplayer__screen video, .lplayer__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.lplayer__ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #9aa0ab; text-align: center; padding: 20px; }
.lplayer__badges { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; pointer-events: none; }
.lplayer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; background: #121419; color: #f2f3f5; }
.lplayer__bar button { height: 44px; min-width: 44px; padding: 0 12px; border-radius: 6px; border: 0; background: rgba(255,255,255,.08); color: #f2f3f5; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 13px; }
.lplayer__bar .grow { flex: 1; }
.lplayer__note { padding: 8px 16px; background: #1a1c22; color: #ffd166; font-size: 13px; }
.now { flex: 1 1 340px; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--radius); background: var(--panel); }
.now h2 { font-size: 28px; }
.now__list { display: flex; flex-direction: column; gap: 8px; }
.now__list div { display: flex; gap: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--panel2); font-weight: 600; }
.now__list b { min-width: 48px; color: var(--gold); }
html[data-theme="light"] .now__list b { color: #a3650a; }
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.days button { flex: 0 0 auto; min-width: 128px; padding: 10px 16px; border-radius: var(--radius); border: 0; background: var(--panel2); color: var(--text); text-align: left; cursor: pointer; }
.days button b { display: block; font-size: 15px; }
.days button small { display: block; font-size: 12px; opacity: .75; }
.days button.on { background: var(--text); color: var(--bg); }
.sched { display: none; flex-direction: column; border-radius: var(--radius); overflow: hidden; }
.sched.on { display: flex; }
.srow { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--panel); }
.srow__t { font-weight: 800; font-size: 18px; color: var(--gold); }
html[data-theme="light"] .srow__t { color: #a3650a; }
.srow h4 { font-size: 16px; font-weight: 700; }
.srow h4 a, .now h2 a, .now__list a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.srow h4 a:hover, .now h2 a:hover, .now__list a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
.srow p { font-size: 13px; color: var(--muted); }
.srow__tag { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--accent-ink); white-space: nowrap; }
.srow.past { opacity: .5; }
.srow.live { background: var(--accent-soft); }
.srow.live .srow__t { color: var(--accent-ink); }

/* ---------- footer ---------- */
.ftr { background: var(--footer); margin-top: 40px; }
.ftr__in { padding: 56px 0; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.ftr__about { flex: 1 1 320px; max-width: 440px; display: flex; flex-direction: column; gap: 14px; color: var(--muted); }
.ftr__cols { display: flex; flex-wrap: wrap; gap: 48px; }
.ftr__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ftr__col b { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.ftr__col a:hover { color: var(--accent-ink); }
.ftr__bottom { padding: 20px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.preview-bar { position: sticky; top: 0; z-index: 100; padding: 10px 16px; background: #ffd166; color: #14161b; text-align: center; font-weight: 700; font-size: 14px; }
.preview-bar a { text-decoration: underline; margin-left: 8px; }

/* ---------- bottom tab bar (phones) ---------- */
.tabbar { display: none; }

/* long Kazakh words in capitals («ҚЫЗМЕТШІЛЕРДІҢ») must break inside narrow cards instead of widening the page */
h1, h2, h3, h4, .lcard__t, .thumb__t { overflow-wrap: anywhere; }

/* the header holds logo, seven menu items and four tools: below this width it tightens up so nothing overlaps */
@media (max-width: 1480px) {
  .nav { gap: 4px 14px; margin-left: 4px; }
  .nav a { font-size: 14px; }
  .hdr__tools .live-btn span:not(.dot) { display: none; }
  .hdr__tools .live-btn { width: 40px; padding: 0; justify-content: center; }
}
/* phones: the bottom tab bar already has «Іздеу», so the header drops its search button to fit */
@media (max-width: 760px) {
  .hdr__tools .search-btn { display: none; }
}
@media (max-width: 1280px) {
  .search { display: none; }
}
@media (max-width: 1240px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 980px) {
  .hdr__tools .live-btn span:not(.dot) { display: none; }
  .hdr__tools .live-btn { width: 40px; padding: 0; justify-content: center; }
  .hero { min-height: 640px; }
  .hero__next, .hero__num, .hero__arrow { display: none; }
  .vhero__poster { display: none; }
  .vhero { min-height: 640px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  body { padding-bottom: 86px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 10px; right: 10px; bottom: 12px; z-index: 50; padding: 6px; border-radius: 12px; background: rgba(22,24,30,.96); backdrop-filter: blur(14px); }
  html[data-theme="light"] .tabbar { background: rgba(255,255,255,.97); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border-radius: 8px; font-size: 11px; font-weight: 600; color: var(--text2); }
  .tabbar a.on { background: var(--accent-soft); color: var(--accent-ink); }
  .tabbar .ico { width: 20px; height: 20px; }
  .hero { min-height: 600px; }
  .hero__body { padding-bottom: 28px; }
  .actions .btn { flex: 1; }
  .sections { gap: 56px; }
  .lcard { flex-basis: 260px; }
  .nrow { grid-template-columns: 110px minmax(0, 1fr); }
  .top__n { font-size: 110px; margin-right: -18px; }
  .top .img { width: 120px; }
  .srow { grid-template-columns: 64px minmax(0, 1fr); }
  .srow__tag { grid-column: 2; }
  .livebox__body { padding: 22px; }
  .prose { font-size: 17px; }
  .searchbar { width: 100%; }
  .searchbar .btn { padding: 0 18px; gap: 8px; }
}
@media (max-width: 420px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .hero h1, .hero .h1 { font-size: 34px; }
  .phead h1 { font-size: 36px; }
  .btn--lg { height: 52px; padding: 0 20px; font-size: 16px; }
  .hdr__in { gap: 12px; }
  .hdr__tools { gap: 6px; }
  .lang-btn { padding: 0 10px; }
  .logo img { height: 24px; }
  .livebox h2 { font-size: 24px; }
  .srow { padding: 14px 16px; gap: 10px; }
}
/* very narrow phones (320–350 px): smaller logo and 36 px header buttons */
@media (max-width: 350px) {
  .hdr__in { gap: 8px; }
  .hdr__tools { gap: 4px; }
  .logo img { height: 20px; }
  .ibtn--sm, .theme-btn, .hdr__tools .live-btn { width: 36px; height: 36px; }
  .lang-btn { height: 36px; min-width: 36px; padding: 0 8px; }
}
/* Large and 4K screens: scale the whole interface so it keeps the same proportions as on a 1440–1920 px desktop. */
@media (min-width: 1920px) { html { zoom: 1.15; } }
@media (min-width: 2240px) { html { zoom: 1.3; } }
@media (min-width: 2560px) { html { zoom: 1.5; } }
@media (min-width: 3200px) { html { zoom: 1.75; } }
@media (min-width: 3600px) { html { zoom: 2; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
