/* ============================================================
   Sadhguru · Poems — a live e-book
   Palette and proportions borrowed from the published poem page:
   deep #00334a, cream #faf7f0, poem ink #dfd6c4, gold #c9a86a.
   ============================================================ */

:root {
  --teal: #00334a;
  --teal-deep: #002230;
  --teal-soft: #0a455c;
  --ink: #10313d;
  --ink-soft: #2a4650;
  --cream: #faf7f0;
  --sand: #dfd6c4;
  --gold: #c9a86a;
  --gold-bright: #e2c48c;
  --copper: #cf4520;
  --parchment: #f2e9d8;
  --paper: #fbf6ec;
  --muted: #7d7263;
  --line: rgba(75, 61, 40, .16);

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --sidebar-w: 326px;
  --player-h: 98px;

  --pad: clamp(18px, 4vw, 54px);
  --leaf-pad: clamp(26px, 4.3vw, 60px);

  --ease: cubic-bezier(.22, .78, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  background:
    radial-gradient(1200px 720px at 8% -8%, #fffaf0 0%, rgba(255, 250, 240, 0) 62%),
    radial-gradient(900px 640px at 102% 0%, #eadcc3 0%, rgba(234, 220, 195, 0) 58%),
    linear-gradient(165deg, #f5eddd 0%, #efe4d1 52%, #ebdfc9 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 110%, rgba(93, 67, 35, .10), transparent 70%),
    linear-gradient(90deg, rgba(120, 96, 60, .035) 1px, transparent 1px);
  background-size: auto, 88px 100%;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.noscript {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 200;
  padding: 18px 24px;
  background: var(--teal);
  color: var(--cream);
  text-align: center;
  font-size: 13px;
  letter-spacing: .04em;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

::selection {
  background: rgba(201, 168, 106, .32);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

button {
  font: inherit;
  color: inherit;
}

a { color: inherit; }

/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding-bottom: var(--player-h);
  background:
    linear-gradient(174deg, #fcf8ef 0%, #f4ebda 48%, #efe2cc 100%);
  border-right: 1px solid var(--line);
  box-shadow: 22px 0 50px -42px rgba(52, 37, 18, .45);
  transform: translateX(0);
  transition: transform .46s var(--ease);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background:
    radial-gradient(80% 30% at 50% 0%, rgba(255, 255, 255, .55), transparent 70%),
    linear-gradient(90deg, rgba(255, 255, 255, .28), transparent 12%, transparent 88%, rgba(93, 66, 29, .06));
}

.sidebar > * { position: relative; z-index: 1; }

body.sidebar-collapsed .sidebar { transform: translateX(calc(-100% - 2px)); }

.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 30px 26px 20px;
}

.brand { min-width: 0; }

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(201, 168, 106, .62);
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  margin-bottom: 16px;
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 13px;
  background: var(--gold);
  opacity: .55;
}
.brand-mark::before { transform: rotate(45deg); }
.brand-mark::after { transform: rotate(-45deg); }
.brand-mark span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, .12);
}

.brand-title {
  display: block;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  line-height: .92;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
}
.brand-title span {
  display: block;
  font-size: 24px;
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: .02em;
}

.brand-sub {
  margin: 13px 0 0;
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

.icon-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background .2s, color .2s, transform .2s;
}
.icon-btn:hover { background: rgba(0, 51, 74, .07); }
.icon-btn:active { transform: scale(.94); }

.sidebar-close { display: grid; color: var(--muted); }

.sidebar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 22px 14px;
  padding: 5px;
  border: 1px solid rgba(75, 61, 40, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .3);
}
.snav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: .2s;
}
.snav svg { width: 14px; height: 14px; }
.snav:hover { background: rgba(0, 51, 74, .06); color: var(--ink); }
.snav[disabled] { opacity: .28; pointer-events: none; }
.sidebar-nav .book-progress { min-width: auto; font-size: 9px; }

.search-wrap {
  position: relative;
  margin: 2px 22px 16px;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 39px;
  border: 1px solid rgba(75, 61, 40, .16);
  border-radius: 11px;
  background: rgba(255, 255, 255, .52);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .02em;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-wrap input::placeholder { color: #9a8f7d; }
.search-wrap input:focus {
  border-color: rgba(201, 168, 106, .8);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, .13);
}
.search-wrap kbd {
  position: absolute;
  right: 11px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(75, 61, 40, .18);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, .45);
}

.filters {
  display: flex;
  gap: 6px;
  padding: 0 22px 14px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid rgba(75, 61, 40, .14);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: .2s;
  white-space: nowrap;
}
.chip span {
  opacity: .6;
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}
.chip:hover { border-color: rgba(201, 168, 106, .7); color: var(--ink); }
.chip.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--cream);
}
.chip.is-active span { opacity: .5; }

