.reader-script-shell {
  position: sticky;
  z-index: 20;
  top: 74px;
  margin-top: -25px;
}

body.prayer-reader .reader-hero {
  min-height: 380px;
  padding: 92px 0 48px;
}

body.prayer-reader .reader-hero h1 {
  font-size: clamp(2.65rem, 5vw, 4.45rem);
}

body.prayer-reader .reader-intro {
  max-width: 680px;
  margin-top: 14px;
}

body.prayer-reader { --verse-size: 1.06rem; }

.reader-hero-tools { display: none; }

body[data-prayer-slug="hanuman-chalisa"] {
  --verse-size: 1rem;
  background: #fffaf1;
}

body[data-prayer-slug="hanuman-chalisa"] .reader-hero {
  min-height: 420px;
  background: #fbf0dc;
  color: var(--ink);
}

body[data-prayer-slug="hanuman-chalisa"] .reader-hero::before {
  background-position: center center;
}

body[data-prayer-slug="hanuman-chalisa"] .reader-hero::after {
  display: block;
  background: linear-gradient(90deg, rgba(255, 250, 240, .38) 0%, rgba(255, 250, 240, .22) 43%, rgba(255, 250, 240, 0) 70%);
}

body[data-prayer-slug="hanuman-chalisa"] .reader-hero .library-shell { position: relative; }
body[data-prayer-slug="hanuman-chalisa"] .back-link { color: var(--maroon); }
body[data-prayer-slug="hanuman-chalisa"] .reader-hero .eyebrow { color: #9a6818; }
body[data-prayer-slug="hanuman-chalisa"] .reader-hero h1 {
  max-width: 540px;
  color: var(--maroon);
  font-size: clamp(3rem, 5.5vw, 4.8rem);
  text-shadow: 0 1px 0 rgba(255, 253, 248, .75);
}
body[data-prayer-slug="hanuman-chalisa"] .reader-native { color: #7e3c24; }
body[data-prayer-slug="hanuman-chalisa"] .reader-intro {
  max-width: 560px;
  color: #433632;
  font-size: 1rem;
}

body[data-prayer-slug="hanuman-chalisa"] .reader-hero-tools {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid rgba(117, 27, 35, .15);
  border-radius: 999px;
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 12px 30px rgba(61, 16, 21, .1);
}
body[data-prayer-slug="hanuman-chalisa"] .reader-hero-tools button {
  min-width: 54px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--maroon);
  font: 800 .95rem Inter, sans-serif;
  cursor: pointer;
}
body[data-prayer-slug="hanuman-chalisa"] .reader-hero-tools button:last-child { font-size: 1.1rem; }
body[data-prayer-slug="hanuman-chalisa"] .reader-hero-tools span {
  width: 1px;
  height: 25px;
  background: rgba(117, 27, 35, .17);
}
body[data-prayer-slug="hanuman-chalisa"] .reader-hero-tools button:focus-visible {
  outline: 3px solid #eebf55;
  outline-offset: -3px;
}

.reading-language-bar {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(520px, 1.28fr);
  align-items: center;
  gap: 26px;
  padding: 18px 20px;
  border: 1px solid rgba(117, 27, 35, .16);
  border-radius: 19px;
  background: rgba(255, 253, 248, .96);
  box-shadow: 0 18px 48px rgba(61, 16, 21, .15);
  backdrop-filter: blur(16px);
}

.reading-language-bar .eyebrow { margin-bottom: 3px; }
.reading-language-bar h2 {
  margin: 0;
  color: var(--maroon);
  font: 700 clamp(1.15rem, 2vw, 1.55rem) / 1.15 Lora, Georgia, serif;
}

.script-switcher {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border-radius: 14px;
  background: #f4ead8;
}

.script-switcher button {
  display: grid;
  min-width: 0;
  min-height: 58px;
  align-content: center;
  gap: 1px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 6px 9px;
  color: #674b40;
  font: inherit;
  cursor: pointer;
}

.script-switcher button strong { color: inherit; font-size: .98rem; }
.script-switcher button span { color: inherit; font-size: .65rem; font-weight: 700; line-height: 1.25; }
.script-switcher button span { overflow-wrap: anywhere; }
.script-switcher button.active {
  border-color: rgba(117, 27, 35, .2);
  background: var(--maroon);
  box-shadow: 0 7px 18px rgba(61, 16, 21, .18);
  color: #fff;
}
.script-switcher button:focus-visible { outline: 3px solid #eebf55; outline-offset: 2px; }
.script-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.reader-layout { padding-top: 30px; }
.reader-content { min-width: 0; }
.reader-aside { position: static; }
.prayer-section { scroll-margin-top: 196px; }
.prayer-section + .prayer-section { margin-top: 38px; }
.prayer-section h2 { margin-bottom: 13px; font-size: 1.58rem; }
.verse-list {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(117, 27, 35, .12);
  border-radius: 16px;
  background: rgba(255, 253, 248, .88);
  box-shadow: 0 10px 28px rgba(70, 30, 18, .04);
}
.verse {
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 19px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.verse + .verse { border-top: 1px solid rgba(117, 27, 35, .09); }
.verse-number {
  display: block;
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: .3rem 0 0;
  border-radius: 0;
  background: transparent;
  color: #8b6657;
  font-size: .66rem;
  line-height: 1.3;
  text-align: left;
}
.verse-text { min-width: 0; overflow-wrap: anywhere; font-weight: 500; line-height: 1.66; }
.verse-text [data-script-panel] { display: block; }
.verse-text [data-script-panel="telugu"] {
  font-family: 'Noto Serif Telugu', 'Nirmala UI', serif;
  font-weight: 600;
  line-height: 1.95;
}
.verse-text [data-script-panel="english"] {
  font-family: Inter, system-ui, sans-serif;
  font-size: calc(var(--verse-size) * .9);
  font-weight: 500;
  letter-spacing: .006em;
  line-height: 1.72;
}

.reader-guide-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(214, 163, 59, .42);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(61, 16, 21, .11);
}
.reader-guide-card img {
  display: block;
  width: 100%;
  height: clamp(245px, 24vw, 315px);
  object-fit: cover;
  object-position: 50% 22%;
}
.reader-guide-card figcaption { display: grid; gap: 4px; padding: 15px 17px 17px; }
.reader-guide-card strong { color: var(--maroon); font: 700 1.18rem Lora, Georgia, serif; }
.reader-guide-card span { color: var(--muted); font-size: .82rem; line-height: 1.45; }

body[data-prayer-slug="hanuman-chalisa"] .reader-layout--focus {
  display: block;
  width: min(100% - 32px, 760px);
}
body[data-prayer-slug="hanuman-chalisa"] .reader-content { max-width: none; }
body[data-prayer-slug="hanuman-chalisa"] .prayer-section + .prayer-section { margin-top: 44px; }
body[data-prayer-slug="hanuman-chalisa"] .prayer-section h2 {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  color: #a66f16;
  font: 800 .78rem / 1.2 Inter, sans-serif;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
}
body[data-prayer-slug="hanuman-chalisa"] .prayer-section h2::before,
body[data-prayer-slug="hanuman-chalisa"] .prayer-section h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(190, 132, 33, .6);
}
body[data-prayer-slug="hanuman-chalisa"] .verse-list {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-prayer-slug="hanuman-chalisa"] .verse {
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 6px 22px;
}
body[data-prayer-slug="hanuman-chalisa"] .verse + .verse {
  border-top-color: rgba(190, 132, 33, .35);
}
body[data-prayer-slug="hanuman-chalisa"] .verse-number {
  padding-top: .18rem;
  color: var(--maroon);
  font: 700 .88rem / 1.45 Lora, Georgia, serif;
}
body[data-prayer-slug="hanuman-chalisa"] .verse-text {
  color: #2d2421;
  font-weight: 500;
  line-height: 1.72;
}
body[data-prayer-slug="hanuman-chalisa"] .verse-text [data-script-panel="english"] {
  font-family: Inter, system-ui, sans-serif;
  font-size: var(--verse-size);
  line-height: 1.7;
}

.prayer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prayer-grid .prayer-card:last-child { grid-column: auto; max-width: none; }
.planned-prayer-card { border-color: rgba(214, 163, 59, .46); }
.planned-prayer-card .prayer-card-copy { background: linear-gradient(180deg, #fffdf8, #fff7e8); }

.planned-reader-hero { min-height: 560px; }
.planned-reader-hero::before { background-position: center 48%; }
.planned-reader-hero::after {
  background: linear-gradient(90deg, rgba(54, 8, 17, .96), rgba(85, 20, 31, .73) 52%, rgba(80, 18, 28, .14));
}
.planned-prayer-overview { padding: 76px 0 90px; background: linear-gradient(180deg, #fffaf0, #f8ecd8); }
.planned-prayer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 52px;
  align-items: start;
}
.planned-prayer-grid h2,
.planned-prayer-note h2 {
  margin: 0;
  color: var(--maroon);
  font: 700 clamp(2rem, 4vw, 3.35rem) / 1.06 Lora, Georgia, serif;
  letter-spacing: -.025em;
}
.planned-prayer-grid > div > p:last-of-type { max-width: 720px; color: var(--muted); }
.planned-language-promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 27px; }
.planned-language-promise article {
  display: grid;
  gap: 3px;
  padding: 17px;
  border: 1px solid rgba(117, 27, 35, .13);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
}
.planned-language-promise strong { color: var(--maroon); }
.planned-language-promise span { color: var(--muted); font-size: .78rem; }
.planned-readiness { padding: 27px; border-radius: 22px; background: var(--maroon-deep); color: #fff; box-shadow: 0 22px 58px rgba(61, 16, 21, .15); }
.planned-readiness .eyebrow { color: #efcf79; }
.planned-readiness ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.planned-readiness li { position: relative; padding-left: 27px; color: rgba(255, 255, 255, .86); }
.planned-readiness li::before { content: '✦'; position: absolute; left: 0; color: #efcf79; }
.planned-prayer-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 38px;
  margin-top: 52px;
  padding: 34px;
  border: 1px solid rgba(214, 163, 59, .48);
  border-radius: 22px;
  background: #fffdf8;
}
.planned-prayer-note h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.planned-prayer-note p { max-width: 680px; margin: 10px 0 0; color: var(--muted); }
.planned-prayer-note > div:last-child { display: grid; justify-items: start; }
.planned-prayer-note .library-button { margin: 0 0 13px; }

@media (max-width: 900px) {
  .reader-script-shell { top: 67px; }
  .reading-language-bar {
    grid-template-columns: minmax(175px, .55fr) minmax(0, 1.45fr);
    gap: 18px;
    padding: 15px 17px;
  }
  .prayer-section { scroll-margin-top: 190px; }
  .reader-content { order: 1; }
  .reader-aside { order: 2; }
  .planned-prayer-grid { grid-template-columns: 1fr; gap: 30px; }
  .planned-prayer-note { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body.prayer-reader { --verse-size: 1rem; }
  .reader-script-shell { top: 66px; width: 100%; margin-top: 0; }
  .reading-language-bar {
    display: block;
    padding: 8px 12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0 0 16px 16px;
  }
  .reading-language-bar > div:first-child { display: none; }
  .script-switcher { gap: 4px; padding: 4px; }
  .script-switcher button { min-height: 58px; padding: 6px 3px; }
  .script-switcher button strong { font-size: clamp(.78rem, 3.7vw, .9rem); line-height: 1.15; }
  .script-switcher button span { font-size: clamp(.62rem, 2.8vw, .7rem); line-height: 1.25; }
  body.prayer-reader .reader-hero {
    min-height: 330px;
    padding: 76px 0 30px;
  }
  body.prayer-reader .reader-hero h1 { font-size: clamp(2.2rem, 11.5vw, 3rem); }
  body.prayer-reader .reader-native { margin-top: 8px; font-size: clamp(1.08rem, 5.3vw, 1.4rem); }
  body.prayer-reader .reader-intro {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 10px;
    font-size: .94rem;
    line-height: 1.48;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  body.prayer-reader .back-link { margin-bottom: 12px; font-size: .86rem; }
  body[data-prayer-slug="hanuman-chalisa"] .reader-hero {
    min-height: 300px;
    padding: 72px 0 24px;
  }
  body[data-prayer-slug="hanuman-chalisa"] .reader-hero::before {
    background-position: 80% center;
  }
  body[data-prayer-slug="hanuman-chalisa"] .reader-hero::after {
    display: block;
    background: linear-gradient(90deg, rgba(255, 250, 240, .58) 0%, rgba(255, 250, 240, .32) 50%, rgba(255, 250, 240, 0) 82%);
  }
  body[data-prayer-slug="hanuman-chalisa"] .reader-hero h1 {
    max-width: 73%;
    font-size: clamp(2.2rem, 11vw, 2.9rem);
    line-height: .96;
  }
  body[data-prayer-slug="hanuman-chalisa"] .reader-native { max-width: 68%; }
  body[data-prayer-slug="hanuman-chalisa"] .reader-intro { display: none; }
  body[data-prayer-slug="hanuman-chalisa"] .reader-hero-tools {
    top: auto;
    right: 0;
    bottom: 0;
    min-height: 42px;
  }
  body[data-prayer-slug="hanuman-chalisa"] .reader-hero-tools button {
    min-width: 45px;
    min-height: 42px;
  }
  .reader-layout { padding-top: 20px; padding-bottom: 64px; }
  .reader-guide-card img { height: clamp(275px, 82vw, 335px); object-position: 50% 20%; }
  .reader-guide-card figcaption { padding: 14px 15px 16px; }
  .reader-guide-card strong { font-size: 1.08rem; }
  .reader-guide-card span { font-size: .86rem; }
  .prayer-section { scroll-margin-top: 158px; }
  .prayer-section + .prayer-section { margin-top: 32px; }
  .prayer-section h2 { margin-bottom: 11px; font-size: clamp(1.3rem, 6vw, 1.5rem); }
  .verse-list { border-radius: 13px; }
  .verse { grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 13px 12px; }
  .verse-number { padding-top: .28rem; font-size: .59rem; }
  .verse-text { font-size: var(--verse-size); line-height: 1.6; }
  .verse-text [data-script-panel="telugu"] { line-height: 1.68; }
  .verse-text [data-script-panel="english"] { font-size: var(--verse-size); line-height: 1.58; }
  body[data-prayer-slug="hanuman-chalisa"] .reader-layout { padding-top: 16px; }
  body[data-prayer-slug="hanuman-chalisa"] .prayer-section h2 {
    gap: 10px;
    margin-bottom: 10px;
    font-size: .69rem;
    letter-spacing: .14em;
  }
  body[data-prayer-slug="hanuman-chalisa"] .verse {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 2px 16px;
  }
  body[data-prayer-slug="hanuman-chalisa"] .verse-number {
    padding-top: .2rem;
    font-size: .74rem;
  }
  body[data-prayer-slug="hanuman-chalisa"] .verse-text {
    font-size: var(--verse-size);
    line-height: 1.62;
  }
  body[data-prayer-slug="hanuman-chalisa"] .verse-text [data-script-panel="telugu"] { line-height: 1.7; }
  body[data-prayer-slug="hanuman-chalisa"] .verse-text [data-script-panel="english"] { line-height: 1.6; }
  .reader-facts,
  .reader-tools,
  .practice-note,
  .reader-sections { padding: 17px; }
  .reader-tools input { min-height: 48px; }
  .tool-row button { min-height: 46px; }
  .verification { gap: 14px; padding: 16px; }
  .verification small { font-size: .76rem; }
  .reader-end { padding: 22px 18px; }
  .reader-next { margin-top: 18px; padding: 24px 20px; }
  .prayer-grid { grid-template-columns: 1fr; }
  .planned-reader-hero { min-height: 510px; }
  .planned-reader-hero::after { background: linear-gradient(0deg, rgba(54, 8, 17, .97), rgba(68, 11, 22, .67), rgba(68, 11, 22, .18)); }
  .planned-prayer-overview { padding: 56px 0 70px; }
  .planned-language-promise { grid-template-columns: 1fr; }
  .planned-prayer-note { margin-top: 32px; padding: 24px; }
}

@media (max-width: 420px) {
  body.prayer-reader .reader-hero { min-height: 310px; padding-top: 72px; }
  body.prayer-reader .reader-hero h1 { font-size: clamp(2.1rem, 11vw, 2.65rem); }
  .reader-guide-card img { height: clamp(265px, 88vw, 325px); }
}

@media (max-width: 350px) {
  body.prayer-reader { --verse-size: .96rem; }
  .library-shell { width: min(100% - 18px, 1160px); }
  .reading-language-bar { padding-inline: 8px; }
  .script-switcher button strong { font-size: .76rem; }
  .script-switcher button span { font-size: .59rem; }
  .reader-hero h1 { font-size: 2.3rem; }
  .verse { padding-inline: 11px; }
}

@media print {
  .reader-script-shell { position: static; margin: 0 0 20px; }
  .reading-language-bar > div:first-child,
  .script-status { display: none; }
  .reading-language-bar { display: block; border: 0; box-shadow: none; padding: 0; }
  .script-switcher { display: none; }
  .reader-guide-card { break-inside: avoid; box-shadow: none; }
}

/* AA contrast for compact reader section labels. */
body[data-prayer-slug="hanuman-chalisa"] .prayer-section h2 { color: #7d1728; }
