/**
 * TFM Welcome Tavern Bar — narrated introduction to the kingdom
 * /wp-content/themes/blocksy-child/css/tfm-tavern-bar.css
 *
 * Elementor page "welcome-tavern-bar". Classes (Advanced → CSS Classes):
 *
 *   .tfm-bar-hero                 container: pretitle, title, voice, drift
 *     .tfm-bar-pre                heading (div)  "Enchanting Village · …"
 *     .tfm-bar-title              heading (h1)   "<em>The Welcome Tavern Bar</em>Before you wander"
 *     .tfm-bar-voice              text editor    split into phrases by the JS
 *     .tfm-bar-drift              button         link to #arrival
 *   .tfm-bar-story                container (full width): JS adds the contents list
 *     .tfm-bar-prose              container: the reading column
 *       .tfm-bar-chapter          container with a CSS ID (arrival, kingdom …);
 *                                 + .tfm-bar-pause adds "· · ·" after it
 *         .tfm-bar-num            heading (div)  "I"
 *         .tfm-bar-h2             heading (h2)   chapter title, also the contents label
 *         .tfm-bar-lead           text editor    centred italic opening
 *         .tfm-bar-text           text editor    body text
 *         .tfm-bar-place          container + .is-village / .is-academy / .is-square / .is-training
 *           .tfm-bar-place-title  heading (h3)   "Name <small>colour</small>"
 *           .tfm-bar-go           button         "Step inside →" / tool location
 *         .tfm-bar-tool           container (row) + area class: text + .tfm-bar-go
 *         .tfm-bar-lights         text editor    list of settings, drawn as chips
 *         .tfm-bar-begin          container (row) with linked containers .tfm-bar-card
 *           .tfm-bar-card-step / -title / -text
 *         .tfm-bar-farewell       text editor
 *
 *   .tfm-bar-guest / .tfm-bar-member   only for visitors / signed-in users
 *   <span class="tfm-bar-gl" data-tip="…">  glossary term with tooltip
 *
 * Colours only from the area variables (--area-accent …); the four area
 * blocks use the fixed area colours, like the footer.
 */

/* ============================================================
   1. FRAME
   ============================================================ */

.tfm-bar-hero,
.tfm-bar-story {
  --tfm-bar-village: #d4a843;
  --tfm-bar-academy: #5ab87a;
  --tfm-bar-square: #40d9b0;
  --tfm-bar-training: #cc3355;
  --tfm-bar-acc: var(--area-accent, #d4a843);
  --tfm-bar-acc-soft: var(--area-accent-soft, #e8c97a);
  --tfm-bar-glow: var(--area-accent-glow, rgba(212, 168, 67, 0.4));
}

/* ============================================================
   2. HERO
   ============================================================ */

.e-con.tfm-bar-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: var(--time-bg, #0d0a1a);
}
.e-con.tfm-bar-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 38% 34% at 50% 62%, color-mix(in srgb, var(--tfm-bar-acc) 26%, transparent), transparent 70%),
    radial-gradient(ellipse 45% 50% at 12% 25%, rgba(110, 50, 180, 0.2), transparent 70%),
    radial-gradient(ellipse 40% 45% at 88% 20%, color-mix(in srgb, var(--tfm-bar-acc) 10%, transparent), transparent 70%);
}
.tfm-bar-hero > .elementor-element {
  position: relative;
  z-index: 1 !important;
}

/* gold dust, inserted by the JS */
.tfm-bar-dust {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.tfm-bar-dust i {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--tfm-bar-acc-soft);
  box-shadow: 0 0 6px var(--tfm-bar-glow);
  opacity: 0;
  animation: tfmBarRise var(--d, 14s) linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes tfmBarRise {
  0%   { transform: translate(0, 0); opacity: 0; }
  15%  { opacity: 0.7; }
  85%  { opacity: 0.5; }
  100% { transform: translate(var(--x, 20px), -92vh); opacity: 0; }
}

.tfm-bar-pre,
.tfm-bar-pre * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.66rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.32em !important;
  text-transform: uppercase !important;
  color: color-mix(in srgb, var(--tfm-bar-acc) 85%, transparent) !important;
}