.poem-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 14px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 51, 74, .18) transparent;
}
.poem-list::-webkit-scrollbar { width: 7px; }
.poem-list::-webkit-scrollbar-track { background: transparent; }
.poem-list::-webkit-scrollbar-thumb {
  background: rgba(0, 51, 74, .16);
  border-radius: 10px;
}

.poem-item {
  appearance: none;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  margin: 1px 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: background .18s, color .18s, transform .18s;
}
.poem-item:hover { background: rgba(0, 51, 74, .055); }
.poem-item:active { transform: scale(.995); }

.poem-item .num {
  font-size: 9px;
  letter-spacing: .1em;
  color: #a29886;
  font-variant-numeric: tabular-nums;
}
.poem-item .t {
  font-family: var(--serif);
  font-size: 18.5px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: .005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poem-item.is-active {
  background: var(--teal);
  color: var(--cream);
  box-shadow: 0 12px 24px -16px rgba(0, 40, 56, .9);
}
.poem-item.is-active .num { color: rgba(250, 247, 240, .48); }

.list-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 17px 12px 5px;
  font-size: 7.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #9a8f7d;
}
.list-section:first-child { padding-top: 4px; }
.list-section .sec-line {
  flex: 1;
  height: 1px;
  background: rgba(75, 61, 40, .14);
}
.list-section .sec-count {
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  opacity: .75;
}

.list-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
}

.sidebar-foot {
  padding: 14px 26px 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(255, 255, 255, .22), transparent);
}
.sidebar-foot p {
  margin: 0;
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}
.sidebar-foot .credit {
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: none;
  line-height: 1.55;
  color: #9a8f7d;
  margin-top: 8px;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(6, 30, 40, .48);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}

/* ============================================================
   Stage / reader
   ============================================================ */

.stage {
  position: relative;
  z-index: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left .46s var(--ease);
}
body.sidebar-collapsed .stage { margin-left: 0; }

