/*
 * TFM Module — "Die Vorlesung"
 * /wp-content/themes/blocksy-child/css/tfm-academy-module.css
 *
 * Geladen auf: class-chapter Einzelseite (via php/tfm-academy-module.php)
 *
 * Voraussetzung in Elementor: äußerer Container mit Klasse .tfm-mod-root,
 * darin irgendwo das Post-Content-Widget mit Klasse .tfm-mod-body. Alles
 * andere (Vignette, Perspektive, Kerze, Eröffnung/Abschluss, Text-
 * Einstellungen) injiziert tfm-academy-module.js automatisch.
 *
 * ALLE Farben kommen aus tfm-academy-core.css, das per Enqueue-
 * Abhängigkeit immer vorher geladen wird — diese Datei definiert
 * keine eigenen Farbwerte mehr.
 *
 * ── STRUKTUR ──────────────────────────────────────────────────
 *  1. Variablen + Grundlagen
 *  2. Seiten-Gerüst (Crumb, Kicker, Titel)
 *  3. Der Raum — Lesepult-Vignette, Saal-Perspektive
 *  4. Vorlesungstext + Block-Styles (Übung, Marginal-Notiz)
 *  5. Rhythmus — Eröffnungsmoment, Abschluss-Moment, Abschnittsübergänge
 *  6. Fortschritt als Kerze (mit Wachs-Pfütze, Rauch, Aufflammen)
 *  7. Kapitel-Navigation (Vorheriges/Nächstes Modul)
 *  8. Text-Einstellungen-Panel
 *  9. Dezenter Neon-Unterton
 * 10. Responsive + Bewegungsreduktion
 */

/* ============================================================
   1. VARIABLEN + GRUNDLAGEN
   ============================================================ */

.tfm-mod-root {
  --mod-accent:      var(--academy-accent);
  --mod-accent-soft: var(--academy-accent-soft);
  --mod-accent-glow: var(--academy-accent-glow);
  --mod-accent-dim:  var(--academy-accent-dim);
  --mod-gold:        var(--academy-gold);
  --mod-ink:         var(--academy-ink);
  --mod-body:        var(--academy-body-bright);
  --mod-muted:       var(--academy-muted);

  --page-progress: 0;
  --mod-text-scale: 1;

  position: relative !important;
  max-width: 760px !important;
  width: 100% !important;
  margin: 0 auto !important;
}

.tfm-mod-root > .e-con-inner {
  max-width: 760px !important;
  width: 100% !important;
  margin: 0 auto !important;
}

/* ============================================================
   2. SEITEN-GERÜST
   ============================================================ */

.tfm-mod-crumb,
.tfm-mod-crumb * {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: 1rem !important;
  color: var(--mod-muted) !important;
  text-decoration: none !important;
  fill: var(--mod-muted) !important;
}
.tfm-mod-crumb * {
  margin: 0 !important;
}
.tfm-mod-crumb {
  display: inline-flex !important;
  gap: .4rem;
  align-items: center;
  margin-bottom: 1.2rem;
  transition: color .2s;
}
.tfm-mod-crumb:hover,
.tfm-mod-crumb:hover * {
  color: var(--mod-accent-soft) !important;
}

.tfm-mod-kicker {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--mod-accent-soft);
  opacity: .8;
  margin-bottom: 1.4rem;
}

.tfm-mod-meta {
  display: flex !important;
  align-items: baseline !important;
  gap: .5rem;
  margin-bottom: 2rem;
}
.tfm-mod-meta > .e-con-inner {
  display: flex !important;
  align-items: baseline !important;
  gap: .5rem;
  width: auto !important;
}

.tfm-mod-meta-kind,
.tfm-mod-meta-kind * {
  font-family: 'Jost', sans-serif !important;
  font-size: .72rem !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: var(--mod-accent-soft) !important;
}

.tfm-mod-meta-sep,
.tfm-mod-meta-sep * {
  font-family: 'Jost', sans-serif !important;
  font-size: .68rem !important;
  color: rgba(var(--academy-muted-rgb), .45) !important;
}

.tfm-mod-meta-num,
.tfm-mod-meta-num * {
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: .95rem !important;
  color: var(--mod-ink) !important;
}

.tfm-mod-meta-unit,
.tfm-mod-meta-unit * {
  font-family: 'Jost', sans-serif !important;
  font-size: .68rem !important;
  letter-spacing: .04em !important;
  color: rgba(var(--academy-muted-rgb), .7) !important;
}