.tfm-bar-title .elementor-heading-title {
  margin: 14px 0 22px !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 500 !important;
  font-size: clamp(2.6rem, 7vw, 4.6rem) !important;
  line-height: 1.05 !important;
  color: var(--ink, #f6f1ea) !important;
  text-shadow: 0 0 40px color-mix(in srgb, var(--tfm-bar-acc) 25%, transparent);
}
.tfm-bar-title .elementor-heading-title em {
  display: block;
  margin-bottom: 6px;
  font-size: 0.42em;
  letter-spacing: 0.02em;
  color: var(--tfm-bar-acc-soft) !important;
}

/* !important: Elementor gives widgets max-width: 100% */
.tfm-bar-voice {
  max-width: 600px !important;
  margin: 0 auto !important;
}
.tfm-bar-voice,
.tfm-bar-voice * {
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: clamp(1.2rem, 2.3vw, 1.45rem) !important;
  line-height: 1.75 !important;
  color: #e6dcf2 !important;
}
.tfm-bar-voice p {
  margin: 0 !important;
}
/* phrases, wrapped by the JS */
.tfm-bar-phrase {
  opacity: 0;
  filter: blur(4px);
  transition: opacity 1.6s ease, filter 1.6s ease;
}
.tfm-bar-phrase.is-in {
  opacity: 1;
  filter: none;
}

.tfm-bar-drift {
  margin-top: 46px !important;
}
.tfm-bar-drift .elementor-button {
  display: inline-grid !important;
  justify-items: center;
  gap: 10px;
  padding: 6px 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase !important;
  color: color-mix(in srgb, var(--tfm-bar-acc) 75%, transparent) !important;
}
.tfm-bar-drift .elementor-button:hover {
  color: var(--tfm-bar-acc-soft) !important;
}
/* the breathing line, inserted by the JS */
.tfm-bar-drift-line {
  display: block;
  width: 1px;
  height: 46px;
  margin: 0 auto;
  background: linear-gradient(to bottom, transparent, var(--tfm-bar-acc));
  transform-origin: top;
  animation: tfmBarBreathe 4.8s ease-in-out infinite;
}
@keyframes tfmBarBreathe {
  0%, 100% { transform: scaleY(0.45); opacity: 0.5; }
  50%      { transform: scaleY(1); opacity: 1; }
}

/* ============================================================
   3. STORY — contents list + reading column
   ============================================================ */

.e-con.tfm-bar-story {
  display: grid !important;
  grid-template-columns: 210px minmax(0, 660px);
  justify-content: center;
  align-items: start;
  gap: 56px !important;
  padding: 30px 24px 60px !important;
  background: var(--time-bg, #0d0a1a);
}
.e-con.tfm-bar-prose {
  grid-column: 2;
  min-width: 0;
  width: 100% !important;
  gap: 0 !important;
  padding: 0 !important;
}
.e-con.tfm-bar-chapter {
  gap: 0 !important;
  padding: 30px 0 0 !important;
  scroll-margin-top: 110px;
}
.tfm-bar-chapter > .elementor-element {
  width: 100% !important;
}

/* contents (desktop), inserted by the JS */
.tfm-bar-toc {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 120px;
  display: grid;
  gap: 4px;
  padding-left: 16px;
  border-left: 1px solid color-mix(in srgb, var(--tfm-bar-acc) 20%, transparent);
}
.tfm-bar-toc a {
  position: relative;
  display: block;
  padding: 5px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: #8f86a8 !important;
  text-decoration: none !important;
  transition: color 0.4s ease;
}
.tfm-bar-toc a::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--time-bg, #0d0a1a);
  border: 1px solid color-mix(in srgb, var(--tfm-bar-acc) 40%, transparent);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.tfm-bar-toc a.is-read { color: #c6bdd8 !important; }
.tfm-bar-toc a.is-read::before { background: color-mix(in srgb, var(--tfm-bar-acc) 45%, transparent); }
.tfm-bar-toc a.is-on { color: var(--tfm-bar-acc-soft) !important; }
.tfm-bar-toc a.is-on::before { background: var(--tfm-bar-acc); box-shadow: 0 0 10px var(--tfm-bar-glow); }
.tfm-bar-toc a:focus-visible { outline: 2px solid var(--tfm-bar-acc-soft); outline-offset: 3px; }
.tfm-bar-toc small {
  margin-top: 10px;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  line-height: 1.5;
  color: #6f6888;
}

/* contents (phone), inserted by the JS */
.tfm-bar-toc-m {
  display: none;
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -20px 10px;
  padding: 10px 20px;
  background: color-mix(in srgb, var(--time-bg, #0d0a1a) 90%, transparent);
  backdrop-filter: blur(6px);
}
.tfm-bar-toc-m > button,
.tfm-bar-toc-m > button:hover,
.tfm-bar-toc-m > button:focus {
  padding: 5px 14px !important;
  border: 1px solid color-mix(in srgb, var(--tfm-bar-acc) 45%, transparent) !important;
  border-radius: 999px !important;
  background: none !important;
  box-shadow: none !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--tfm-bar-acc-soft) !important;
  cursor: pointer;
}
.tfm-bar-toc-m .tfm-bar-toc-list {
  display: none;
  margin-top: 8px;
}
.tfm-bar-toc-m.is-open .tfm-bar-toc-list {
  display: grid;
  gap: 2px;
}
.tfm-bar-toc-list a {
  padding: 6px 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: #c6bdd8 !important;
  text-decoration: none !important;
}

/* ============================================================
   4. TEXT
   ============================================================ */

.tfm-bar-text,
.tfm-bar-text *,
.tfm-bar-lead,
.tfm-bar-lead *,
.tfm-bar-farewell,
.tfm-bar-farewell * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.24rem !important;
  line-height: 1.85 !important;
  color: #ded5ec !important;
}
.tfm-bar-text p {
  margin: 0 0 1.15em !important;
}
.tfm-bar-text em {
  color: var(--tfm-bar-acc-soft) !important;
}
.tfm-bar-text b,
.tfm-bar-text strong {
  font-weight: 600 !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-bar-lead,
.tfm-bar-lead * {
  text-align: center;
  font-style: italic !important;
  font-size: 1.42rem !important;
  line-height: 1.7 !important;
  color: #ebe2f5 !important;
}
.tfm-bar-lead p {
  margin: 10px 0 1.3em !important;
}

.tfm-bar-num,
.tfm-bar-num * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.66rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.32em !important;
  text-transform: uppercase !important;
  color: color-mix(in srgb, var(--tfm-bar-acc) 80%, transparent) !important;
}
.tfm-bar-h2 .elementor-heading-title {
  margin: 6px 0 18px !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 500 !important;
  font-size: clamp(1.9rem, 4vw, 2.5rem) !important;
  line-height: 1.15 !important;
  color: var(--ink, #f6f1ea) !important;
}

/* soft reveal while scrolling: the JS adds .tfm-bar-rv, so without JS
   (and in the Elementor editor) everything is visible right away */
.tfm-bar-rv {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(3px);
  transition: opacity 1.4s ease, transform 1.4s ease, filter 1.4s ease;
}
.tfm-bar-rv.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* pause "· · ·", inserted by the JS after .tfm-bar-pause chapters */
.tfm-bar-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 34px 0 4px;
}
.tfm-bar-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tfm-bar-acc);
  opacity: 0.5;
  animation: tfmBarPulse 4.8s ease-in-out infinite;
}
.tfm-bar-dots i:nth-child(2) { animation-delay: 0.6s; }
.tfm-bar-dots i:nth-child(3) { animation-delay: 1.2s; }
@keyframes tfmBarPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%      { opacity: 0.9; transform: scale(1.25); }
}