.menu-fab {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 70;
  width: 44px;
  height: 44px;
  display: none;
  border: 1px solid rgba(75, 61, 40, .16);
  background: rgba(251, 246, 236, .94);
  color: var(--ink);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.menu-fab:hover { background: #fffaf0; }
body.sidebar-collapsed .menu-fab { display: grid; }

.book-progress {
  min-width: 54px;
  text-align: center;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Reader / leaf
   ============================================================ */

.reader {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.leaf {
  position: relative;
  isolation: isolate;
  overflow: visible;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--leaf-pad);
  padding-bottom: calc(var(--leaf-pad) + var(--player-h));
  color: var(--sand);
  background:
    radial-gradient(115% 75% at 86% -6%, rgba(201, 168, 106, .16), rgba(201, 168, 106, 0) 46%),
    radial-gradient(90% 60% at 0% 105%, rgba(0, 0, 0, .34), rgba(0, 0, 0, 0) 58%),
    linear-gradient(148deg, #064158 0%, #00334a 42%, #002d41 100%);
  border-radius: 0;
  box-shadow: none;
}

.leaf::before {
  content: "";
  position: absolute;
  inset: 13px;
  z-index: 0;
  border: 1px solid rgba(201, 168, 106, .22);
  border-radius: 1px;
  pointer-events: none;
}

.leaf::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.leaf > * { position: relative; z-index: 1; }

.leaf.is-entering { animation: leafIn .62s var(--ease-out) both; }

@keyframes leafIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-sheet {
  flex: 1;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
}

/* The cover stays put while the poem rises over it, like the Forest Flower. */
.hero-wrap {
  position: sticky;
  top: 0;
  z-index: 0;
}
.hero {
  position: relative;
  margin: 0 auto;
}
.hero img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 58vh;
  object-fit: cover;
  background: #062a38;
  border: 1px solid rgba(201, 168, 106, .28);
  box-shadow:
    0 36px 74px -44px rgba(0, 0, 0, .8),
    0 0 0 1px rgba(0, 0, 0, .1);
  filter: saturate(.96) contrast(1.02);
}

.text-stage {
  position: relative;
  z-index: 1;
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: clamp(54px, 8vh, 104px);
  background: linear-gradient(
    to bottom,
    rgba(0, 51, 74, 0) 0,
    #00334a clamp(54px, 8vh, 104px),
    #00334a 100%
  );
}

.poem-col {
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
}

.poem-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5.6vw, 72px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: .005em;
  color: var(--cream);
  text-wrap: balance;
}

.poem-subtitle {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  color: rgba(232, 223, 205, .7);
}

.divider {
  display: block;
  width: min(220px, 62%);
  height: auto;
  margin: 24px auto 0;
  opacity: .72;
  filter: sepia(.35) saturate(1.25) brightness(1.22);
}

.listen {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 24px;
  padding: 7px 16px 7px 7px;
  border: 1px solid rgba(201, 168, 106, .38);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--cream);
  cursor: pointer;
  transition: background .25s, border-color .25s, transform .25s;
}
.listen:hover {
  background: rgba(201, 168, 106, .13);
  border-color: rgba(201, 168, 106, .7);
  transform: translateY(-1px);
}
.listen .mini-play {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--teal);
  transition: transform .25s;
}
.listen .mini-play svg { width: 16px; height: 16px; margin-left: 1px; }
.listen:hover .mini-play { transform: scale(1.06); }
.listen .l-label {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.listen .l-time {
  font-style: normal;
  font-size: 10px;
  letter-spacing: .06em;
  color: rgba(232, 223, 205, .55);
  font-variant-numeric: tabular-nums;
}
.listen.is-playing .mini-play svg { margin-left: 0; }

.poem-text {
  margin: clamp(26px, 3.4vw, 40px) auto 0;
  max-width: 590px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 1.85vw, 25px);
  line-height: 1.58;
  letter-spacing: .012em;
  color: #e6ddca;
}
.poem-text p {
  margin: 0 0 1.05em;
}
.poem-text p:last-child { margin-bottom: 0; }
.poem-text p:first-child { color: #f0e8d8; }

.text-note {
  max-width: 520px;
  margin: 26px auto 0;
  padding: 10px 16px;
  border-left: 1px solid rgba(201, 168, 106, .55);
  background: rgba(201, 168, 106, .055);
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: rgba(232, 223, 205, .7);
  text-align: left;
}

.no-text {
  margin: clamp(30px, 4vw, 44px) auto 0;
  max-width: 470px;
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 23px);
  font-style: italic;
  line-height: 1.5;
  color: rgba(232, 223, 205, .58);
}

.signoff {
  margin: clamp(30px, 4vw, 46px) auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.signoff-text {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  letter-spacing: .05em;
  color: rgba(232, 223, 205, .58);
}
.signoff img {
  width: 118px;
  height: auto;
  opacity: .74;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .2));
}

.alt-version {
  max-width: 590px;
  margin: 30px auto 0;
  border-top: 1px solid rgba(223, 214, 196, .14);
  padding-top: 16px;
  text-align: left;
}
.alt-version summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  font-size: 9px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: rgba(232, 223, 205, .55);
  transition: color .2s;
}
.alt-version summary::-webkit-details-marker { display: none; }
.alt-version summary:hover { color: var(--gold-bright); }
.alt-version summary em {
  font-style: normal;
  color: var(--gold);
  opacity: .8;
}
.alt-version summary::after {
  content: "+";
  font-size: 13px;
  color: var(--gold);
  line-height: 1;
}
.alt-version[open] summary::after { content: "–"; }
.alt-version .alt-body {
  margin-top: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: #e6ddca;
  text-align: center;
}
.alt-version .alt-body p { margin: 0 0 .9em; }
.alt-version .alt-source {
  display: inline-block;
  margin-top: 8px;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(232, 223, 205, .42);
  text-decoration: none;
}
.alt-version .alt-source:hover { color: var(--gold-bright); }

/* leaf footer */

.leaf-foot {
  margin-top: clamp(36px, 5vw, 58px);
  padding-top: 20px;
  border-top: 1px solid rgba(223, 214, 196, .14);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.leaf-nav {
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(232, 223, 205, .55);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  transition: color .2s;
}
.leaf-nav.next { text-align: right; align-items: flex-end; }
.leaf-nav span {
  font-size: 8px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(232, 223, 205, .34);
}
.leaf-nav strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.leaf-nav:hover { color: var(--gold-bright); }
.leaf-nav:disabled { opacity: 0; pointer-events: none; }

.page-no {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(232, 223, 205, .4);
  font-variant-numeric: tabular-nums;
}
.page-no b {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--gold);
}

