/*
 * TFM Training Center — TV page (slug tfm-tv)
 * /wp-content/themes/blocksy-child/css/tfm-training-tv.css
 *
 * On top of tfm-training.css (atmosphere, door button, crumb styles come from the
 * Training Center files). Colours only from the area variables, with fallbacks.
 *
 * Text styles of label/title/description only apply inside the TV page root (.tfm-tv);
 * on the main page the same classes only connect the monitor widgets to the script.
 *
 * Contents
 *  1. Layout (top row, columns, panels)
 *  2. Now: info texts, meta row, bar, safety
 *  3. Guide: next two + day plans
 *  4. Screen (mini + player): visuals, scanlines, noise, LIVE, stand-by, OSD
 *  5. Player (viewer): popup / theater, frames, aura, controls, look menu
 *  6. Responsive + reduced motion
 */

/* ============================================================
   1. LAYOUT
   ============================================================ */

/* Top row: container .tfm-tv-top (crumb | channel) */
.tfm-tv-top {
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}
.tfm-tv-top > .elementor-element,
.tfm-tv-top > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
  width: auto !important;
}
/* Text widget .tfm-tv-chan ("Channel 01"), with an "On air" badge in front */
.tfm-tv-chan,
.tfm-tv-chan * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tv-chan p {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
}
.tfm-tv-chan p::before {
  content: 'On air';
  display: inline-flex;
  align-items: center;
  padding: 3px 8px 3px 20px;
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  background:
    radial-gradient(circle at 10px 50%, #ffffff 0 3px, transparent 3.5px),
    var(--area-accent, #cc3355);
}

/* Columns: container .tfm-tv-cols (main | guide) */
.tfm-tv-cols.e-con-full,
.tfm-tv-cols.e-con-boxed > .e-con-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 340px !important;
  gap: 28px !important;
  align-items: start !important;
}
.tfm-tv-cols > .e-con,
.tfm-tv-cols > .e-con-inner > .e-con {
  width: 100% !important;
  min-width: 0 !important;
}

/* Panels: containers .tfm-tv-panel */
.tfm-tv-panel {
  position: relative !important;
  padding: 20px 22px;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(30, 14, 22, 0.92), rgba(14, 8, 12, 0.96)) !important;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 26%, transparent) !important;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.35), 0 24px 50px -28px rgba(0, 0, 0, 0.9) !important;
}
.tfm-tv-guide {
  position: sticky !important;
  top: 20px;
}

/* Now row: container .tfm-tv-now = mini screen | info */
.tfm-tv-now.e-con-full,
.tfm-tv-now.e-con-boxed > .e-con-inner {
  display: grid !important;
  grid-template-columns: 300px minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: start !important;
}
.tfm-tv-now > .e-con,
.tfm-tv-now > .e-con-inner > .e-con {
  width: 100% !important;
  min-width: 0 !important;
}

/* ============================================================
   2. NOW: TEXTS, META, BAR, SAFETY
   ============================================================ */

