/* Jimbo TV Night Drive (tvn-) */
.tvn-on .tv { --tvn-c: #f5a623; isolation: isolate; background: #07080b; }
.tvn-stage { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.tvn-stage__beam { position: absolute; left: 50%; top: -20%; width: 140%; height: 90%; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 50%, color-mix(in oklab, var(--tvn-c) 34%, transparent), transparent 70%); filter: blur(30px); opacity: .7; transition: background 1.2s var(--mn-ease); animation: tvnBreath 9s ease-in-out infinite alternate; }
.tvn-stage__floor { position: absolute; left: -30%; right: -30%; bottom: -6%; height: 46%; transform: perspective(520px) rotateX(64deg); transform-origin: bottom; opacity: .32;
  background-image: linear-gradient(color-mix(in oklab, var(--tvn-c) 60%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in oklab, var(--tvn-c) 60%, transparent) 1px, transparent 1px); background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 85%); mask-image: linear-gradient(to top, #000, transparent 85%); animation: mnRoad 5s linear infinite; transition: opacity .6s; }
@keyframes tvnBreath { from { opacity: .5; transform: translateX(-50%) scale(.96); } to { opacity: .85; transform: translateX(-50%) scale(1.04); } }

/* the set: glass bezel with a glow in the channel's colour */
.tvn-on .tv__set { --tvn-c: #f5a623; background: linear-gradient(160deg, rgb(40 42 50 / .78), rgb(14 15 19 / .86) 55%, rgb(26 27 33 / .8)); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgb(255 255 255 / .08); box-shadow: 0 0 0 1px rgb(0 0 0 / .4), 0 40px 120px -30px color-mix(in oklab, var(--tvn-c) 55%, transparent), 0 30px 80px rgb(0 0 0 / .55), inset 0 1px 0 rgb(255 255 255 / .1); transition: box-shadow 1s var(--mn-ease); }
.tvn-on .tv__screen { box-shadow: 0 0 0 1px rgb(255 255 255 / .07), 0 0 60px -6px color-mix(in oklab, var(--tvn-c) 50%, transparent); transition: box-shadow 1s var(--mn-ease); }

/* scanline sweep while a channel changes */
.tvn-scan { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: repeating-linear-gradient(to bottom, rgb(255 255 255 / .07) 0 1px, transparent 1px 3px), linear-gradient(to bottom, transparent 0%, color-mix(in oklab, var(--tvn-c) 45%, transparent) 48%, rgb(255 255 255 / .55) 50%, color-mix(in oklab, var(--tvn-c) 45%, transparent) 52%, transparent 100%);
  background-size: 100% 100%, 100% 260%; }
.tvn-scanning .tvn-scan { animation: tvnScan .65s cubic-bezier(.3, .7, .2, 1) forwards; }
@keyframes tvnScan { 0% { opacity: 1; background-position: 0 0, 0 100%; } 70% { opacity: .9; } 100% { opacity: 0; background-position: 0 0, 0 0%; } }

/* glass dock under the screen with sliding channel ticker */
.tvn-on .tvn-dock { margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .08); box-shadow: inset 0 1px 0 rgb(255 255 255 / .07); touch-action: pan-y; cursor: grab; user-select: none; }
.tvn-on .tvn-dock .tv__now-n { background: color-mix(in oklab, var(--tvn-c) 22%, #15161b); color: #fff; border-color: color-mix(in oklab, var(--tvn-c) 60%, transparent); box-shadow: 0 0 22px -4px color-mix(in oklab, var(--tvn-c) 70%, transparent); transition: background .6s, box-shadow .6s, border-color .6s; }
.tvn-slide { display: inline-block; animation: tvnSlide .5s var(--mn-spring) both; }
b.tvn-slide { display: block; }
@keyframes tvnSlide { from { opacity: 0; transform: translateX(22px); filter: blur(4px); } }

/* console: D-pad next to the remote */
.tvn-console { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-top: 10px; }
.tvn-pad { position: relative; width: 150px; height: 150px; border-radius: 50%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  background: radial-gradient(circle at 50% 35%, #2c2e36, #121318 70%); border: 1px solid rgb(255 255 255 / .09); box-shadow: inset 0 2px 0 rgb(255 255 255 / .06), inset 0 -10px 24px rgb(0 0 0 / .5), 0 14px 30px -12px rgb(0 0 0 / .7), 0 0 0 4px rgb(255 255 255 / .02); }
.tvn-pad__b { border: 0; background: none; color: #e9e7e2; cursor: pointer; display: grid; place-items: center; border-radius: 50%; transition: color .2s, transform .12s; }
.tvn-pad__b svg { width: 26px; height: 26px; }
.tvn-pad__b:hover { color: var(--tvn-c); }
.tvn-pad__b:active, .tvn-pad__b.is-hit { transform: scale(.88); color: var(--tvn-c); }
.tvn-pad__u { grid-area: 1 / 2; } .tvn-pad__l { grid-area: 2 / 1; } .tvn-pad__r { grid-area: 2 / 3; } .tvn-pad__d { grid-area: 3 / 2; }
.tvn-pad__ok { grid-area: 2 / 2; margin: 2px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .12); cursor: pointer; color: #fff; font: 800 11px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  background: radial-gradient(circle at 50% 30%, color-mix(in oklab, var(--tvn-c) 70%, #fff 10%), color-mix(in oklab, var(--tvn-c) 55%, #000)); box-shadow: 0 0 20px -2px color-mix(in oklab, var(--tvn-c) 70%, transparent), inset 0 1px 0 rgb(255 255 255 / .35); transition: transform .3s var(--mn-spring), background .6s; }
.tvn-pad__ok:active { transform: scale(.9); }
.tvn-pad button:focus-visible { outline: 2px solid var(--tvn-c); outline-offset: 2px; }
.tvn-on .tv-btn { background: linear-gradient(180deg, rgb(255 255 255 / .07), rgb(255 255 255 / .02)); border-color: rgb(255 255 255 / .09); box-shadow: inset 0 1px 0 rgb(255 255 255 / .06); transition: transform .3s var(--mn-spring), border-color .2s, background .2s, box-shadow .2s; }
.tvn-on .tv-btn:hover { border-color: color-mix(in oklab, var(--tvn-c) 55%, transparent); box-shadow: 0 0 18px -6px color-mix(in oklab, var(--tvn-c) 70%, transparent); }
.tvn-on .tv-btn:active { transform: scale(.94); }
@media (max-width: 720px) {
  .tvn-console { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .tvn-console .tv__remote { width: 100%; }
  .tvn-pad { width: 132px; height: 132px; }
}

/* parking-brake gauge */
.tvn-gauge.tv__gate-icon { width: 104px; height: 104px; border: 0; border-radius: 50%; box-shadow: 0 0 0 10px rgb(245 166 35 / .06), 0 0 50px -10px rgb(245 166 35 / .45); background: radial-gradient(circle at 50% 40%, #23242b, #0c0c10 72%); }
.tvn-gauge svg { width: 100%; height: 100%; overflow: visible; }
.tvn-g__rim { fill: none; stroke: rgb(255 255 255 / .1); stroke-width: 1.5; }
.tvn-g__arc { fill: none; stroke: var(--amber, #f5a623); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 3 5; opacity: .6; }
.tvn-g__ticks line { stroke: rgb(255 255 255 / .55); stroke-width: 1.6; stroke-linecap: round; }
.tvn-g__p { font: 900 21px/1 var(--font-display, system-ui); fill: var(--amber, #f5a623); }
.tvn-g__lbl { font: 800 6.5px/1 var(--font-body, system-ui); letter-spacing: .2em; fill: rgb(255 255 255 / .55); }
.tvn-g__needle { transform-origin: 40px 44px; transform: rotate(-112deg); animation: tvnNeedle 3.4s ease-in-out infinite; }
.tvn-g__needle path { stroke: #ff5a5f; stroke-width: 2.6; stroke-linecap: round; }
.tvn-g__needle circle { fill: #ff5a5f; }
.tvn-gauge.is-ready .tvn-g__needle { animation: none; transform: rotate(0deg); transition: transform .7s var(--mn-spring); }
.tvn-gauge.is-set .tvn-g__needle { animation: none; transform: rotate(112deg); transition: transform .5s var(--mn-spring); }
.tvn-gauge.is-set .tvn-g__p { fill: #34c759; }
@keyframes tvnNeedle { 0%, 100% { transform: rotate(-112deg); } 45%, 60% { transform: rotate(-70deg); } }

/* break-timer ring: sits just outside the video edge, never on it */
.tvn-ring { position: absolute; pointer-events: none; z-index: 1; --p: 1; }
.tvn-ring::before { content: ""; position: absolute; inset: -5px; border-radius: 20px; padding: 3px;
  background: conic-gradient(from 0deg, var(--mn-acc, #2dd4bf) calc(var(--p) * 360deg), rgb(255 255 255 / .08) 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); transition: background .9s linear; }
.tvn-ring.is-low::before { background: conic-gradient(from 0deg, #ff5a5f calc(var(--p) * 360deg), rgb(255 255 255 / .08) 0); animation: tvnLow 1.4s ease-in-out infinite; }
.tvn-ring__glow { position: absolute; inset: -5px; border-radius: 20px; box-shadow: 0 0 26px -6px var(--mn-acc, #2dd4bf); opacity: .55; }
.tvn-ring__lbl { position: absolute; right: 8px; bottom: -30px; font: 800 12px/1 var(--font-body); font-variant-numeric: tabular-nums; color: var(--mn-acc, #2dd4bf); letter-spacing: .04em; }
@keyframes tvnLow { 50% { opacity: .45; } }

/* ---------- Channel Wall ---------- */
.tvn-view { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .09); margin-left: auto; }
.tvn-view button { position: relative; z-index: 1; border: 0; background: none; color: rgb(243 241 236 / .7); font: 700 13px/1 var(--font-body); padding: 9px 14px; border-radius: 999px; cursor: pointer; transition: color .2s; }
.tvn-view button[aria-pressed="true"] { color: #0c0d10; }
.tvn-view__pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--mn-acc, #2dd4bf); box-shadow: 0 0 18px -4px var(--mn-acc, #2dd4bf); transition: transform .45s var(--mn-spring); }
.tvn-view:has([data-v="list"][aria-pressed="true"]) .tvn-view__pill { transform: translateX(100%); }
.tvn-on .tv__guide-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tvn-wall { display: none; }
.tvn-is-wall .tvn-wall { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; max-width: 100%; }
.tvn-row, .tvn-row__l { min-width: 0; max-width: 100%; }
.tvn-is-wall .tv__grid, .tvn-is-wall .tv-filters { display: none !important; }
.tvn-row__h { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.tvn-row__h h3 { margin: 0; font: 800 1.1rem/1.2 var(--font-display, var(--font-body)); color: #f6f4ef; }
.tvn-row__h span { font-size: 13px; color: rgb(243 241 236 / .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tvn-row__h h3 { flex: none; }
.tvn-row__h span { flex: 1; }
.tvn-row__all { flex: none; margin-left: auto; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .14); background: rgb(255 255 255 / .07); color: #f6f4ef; font: 800 12.5px/1 var(--font-body); cursor: pointer; white-space: nowrap; }
.tvn-row__all:active { transform: scale(.95); }
.tvn-row.is-all .tvn-row__all { background: var(--mn-acc, #2dd4bf); color: #0c0d10; border-color: transparent; }
.tvn-row.is-all .tvn-row__l { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-columns: auto; overflow: visible; scroll-snap-type: none; }
@media (max-width: 520px) { .tvn-row__h span { display: none; } .tvn-row.is-all .tvn-row__l { grid-template-columns: 1fr 1fr; } .tvn-row.is-all .tvn-tile { height: 100px; } }
.tvn-row__empty { margin: 0; padding: 14px 16px; border-radius: 16px; border: 1px dashed rgb(255 255 255 / .14); color: rgb(243 241 236 / .6); font-size: 14px; }
.tvn-row__l { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(176px, 210px); gap: 12px; overflow-x: auto; padding: 10px 4px 16px; margin: -10px -4px -8px; scroll-snap-type: x proximity; scroll-padding: 4px; overscroll-behavior-x: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
.tvn-cell { position: relative; scroll-snap-align: start; animation: mnRise .45s var(--mn-spring) both; animation-delay: calc(var(--d) * 30ms); }
.tvn-tile { position: relative; width: 100%; height: 112px; display: grid; align-content: end; gap: 3px; padding: 12px 14px; text-align: left; border-radius: 18px; cursor: pointer; color: #f7f5f0; font: inherit; overflow: hidden;
  background: linear-gradient(150deg, color-mix(in oklab, var(--c) 32%, rgb(22 23 29 / .85)), rgb(16 17 22 / .9) 70%); border: 1px solid color-mix(in oklab, var(--c) 30%, rgb(255 255 255 / .06));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .09), 0 12px 26px -16px rgb(0 0 0 / .8); transition: transform .45s var(--mn-spring), box-shadow .3s, border-color .3s; }
.tvn-tile::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--c) 45%, transparent), transparent 60%); opacity: .55; pointer-events: none; }
.tvn-tile:focus-visible { outline: none; }
@media (hover: hover) { .tvn-tile:hover { transform: perspective(700px) translateY(-5px) rotateX(6deg) scale(1.03); border-color: color-mix(in oklab, var(--c) 70%, transparent); } }
.tvn-tile:focus-visible { transform: perspective(700px) translateY(-5px) rotateX(6deg) scale(1.03); border-color: color-mix(in oklab, var(--c) 70%, transparent); box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), 0 22px 40px -18px color-mix(in oklab, var(--c) 80%, transparent); outline: none; }
.tvn-tile.is-cur { transform: perspective(700px) translateY(-6px) rotateX(7deg) scale(1.04); border-color: var(--c); box-shadow: 0 0 0 2px var(--c), 0 24px 46px -18px color-mix(in oklab, var(--c) 90%, transparent); }
.tvn-tile__n { position: absolute; top: 10px; left: 12px; font: 900 1.6rem/1 var(--font-display, var(--font-body)); font-variant-numeric: tabular-nums; color: color-mix(in oklab, var(--c) 55%, #fff); opacity: .9; text-shadow: 0 0 18px color-mix(in oklab, var(--c) 70%, transparent); }
.tvn-tile__t { position: relative; font-size: 14.5px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tvn-tile__s { position: relative; font-size: 12px; color: rgb(247 245 240 / .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvn-tile__live, .tvn-tile__on { position: absolute; top: 12px; right: 42px; font: 800 10px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: 4px 6px; border-radius: 6px; }
.tvn-tile__live { background: #e5484d; color: #fff; animation: mnPulse 2s ease-in-out infinite; }
.tvn-tile__on { background: var(--c); color: #0c0d10; top: auto; bottom: 12px; right: 12px; animation: none; }
.tvn-tile__live + .tvn-tile__on { right: 12px; }
.tvn-tile__fav { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer; background: rgb(0 0 0 / .35); color: rgb(255 255 255 / .75); transition: transform .3s var(--mn-spring), color .2s; }
.tvn-tile__fav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.tvn-tile__fav[aria-pressed="true"] { color: #ffd60a; } .tvn-tile__fav[aria-pressed="true"] svg { fill: currentColor; }
.tvn-tile__fav:active { transform: scale(.85); }

/* calm + reduced motion */
.mn-still .tvn-stage__beam, .mn-still .tvn-stage__floor, .mn-still .tvn-g__needle, .mn-still .tvn-tile__live, .mn-still .tvn-cell, .mn-still .tvn-slide, .mn-still .tvn-ring.is-low::before { animation: none !important; }
.mn-still .tvn-tile:hover, .mn-still .tvn-tile.is-cur { transform: none; }
.tv__set:fullscreen .tvn-console, .tv__set:-webkit-full-screen .tvn-console { display: none; }

/* Continue watching / Recently watched */
.tvn-tile__prog { position: absolute; left: 12px; right: 12px; bottom: 7px; height: 4px; border-radius: 3px; background: rgb(255 255 255 / .16); overflow: hidden; }
.tvn-tile__prog::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: var(--c); box-shadow: 0 0 10px var(--c); }
.tvn-tile--cont { padding-bottom: 18px; }
.tvn-tile__res { position: absolute; top: 12px; right: 52px; font: 800 11px/1 var(--font-body); font-style: normal; padding: 4px 7px; border-radius: 999px; background: rgb(0 0 0 / .45); color: #fff; font-variant-numeric: tabular-nums; }
.tvn-row__clr { flex: none; min-height: 34px; padding: 0 10px; border: 0; background: none; color: rgb(243 241 236 / .6); font: 700 12.5px/1 var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tvn-row__clr + .tvn-row__all { margin-left: 0; }
.tvn-row__h .tvn-row__clr { margin-left: auto; }
.tvn-row--networks .tvn-tile { background: linear-gradient(150deg, rgb(245 166 35 / .38), rgb(16 17 22 / .92) 72%); }
