/* ================================================================
   lulla-reader.css v1.0 (T123 build, 2026-07-01)
   Reading-loop styles for lulla.net. Loads AFTER custom.css.
   Pairs with lulla-reader.js. Tokens only; the ONLY hex literals
   live in the sepia token block and the corpus accent block, both
   fenced with LV-HEX-OK markers for the validator.
   Sections:
     1  sepia theme tokens (+ dark-media guards)
     2  reader vars, display utilities, stroke
     3  chapter opener (parva-tag, subtitle, post title)
     4  shirorekha divider
     5  body type bump (reader scale + leading)
     6  meta line
     7  prev/next chapter nav (.lv-chnav)
     8  progress milestones
     9  toc rail
    10  resume pill
    11  fab stack + settings panel
    12  glossary popover
    13  darshan lightbox
    14  reveal grammar (gated under html.lv-js)
    15  sound toggle bars
    16  idle toast
    17  view transitions + curtain
    18  magnetic buttons
    19  hub read chips
    20  corpus accents
    21  print
   ================================================================ */

/* ================================================================
   1. SEPIA THEME TOKENS  (data-theme="sepia")
   /* LV-HEX-OK-START */
:root[data-theme="sepia"] {
  --lv-bg:          #F3E9D2;
  --lv-bg-soft:     #EADDC0;
  --lv-bg-card:     #F9F1DE;
  --lv-ink:         #2A2115;
  --lv-ink-soft:    #5C4E3A;
  --lv-ink-faint:   #6E5F49;
  --lv-accent:      #B5650A;
  --lv-accent-deep: #7E2020;
  --lv-accent-text: #7E2020;
  --lv-tech:        #9A5A10;
  --lv-tech-soft:   #E7D3AE;
  --lv-line:        rgba(42, 33, 21, 0.14);
  --lv-line-strong: rgba(42, 33, 21, 0.3);
  --lv-shadow:      0 1px 2px rgba(42, 33, 21, 0.05), 0 8px 24px rgba(42, 33, 21, 0.08);
  --lv-glow:        rgba(181, 101, 10, 0.14);
  --lv-btn-ink:     #FFFFFF;
  color-scheme: light;
}

/* Guard: custom.css ships an OS-dark media block scoped to
   :root:not([data-theme="light"]), which also matches sepia.
   Re-assert the sepia tokens inside the same media condition;
   this file loads after custom.css, so equal specificity wins. */
@media (prefers-color-scheme: dark) {
  :root[data-theme="sepia"] {
    --lv-bg:          #F3E9D2;
    --lv-bg-soft:     #EADDC0;
    --lv-bg-card:     #F9F1DE;
    --lv-ink:         #2A2115;
    --lv-ink-soft:    #5C4E3A;
    --lv-ink-faint:   #6E5F49;
    --lv-accent:      #B5650A;
    --lv-accent-deep: #7E2020;
    --lv-accent-text: #7E2020;
    --lv-tech:        #9A5A10;
    --lv-tech-soft:   #E7D3AE;
    --lv-line:        rgba(42, 33, 21, 0.14);
    --lv-line-strong: rgba(42, 33, 21, 0.3);
    --lv-shadow:      0 1px 2px rgba(42, 33, 21, 0.05), 0 8px 24px rgba(42, 33, 21, 0.08);
    --lv-glow:        rgba(181, 101, 10, 0.14);
    --lv-btn-ink:     #FFFFFF;
  }
}
/* LV-HEX-OK-END */

/* Guard: custom.css's legacy OS-dark block hardcodes element colors
   (headings, links, blockquote, cards) with selectors that also match
   sepia. Re-route them to tokens at equal specificity, later cascade. */
:root[data-theme="sepia"] h1,
:root[data-theme="sepia"] h2,
:root[data-theme="sepia"] h3,
:root[data-theme="sepia"] h4,
:root[data-theme="sepia"] h5,
:root[data-theme="sepia"] h6 { color: var(--lv-ink); }
:root[data-theme="sepia"] a { color: var(--lv-accent); }
:root[data-theme="sepia"] a:hover { color: var(--lv-accent-deep); }
:root[data-theme="sepia"] blockquote {
  background: var(--lv-bg-soft);
  border-left-color: var(--lv-accent);
}
:root[data-theme="sepia"] .chapter-card,
:root[data-theme="sepia"] .wp-block-group.chapter-card {
  background: var(--lv-bg-card);
  border-color: var(--lv-line);
}
:root[data-theme="sepia"] .salok-label { color: var(--lv-ink-soft); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="sepia"] .lulla-toggle .lulla-toggle__sun { display: none; }
  :root[data-theme="sepia"] .lulla-toggle .lulla-toggle__moon { display: block; }
}