.tfm-tv .tfm-tv-label,
.tfm-tv .tfm-tv-label *,
.tfm-tv-small-label,
.tfm-tv-small-label * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  color: var(--area-accent-soft, #e06080) !important;
}
.tfm-tv .tfm-tv-label p,
.tfm-tv-small-label p {
  margin: 0 !important;
}
.tfm-tv .tfm-tv-title,
.tfm-tv .tfm-tv-title * {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 600 !important;
  font-size: clamp(2rem, 3.6vw, 2.8rem) !important;
  line-height: 1.08 !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tv .tfm-tv-desc,
.tfm-tv .tfm-tv-desc * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.18rem !important;
  line-height: 1.55 !important;
  color: var(--body-text, #e4ddf0) !important;
}
.tfm-tv .tfm-tv-desc p {
  margin: 0 !important;
}

/* Meta row: container .tfm-tv-meta with small text widgets */
.tfm-tv-meta {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 6px 18px !important;
}
.tfm-tv-meta > .elementor-element,
.tfm-tv-meta > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
  width: auto !important;
}
.tfm-tv-meta,
.tfm-tv-meta * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.78rem !important;
  color: var(--muted, #b6afc7) !important;
  font-variant-numeric: tabular-nums;
}
.tfm-tv-meta p {
  margin: 0 !important;
}
.tfm-tv-meta b,
.tfm-tv-signal-word {
  color: var(--ink, #f6f1ea) !important;
  font-weight: 500 !important;
}
body.tfm-tv-is-interlude .tfm-tv-watched,
.tfm-tv-meta .is-empty,
body.tfm-tv-js .tfm-tv-desc.is-empty,
body.tfm-tv-js .tfm-tv-intensity.is-empty {
  display: none !important;
}
.tfm-tv-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -1px;
}
.tfm-tv-bars i {
  width: 3px;
  border-radius: 1px;
  background: var(--area-accent-soft, #e06080);
  transition: opacity 0.4s ease;
}
.tfm-tv-bars i:nth-child(1) { height: 4px; }
.tfm-tv-bars i:nth-child(2) { height: 7px; }
.tfm-tv-bars i:nth-child(3) { height: 10px; }
.tfm-tv-bars i:nth-child(4) { height: 12px; }

/* Bar: container .tfm-tv-bar (empty; the JS adds the fill) */
.tfm-tv-bar {
  position: relative !important;
  height: 4px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  overflow: hidden !important;
}
.tfm-tv-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--area-accent, #cc3355) 70%, transparent), var(--area-accent-soft, #e06080));
  box-shadow: 0 0 10px var(--area-accent-glow, rgba(204, 51, 85, 0.4));
  transition: width 1s linear;
}