/* ============================================================
   Player
   ============================================================ */

.player {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 80;
  height: var(--player-h);
  color: var(--cream);
  background:
    radial-gradient(70% 160% at 18% 0%, rgba(201, 168, 106, .11), transparent 55%),
    linear-gradient(180deg, rgba(8, 39, 52, .965), rgba(4, 27, 37, .99));
  border-top: 1px solid rgba(201, 168, 106, .26);
  box-shadow: 0 -22px 60px -30px rgba(0, 20, 28, .55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.player::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.player-inner {
  position: relative;
  max-width: 1520px;
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(14px, 2.6vw, 38px);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(240px, 1.45fr) auto;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
}

.now {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  text-align: left;
  cursor: pointer;
}
.now:hover .now-title { color: var(--gold-bright); }

.now-art {
  position: relative;
  flex: 0 0 auto;
  width: 53px;
  height: 53px;
  border: 1px solid rgba(201, 168, 106, .38);
  background: #062a38;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .6);
}
.now-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92);
}

.eq {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  padding: 2px 3px;
  background: rgba(0, 30, 40, .68);
  border-radius: 2px;
  opacity: 0;
  transition: opacity .25s;
}
.eq i {
  display: block;
  width: 2px;
  height: 100%;
  background: var(--gold-bright);
  transform-origin: bottom;
  animation: eqBounce 1.05s ease-in-out infinite;
  animation-play-state: paused;
}
.eq i:nth-child(1) { animation-delay: -.1s; height: 45%; }
.eq i:nth-child(2) { animation-delay: -.45s; height: 90%; }
.eq i:nth-child(3) { animation-delay: -.7s; height: 65%; }
.eq i:nth-child(4) { animation-delay: -.25s; height: 100%; }
body.is-playing .eq { opacity: 1; }
body.is-playing .eq i { animation-play-state: running; }

@keyframes eqBounce {
  0%, 100% { transform: scaleY(.32); }
  50% { transform: scaleY(1); }
}

.now-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.now-label {
  font-size: 7.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
}
.now-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s;
}
.now-sub {
  font-size: 8.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(232, 223, 205, .4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transport {
  display: flex;
  align-items: center;
  gap: 8px;
}
.t-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(232, 223, 205, .16);
  border-radius: 50%;
  background: transparent;
  color: rgba(232, 223, 205, .72);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .2s;
}
.t-btn svg { width: 15px; height: 15px; }
.t-btn:hover { color: var(--cream); border-color: rgba(201, 168, 106, .55); background: rgba(201, 168, 106, .08); }

.play-btn {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  color: var(--teal);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 7px 20px -8px rgba(0, 0, 0, .6), 0 0 0 0 rgba(201, 168, 106, .3);
  transition: transform .2s, background .2s, box-shadow .3s;
}
.play-btn:hover { transform: scale(1.055); background: #fffdf7; box-shadow: 0 9px 26px -8px rgba(0, 0, 0, .65), 0 0 0 5px rgba(201, 168, 106, .1); }
.play-btn:active { transform: scale(.97); }
.play-btn svg { width: 21px; height: 21px; }
.play-btn .icon-play { margin-left: 2px; }
.play-btn .icon-pause { display: none; }
body.is-playing .play-btn .icon-play { display: none; }
body.is-playing .play-btn .icon-pause { display: block; }
body.is-playing .play-btn { box-shadow: 0 7px 20px -8px rgba(0, 0, 0, .6), 0 0 0 5px rgba(201, 168, 106, .08); }

.timeline {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.time {
  flex: 0 0 auto;
  width: 36px;
  font-size: 9.5px;
  letter-spacing: .06em;
  color: rgba(232, 223, 205, .45);
  font-variant-numeric: tabular-nums;
}
.time:last-child { text-align: right; }

.range {
  -webkit-appearance: none;
  appearance: none;
  height: 22px;
  background: transparent;
  cursor: pointer;
  outline: none;
  min-width: 0;
}
.range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--p, 0%), rgba(232, 223, 205, .16) var(--p, 0%), rgba(232, 223, 205, .16) 100%);
}
.range::-moz-range-track {
  height: 3px;
  border-radius: 4px;
  background: rgba(232, 223, 205, .16);
}
.range::-moz-range-progress {
  height: 3px;
  border-radius: 4px;
  background: var(--gold);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid rgba(201, 168, 106, .5);
  box-shadow: 0 0 0 0 rgba(201, 168, 106, .2);
  transition: transform .15s, box-shadow .2s;
}
.range:hover::-webkit-slider-thumb,
.range:focus::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(201, 168, 106, .12);
}
.range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
}
.seek { flex: 1; }