/* ================================================================
   2. READER VARS + DISPLAY UTILITIES
   ================================================================ */
:root {
  --lv-reader-scale: 1;
  --lv-reader-leading: 1.8;
}

.lv-display {
  font-family: 'Rozha One', 'Rozha Fallback', 'Noto Serif Devanagari', serif;
  font-weight: 400;
}

/* Stroked-outline display treatment; solid color where text-stroke
   is unsupported. */
.lv-stroke { color: var(--lv-accent-text); }
@supports (-webkit-text-stroke: 1px red) {
  .lv-stroke {
    -webkit-text-stroke: 1px var(--lv-accent-text);
    color: transparent;
    paint-order: stroke;
  }
}

/* ================================================================
   3. CHAPTER OPENER  (.lulla-epic header.chapter + post title)
   ================================================================ */
.lulla-epic header.chapter { margin: 0 0 1.7rem; }

.lulla-epic header.chapter .parva-tag {
  position: relative;
  display: inline-block;
  padding-top: 0.75rem;
  font-family: var(--lv-font-script);
  font-weight: 600;
  font-size: 0.85rem;
  /* Devanagari must not be letter-spaced apart; matras and the shirorekha
     need contiguous clusters. Keep only a whisper of tracking. */
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lv-accent-text);
}
/* shirorekha rule above the kicker */
.lulla-epic header.chapter .parva-tag::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 1px;
  background: var(--lv-line-strong);
}

.lulla-epic header.chapter .subtitle {
  font-family: 'Noto Serif Devanagari', 'Noto Serif', serif;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--lv-ink-soft);
  margin-top: 0.4rem;
}

body.lv-chapter h1.wp-block-post-title {
  font-family: 'Rozha One', 'Rozha Fallback', 'Noto Serif Devanagari', serif;
  font-weight: 400;
  line-height: 1.35;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  letter-spacing: normal;
  color: var(--lv-ink);
}

/* ================================================================
   4. SHIROREKHA DIVIDER  (.entry-content hr + .lv-shirorekha)
   ================================================================ */
.entry-content hr,
.lv-shirorekha {
  position: relative;
  overflow: visible;
  border: 0;
  height: 1px;
  margin: 2.4rem auto;
  background: linear-gradient(90deg, transparent, var(--lv-line-strong) 18%, var(--lv-line-strong) 82%, transparent);
}
.entry-content hr::after,
.lv-shirorekha::after {
  content: "\2022";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0 0.6em;
  background: var(--lv-bg);
  color: var(--lv-accent);
  font-size: 0.9rem;
  line-height: 1;
}

/* ================================================================
   5. BODY TYPE BUMP  (chapter prose, reader scale + leading)
   ================================================================ */
body.lv-chapter .entry-content p,
body.lv-chapter .entry-content li {
  font-size: calc(clamp(1.0625rem, 1rem + 0.45vw, 1.1875rem) * var(--lv-reader-scale, 1));
  line-height: calc(var(--lv-reader-leading, 1.8));
}

/* ================================================================
   6. READING META LINE
   ================================================================ */
.lv-meta-line {
  font-family: var(--lv-font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--lv-ink-faint);
  margin: 0.15rem 0 1.6rem;
}

/* ================================================================
   7. PREV / NEXT CHAPTER NAV  (.lv-chnav)
   ================================================================ */
.lv-chnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 2.8rem 0 1rem;
  font-family: var(--lv-font-ui);
}
@media (max-width: 640px) {
  .lv-chnav { grid-template-columns: 1fr; }
}

.lv-chnav__card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 44px;
  padding: 1.1rem 1.3rem;
  background: var(--lv-bg-card);
  border: 1px solid var(--lv-line);
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s, box-shadow 0.35s;
}
.lv-chnav__card:hover,
.lv-chnav__card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--lv-accent);
  box-shadow: 0 10px 26px var(--lv-glow, transparent), var(--lv-shadow);
}
.lv-chnav__card--next {
  text-align: right;
  align-items: flex-end;
  background: color-mix(in srgb, var(--lv-accent) 7%, var(--lv-bg-card));
  border-color: color-mix(in srgb, var(--lv-accent) 40%, var(--lv-line-strong));
}
.lv-chnav__kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lv-ink-faint);
}
.lv-chnav__title {
  font-family: 'Noto Serif Devanagari', 'Noto Serif', serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--lv-ink);
}
.lv-chnav__all {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--lv-ink-faint);
  text-decoration: none;
  transition: color 0.25s;
}
.lv-chnav__all:hover { color: var(--lv-accent-text); }
.lv-chnav a:focus-visible {
  outline: 2px solid var(--lv-accent);
  outline-offset: 3px;
}