/* glossary term */
.tfm-bar-gl {
  position: relative;
  border-bottom: 1px dotted color-mix(in srgb, var(--tfm-bar-acc) 80%, transparent);
  cursor: help;
}
.tfm-bar-gl::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: 230px;
  padding: 9px 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f3ead6, #e6d9bb);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.4;
  color: #2b2216;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tfm-bar-gl:hover,
.tfm-bar-gl:focus-visible {
  color: var(--tfm-bar-acc-soft) !important;
  outline: none;
}
.tfm-bar-gl:hover::after,
.tfm-bar-gl:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%);
}

/* ============================================================
   5. PLACES, TOOLS, LINKS
   ============================================================ */

/* scoped: the footer uses the same .is-* classes with its own --c */
.tfm-bar-story .is-village  { --c: var(--tfm-bar-village); }
.tfm-bar-story .is-academy  { --c: var(--tfm-bar-academy); }
.tfm-bar-story .is-square   { --c: var(--tfm-bar-square); }
.tfm-bar-story .is-training { --c: var(--tfm-bar-training); }

.e-con.tfm-bar-place {
  gap: 0 !important;
  margin: 0 0 18px !important;
  padding: 18px 20px 16px 24px !important;
  border-left: 2px solid var(--c) !important;
  border-radius: 4px 12px 12px 4px !important;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, transparent), rgba(255, 255, 255, 0.015) 70%) !important;
}
.tfm-bar-place > .elementor-element {
  width: 100% !important;
}
.tfm-bar-place-title .elementor-heading-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 10px;
  margin: 0 0 4px !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 500 !important;
  font-size: 1.45rem !important;
  line-height: 1.3 !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-bar-place-title small {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: var(--c) !important;
}
.tfm-bar-place .tfm-bar-text,
.tfm-bar-place .tfm-bar-text *,
.tfm-bar-tool .tfm-bar-text,
.tfm-bar-tool .tfm-bar-text * {
  font-size: 1.16rem !important;
  line-height: 1.75 !important;
}
.tfm-bar-place .tfm-bar-text p,
.tfm-bar-tool .tfm-bar-text p {
  margin: 0 0 8px !important;
}