.player-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.tool {
  border: 0;
  background: transparent;
  color: rgba(232, 223, 205, .5);
  font-size: 8.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 7px;
  border-radius: 5px;
  transition: .2s;
  white-space: nowrap;
}
.tool:hover { color: var(--cream); background: rgba(255, 255, 255, .05); }
.tool.toggle { display: inline-flex; align-items: center; gap: 6px; }
.toggle-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid rgba(232, 223, 205, .35);
  transition: .2s;
}
.toggle.is-on { color: var(--gold-bright); }
.toggle.is-on .toggle-dot { background: var(--gold-bright); border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(201, 168, 106, .1); }
.icon-tool { display: grid; place-items: center; padding: 6px; }
.icon-tool svg { width: 16px; height: 16px; }
.icon-mute { display: none; }
body.is-muted .icon-volume { display: none; }
body.is-muted .icon-mute { display: block; }
.volume { width: 70px; flex: 0 0 auto; }

/* ============================================================
   Full-screen Now Playing — the app's poem player
   ============================================================ */

.now-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .38s var(--ease), visibility .38s var(--ease);
}
.now-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.overlay-open { overflow: hidden; }

.now-overlay-backdrop {
  position: absolute;
  inset: -50px;
  z-index: 0;
  overflow: hidden;
}
.now-overlay-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(36px) brightness(.32) saturate(.85);
  transform: scale(1.08);
}

.now-overlay-close {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(250, 247, 240, .28);
  background: rgba(0, 0, 0, .35);
  color: var(--cream);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .2s, transform .2s;
}
.now-overlay-close:hover { background: rgba(0, 0, 0, .6); transform: scale(1.04); }

.now-overlay-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vh, 40px) 16px;
}

.now-cover {
  position: relative;
  height: min(86vh, 1040px);
  aspect-ratio: 9 / 16;
  max-width: calc(100vw - 32px);
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid rgba(201, 168, 106, .28);
  background: #000;
  box-shadow: 0 50px 110px -34px #000;
}
.now-cover > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.94) contrast(1.03);
}
.now-cover::before,
.now-cover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}
.now-cover::before {
  top: 0;
  height: 32%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .72), transparent);
}
.now-cover::after {
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0, 0, 0, .82), transparent);
}

.now-cover-caption {
  position: absolute;
  top: clamp(26px, 5vh, 58px);
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 24px;
  text-align: center;
  color: var(--cream);
  pointer-events: none;
}
.now-cover-eyebrow {
  display: block;
  font-size: 8px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.now-cover-caption h2 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: .005em;
  text-wrap: balance;
}
.now-cover-caption p {
  margin: 9px 0 0;
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(250, 247, 240, .55);
}