/* ================================================================
   8. PROGRESS MILESTONES  (#lulla-progress stays 3px; overlay adds dots)
   ================================================================ */
.lv-milestones {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  z-index: 71;
  pointer-events: none;
}
.lv-milestone {
  position: absolute;
  top: -1px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--lv-accent-deep);
  opacity: 0.6;
}

/* ================================================================
   9. TOC RAIL  (.lv-toc, desktop >= 1100px only)
   ================================================================ */
.lv-toc {
  position: fixed;
  right: 18px;
  top: 120px;
  width: 216px;
  max-height: calc(100vh - 200px);
  overflow: auto;
  z-index: 900;
  padding: 0.9rem;
  border: 1px solid var(--lv-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--lv-bg-soft) 60%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--lv-font-ui);
  font-size: 0.82rem;
}
@media (max-width: 1099.98px) {
  .lv-toc { display: none; }
}
.lv-toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.lv-toc__title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lv-accent-text);
}
.lv-toc__btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: -10px -10px -10px 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--lv-ink-faint);
  cursor: pointer;
  transition: color 0.2s;
}
.lv-toc__btn:hover,
.lv-toc__btn:focus-visible { color: var(--lv-accent-text); }
.lv-toc__list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.lv-toc__list li { margin: 0; }
.lv-toc__list a {
  display: block;
  padding: 0.3rem 0.4rem 0.3rem 0.65rem;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--lv-ink-soft);
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.lv-toc__list a:hover { color: var(--lv-accent-text); }
.lv-toc__list a.is-current {
  color: var(--lv-accent-text);
  border-left-color: var(--lv-accent);
}
.lv-toc.is-collapsed { width: auto; }
.lv-toc.is-collapsed .lv-toc__list { display: none; }

/* ================================================================
   10. RESUME PILL  (.lv-resume)
   ================================================================ */
.lv-resume {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1210;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: calc(100vw - 2rem);
  padding: 0.4rem 0.4rem 0.4rem 1.1rem;
  border: 1px solid var(--lv-line-strong);
  border-radius: 999px;
  background: var(--lv-bg-card);
  box-shadow: var(--lv-shadow);
  color: var(--lv-ink);
  font-family: var(--lv-font-ui);
  font-size: 0.85rem;
  animation: lv-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.lv-resume[hidden] { display: none; }
.lv-resume__txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-resume__btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--lv-accent-deep);
  color: var(--lv-bg);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lv-resume__btn:hover { box-shadow: 0 8px 20px var(--lv-glow, transparent); }