/* ============================================================
   3. DER RAUM
   ============================================================ */

.tfm-mod-podium {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 76% at 50% 38%,
      transparent 0%, transparent 54%,
      rgba(6, 4, 12, .24) 84%, rgba(6, 4, 12, .4) 100%);
}

.tfm-mod-persp {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    transparent, rgba(var(--academy-accent-soft-rgb), .14) 40%,
    rgba(var(--academy-accent-soft-rgb), .14) 60%, transparent);
}
.tfm-mod-persp--l { left: calc(50% - 420px); transform: rotate(.6deg); transform-origin: bottom; }
.tfm-mod-persp--r { right: calc(50% - 420px); transform: rotate(-.6deg); transform-origin: bottom; }

@media (max-width: 900px) {
  .tfm-mod-persp { display: none; }
}
@media (max-width: 620px) {
  .tfm-mod-podium { display: none; }
}

/* ============================================================
   4. VORLESUNGSTEXT + BLOCK-STYLES
   ============================================================ */

.tfm-mod-surface {
  position: relative;
  padding: 2.4rem 2.6rem;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--academy-surface-lift-a), var(--academy-surface-lift-b));
  border: 1px solid rgba(var(--academy-accent-rgb), .14);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .05);
  margin-bottom: 1rem;
}
.tfm-mod-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: .5;
  background-image:
    repeating-linear-gradient(88deg,
      rgba(255, 255, 255, .012) 0px, transparent 1px,
      transparent 2px, rgba(255, 255, 255, .012) 3px),
    repeating-linear-gradient(2deg,
      rgba(255, 255, 255, .01) 0px, transparent 1px,
      transparent 3px, rgba(0, 0, 0, .015) 4px),
    radial-gradient(ellipse at 20% 15%, rgba(255, 240, 200, .03), transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(200, 180, 255, .025), transparent 55%);
}

@media (max-width: 620px) {
  .tfm-mod-surface { padding: 1.6rem 1.4rem; }
}

.tfm-mod-body {
  position: relative;
  font-size: calc(1.08rem * var(--mod-text-scale));
}
.tfm-mod-body p {
  font-family: 'Cormorant Garamond', serif;
  font-size: calc(1.08rem * var(--mod-text-scale));
  line-height: 1.9;
  color: var(--mod-body);
  margin: 0 0 1.3rem;
}
.tfm-mod-body h2,
.tfm-mod-body h3,
.tfm-mod-body h4 {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: calc(1.2rem * var(--mod-text-scale));
  color: var(--mod-accent-soft);
  margin: 2.2rem 0 .8rem;
}

.tfm-mod-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.8rem auto;
  border-radius: 8px;
  border: 1px solid rgba(var(--academy-accent-rgb), .14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.tfm-mod-body a {
  color: var(--mod-accent-soft);
  text-decoration-color: rgba(var(--academy-accent-soft-rgb), .4);
}
.tfm-mod-body a:hover {
  color: var(--mod-ink);
}

.tfm-mod-body .is-style-tfm-instruct,
.tfm-mod-body .tfm-instruct {
  position: relative;
  padding: 1rem 1.2rem;
  margin: 1.6rem 0 !important;
  border-radius: 4px;
  background: rgba(var(--academy-accent-rgb), .06);
  border-left: 2px solid var(--mod-accent);
}
.tfm-mod-body .is-style-tfm-instruct::before,
.tfm-mod-body .tfm-instruct::before {
  content: 'Exercise';
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mod-accent-soft);
  opacity: .8;
  margin-bottom: .5rem;
}

.tfm-mod-body .is-style-tfm-margin,
.tfm-mod-body .tfm-margin {
  margin: 0 0 1rem 0 !important;
  padding-left: .9rem;
  border-left: 1px solid rgba(var(--academy-accent-soft-rgb), .25);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: .82rem;
  line-height: 1.5;
  color: rgba(var(--academy-accent-soft-rgb), .55);
}
.tfm-mod-body .is-style-tfm-margin::before,
.tfm-mod-body .tfm-margin::before {
  content: '— ';
  color: rgba(var(--academy-accent-soft-rgb), .4);
}

.tfm-mod-body .tfm-highlight {
  color: var(--mod-accent-soft);
  font-style: italic;
}

/* ============================================================
   5. RHYTHMUS
   ============================================================ */