.now-cover-controls {
  position: absolute;
  top: 55%;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transform: translateY(-50%);
}
.now-cover-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(250, 247, 240, .25);
  background: rgba(0, 0, 0, .3);
  color: rgba(250, 247, 240, .8);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: .2s;
}
.now-cover-btn:hover { color: #fff; border-color: rgba(201, 168, 106, .7); }
.now-cover-btn svg { width: 15px; height: 15px; }
.now-cover-play {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 1px solid rgba(250, 247, 240, .38);
  background: rgba(0, 0, 0, .42);
  color: var(--cream);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .2s, background .2s;
}
.now-cover-play:hover { transform: scale(1.05); background: rgba(0, 0, 0, .58); }
.now-cover-play svg { width: 27px; height: 27px; }
.now-cover-play .icon-play { margin-left: 3px; }
.now-cover-play .icon-pause { display: none; }
body.is-playing .now-cover-play .icon-play { display: none; }
body.is-playing .now-cover-play .icon-pause { display: block; }

.now-cover-timeline {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: clamp(44px, 6vh, 66px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}
.now-cover-timeline .time {
  color: rgba(250, 247, 240, .58);
  font-size: 9px;
}
.now-cover-timeline .range { flex: 1; }
.now-cover-read {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 2.2vh, 24px);
  z-index: 2;
  transform: translateX(-50%);
  border: 0;
  background: none;
  color: rgba(250, 247, 240, .55);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s;
}
.now-cover-read:hover { color: var(--gold-bright); }

@media (max-width: 700px) {
  .now-cover {
    width: 100vw;
    height: 100vh;
    max-width: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .now-overlay-stage { padding: 0; }
  .now-overlay-close { top: 18px; left: 18px; }
  .now-cover-controls { top: 57%; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1180px) {
  .player-inner { grid-template-columns: minmax(170px, .9fr) auto minmax(190px, 1.2fr) auto; gap: 14px; }
  .volume { display: none; }
  .player-tools { gap: 2px; }
}

@media (max-width: 1100px) {
  .sidebar {
    transform: translateX(calc(-100% - 2px));
    box-shadow: 30px 0 70px -30px rgba(20, 12, 2, .55);
  }
  .sidebar-close { display: grid; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .scrim { opacity: 1; pointer-events: auto; }
  .stage { margin-left: 0; }
  body.sidebar-collapsed .stage { margin-left: 0; }
  .leaf { min-height: 100vh; }
  .menu-fab { display: grid; top: 12px; left: 12px; }
  body.sidebar-open .menu-fab { display: none; }
}

@media (max-width: 900px) {
  :root { --player-h: 122px; }
  .leaf {
    padding: clamp(24px, 5vw, 44px);
    padding-bottom: calc(clamp(24px, 5vw, 44px) + var(--player-h));
  }
  .poem-col { max-width: 620px; }
  .hero img { aspect-ratio: 4 / 3; max-height: 52vh; }
  .text-stage { padding-top: clamp(48px, 7vh, 80px); }
  .leaf-foot { grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .leaf-nav strong { max-width: 130px; font-size: 17px; }
  .player-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "now transport" "timeline timeline";
    grid-template-rows: auto auto;
    align-content: center;
    gap: 8px 14px;
    padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .now { grid-area: now; }
  .transport { grid-area: transport; }
  .timeline { grid-area: timeline; }
  .player-tools { display: none; }
  .now-art { width: 46px; height: 46px; }
  .now-title { font-size: 16px; }
  .now-sub { font-size: 8px; }
  .play-btn { width: 46px; height: 46px; }
  .play-btn svg { width: 19px; height: 19px; }
  .t-btn { width: 30px; height: 30px; }
}

@media (max-width: 620px) {
  .sidebar-nav { margin-bottom: 12px; }
  .book-progress { min-width: 44px; font-size: 9px; }
  .leaf {
    padding: 26px 20px;
    padding-bottom: calc(26px + var(--player-h));
  }
  .leaf::before { inset: 8px; }
  .poem-title { font-size: clamp(38px, 10.5vw, 52px); }
  .poem-text { font-size: clamp(19px, 5.2vw, 22px); line-height: 1.56; }
  .divider { margin-top: 18px; }
  .listen { margin-top: 18px; }
  .hero img { aspect-ratio: 4 / 3; max-height: 44vh; }
  .text-stage { padding-top: clamp(44px, 6vh, 64px); }
  .leaf-foot { padding-top: 16px; }
  .leaf-nav strong { display: none; }
  .leaf-nav span { font-size: 8px; }
  .leaf-nav.next span::after { content: " →"; }
  .leaf-nav.prev span::before { content: "← "; }
  .page-no { font-size: 8px; }
  .page-no b { font-size: 18px; }
  .now-text .now-sub { display: none; }
  .timeline { gap: 8px; }
  .time { width: 30px; font-size: 8.5px; }
}

@media (max-width: 380px) {
  .book-progress { display: none; }
  .transport { gap: 4px; }
  .t-btn { width: 28px; height: 28px; }
}

/* ============================================================
   Motion preferences / print
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body { background: #fff; }
  .grain, .sidebar, .scrim, .menu-fab, .player, .leaf-foot, .listen, .alt-version, .hero-wrap {
    display: none !important;
  }
  .stage { margin: 0; }
  .reader { padding: 0; max-width: none; }
  .leaf {
    background: #fff;
    color: #111;
    box-shadow: none;
    min-height: 0;
    padding: 30mm 24mm;
  }
  .leaf::before, .leaf::after { display: none; }
  .text-stage { background: none; margin: 0; padding: 0; }
  .poem-title, .poem-text, .poem-text p:first-child, .signoff-text { color: #111; }
  .text-note, .no-text { color: #555; }
  .page-sheet, .poem-col { max-width: none; }
  .divider { filter: invert(1) sepia(.25); opacity: .45; }
  .signoff img { filter: invert(1); opacity: .75; }
}

/* A small, quiet entrance for the whole book on first paint. */
@keyframes bookIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
body { animation: bookIn .5s ease both; }