.lv-resume__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--lv-ink-faint);
  font-size: 1.05rem;
  cursor: pointer;
  transition: color 0.2s;
}
.lv-resume__close:hover,
.lv-resume__close:focus-visible { color: var(--lv-ink); }
@keyframes lv-rise {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ================================================================
   11. FAB STACK + SETTINGS PANEL
   ================================================================ */
.lv-fabs {
  position: fixed;
  right: 18px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 1240;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
/* when reader.js folds the theme toggle into the stack, neutralise
   its fixed positioning (custom.css pins it with !important) */
.lv-fabs .lulla-toggle {
  position: static !important;
  bottom: auto !important;
  right: auto !important;
}
/* toggle left outside the stack: clear its corner spot */
body:not(:has(.lv-fabs .lulla-toggle)) .lv-fabs {
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
}
/* clear the mobile bottom nav (64px) */
@media (max-width: 900px) {
  body:has(.lulla-mobile-bottom-nav) .lv-fabs {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}

.lv-fab {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--lv-line-strong);
  border-radius: 999px;
  background: var(--lv-bg-card);
  color: var(--lv-ink);
  box-shadow: var(--lv-shadow);
  cursor: pointer;
  font-family: var(--lv-font-ui);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.lv-fab:hover { transform: translateY(-1px); border-color: var(--lv-accent); }
.lv-fab:focus-visible { outline: 2px solid var(--lv-accent); outline-offset: 2px; }
.lv-fab--reader {
  font-family: 'Noto Serif Devanagari', 'Noto Serif', serif;
  font-size: 1.15rem;
  line-height: 1;
}

.lv-panel {
  position: fixed;
  right: 18px;
  bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  z-index: 1260;
  width: min(320px, calc(100vw - 36px));
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid var(--lv-line);
  border-radius: 16px;
  background: var(--lv-bg-card);
  box-shadow: var(--lv-shadow);
  color: var(--lv-ink);
  font-family: var(--lv-font-ui);
}
.lv-panel[hidden] { display: none; }
.lv-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.lv-panel__title {
  font-family: 'Noto Serif Devanagari', 'Noto Serif', serif;
  font-weight: 600;
  font-size: 1rem;
}
.lv-panel__close {
  width: 44px;
  height: 44px;
  margin: -8px -12px -8px 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--lv-ink-faint);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s;
}
.lv-panel__close:hover,
.lv-panel__close:focus-visible { color: var(--lv-ink); }
.lv-panel__label {
  margin: 0.9rem 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lv-ink-faint);
}

/* segmented control (leading, theme) */
.lv-seg { display: flex; gap: 6px; }
.lv-seg button {
  flex: 1;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.5rem;
  border: 1px solid var(--lv-line);
  border-radius: 10px;
  background: transparent;
  color: var(--lv-ink-soft);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.lv-seg button[aria-pressed="true"] {
  border-color: var(--lv-accent);
  color: var(--lv-accent-text);
  background: color-mix(in srgb, var(--lv-accent) 10%, transparent);
}
.lv-seg button:focus-visible {
  outline: 2px solid var(--lv-accent);
  outline-offset: 2px;
}

/* stepper (font size - / +) */
.lv-stepper { display: flex; align-items: center; gap: 8px; }
.lv-stepper button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--lv-line);
  border-radius: 10px;
  background: transparent;
  color: var(--lv-ink-soft);
  font-family: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lv-stepper button:hover,
.lv-stepper button:focus-visible {
  border-color: var(--lv-accent);
  color: var(--lv-accent-text);
}
.lv-stepper button:focus-visible {
  outline: 2px solid var(--lv-accent);
  outline-offset: 2px;
}
.lv-stepper button:disabled {
  opacity: 0.35;
  cursor: default;
  border-color: var(--lv-line);
  color: var(--lv-ink-faint);
}
.lv-stepper__val {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  color: var(--lv-ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ================================================================
   12. GLOSSARY  (.lv-gloss spans + .lv-pop popover)
   ================================================================ */
.lv-gloss {
  border-bottom: 1px dashed color-mix(in srgb, var(--lv-accent-text) 32%, transparent);
  cursor: help;
  transition: border-bottom-color .15s ease;
}
.lv-gloss:hover,
.lv-gloss:focus-visible {
  border-bottom-color: var(--lv-accent-text);
}
.lv-gloss:focus-visible {
  outline: 2px solid var(--lv-accent-text);
  outline-offset: 2px;
  border-radius: 3px;
}
.lv-pop {
  position: absolute;
  z-index: 1200;
  max-width: 300px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--lv-line);
  border-radius: 12px;
  background: var(--lv-bg-card);
  box-shadow: var(--lv-shadow);
  color: var(--lv-ink);
}
.lv-pop__kicker {
  font-family: var(--lv-font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lv-accent-text);
  margin-bottom: 0.3rem;
}
.lv-pop__word {
  font-family: 'Noto Serif Devanagari', 'Noto Serif', serif;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.5;
}
.lv-pop__gloss {
  margin: 0.25rem 0 0;
  font-family: 'Noto Serif Devanagari', 'Noto Serif', serif;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--lv-ink-soft);
}

/* ================================================================
   13. DARSHAN LIGHTBOX  (.lv-lb)
   ================================================================ */
html.lv-js .entry-content figure img { cursor: zoom-in; }

.lv-lb {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--lv-bg) 96%, transparent);
  animation: lv-fade 0.25s ease both;
}
.lv-lb[hidden] { display: none; }
.lv-lb__img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 8px;
  box-shadow: var(--lv-shadow);
  touch-action: none;
  cursor: grab;
  will-change: transform;
}
.lv-lb__img:active { cursor: grabbing; }
.lv-lb__cap {
  position: absolute;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: 80vw;
  text-align: center;
  font-family: var(--lv-font-ui);
  font-size: 0.85rem;
  color: var(--lv-ink-soft);
}
.lv-lb__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lv-line-strong);
  border-radius: 999px;
  background: var(--lv-bg-card);
  color: var(--lv-ink);
  font-size: 1.15rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.lv-lb__close:hover { border-color: var(--lv-accent); transform: rotate(90deg); }