/* small link in area colour: "Step inside →", "Town Square →" */
.tfm-bar-go .elementor-button {
  padding: 4px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: var(--c, var(--tfm-bar-acc)) !important;
}
.tfm-bar-go .elementor-button:hover {
  text-decoration: underline !important;
}
.tfm-bar-go .elementor-button:focus-visible {
  outline: 2px solid var(--c, var(--tfm-bar-acc));
  outline-offset: 3px;
}

/* tool: text left, location right */
.e-con.tfm-bar-tool {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: baseline !important;
  gap: 4px 18px !important;
  margin: 0 0 14px !important;
  padding: 0 0 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.tfm-bar-tool > .tfm-bar-text {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0;
}
.tfm-bar-tool > .tfm-bar-go {
  flex: 0 0 auto !important;
  width: auto !important;
  white-space: nowrap;
}
.tfm-bar-tool .tfm-bar-text p {
  margin: 0 !important;
}

/* settings, drawn as the FAB + chips */
.tfm-bar-lights {
  margin: 4px 0 18px !important;
  padding: 14px 18px 14px 82px !important;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(5, 3, 10, 0.35);
}
/* the gear of the real settings button (.tfm-settings-fab-btn) */
.tfm-bar-lights::before {
  content: '\2699';
  position: absolute;
  left: 18px;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--tfm-bar-acc) 45%, transparent);
  background: rgba(20, 14, 32, 0.9);
  box-shadow: 0 0 18px var(--tfm-bar-glow);
  font-size: 18px;
  color: var(--tfm-bar-acc-soft);
}
.tfm-bar-lights ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.tfm-bar-lights li {
  margin: 0 !important;
  padding: 3px 11px !important;
  border: 1px solid color-mix(in srgb, var(--tfm-bar-acc) 30%, transparent);
  border-radius: 999px;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: #cfc6e0 !important;
}