.tfm-mod-veil {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  animation: tfmModOpen 1.7s cubic-bezier(.3, .7, .3, 1) forwards;
}
@keyframes tfmModOpen {
  0%   { opacity: 1; background: radial-gradient(ellipse 18% 16% at 50% 40%, transparent 0%, rgba(6,4,12,.98) 55%); }
  70%  { opacity: 1; }
  100% { opacity: 0; background: radial-gradient(ellipse 60% 55% at 50% 40%, transparent 0%, rgba(6,4,12,.9) 85%); }
}

.tfm-mod-end {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(var(--academy-accent-rgb), .14);
}
.tfm-mod-end__glyph {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--mod-accent);
  opacity: .5;
  transition: opacity 1.4s ease, text-shadow 1.4s ease;
}
.tfm-mod-end.is-seen .tfm-mod-end__glyph {
  opacity: 1;
  text-shadow: 0 0 22px rgba(var(--academy-accent-rgb), .5);
}
.tfm-mod-end__text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: .92rem;
  color: var(--mod-muted);
  margin-top: .6rem;
  opacity: .6;
  transition: opacity 1.4s ease;
}
.tfm-mod-end.is-seen .tfm-mod-end__text {
  opacity: 1;
}

.tfm-mod-root:not(.tfm-mod-fade-off) .tfm-mod-body > * {
  opacity: 0;
  transform: translateY(14px);
}
.tfm-mod-root:not(.tfm-mod-fade-off) .tfm-mod-body > *.is-in {
  animation: tfmModRise .9s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes tfmModRise {
  to { opacity: 1; transform: none; }
}

/* ============================================================
   6. FORTSCHRITT ALS KERZE
   ============================================================ */

.tfm-mod-candle {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 40;
  width: 40px;
  text-align: center;
}
.tfm-mod-candle.is-hidden {
  display: none;
}

.tfm-mod-candle__stick {
  position: relative;
  height: 70px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.tfm-mod-candle__wax {
  width: 13px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(to bottom, #f0e2c0, #c9b48a);
  box-shadow: 0 0 6px rgba(255, 230, 180, .22);
  height: calc(10px + (1 - var(--page-progress)) * 46px);
  transition: height .15s linear;
  position: relative;
  z-index: 2;
}
.tfm-mod-candle__flame {
  position: absolute;
  left: 50%;
  width: 7px;
  height: 12px;
  margin-left: -3.5px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 70%, #fff3c0, #ffb347 45%, #ff7518 80%, transparent);
  box-shadow: 0 0 9px rgba(255, 160, 70, .75), 0 0 18px rgba(255, 120, 30, .4);
  animation: tfmModFlicker 2.3s ease-in-out infinite;
  bottom: calc(11px + (1 - var(--page-progress)) * 46px);
  transition: bottom .15s linear;
  z-index: 3;
}
@keyframes tfmModFlicker {
  0%, 100% { transform: translateX(-50%) scaleY(1) scaleX(1); opacity: 1; }
  35%      { transform: translateX(-56%) scaleY(1.12) scaleX(.9); opacity: .9; }
  65%      { transform: translateX(-44%) scaleY(.95) scaleX(1.05); opacity: 1; }
}

.tfm-mod-candle__pool {
  position: absolute;
  left: 50%;
  bottom: -2px;
  z-index: 1;
  width: calc(14px + var(--page-progress) * 22px);
  height: calc(3px + var(--page-progress) * 5px);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(240, 226, 192, .55), rgba(201, 180, 138, .25) 70%, transparent);
  transition: width .3s ease, height .3s ease;
}

.tfm-mod-candle__smoke {
  position: absolute;
  left: 50%;
  bottom: calc(11px + (1 - var(--page-progress)) * 46px + 10px);
  width: 3px;
  height: 26px;
  margin-left: -1.5px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(200, 195, 210, .16), transparent);
  border-radius: 50%;
  filter: blur(1.5px);
  animation: tfmModSmoke 3.4s ease-in infinite;
}
.tfm-mod-candle__smoke--b {
  animation-delay: 1.2s;
  opacity: .7;
}
@keyframes tfmModSmoke {
  0%   { transform: translateY(0) translateX(0) scaleX(1); opacity: 0; }
  15%  { opacity: .6; }
  100% { transform: translateY(-30px) translateX(6px) scaleX(2.2); opacity: 0; }
}

.tfm-mod-candle.is-flaring .tfm-mod-candle__flame {
  animation: tfmModFlare 1.4s ease-out;
}
@keyframes tfmModFlare {
  0%   { transform: translateX(-50%) scale(1); filter: brightness(1); }
  30%  { transform: translateX(-50%) scale(1.6); filter: brightness(1.5); }
  100% { transform: translateX(-50%) scale(1); filter: brightness(1); }
}

@media (max-width: 620px) {
  .tfm-mod-candle { display: none; }
}

/* ============================================================
   7. KAPITEL-NAVIGATION — Vorheriges/Nächstes Modul
   Bewusst OHNE umschließenden Rahmen (Border/Hintergrundfläche) — nur
   die einzelnen Buttons tragen noch einen Rand. Der Button-Text IST
   jetzt der echte Modultitel (Dynamic Tag), keine separate große
   Überschrift und kein fester Aktions-Text ("Begin Next Lecture") mehr.
   Previous links, Next rechts.

   WICHTIG: bewusst KEIN erzwungenes align-items mit !important an
   .tfm-mod-prev/.tfm-mod-next — das hat beim Pendant auf der
   Buch-Kapitel-Seite dazu geführt, dass Nicos eigene Elementor-
   Ausrichtung nie greifen konnte, egal was eingestellt wurde. Die
   Inhalts-Ausrichtung bleibt deshalb komplett Elementors eigener
   Container-Einstellung überlassen.
   ============================================================ */

.tfm-mod-nav {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2.6rem;
}
.tfm-mod-nav > .e-con-inner {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  flex-wrap: wrap;
  gap: 1.4rem;
  width: 100% !important;
}

.tfm-mod-prev,
.tfm-mod-next {
  display: flex !important;
  flex-direction: column !important;
  gap: .5rem;
  max-width: 280px;
  /* Sinnvoller Standard OHNE !important — sieht von Haus aus richtig
     aus (Previous linksbündig, Next rechtsbündig, zur jeweiligen
     Außenseite hin), lässt sich aber trotzdem von deiner eigenen
     Elementor-Einstellung überschreiben, falls gewünscht. */
  align-items: flex-start;
}
.tfm-mod-next {
  align-items: flex-end;
}
.tfm-mod-prev > .e-con-inner,
.tfm-mod-next > .e-con-inner {
  display: flex !important;
  flex-direction: column !important;
  gap: .5rem;
  width: auto !important;
  align-items: flex-start;
}
.tfm-mod-next > .e-con-inner {
  align-items: flex-end;
}
.tfm-mod-next {
  margin-left: auto;
}

.tfm-mod-prev__hint,
.tfm-mod-next__hint {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(var(--academy-muted-rgb), .65);
  /* display:flex statt nur Text: steckt Elementor den Text in ein
     verschachteltes Block-Element (z.B. <p>), erzwingt das einen
     Zeilenumbruch VOR dem ::before-Stern, unabhängig davon, dass der
     Stern selbst inline ist. Flex bindet beides in eine Zeile ein —
     derselbe Fix wie bei der Kapitel-Nummer auf der Buch-Seite. */
  display: flex !important;
  align-items: baseline;
  gap: .3em;
  white-space: nowrap;
}
.tfm-mod-next__hint {
  justify-content: flex-end;
}
.tfm-mod-prev__hint::before,
.tfm-mod-next__hint::before {
  content: '\2726';
  color: var(--mod-accent-soft);
}

/* WICHTIG: Die Klasse .tfm-mod-prev__btn / .tfm-mod-next__btn sitzt auf
   Elementors äußerem Widget-Wrapper (<div>), NICHT auf dem tatsächlichen
   klickbaren Link — der steckt drei Ebenen tiefer als <a class=
   "elementor-button">. Per Konsolen-Check bestätigt: wenn die komplette
   Optik (Rahmen, Padding, Hintergrund) auf dem WRAPPER liegt, ist die
   sichtbare Fläche größer als die tatsächliche Klickfläche — man muss
   dann exakt auf den Schriftzug klicken. Deshalb hier ALLES auf den
   echten Link gezogen (.tfm-mod-prev__btn .elementor-button), der
   Wrapper selbst bekommt keine eigene Box mehr. */
.tfm-mod-prev__btn,
.tfm-mod-next__btn {
  display: block;
  /* align-self:stretch NUR am Button — die Spalte selbst hat
     align-items:flex-start/flex-end (für den Hinweistext gedacht), das
     schrumpft normalerweise JEDES Kind auf Inhaltsbreite, unabhängig
     von width:100% weiter innen. align-self überschreibt das gezielt
     nur für dieses eine Element. */
  align-self: stretch;
}
.tfm-mod-prev__btn .elementor-button,
.tfm-mod-prev__btn .elementor-button *,
.tfm-mod-next__btn .elementor-button,
.tfm-mod-next__btn .elementor-button * {
  background: transparent !important;
  border-color: var(--mod-accent-glow) !important;
  color: var(--mod-accent-soft) !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: 1rem !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: none !important;
  white-space: normal !important;
  box-shadow: none !important;
  fill: var(--mod-accent-soft) !important;
}
.tfm-mod-prev__btn .elementor-button::before {
  content: '\2190  ';
  font-style: normal;
}
.tfm-mod-next__btn .elementor-button::after {
  content: '  \2192';
  font-style: normal;
}
.tfm-mod-prev__btn .elementor-widget-container,
.tfm-mod-next__btn .elementor-widget-container,
.tfm-mod-prev__btn .elementor-button-wrapper,
.tfm-mod-next__btn .elementor-button-wrapper {
  width: 100%;
}
.tfm-mod-prev__btn .elementor-button,
.tfm-mod-next__btn .elementor-button {
  /* flex statt inline-flex + width:100%: inline-flex schrumpft immer auf
     den Inhalt, egal wie viel Platz Container/Grow-Einstellungen in
     Elementor anbieten — das hat die Buttons klein gemacht, obwohl der
     Platz da war. */
  display: flex !important;
  width: 100%;
  justify-content: center !important;
  align-items: center !important;
  gap: .3rem !important;
  border: 1px solid var(--mod-accent-glow) !important;
  /* KEIN !important mehr bei padding — die zwei Klassen in diesem
     Selektor reichen bereits, um Elementors einfache Basis-Regel
     (.elementor-button, nur eine Klasse) zu schlagen. !important hätte
     hier zusätzlich JEDE eigene Padding-Einstellung von dir blockiert —
     genau das war die Ursache für "Padding macht nichts". */
  padding: .7rem 1.5rem;
  /* line-height ebenfalls ohne !important: Elementors Basis-Regel setzt
     1 (sehr eng), das machte den Button zusätzlich niedriger als nötig. */
  line-height: 1.4;
  border-radius: 6px !important;
  box-shadow: 0 0 16px -3px rgba(var(--academy-accent-rgb), .35) !important;
  transition: .3s;
}
/* Hintergrund NUR auf den Link selbst — nicht auf "*", sonst bekommt
   jedes verschachtelte Element (z.B. ein innerer Text-Span) beim Hover
   ebenfalls einen eigenen Hintergrund, sichtbar als Kästen ineinander. */
.tfm-mod-prev__btn .elementor-button:hover,
.tfm-mod-next__btn .elementor-button:hover {
  background: rgba(var(--academy-accent-rgb), .16) !important;
  border-color: var(--mod-gold) !important;
  color: var(--mod-ink) !important;
  box-shadow:
    0 0 22px rgba(var(--academy-gold-rgb), .3),
    0 0 20px var(--mod-accent-glow) !important;
}
.tfm-mod-prev__btn .elementor-button:hover *,
.tfm-mod-next__btn .elementor-button:hover * {
  color: var(--mod-ink) !important;
}

/* ============================================================
   8. TEXT-EINSTELLUNGEN-PANEL
   ============================================================ */

.tfm-mod-settings {
  margin: 0 0 2rem;
}

.tfm-mod-settings__trigger {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(20, 12, 35, .5);
  border: 1px solid var(--mod-accent-dim);
  color: var(--mod-accent-soft);
  font-family: 'Jost', sans-serif;
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: .2s;
}
.tfm-mod-settings__trigger:hover {
  background: rgba(var(--academy-accent-rgb), .12);
}

.tfm-mod-settings__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s cubic-bezier(.4, 0, .2, 1);
}
.tfm-mod-settings.is-open .tfm-mod-settings__panel {
  max-height: 480px;
}
.tfm-mod-settings__inner {
  margin-top: 1rem;
  padding: 1.4rem 1.5rem;
  border-radius: 8px;
  background: rgba(16, 10, 30, .6);
  border: 1px solid rgba(var(--academy-accent-rgb), .14);
}
.tfm-mod-settings__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  flex-wrap: wrap;
}
.tfm-mod-settings__row + .tfm-mod-settings__row {
  border-top: 1px solid rgba(var(--academy-accent-rgb), .08);
}
.tfm-mod-settings__label {
  font-family: 'Jost', sans-serif;
  font-size: .78rem;
  color: var(--mod-body);
}
.tfm-mod-settings__label small {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: .74rem;
  color: var(--mod-muted);
  margin-top: .15rem;
}