.lv-lb__close:focus-visible { outline: 2px solid var(--lv-accent); outline-offset: 2px; }
body.lv-lock { overflow: hidden; }
@keyframes lv-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ================================================================
   14. REVEAL GRAMMAR  (gated: only when html.lv-js, never no-JS)
   ================================================================ */
html.lv-js .entry-content figure,
html.lv-js .entry-content h2 {
  opacity: 0.001;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.lv-js .entry-content figure.lv-in,
html.lv-js .entry-content h2.lv-in {
  opacity: 1;
  transform: none;
}
/* helper for above-the-fold elements: visible instantly, no motion */
html.lv-js .entry-content figure.lv-noanim,
html.lv-js .entry-content h2.lv-noanim { transition: none; }

/* ================================================================
   15. SOUND TOGGLE  (.lv-soundbtn, 4 waveform bars)
   ================================================================ */
.lv-soundbtn .lv-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 15px;
  pointer-events: none;
}
.lv-soundbtn .lv-bars i {
  width: 2.5px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: 50% 100%;
}
/* static, uneven bars while muted */
.lv-soundbtn .lv-bars i:nth-child(1) { transform: scaleY(0.4); }
.lv-soundbtn .lv-bars i:nth-child(2) { transform: scaleY(0.7); }
.lv-soundbtn .lv-bars i:nth-child(3) { transform: scaleY(0.5); }
.lv-soundbtn .lv-bars i:nth-child(4) { transform: scaleY(0.65); }
/* animated when sound is on */
.lv-soundbtn[aria-pressed="true"] { color: var(--lv-accent-text); border-color: var(--lv-accent); }
.lv-soundbtn[aria-pressed="true"] .lv-bars i {
  animation: lv-bar 1.1s ease-in-out infinite alternate;
}
.lv-soundbtn[aria-pressed="true"] .lv-bars i:nth-child(2) { animation-delay: 0.18s; }
.lv-soundbtn[aria-pressed="true"] .lv-bars i:nth-child(3) { animation-delay: 0.36s; }
.lv-soundbtn[aria-pressed="true"] .lv-bars i:nth-child(4) { animation-delay: 0.54s; }
@keyframes lv-bar {
  from { transform: scaleY(0.3); }
  to   { transform: scaleY(1); }
}

/* ================================================================
   16. IDLE TOAST  (.lv-toast)
   ================================================================ */
.lv-toast {
  position: fixed;
  bottom: 148px;
  left: 50%;
  transform: translate(-50%, 8px);
  z-index: 1215;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--lv-line);
  border-radius: 999px;
  background: var(--lv-bg-card);
  box-shadow: var(--lv-shadow);
  color: var(--lv-ink-soft);
  font-family: var(--lv-font-ui);
  font-size: 0.85rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.lv-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ================================================================
   17. VIEW TRANSITIONS + CURTAIN
   ================================================================ */
/* Page transitions: one grammar in the site header CSS (theme/inc/chrome-header.php, scripts/build_static_header.py), 2026-09-27. */