/* where to begin: three linked cards */
.e-con.tfm-bar-begin {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px !important;
  margin: 6px 0 24px !important;
  padding: 0 !important;
}
.e-con.tfm-bar-card {
  display: block !important;
  width: 100% !important;
  padding: 16px 16px 14px !important;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, transparent), rgba(10, 7, 18, 0.6)) !important;
  text-decoration: none !important;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.e-con.tfm-bar-card:hover {
  transform: translateY(-3px);
  border-color: var(--c) !important;
}
.e-con.tfm-bar-card:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 3px;
}
.tfm-bar-card-step,
.tfm-bar-card-step * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: var(--c) !important;
}
.tfm-bar-card-title .elementor-heading-title {
  margin: 6px 0 4px !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 500 !important;
  font-size: 1.25rem !important;
  line-height: 1.25 !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-bar-card-text,
.tfm-bar-card-text * {
  margin: 0 !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: 1.02rem !important;
  line-height: 1.45 !important;
  color: #b9b0cc !important;
}

.tfm-bar-farewell {
  margin-top: 46px !important;
  text-align: center;
}
.tfm-bar-farewell,
.tfm-bar-farewell * {
  font-style: italic !important;
  font-size: 1.4rem !important;
  color: #ebe2f5 !important;
}
.tfm-bar-farewell p {
  margin: 0 0 10px !important;
}
.tfm-bar-farewell::after {
  content: '✦';
  display: block;
  font-size: 1.8rem;
  color: var(--tfm-bar-acc);
  text-shadow: 0 0 18px var(--tfm-bar-glow);
}

/* guest / member variants */
body.logged-in:not(.elementor-editor-active) .tfm-bar-guest,
body:not(.logged-in):not(.elementor-editor-active) .tfm-bar-member {
  display: none !important;
}

/* ============================================================
   6. CANDLE — reading progress, inserted by the JS
   ============================================================ */

.tfm-bar-candle {
  position: fixed;
  z-index: 15;
  right: max(24px, calc(50% - 560px));
  top: 50%;
  width: 18px;
  height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.6s ease;
}
.tfm-bar-candle.is-on {
  opacity: 1;
}
.tfm-bar-wax {
  position: relative;
  width: 14px;
  height: var(--h, 100%);
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, #cdbf9f, #f3ead6 45%, #bfae8a);
  box-shadow: inset 0 6px 6px -4px rgba(0, 0, 0, 0.25);
  transition: height 0.4s ease;
}
.tfm-bar-wax::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -9px;
  width: 1.5px;
  height: 9px;
  margin-left: -0.75px;
  background: #2a2018;
}
.tfm-bar-flame {
  position: absolute;
  left: 50%;
  top: -30px;
  width: 10px;
  height: 20px;
  margin-left: -5px;
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: radial-gradient(ellipse at 50% 70%, #fff6d8, #ffc86a 45%, rgba(255, 140, 40, 0.7) 70%, transparent 72%);
  box-shadow: 0 0 22px 6px rgba(255, 180, 80, 0.35);
  transform-origin: 50% 90%;
  animation: tfmBarFlick 2.4s ease-in-out infinite;
}
@keyframes tfmBarFlick {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  30%      { transform: scale(1.06, 0.94) rotate(2deg); }
  60%      { transform: scale(0.95, 1.05) rotate(-1deg); }
}
.tfm-bar-dish {
  width: 30px;
  height: 6px;
  margin-top: 2px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tfm-bar-acc) 55%, transparent);
}

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

@media (max-width: 900px) {
  .e-con.tfm-bar-story {
    grid-template-columns: minmax(0, 1fr);
    gap: 0 !important;
    padding: 10px 20px 40px !important;
  }
  .e-con.tfm-bar-prose {
    grid-column: 1;
  }
  .tfm-bar-toc,
  .tfm-bar-candle {
    display: none;
  }
  .tfm-bar-toc-m {
    display: block;
  }
}

@media (max-width: 700px) {
  .e-con.tfm-bar-begin {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .e-con.tfm-bar-tool {
    flex-direction: column !important;
    gap: 2px !important;
  }
  .tfm-bar-lights {
    padding: 70px 16px 14px !important;
  }
  .tfm-bar-lights::before {
    top: 14px;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tfm-bar-rv,
  .tfm-bar-phrase {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .tfm-bar-dust,
  .tfm-bar-dots i,
  .tfm-bar-drift-line,
  .tfm-bar-flame {
    animation: none !important;
  }
  .tfm-bar-dust {
    display: none;
  }
}