/* Actions row */
.tfm-tv-actions {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 14px !important;
}
.tfm-tv-actions > .elementor-element,
.tfm-tv-actions > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
  width: auto !important;
}
.tfm-tv-tune-fs .elementor-button {
  padding: 8px 2px;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-tv-tune-fs .elementor-button * {
  color: inherit !important;
}
.tfm-tv-tune-fs .elementor-button:hover {
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tv-guestnote,
.tfm-tv-guestnote * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.8rem !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-tv-guestnote a {
  color: var(--area-accent-soft, #e06080) !important;
}

/* Safety: container .tfm-tv-safety with label + .tfm-tv-what + .tfm-tv-intensity */
.tfm-tv-safety {
  padding: 16px 18px;
  gap: 6px !important;
  border-radius: 10px !important;
  border-left: 2px solid var(--area-accent, #cc3355) !important;
  background: color-mix(in srgb, var(--area-accent, #cc3355) 9%, rgba(0, 0, 0, 0.3)) !important;
}
body.tfm-tv-js .tfm-tv-safety.is-empty {
  display: none !important;
}
.tfm-tv-what,
.tfm-tv-what * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.1rem !important;
  line-height: 1.5 !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tv-what p:last-child {
  margin-bottom: 0 !important;
}
.tfm-tv-intensity,
.tfm-tv-intensity * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.8rem !important;
  color: var(--body-text, #e4ddf0) !important;
}
.tfm-tv-intensity p {
  margin: 0 !important;
}

/* ============================================================
   3. GUIDE
   ============================================================ */

.tfm-tv-next-list,
.tfm-tv-day-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.tfm-tv-next-list li,
.tfm-tv-day-list li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tfm-tv-next-list time,
.tfm-tv-day-list time {
  padding-top: 3px;
  font-family: 'Jost', sans-serif;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted, #b6afc7);
}
.tfm-tv-next-list strong,
.tfm-tv-day-list strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink, #f6f1ea);
}
.tfm-tv-next-list small,
.tfm-tv-day-list small {
  font-family: 'Jost', sans-serif;
  font-size: 0.7rem;
  color: var(--muted, #b6afc7);
}
.tfm-tv-day-list li.is-past {
  opacity: 0.38;
}
.tfm-tv-day-list li.is-int strong {
  font-style: italic;
  font-weight: 400;
  color: var(--muted, #b6afc7);
}
.tfm-tv-day-list li.is-now {
  margin: 4px -10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--area-accent, #cc3355) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 45%, transparent);
}
.tfm-tv-tagnow {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--area-accent, #cc3355);
  color: #ffffff;
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  vertical-align: 3px;
}

/* Buttons without a link (they act through the JS): show the hand cursor */
.tfm-tv-tune .elementor-button,
.tfm-tv-tune-fs .elementor-button,
.tfm-tv-day-today .elementor-button,
.tfm-tv-day-tomorrow .elementor-button {
  cursor: pointer;
}
.tfm-tv-day-loading {
  margin: 10px 0 0;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  color: var(--muted, #b6afc7);
}

/* Buttons "Today's schedule" / "Tomorrow's schedule" */
.tfm-tv-days-row {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}
.tfm-tv-days-row > .elementor-element,
.tfm-tv-days-row > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
  width: auto !important;
}
.tfm-tv-day-today .elementor-button,
.tfm-tv-day-tomorrow .elementor-button {
  padding: 8px 12px;
  border-radius: 999px !important;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 35%, transparent) !important;
  background: transparent !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--area-accent-soft, #e06080) !important;
}
.tfm-tv-day-today .elementor-button[aria-pressed="true"],
.tfm-tv-day-tomorrow .elementor-button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--area-accent, #cc3355) 20%, transparent) !important;
  color: var(--ink, #f6f1ea) !important;
}
/* Container .tfm-tv-day: the list of a whole day, closed until a button is pressed */
body.tfm-tv-js .tfm-tv-day:not(.is-open) {
  display: none !important;
}
.tfm-tv-day {
  max-height: 55vh;
  overflow: auto !important;
  scrollbar-width: thin;
}

/* ============================================================
   4. SCREEN
   ============================================================ */

.tfm-tv-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  isolation: isolate;
  border-radius: 10px;
  background: #050304;
}
/* width: the mini sits in an Elementor flex column. The stretched width
   alone does not feed aspect-ratio there, so in the one-column phone layout
   the screen collapsed to its 2px border. */
.tfm-tv-mini .tfm-tv-screen {
  width: 100%;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 30%, transparent);
}
.tfm-tv-mini .tfm-tv-screen:focus-visible {
  outline: 2px solid var(--area-accent-soft, #e06080);
  outline-offset: 3px;
}
.tfm-tv-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--area-accent, #cc3355) 35%, #120810), #050304 72%);
}
.tfm-tv-visual img,
.tfm-tv-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tfm-tv-visual.is-video {
  background: #000000;
}
.tfm-tv-visual.is-video video {
  object-fit: contain;
}
.tfm-tv-spiral {
  position: absolute;
  inset: -45%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--area-accent, #cc3355) 60%, transparent) 0 12deg, transparent 12deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 0 16%, transparent 62%);
          mask: radial-gradient(circle, #000 0 16%, transparent 62%);
  animation: tfmTvSpin 22s linear infinite;
}
@keyframes tfmTvSpin {
  to { transform: rotate(360deg); }
}
.tfm-tv-pendulum {
  position: absolute;
  top: -8%;
  left: 50%;
  width: 2px;
  height: 78%;
  transform-origin: top center;
  background: linear-gradient(transparent, color-mix(in srgb, var(--area-accent-soft, #e06080) 70%, #ffffff));
  animation: tfmTvSwing 3.2s ease-in-out infinite alternate;
}
.tfm-tv-pendulum::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: -13px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, var(--area-accent-soft, #e06080) 40%, var(--area-accent, #cc3355) 70%);
  box-shadow: 0 0 30px var(--area-accent-glow, rgba(204, 51, 85, 0.4));
}
@keyframes tfmTvSwing {
  from { transform: rotate(-24deg); }
  to   { transform: rotate(24deg); }
}
.tfm-tv-testcard {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #bcbcbc 0 14.28%, #bcbc3c 14.28% 28.56%, #3cbcbc 28.56% 42.84%, #3cbc3c 42.84% 57.12%, #bc3cbc 57.12% 71.4%, #bc3c3c 71.4% 85.68%, #3c3cbc 85.68% 100%);
  filter: saturate(0.35) brightness(0.45);
}
.tfm-tv-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px);
}
.tfm-tv-noise {
  position: absolute;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: var(--tfm-tv-noise, 0.06);
  background-image: repeating-radial-gradient(circle at 17% 32%, #ffffff 0 1px, transparent 1px 3px);
  animation: tfmTvGrain 0.5s steps(3) infinite;
  transition: opacity 1s ease;
}
@keyframes tfmTvGrain {
  33% { transform: translate(3%, -2%); }
  66% { transform: translate(-2%, 3%); }
}
.tfm-tv-live {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--area-accent, #cc3355);
  color: #ffffff;
  font-family: 'Jost', sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}
.tfm-tv-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: tfmTvPulse 1.4s ease-in-out infinite;
}
@keyframes tfmTvPulse {
  50% { opacity: 0.2; }
}
.tfm-tv-hint {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  padding: 24px 12px 10px;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink, #f6f1ea);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}
.tfm-tv-standby {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.75));
}
.tfm-tv-standby span {
  font-family: 'Jost', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted, #b6afc7);
}
.tfm-tv-standby b {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink, #f6f1ea);
}
.tfm-tv-standby em {
  font-family: 'Jost', sans-serif;
  font-style: normal;
  font-size: 1.6rem;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: var(--ink, #f6f1ea);
}
.tfm-tv-osd {
  display: none;
  position: absolute;
  z-index: 4;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #e8e8e8;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
}
.tfm-tv-osd.is-tl { top: 12px; left: 14px; }
.tfm-tv-osd.is-tr { top: 12px; right: 14px; color: var(--area-accent-soft, #e06080); }
.tfm-tv-osd.is-bl { bottom: 12px; left: 14px; }
.tfm-tv-osd.is-br { bottom: 12px; right: 14px; }
.tfm-tv-audio {
  display: none;
}

/* ============================================================
   5. PLAYER (VIEWER)
   ============================================================ */

html.tfm-tv-locked {
  overflow: hidden;
}
.tfm-tv-viewer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}
.tfm-tv-viewer.is-open {
  display: flex;
}
.tfm-tv-dim {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 3, 0.9);
  backdrop-filter: blur(6px);
  animation: tfmTvFade 0.8s ease both;
}
.tfm-tv-viewer[data-mode="theater"] {
  align-items: flex-start;
  padding-top: 6vh;
}
.tfm-tv-viewer[data-mode="theater"] .tfm-tv-dim {
  background: rgba(4, 2, 3, 0.72);
  backdrop-filter: none;
}
@keyframes tfmTvFade {
  from { opacity: 0; }
}
.tfm-tv-stage {
  position: relative;
  width: min(1040px, 100%, calc((100vh - 250px) * 1.6));
  min-width: min(320px, 100%);
  animation: tfmTvGrow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes tfmTvGrow {
  from { transform: scale(0.6); opacity: 0; }
}
.tfm-tv-viewer:fullscreen {
  padding: 0;
  background: #000000;
}
.tfm-tv-viewer:fullscreen .tfm-tv-stage {
  width: min(100vw, calc((100vh - 140px) * 1.6));
}
.tfm-tv-slot .tfm-tv-screen {
  border-radius: 12px;
}
.tfm-tv-viewer:not(.opt-scan) .tfm-tv-slot .tfm-tv-scan {
  display: none;
}

/* breathing glow (combinable with every frame): a halo around the screen that
   swells and fades in a calm breathing rhythm — 10 s: in 4 · hold 1.5 · out 4.5 */
.tfm-tv-aura {
  position: absolute;
  inset: -8%;
  z-index: -1;
  border-radius: 48px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse 62% 60% at center, var(--area-accent-glow, rgba(204, 51, 85, 0.4)) 0%, color-mix(in srgb, var(--area-accent, #cc3355) 22%, transparent) 45%, transparent 72%);
  filter: blur(18px);
}
.tfm-tv-viewer.opt-breath .tfm-tv-aura {
  animation: tfmTvBreathe 10s ease-in-out infinite;
}
.tfm-tv-viewer.opt-breath .tfm-tv-frame {
  animation: tfmTvBreatheEdge 10s ease-in-out infinite;
}
@keyframes tfmTvBreathe {
  0%, 100% { opacity: 0.15; transform: scale(0.94); }
  40%, 55% { opacity: 1;    transform: scale(1.1); }
}
/* the outline of the set itself glows along (drop-shadow follows every frame shape
   and leaves the frames' own shadows untouched) */
@keyframes tfmTvBreatheEdge {
  0%, 100% { filter: drop-shadow(0 0 2px color-mix(in srgb, var(--area-accent, #cc3355) 30%, transparent)); }
  40%, 55% { filter: drop-shadow(0 0 22px var(--area-accent-soft, #e06080)) drop-shadow(0 0 48px var(--area-accent-glow, rgba(204, 51, 85, 0.4))); }
}

/* frame: clean */
.tfm-tv-viewer[data-frame="clean"] .tfm-tv-slot .tfm-tv-screen {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--area-accent, #cc3355) 45%, transparent), 0 30px 90px -20px rgba(0, 0, 0, 0.9);
}
.tfm-tv-knobs {
  display: none;
}
/* frame: television */
.tfm-tv-viewer[data-frame="crt"] .tfm-tv-frame {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 18px;
  padding: 26px 22px 30px 26px;
  border-radius: 38px;
  background: linear-gradient(160deg, #3a2a2c, #1b1113 55%, #120b0d);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08), inset 0 -10px 30px rgba(0, 0, 0, 0.6), 0 40px 90px -30px rgba(0, 0, 0, 0.95);
}
.tfm-tv-viewer[data-frame="crt"] .tfm-tv-slot .tfm-tv-screen {
  border-radius: 34px / 28px;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.85), 0 0 0 6px #0b0607;
}
.tfm-tv-viewer[data-frame="crt"] .tfm-tv-slot .tfm-tv-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.09), transparent 45%);
}
.tfm-tv-viewer[data-frame="crt"] .tfm-tv-knobs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
}
.tfm-tv-knob {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5a4446, #1a1012 70%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}
.tfm-tv-knob::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 2px;
  height: 12px;
  transform: translateX(-50%);
  background: var(--area-accent-soft, #e06080);
}
.tfm-tv-knob.is-vol {
  transform: rotate(40deg);
}
.tfm-tv-knobs small {
  font-family: 'Jost', sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  color: var(--muted, #b6afc7);
}
.tfm-tv-speaker {
  width: 56px;
  height: 70px;
  border-radius: 8px;
  background: repeating-linear-gradient(0deg, #0e0809 0 3px, #2a1c1e 3px 5px);
}
/* frame: monitor */
.tfm-tv-viewer[data-frame="mon"] .tfm-tv-frame {
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2a2a2e, #141416);
  box-shadow: inset 0 0 0 2px #3c3c40, 0 40px 90px -30px rgba(0, 0, 0, 0.95);
}
.tfm-tv-viewer[data-frame="mon"] .tfm-tv-slot .tfm-tv-screen {
  border-radius: 4px;
  filter: saturate(0.6) contrast(1.15);
}
.tfm-tv-viewer[data-frame="mon"] .tfm-tv-osd {
  display: block;
}
.tfm-tv-viewer[data-frame="mon"] .tfm-tv-slot .tfm-tv-live,
.tfm-tv-viewer[data-frame="void"] .tfm-tv-slot .tfm-tv-live {
  display: none;
}
/* frame: void */
.tfm-tv-viewer[data-frame="void"] .tfm-tv-slot .tfm-tv-screen {
  border-radius: 50% / 40%;
  -webkit-mask: radial-gradient(ellipse at center, #000 45%, transparent 72%);
          mask: radial-gradient(ellipse at center, #000 45%, transparent 72%);
}

/* side info + controls */
.tfm-tv-sideinfo {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-family: 'Jost', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted, #b6afc7);
}
.tfm-tv-sideinfo b {
  color: var(--ink, #f6f1ea);
  font-weight: 500;
}
.tfm-tv-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(12, 6, 9, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.tfm-tv-sideinfo,
.tfm-tv-controls {
  transition: opacity 0.6s ease;
}
.tfm-tv-viewer.is-idle .tfm-tv-sideinfo,
.tfm-tv-viewer.is-idle .tfm-tv-controls {
  opacity: 0;
}
.tfm-tv-viewer.is-idle {
  cursor: none;
}
.tfm-tv-v-title {
  flex: 1;
  min-width: 180px;
}
.tfm-tv-v-title b {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink, #f6f1ea);
}
.tfm-tv-v-title small {
  font-family: 'Jost', sans-serif;
  font-size: 0.7rem;
  color: var(--muted, #b6afc7);
}
/* the theme styles <button> globally, hence !important */
.tfm-tv-ctl {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  cursor: pointer;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tv-ctl-gear svg {
  transition: transform 0.6s ease;
}
.tfm-tv-ctl-gear[aria-expanded="true"] svg,
.tfm-tv-ctl-gear:hover svg {
  transform: rotate(60deg);
}
.tfm-tv-ctl:hover,
.tfm-tv-ctl[aria-pressed="true"] {
  border-color: var(--area-accent, #cc3355) !important;
}
.tfm-tv-ctl:focus-visible,
.tfm-tv-opt:focus-visible {
  outline: 2px solid var(--area-accent-soft, #e06080) !important;
  outline-offset: 2px;
}
.tfm-tv-vol {
  width: 90px;
  accent-color: var(--area-accent, #cc3355);
}

/* look menu */
.tfm-tv-lookwrap {
  position: relative;
}
.tfm-tv-looks {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: 300px;
  padding: 16px;
  border-radius: 14px;
  background: #140a0f;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 45%, transparent);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.9);
}
.tfm-tv-looks[hidden] {
  display: none;
}
.tfm-tv-looks h4 {
  margin: 0 0 8px;
  font-family: 'Jost', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--area-accent-soft, #e06080);
}
.tfm-tv-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}
.tfm-tv-opt {
  padding: 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  cursor: pointer;
  text-align: left;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tv-opt small {
  display: block;
  margin-top: 2px;
  font-size: 0.64rem;
  color: var(--muted, #b6afc7);
}
.tfm-tv-opt[aria-pressed="true"] {
  border-color: var(--area-accent, #cc3355) !important;
  background: color-mix(in srgb, var(--area-accent, #cc3355) 16%, transparent) !important;
}
.tfm-tv-toggles {
  display: grid;
  gap: 6px;
}
.tfm-tv-toggles label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  color: var(--body-text, #e4ddf0);
}
.tfm-tv-toggles input {
  width: 18px;
  height: 18px;
  accent-color: var(--area-accent, #cc3355);
}

/* ============================================================
   6. RESPONSIVE + REDUCED MOTION
   ============================================================ */

@media (max-width: 1024px) {
  .tfm-tv-cols.e-con-full,
  .tfm-tv-cols.e-con-boxed > .e-con-inner {
    grid-template-columns: 1fr !important;
  }
  .tfm-tv-guide {
    position: static !important;
  }
}
@media (max-width: 680px) {
  .tfm-tv-now.e-con-full,
  .tfm-tv-now.e-con-boxed > .e-con-inner {
    grid-template-columns: 1fr !important;
  }
  .tfm-tv-viewer[data-frame="crt"] .tfm-tv-frame {
    grid-template-columns: 1fr;
    padding: 16px;
    border-radius: 24px;
  }
  .tfm-tv-viewer[data-frame="crt"] .tfm-tv-knobs {
    flex-direction: row;
    justify-content: center;
    padding-top: 0;
  }
  .tfm-tv-looks {
    width: min(300px, calc(100vw - 48px));
  }
}
/* Phones: readable labels on the screen and 44px tap areas. */
@media (max-width: 767px) {
  .tfm-tv .tfm-tv-label,
  .tfm-tv .tfm-tv-label *,
  .tfm-tv-small-label,
  .tfm-tv-small-label * {
    font-size: 0.7rem !important;
  }
  .tfm-tv-live {
    font-size: 0.68rem;
  }
  .tfm-tv-hint {
    font-size: 0.7rem;
  }
  /* The preview next to the programme info is only ~96px wide on phones:
     its texts overlapped each other. The info beside it says the same
     (label, title, time left) and "Tune in" has its own button, so the
     preview shows only the picture here. */
  .tfm-tv-mini .tfm-tv-hint,
  .tfm-tv-mini .tfm-tv-live,
  .tfm-tv-mini .tfm-tv-standby > * {
    display: none;
  }
  .tfm-tv-tune-fs .elementor-button {
    padding: 14px 2px;
  }
  .tfm-tv-tune-fs .elementor-button,
  .tfm-tv-tune-fs .elementor-button * {
    font-size: 0.74rem !important;
  }
  .tfm-tv-day-today .elementor-button,
  .tfm-tv-day-tomorrow .elementor-button {
    padding: 13px 14px;
    font-size: 0.7rem !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tfm-tv-viewer.opt-breath .tfm-tv-frame,
  .tfm-tv-spiral,
  .tfm-tv-pendulum,
  .tfm-tv-noise,
  .tfm-tv-live::before,
  .tfm-tv-aura,
  .tfm-tv-dim,
  .tfm-tv-stage {
    animation: none !important;
  }
}