/* JS-driven title card shown on pagereveal, then lifted away */
.lv-curtain {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background: var(--lv-bg);
}
.lv-curtain__title {
  font-family: 'Rozha One', 'Rozha Fallback', 'Noto Serif Devanagari', serif;
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.35;
  color: var(--lv-accent-text);
  padding: 0 1.2rem;
  text-align: center;
  max-width: 26ch;
}
.lv-curtain.is-leaving {
  animation: lv-curtain-lift 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes lv-curtain-lift {
  to { opacity: 0; transform: translateY(-3vh); }
}

/* ================================================================
   18. MAGNETIC BUTTONS  (JS writes transform while hovered)
   ================================================================ */
.lv-magnet {
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

/* ================================================================
   19. HUB READ CHIP  (.lv-readchip)
   ================================================================ */
.lv-readchip {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 0.4em;
  padding: 0 0.45em;
  border: 1px solid var(--lv-line-strong);
  border-radius: 999px;
  font-family: var(--lv-font-ui);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--lv-accent-text);
}

/* ================================================================
   20. CORPUS ACCENTS  (parva-tag color only, warm family)
   /* LV-HEX-OK-START */
body.lv-corpus-ramayana      { --lv-corpus: #A34E08; }
body.lv-corpus-mahabharata   { --lv-corpus: #8B1A1A; }
body.lv-corpus-devi-mahatmya { --lv-corpus: #7E2020; }
body.lv-corpus-bhagavatam    { --lv-corpus: #935B10; }
body.lv-corpus-harivamsha    { --lv-corpus: #7C4A0B; }

:root[data-theme="dark"] body.lv-corpus-ramayana      { --lv-corpus: #E9A45C; }
:root[data-theme="dark"] body.lv-corpus-mahabharata   { --lv-corpus: #E88C8C; }
:root[data-theme="dark"] body.lv-corpus-devi-mahatmya { --lv-corpus: #EB9A9A; }
:root[data-theme="dark"] body.lv-corpus-bhagavatam    { --lv-corpus: #E5B36B; }
:root[data-theme="dark"] body.lv-corpus-harivamsha    { --lv-corpus: #DFA85F; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="sepia"]) body.lv-corpus-ramayana      { --lv-corpus: #E9A45C; }
  :root:not([data-theme="light"]):not([data-theme="sepia"]) body.lv-corpus-mahabharata   { --lv-corpus: #E88C8C; }
  :root:not([data-theme="light"]):not([data-theme="sepia"]) body.lv-corpus-devi-mahatmya { --lv-corpus: #EB9A9A; }
  :root:not([data-theme="light"]):not([data-theme="sepia"]) body.lv-corpus-bhagavatam    { --lv-corpus: #E5B36B; }
  :root:not([data-theme="light"]):not([data-theme="sepia"]) body.lv-corpus-harivamsha    { --lv-corpus: #DFA85F; }
}
/* LV-HEX-OK-END */

body[class*="lv-corpus"] .lulla-epic .parva-tag {
  color: var(--lv-corpus, var(--lv-accent-text));
}

/* ================================================================
   21. PRINT
   ================================================================ */
@media print {
  .lv-fabs,
  .lv-toc,
  .lv-resume,
  .lv-toast,
  .lv-curtain,
  .lv-panel,
  .lv-pop,
  .lv-lb,
  .lv-milestones,
  .lv-chnav { display: none !important; }
  html.lv-js .entry-content figure,
  html.lv-js .entry-content h2 { opacity: 1; transform: none; }
}

/* ================================================================
   REDUCED MOTION: no movement anywhere, instant states
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  html.lv-js .entry-content figure,
  html.lv-js .entry-content h2 {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .lv-resume { animation: none; }
  .lv-toast { transition: none; transform: translate(-50%, 0); }
  .lv-lb { animation: none; }
  .lv-lb__close { transition: none; }
  .lv-lb__close:hover { transform: none; }
  .lv-curtain.is-leaving { animation-duration: 0.001s; }
  .lv-magnet { transition: none; will-change: auto; transform: none !important; }
  .lv-soundbtn[aria-pressed="true"] .lv-bars i {
    animation: none;
    transform: scaleY(0.85);
  }
  .lv-fab,
  .lv-chnav__card,
  .lv-resume__btn,
  .lv-toc__btn,
  .lv-seg button,
  .lv-stepper button { transition: none; }
  .lv-chnav__card:hover,
  .lv-chnav__card:focus-visible,
  .lv-fab:hover { transform: none; }
}

/* ================================================================
   22. LANGUAGE PILL + STALE NOTE  (i18n, 2026-07-02)
   ================================================================ */
.lv-langpill {
  position: fixed;
  left: 18px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--lv-line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--lv-bg-card) 88%, transparent);
  backdrop-filter: blur(8px);
  color: var(--lv-accent-text);
  font-family: var(--lv-font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: var(--lv-shadow);
}
.lv-langpill:focus-visible { outline: 2px solid var(--lv-accent); outline-offset: 2px; }
@media print { .lv-langpill { display: none; } }

.lv-stale-note {
  margin: 0 0 1.4rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--lv-line-strong);
  border-left: 3px solid var(--lv-accent);
  border-radius: 10px;
  background: var(--lv-bg-soft);
  color: var(--lv-ink-soft);
  font-size: 0.92rem;
}

/* Item 8 (2026-07-04): chnav text uses HTML classes __k/__t/__hub (not __kicker/__title);
   they were inheriting a too-light color on the accent-tinted card (3.55-3.76:1).
   Pin AA-passing tokens (verified: ink-soft 6.7-8.9, ink 13-16, accent-text 8.2 on card). */
.lv-chnav__k { color: var(--lv-ink-soft); }
.lv-chnav__t { color: var(--lv-ink); }
.lv-chnav__hub { color: var(--lv-accent-text); }
