/* Motion as a television: a set on a shelf in a dark room, a real CRT picture drawn in WebGL (tv.js), a channel knob you turn,
   a guide of channels underneath. The room's light is the picture's own colour. Reduced motion: no turn-on, static or roll. */
.tv-room { --glow: 120, 110, 100; position: relative; background: #0a0908; color: #f3f1ec; padding: 96px var(--pad) 72px; scroll-margin-top: 52px; overflow: hidden; isolation: isolate; }
.tv-room::before { content: ''; position: absolute; inset: -10% -10% 0; z-index: -1; pointer-events: none; background: radial-gradient(60% 55% at 42% 46%, rgba(var(--glow), .34), rgba(var(--glow), .08) 55%, transparent 75%); transition: background .6s; }
.tv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.tv-head h2 { font-size: clamp(64px, 8vw, 120px); line-height: .9; letter-spacing: -.05em; margin: 0; font-weight: 600; }
.tv-head p { max-width: 30ch; margin: 0; color: #b9b4aa; font-size: 17px; }
.tv-stage { position: relative; max-width: 1180px; margin: 0 auto; padding-top: 118px; }
/* the antenna: two rods that lean with the pointer */
.tv-ant { position: absolute; left: 28%; top: 0; width: 360px; height: 150px; transform: translateX(-50%); pointer-events: none; z-index: 0; }
.tv-ant .rod { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.23, 1, .32, 1); }
/* the set */
.tv-set { --th: min(56vh, 600px); position: relative; z-index: 1; display: grid; grid-template-columns: auto 168px; width: fit-content; max-width: 100%; margin-inline: auto; transition: none; gap: 22px; padding: 26px; border-radius: 34px 34px 22px 22px;
  background: linear-gradient(168deg, #e6dfcf 0%, #cfc7b4 46%, #b2a994 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -10px 22px rgba(70, 55, 30, .28), inset 6px 0 14px rgba(255, 255, 255, .12), 0 40px 70px rgba(0, 0, 0, .6), 0 4px 0 #8c846f, 0 0 120px rgba(var(--glow), .16); }
.tv-set::before, .tv-set::after { content: ''; position: absolute; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, #8a826d 70%); box-shadow: 0 1px 1px #0005; }
.tv-set::before { left: 14px; } .tv-set::after { right: 14px; }
.tv-bezel { position: relative; padding: 20px; border-radius: 30px; background: linear-gradient(160deg, #1b1915, #0b0a08); box-shadow: inset 0 3px 10px #000, inset 0 -2px 0 rgba(255, 255, 255, .05), 0 1px 0 rgba(255, 255, 255, .5); }
.tv-tube { --ar: .75; position: relative; aspect-ratio: var(--ar); width: calc(var(--ar) * var(--th)); max-width: calc(100vw - 2 * var(--pad, 24px) - 330px); transition: aspect-ratio .7s cubic-bezier(.77, 0, .175, 1), width .7s cubic-bezier(.77, 0, .175, 1); border-radius: 52px / 44px; overflow: hidden; background: #000; box-shadow: inset 0 0 0 2px #000, 0 0 40px rgba(var(--glow), .28); touch-action: pan-y; cursor: ew-resize; }
.tv-tube canvas, .tv-tube video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tv-tube video { object-fit: contain; opacity: 0; pointer-events: none; }
.tv-fallback .tv-tube video { opacity: 1; } .tv-fallback .tv-tube canvas { display: none; }
.tv-glass { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(118deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .03) 22%, transparent 38%), radial-gradient(120% 100% at 50% 50%, transparent 60%, rgba(0, 0, 0, .45)); box-shadow: inset 0 0 30px rgba(0, 0, 0, .7); }
.tv-fallback .tv-glass { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px), radial-gradient(120% 100% at 50% 50%, transparent 60%, rgba(0, 0, 0, .45)); }
.tv-chnum { position: absolute; left: 6.5%; top: 8%; font: 700 clamp(18px, 2.4vw, 30px) 'Inter Tight', system-ui, sans-serif; letter-spacing: .02em; color: #7dffa0; text-shadow: 0 0 10px rgba(125, 255, 160, .75); opacity: 0; pointer-events: none; }
.tv-chnum.on { opacity: 1; transition: none; } .tv-chnum:not(.on) { transition: opacity .6s .9s; }
/* the control panel */
.tv-panel { display: grid; align-content: space-between; justify-items: center; gap: 18px; padding: 14px 6px 4px; }
.tv-dial { position: relative; width: 132px; height: 132px; touch-action: none; user-select: none; cursor: grab; outline-offset: 6px; border-radius: 50%; }
.tv-dial:active { cursor: grabbing; }
.tv-dial i { position: absolute; font: 700 11px 'Inter Tight', system-ui, sans-serif; color: #4e4738; transform: translate(-50%, -50%); }
.tv-knob { position: absolute; inset: 22px; border-radius: 50%; background: conic-gradient(from 20deg, #2b2822, #4a463d, #1e1c18, #4a463d, #2b2822); box-shadow: 0 8px 14px rgba(0, 0, 0, .45), 0 2px 0 rgba(255, 255, 255, .35) inset, 0 0 0 3px #8c846f; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.tv-knob.drag { transition: none; }
.tv-knob::after { content: ''; position: absolute; left: 50%; top: 8px; width: 5px; height: 20px; margin-left: -2.5px; border-radius: 3px; background: #ff7a2f; box-shadow: 0 0 8px rgba(255, 122, 47, .7); }
.tv-small { display: flex; gap: 22px; align-items: center; }
.tv-vol { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: conic-gradient(from 40deg, #2b2822, #4a463d, #1e1c18, #4a463d, #2b2822); box-shadow: 0 6px 10px rgba(0, 0, 0, .4), 0 2px 0 rgba(255, 255, 255, .3) inset, 0 0 0 3px #8c846f; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.tv-vol::after { content: ''; position: absolute; left: 50%; top: 5px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: #f3f1ec; }
.tv-vol[aria-pressed="true"] { transform: rotate(150deg); }
.tv-vol:focus-visible, .tv-pwr:focus-visible, .tv-dial:focus-visible, .tv-chip:focus-visible { outline: 2px solid #2b6cff; outline-offset: 4px; }
.tv-pwr { width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; background: linear-gradient(#e8e1d1, #bdb4a0); box-shadow: 0 4px 8px rgba(0, 0, 0, .35), 0 1px 0 #fff8 inset, 0 0 0 2px #8c846f; }
.tv-pwr:active { transform: translateY(2px); box-shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 0 0 2px #8c846f; }
.tv-led { width: 9px; height: 9px; border-radius: 50%; background: #5b2418; box-shadow: inset 0 1px 1px #0008; transition: background .3s, box-shadow .3s; }
.tv-pwr[aria-pressed="true"] .tv-led { background: #ff4a2a; box-shadow: 0 0 10px #ff4a2a, 0 0 22px rgba(255, 74, 42, .6); }
.tv-grille { width: 100%; height: 56px; border-radius: 8px; background: repeating-linear-gradient(90deg, #26231d 0 3px, #6e675a 3px 8px); box-shadow: inset 0 2px 5px #000a; opacity: .9; }
.tv-feet { display: flex; justify-content: space-between; padding: 0 9%; margin-top: -2px; position: relative; z-index: 0; }
.tv-feet i { width: 56px; height: 18px; border-radius: 0 0 10px 10px; background: linear-gradient(#5b5446, #2b2822); box-shadow: 0 6px 8px #0008; }
.tv-shelf { position: relative; height: 22px; margin: 0 -3%; border-radius: 4px; background: linear-gradient(#5a3d26, #3a2616); box-shadow: 0 18px 28px rgba(0, 0, 0, .7), inset 0 2px 0 rgba(255, 220, 170, .2); }
/* below the set: what is on */
.tv-now { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin: 34px 4px 18px; }
.tv-now h3 { margin: 0; font-size: clamp(28px, 3.6vw, 52px); letter-spacing: -.035em; font-weight: 500; line-height: 1; }
.tv-meta { margin: 0; font-size: 14px; color: #b9b4aa; white-space: nowrap; }
.tv-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tv-chip { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 12px; background: rgba(255, 255, 255, .05); transition: background .2s, transform .2s; min-height: 56px; }
.tv-chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 7px; display: block; }
.tv-chip b { display: block; font: 700 12px 'Inter Tight', system-ui, sans-serif; color: #7dffa0; opacity: .85; }
.tv-chip span { display: block; font-size: 14px; line-height: 1.2; }
.tv-chip[aria-pressed="true"] { background: rgba(var(--glow), .3); }
.tv-chip:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .tv-chip:hover { background: rgba(255, 255, 255, .12); } }
.tv-next { display: inline-block; margin-top: 48px; color: #f3f1ec; }
@media (max-width: 760px) {
  .tv-room { padding: 112px 12px 48px; scroll-margin-top: 88px; } .tv-head { display: block; margin-bottom: 24px; } .tv-head p { margin-top: 18px; }
  .tv-stage { padding-top: 92px; } .tv-ant { left: 50%; width: 260px; height: 110px; }
  .tv-set { grid-template-columns: 1fr; padding: 16px; border-radius: 26px; } .tv-bezel { padding: 12px; border-radius: 22px; }
  .tv-set { --th: 66svh; width: 100%; } .tv-bezel { display: grid; justify-items: center; } .tv-tube { width: min(100%, calc(var(--ar) * var(--th))); max-width: none; border-radius: 40px / 34px; }
  .tv-panel { grid-auto-flow: column; grid-template-columns: auto 1fr auto; align-items: center; padding: 6px 4px 0; } .tv-grille { display: none; } .tv-dial { width: 112px; height: 112px; } .tv-small { flex-direction: row-reverse; grid-column: 3; }
  .tv-now { display: block; } .tv-meta { margin-top: 8px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .tv-tube { transition: none; } .tv-knob, .tv-vol, .tv-ant .rod, .tv-chip, .tv-room::before { transition: none; } }
