/* ---------- Canlı TV (js/live.js) ---------- */
.lv-page { --lv-chw: 124px; padding: calc(84px + env(safe-area-inset-top)) var(--gutter) 0; }
.lv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.lv-head h1 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.lv-clock { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.lv-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 5px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em; vertical-align: .1em; }
.lv-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }   /* a steady dot: the badge already says live (docs/motion.md) */
.lv-bar { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.lv-bar > span { display: block; height: 100%; background: var(--red); }

/* Logos come in every shape; a coloured monogram sits underneath for the ones that fail. */
.lv-logo { position: relative; display: grid; place-items: center; flex: none; width: 64px; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h) 45% 26%), hsl(calc(var(--h) + 40) 40% 16%)); }
.lv-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12%; background: #1f1d28; }
.lv-mono { font-weight: 800; font-size: .95rem; letter-spacing: .02em; color: rgba(255, 255, 255, .85); }
.lv-logo.big { width: 100%; aspect-ratio: 16/9; }
.lv-logo.big img { padding: 10% 14%; }
.lv-logo.big .lv-mono { font-size: 1.6rem; }

/* today's matches + list chips */
.lv-matches .track { padding: 14px 0 4px; margin: 0; scroll-padding: 0; }
.lv-match { flex: 0 0 280px; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: var(--radius); background: linear-gradient(120deg, rgba(229, 38, 52, .22), rgba(246, 244, 240, .05) 60%); }
.lv-match .lv-logo { grid-row: span 2; width: 56px; }
.lv-mt { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-mm { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-mm b { color: var(--ink); }
.lv-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 14px 0 12px; }
.lv-tabs::-webkit-scrollbar { display: none; }
.lv-tabs a { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 14px; border-radius: 999px; background: rgba(246, 244, 240, .07); color: var(--muted); font-weight: 700; font-size: .92rem; white-space: nowrap; }
.lv-tabs a.active { background: var(--ink); color: #111; }
.lv-tabs .icon { width: 1em; height: 1em; color: var(--warn); }
.lv-empty, .lv-note { color: var(--muted); font-size: .88rem; }
.lv-note { padding: 14px 0 24px; margin: 0; }
.lv-skel { height: 72px; margin-bottom: 8px; border-radius: var(--radius); background: rgba(246, 244, 240, .05); }

/* focus panel above the grid: fixed height, so moving focus never shifts the page */
.lv-info { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start; height: 7.4rem; overflow: hidden; padding: 4px 0 12px; }
.lv-info .lv-logo { width: 112px; }
.lv-ititle { font-size: 1.3rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-imeta { color: var(--muted); font-size: .88rem; margin-top: 4px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.lv-idesc { margin: 6px 0 0; color: #d9d6e0; font-size: .9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 80ch; }

/* guide grid: times stick to the top, channels to the left */
.lv-scroll { position: relative; overflow: auto; overscroll-behavior: contain; border-radius: var(--radius); background: var(--bg2); scrollbar-width: thin;
  scroll-padding: 34px 0 0 var(--lv-chw); }
.lv-gridin { position: relative; }
.lv-times { position: sticky; top: 0; z-index: 4; display: flex; height: 34px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.lv-corner { position: sticky; left: 0; z-index: 1; flex: 0 0 var(--lv-chw); background: var(--bg2); }
.lv-tl { position: relative; }
.lv-tl span { position: absolute; top: 8px; padding-left: 8px; border-left: 1px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lv-rows { position: relative; }
.lv-nowwrap { position: absolute; top: 0; bottom: 0; left: var(--lv-chw); right: 0; pointer-events: none; z-index: 2; }
.lv-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); box-shadow: 0 0 10px rgba(229, 38, 52, .6); }
.lv-row { display: flex; height: 64px; border-bottom: 1px solid rgba(246, 244, 240, .05); }
.lv-ch { position: sticky; left: 0; z-index: 3; flex: 0 0 var(--lv-chw); display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--bg2); border-right: 1px solid var(--line); }
.lv-ch .lv-logo { width: 60px; }
.lv-chno { color: var(--muted); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lv-ch .icon { width: .9em; height: .9em; color: var(--warn); margin-left: auto; }
.lv-progs { position: relative; }
.lv-prog { position: absolute; top: 5px; bottom: 5px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 12px; text-align: left; border-radius: 8px; background: rgba(246, 244, 240, .07); overflow: hidden; }
.lv-prog.on { background: rgba(246, 244, 240, .14); }
/* Over: a quieter surface and title, times still readable (whole-cell opacity dropped them to ~2.4:1). */
.lv-prog.past { background: rgba(246, 244, 240, .035); }
.lv-prog.past .lv-pt { color: var(--muted); }
.lv-prog.none { background: repeating-linear-gradient(135deg, rgba(246, 244, 240, .05) 0 10px, rgba(246, 244, 240, .03) 10px 20px); }
.lv-pt { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-pm { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.lv-prog:focus-visible, .lv-ch:focus-visible { z-index: 2; background: var(--ink); color: #111; box-shadow: none; opacity: 1; }
.lv-prog:focus-visible .lv-pm, .lv-ch:focus-visible .lv-chno { color: #444; }

/* channel wall (24/7 channels without a guide) */
.lv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.lv-tile { display: grid; gap: 6px; text-align: left; padding: 8px; border-radius: 12px; }   /* remote focus answers at once (docs/motion.md) */
.lv-tname { font-weight: 800; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-tnow { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
.lv-tile:focus-visible { background: rgba(246, 244, 240, .1); transform: scale(1.03); }

/* now/next list (phones, search) */
.lv-list { display: grid; gap: 8px; }
.lv-item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; text-align: left; padding: 10px; border-radius: var(--radius); background: rgba(246, 244, 240, .05); }
.lv-item .lv-logo { width: 72px; }
.lv-ibody { display: grid; gap: 4px; min-width: 0; }
.lv-iname { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-inow { font-size: .9rem; color: #e4e1ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-inext { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-item:focus-visible { background: rgba(246, 244, 240, .12); }
.track > .lv-item { flex: 0 0 min(340px, 82vw); }

/* home row cards */
.lv-card { flex: 0 0 calc(var(--card) * 1.6); display: grid; gap: 4px; text-align: left; border-radius: var(--radius); scroll-snap-align: start; }
.lv-card.lv-skel { height: auto; aspect-ratio: 16/12; margin: 0; }
.lv-cart { position: relative; display: block; }
.lv-cart .lv-badge { position: absolute; top: 8px; left: 8px; }
.lv-cname { font-weight: 800; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.lv-csub { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-card:focus-visible { box-shadow: none; }
.lv-card:focus-visible .lv-logo { box-shadow: var(--focus-art); }

/* ---------- live player ---------- */
.lv-player .player-controls { background: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 26%, transparent 52%, rgba(0, 0, 0, .9)); }
.lv-phead { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lv-phead .lv-logo { width: 72px; }
.lv-phead .pt-main { font-size: 1.3rem; font-weight: 800; }
.lv-phead .pt-sub { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.lv-pinfo { max-width: 900px; }
.lv-ptitle { font-size: clamp(1.3rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -.01em; }
.lv-ptime { display: grid; grid-template-columns: auto minmax(80px, 320px) auto auto; justify-content: start; align-items: center; gap: 10px; margin-top: 8px; color: #ddd; font-size: .9rem; font-variant-numeric: tabular-nums; }
.lv-left { color: var(--muted); }
.lv-pdesc { margin: 8px 0 0; color: #d9d6e0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lv-pnext { margin-top: 8px; color: var(--muted); }
.lv-pnext b { color: var(--ink); }
.lv-spacer { flex: 1; }
.lv-player .icon-btn[aria-pressed="true"] { color: var(--warn); }
.lv-slate { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(900px 500px at 50% 60%, rgba(60, 40, 70, .5), #000 70%); z-index: 1; }
.lv-slate-in { display: grid; justify-items: center; gap: 12px; text-align: center; width: min(420px, 80vw); }
.lv-slate-in .lv-logo { width: 200px; }
.lv-sname { font-size: 1.4rem; font-weight: 800; }
.lv-snow { color: var(--muted); }
.lv-sdown p { color: var(--muted); margin: 8px 0 0; }
.lv-sdown .row-btns { justify-content: center; }
.lv-player .player-controls { z-index: 2; }
/* Only the bars take pointer input, so the slate's buttons under the controls stay tappable. */
.lv-player.show-ui .player-controls { pointer-events: none; }
.lv-player.show-ui .player-controls .top, .lv-player.show-ui .player-controls .bottom { pointer-events: auto; }
.lv-strip { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 18px 0 max(18px, env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0, 0, 0, .95) 60%, transparent); }
.lv-player.strip-open .player-controls .bottom { visibility: hidden; }
.lv-schip { flex: 0 0 220px; display: grid; gap: 6px; text-align: left; padding: 10px; border-radius: 12px; background: rgba(40, 38, 50, .9); }
.lv-schip .lv-logo { width: 100%; aspect-ratio: 16/9; }
.lv-schip.current { outline: 2px solid var(--red); outline-offset: -2px; }
.lv-sct { font-weight: 800; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-scn { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-schip:focus-visible { background: var(--ink); color: #111; box-shadow: none; }
.lv-schip:focus-visible .lv-scn { color: #444; }
.lv-num { position: absolute; top: max(24px, env(safe-area-inset-top)); right: var(--gutter); z-index: 4; padding: 10px 20px; border-radius: 12px; background: rgba(0, 0, 0, .7); font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }

@media (hover: hover) {
  .lv-prog:hover, .lv-ch:hover, .lv-item:hover, .lv-schip:hover { background: rgba(246, 244, 240, .18); }
  .lv-tile:hover { background: rgba(246, 244, 240, .08); }
}
@media (max-width: 720px) {
  .lv-page { padding-top: calc(72px + env(safe-area-inset-top)); }
  .lv-tabs a { min-height: 44px; }   /* thumb-sized, like .chip and .tab */
  .lv-match { flex-basis: 250px; }
  .lv-item { grid-template-columns: 64px 1fr; }
  .lv-item .lv-logo { width: 64px; }
  .lv-phead .lv-logo { width: 52px; }
  .lv-pdesc { display: none; }
  .lv-ptime { grid-template-columns: auto 1fr auto; }
  .lv-left { display: none; }
  .lv-schip { flex-basis: 160px; }
  .lv-slate-in .lv-logo { width: 150px; }
}