.tfm-mod-switch {
  position: relative;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}
.tfm-mod-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.tfm-mod-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(var(--academy-muted-rgb), .25);
  transition: background .25s;
}
.tfm-mod-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ece6f5;
  transition: transform .25s;
}
.tfm-mod-switch input:checked + .tfm-mod-switch__track {
  background: var(--mod-accent);
}
.tfm-mod-switch input:checked + .tfm-mod-switch__track::after {
  transform: translateX(18px);
}

.tfm-mod-settings__slider-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  max-width: 220px;
}
.tfm-mod-settings__slider-row span {
  font-family: 'Cormorant Garamond', serif;
  color: var(--mod-muted);
  flex-shrink: 0;
}
.tfm-mod-settings__slider-row span:first-child { font-size: .8rem; }
.tfm-mod-settings__slider-row span:last-child  { font-size: 1.1rem; }

.tfm-mod-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: rgba(var(--academy-muted-rgb), .25);
  outline: none;
}
.tfm-mod-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--mod-accent-soft);
  box-shadow: 0 0 8px var(--mod-accent-glow);
  cursor: pointer;
}
.tfm-mod-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 50%;
  background: var(--mod-accent-soft);
  box-shadow: 0 0 8px var(--mod-accent-glow);
  cursor: pointer;
}

.tfm-mod-settings__pills {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.tfm-mod-settings__pill {
  font-family: 'Jost', sans-serif;
  font-size: .64rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(var(--academy-accent-rgb), .06);
  color: var(--mod-muted);
  border: 1px solid var(--mod-accent-dim);
  border-radius: 6px;
  padding: .4rem .7rem;
  cursor: pointer;
  transition: .2s;
}
.tfm-mod-settings__pill.on {
  background: var(--mod-accent);
  color: #0d0819;
  border-color: var(--mod-accent);
}
.tfm-mod-settings__pill:hover:not(.on) {
  border-color: var(--mod-accent-soft);
  color: var(--mod-accent-soft);
}

.tfm-mod-settings__save {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .3rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: .78rem;
  color: var(--mod-muted);
}
.tfm-mod-settings__save input {
  accent-color: var(--mod-accent);
}

/* ============================================================
   9. DEZENTER NEON-UNTERTON
   ============================================================ */

.tfm-mod-title {
  text-shadow: 0 0 32px rgba(var(--academy-accent-rgb), .32) !important;
}
.tfm-mod-settings__trigger {
  box-shadow: 0 0 22px -4px rgba(var(--academy-accent-rgb), .4) !important;
}
.tfm-mod-crumb {
  text-shadow: 0 0 18px rgba(var(--academy-accent-rgb), .2) !important;
}
.tfm-mod-body .is-style-tfm-instruct {
  box-shadow: -2px 0 20px -4px rgba(var(--academy-accent-rgb), .38) !important;
}

/* ============================================================
   10. RESPONSIVE + BEWEGUNGSREDUKTION
   ============================================================ */

.tfm-mod-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  color: var(--academy-parchment);
  line-height: 1.15;
  margin: 0 0 .7rem;
  letter-spacing: .01em;
}

@media (max-width: 620px) {
  .tfm-mod-title { font-size: 1.7rem; }
  .tfm-mod-settings__row { flex-direction: column; align-items: flex-start; }
  .tfm-mod-prev,
  .tfm-mod-next {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tfm-mod-veil,
  .tfm-mod-candle__flame,
  .tfm-mod-candle__smoke,
  .tfm-mod-candle.is-flaring .tfm-mod-candle__flame {
    animation: none !important;
  }
  .tfm-mod-root .tfm-mod-body > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
/* Title: same as the chapter title (.tfm-ch-title); the theme styles the
   heading tag itself, so the rule needs !important. */
.tfm-mod-title,
.tfm-mod-title * {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 500 !important;
  font-size: clamp(2rem, 4.6vw, 2.9rem) !important;
  color: var(--academy-parchment) !important;
  line-height: 1.18 !important;
  letter-spacing: .01em !important;
  margin: 0 0 .5rem !important;
}
