*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  background: #1B1105;
  color: #EDD9A3;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  background: #0E0803;
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 3px solid #5C3A14;
}

.title-ar {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: clamp(4.5rem, 14vw, 13rem);
  color: #EDD9A3;
  font-weight: 700;
  direction: rtl;
  line-height: 1.4;
}

.title-sub {
  margin-top: 0.6rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #C9A668;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.search-wrap {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
}

.search-input {
  width: 100%;
  max-width: 440px;
  padding: 0.65rem 1.1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  color: #EDD9A3;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder { color: #4A3820; }

.search-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.search-input::-webkit-search-cancel-button {
  filter: invert(1) opacity(0.35);
  cursor: pointer;
}

/* ── Main ────────────────────────────────────────────────── */

main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Testament sections ──────────────────────────────────── */

.testament-section + .testament-section {
  margin-top: 3.5rem;
}

.testament-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #3D2810;
}

.testament-ar {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  color: #D4A040;
  font-weight: 700;
  direction: rtl;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.testament-en {
  font-size: 1.1rem;
  font-weight: 600;
  color: #C9A668;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 0.6rem;
}

/* ── Book grid ───────────────────────────────────────────── */

.book-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem;
  direction: rtl;
}

/* ── Book card ───────────────────────────────────────────── */

.book-card {
  display: flex;
  flex: 0 1 200px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.25rem 1.75rem;
  background: #2A1A0A;
  border: 2px solid #4A3218;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  user-select: none;
}

.book-card:hover {
  border-color: #A06828;
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.45);
  background: #341F0C;
}

.book-card:active {
  background: #1E1208;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}

.book-ar {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #EDD9A3;
  direction: rtl;
  line-height: 1.4;
}

.book-en {
  margin-top: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  color: #C9A668;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.3;
}

/* ── Inner page header (book & chapter views) ────────────── */

.inner-header {
  background: #0E0803;
  border-bottom: 3px solid #5C3A14;
  text-align: center;
}

.inner-header-top {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #2A1608;
}

.back-btn {
  background: none;
  border: 1px solid #5C3A14;
  border-radius: 4px;
  color: #C09A60;
  font-size: 1rem;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.back-btn:hover {
  border-color: #A06828;
  color: #EDD9A3;
}

.inner-header-body {
  padding: 2rem 1.5rem 2rem;
}

.inner-title-ar {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  color: #EDD9A3;
  font-weight: 700;
  direction: rtl;
  line-height: 1.4;
}

.inner-title-chapter {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: #A07840;
  font-weight: 700;
  direction: rtl;
  margin-top: 0.6rem;
  line-height: 1.4;
}

.inner-title-az {
  margin-top: 0.6rem;
  font-size: 1.05rem;
  color: #A07840;
  font-style: italic;
}

.inner-title-en {
  margin-top: 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #C9A668;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── Chapter grid ────────────────────────────────────────── */

.chapter-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  direction: rtl;
}

/* ── Chapter card ────────────────────────────────────────── */

.chapter-card {
  display: flex;
  flex: 0 1 110px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: #2A1A0A;
  border: 2px solid #4A3218;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  user-select: none;
}

.chapter-card:hover {
  border-color: #A06828;
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.45);
  background: #341F0C;
}

.chapter-card:active {
  background: #1E1208;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}

.chapter-num-ar {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: 3rem;
  font-weight: 700;
  color: #EDD9A3;
  line-height: 1.4;
}

/* ── Chapter reading view ────────────────────────────────── */

.reading-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

.verse-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.verse-block {
  border-bottom: 1px solid #2E1E0C;
  padding-bottom: 2.5rem;
}

.verse-block:last-child {
  border-bottom: none;
}

.verse-label {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.verse-play-btn {
  background: none;
  border: 1px solid #4A3218;
  border-radius: 50%;
  color: #7A5C38;
  font-size: 0.7rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.verse-play-btn:hover {
  border-color: #A06828;
  color: #D4A040;
}

.verse-play-btn.playing {
  border-color: #D4A040;
  color: #D4A040;
  background: rgba(212, 160, 64, 0.1);
}

.verse-num {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: #5C3A14;
  line-height: 1;
  user-select: none;
}

/* Ichthys verse marker — used in chapter reading view and search results (non-compact). */
.verse-num-badge {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  font-size: clamp(3rem, 6vw, 5rem);
  height: 1em;
  width: calc(1em * 100 / 46);
  user-select: none;
}

.verse-num-badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.verse-num-badge path {
  fill: none;
  stroke: #7A5230;
  stroke-width: 3.4;
  stroke-linecap: round;
}

.verse-num-badge .num {
  position: absolute;
  top: 52%;
  left: 39%;
  transform: translate(-50%, -50%);
  font-family: 'Amiri', 'Times New Roman', serif;
  font-weight: 700;
  font-size: 0.36em;
  color: #EDD9A3;
  line-height: 1;
  white-space: nowrap;
}

.verse-num-badge.digits-3 .num {
  font-size: 0.27em;
}

.verse-text {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  color: #EDD9A3;
  line-height: 2;
  text-align: start;
  margin: 0;
}

.verse-text-secondary {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 400;
  color: #A68955;
  line-height: 1.6;
  text-align: left;
  margin: 0.75rem 0 0;
}

/* ── Chapter prev/next nav ───────────────────────────────── */

.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #2E1E0C;
  gap: 0.75rem;
}

.chapter-nav-btn {
  background: #2A1A0A;
  border: 2px solid #4A3218;
  border-radius: 5px;
  color: #C09A60;
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: 1.1rem;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.chapter-nav-btn:hover {
  border-color: #A06828;
  color: #EDD9A3;
  background: #341F0C;
}

.chapter-nav-list { font-size: 0.95rem; }

/* ── Reference search view ───────────────────────────────── */

.inner-header-top {
  justify-content: space-between;
}

.search-header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.translation-select {
  background: #1B1105;
  border: 1px solid #5C3A14;
  border-radius: 4px;
  color: #C09A60;
  font-family: 'Cairo', sans-serif;
  font-size: 0.82rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  outline: none;
  max-width: 220px;
  transition: border-color 0.15s, color 0.15s;
}

.translation-select:hover {
  border-color: #A06828;
  color: #EDD9A3;
}

.translation-select option {
  background: #1B1105;
  color: #EDD9A3;
}

.view-toggle-btn {
  background: none;
  border: 1px solid #5C3A14;
  border-radius: 4px;
  color: #C09A60;
  font-size: 0.82rem;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.view-toggle-btn:hover {
  border-color: #A06828;
  color: #EDD9A3;
}

.ref-query-title {
  font-size: 0.95rem;
  color: #A07840;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

.ref-group {
  margin-bottom: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid #3D2810;
}

.ref-group:first-child {
  padding-top: 0;
  border-top: none;
}

.ref-group:last-child {
  margin-bottom: 0;
}

.ref-label {
  font-size: 0.78rem;
  color: #A07840;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.compact-para {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: #EDD9A3;
  line-height: 2.3;
  text-align: start;
  margin: 0;
}

.compact-vnum {
  font-family: 'Amiri', serif;
  font-size: 0.6em;
  color: #5C3A14;
  vertical-align: super;
  margin-left: 0.2em;
  user-select: none;
}

.compact-para-secondary {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-weight: 400;
  color: #A68955;
  line-height: 1.65;
  text-align: left;
  margin: 0.75rem 0 0;
}

.ref-error {
  color: #7A6040;
  font-style: italic;
  padding: 1rem 0;
}

/* ── Tappable words ──────────────────────────────────────── */

.w {
  cursor: pointer;
  border-radius: 3px;
  padding: 0 2px;
  transition: background 0.1s, color 0.1s;
}

.w:hover {
  background: rgba(212, 160, 64, 0.18);
}

.w.playing {
  color: #D4A040;
  background: rgba(212, 160, 64, 0.12);
}

/* ── Top words table ─────────────────────────────────────── */

.words-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

.words-table-wrap {
  overflow-x: auto;
}

.words-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.words-table thead th {
  position: sticky;
  top: 0;
  background: #1B1105;
  text-align: start;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid #5C3A14;
  color: #A07840;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.words-table thead th.word-count { text-align: end; }

.words-table tbody tr {
  border-bottom: 1px solid #2E1E0C;
}

.words-table tbody tr:hover {
  background: rgba(212, 160, 64, 0.06);
}

.words-table td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
}

.words-table .word-rank {
  color: #6A5840;
  font-variant-numeric: tabular-nums;
  width: 3rem;
}

.words-table .word-ar {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: 1.35rem;
  color: #EDD9A3;
}

.words-table .word-count {
  color: #C09A60;
  font-variant-numeric: tabular-nums;
  text-align: end;
}

.words-table .word-en {
  color: #B89A6A;
  font-size: 0.85rem;
}

/* ── Login ────────────────────────────────────────────────── */

.login-form {
  max-width: 340px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.login-input {
  padding: 0.65rem 1.1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  color: #EDD9A3;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.login-input::placeholder { color: #4A3820; }

.login-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.login-error {
  color: #B87050;
  font-size: 0.85rem;
  font-style: italic;
  min-height: 1.2em;
  text-align: center;
}

/* ── Mode toggle (Study / Browse) ────────────────────────── */

.mode-toggle {
  display: inline-flex;
  margin-top: 1.5rem;
  border: 1px solid #5C3A14;
  border-radius: 6px;
  overflow: hidden;
}

.mode-toggle-btn {
  background: none;
  border: none;
  color: #A07840;
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  padding: 0.5rem 1.4rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mode-toggle-btn + .mode-toggle-btn {
  border-left: 1px solid #5C3A14;
}

.mode-toggle-btn:hover:not(:disabled) {
  background: rgba(212, 160, 64, 0.1);
  color: #EDD9A3;
}

.mode-toggle-btn.active {
  background: rgba(212, 160, 64, 0.18);
  color: #D4A040;
  cursor: default;
}

/* ── Study dashboard ──────────────────────────────────────── */

.study-header {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.study-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  padding: 1.25rem 1rem;
  background: #2A1A0A;
  border: 2px solid #4A3218;
  border-radius: 5px;
}

.study-stat-num {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #D4A040;
}

.study-stat-label {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #806A50;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.reveal-btn {
  display: block;
  margin: 1.5rem auto 0;
  background: #2A1A0A;
  border: 2px solid #4A3218;
  border-radius: 5px;
  color: #EDD9A3;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.reveal-btn:hover {
  border-color: #A06828;
  background: #341F0C;
}

.reveal-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Flashcard ────────────────────────────────────────────── */

.flashcard {
  max-width: 560px;
  margin: 2rem auto 0;
  padding: 3rem 1.5rem;
  background: #2A1A0A;
  border: 2px solid #4A3218;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.flashcard-word {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: #EDD9A3;
  line-height: 1.4;
}

.flashcard-translation {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: #C09A60;
}

.rating-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.rating-btn {
  background: none;
  border: 2px solid #4A3218;
  border-radius: 5px;
  color: #C09A60;
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  padding: 0.6rem 1.3rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.rating-btn:hover { background: rgba(212, 160, 64, 0.1); }

.rating-again { border-color: #5C3A14; color: #A07840; }
.rating-again:hover { border-color: #7A5030; color: #D0A070; }

.rating-easy { border-color: #A06828; color: #D4A040; }
.rating-easy:hover { background: rgba(212, 160, 64, 0.18); }

/* ── Multiple-choice mode ─────────────────────────────────── */

.study-start-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.study-start-group .study-start-btn {
  margin: 0;
}

/* ── Lessons ──────────────────────────────────────────────── */

.lessons-section {
  max-width: 420px;
  margin: 2.5rem auto 0;
  text-align: center;
}

.lessons-heading {
  font-family: 'Cairo', sans-serif;
  font-size: 0.72rem;
  color: #806A50;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 0 0.75rem;
}

.lesson-btn {
  display: block;
  width: 100%;
  margin: 0 0 0.6rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}

.choice-btn {
  background: none;
  border: 2px solid #4A3218;
  border-radius: 5px;
  color: #EDD9A3;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.choice-btn:hover:not(:disabled) {
  border-color: #A06828;
  background: #341F0C;
}

.choice-btn:disabled { cursor: default; }

.choice-correct {
  border-color: #A06828;
  background: rgba(212, 160, 64, 0.18);
  color: #D4A040;
}

.choice-wrong {
  border-color: #7A5030;
  background: rgba(122, 80, 48, 0.18);
  color: #D0A070;
}

/* ── Streak-day celebration ───────────────────────────────── */

.streak-flash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(14, 8, 3, 0.82);
  cursor: pointer;
  animation: streak-flash-in 0.3s ease-out;
}

.streak-flash-out {
  animation: streak-flash-out 0.4s ease-in forwards;
}

@keyframes streak-flash-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes streak-flash-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.streak-flash-card {
  max-width: 600px;
  padding: 3rem 2rem;
  background: #2A1A0A;
  border: 2px solid #D4A040;
  border-radius: 8px;
  box-shadow: 0 10px 60px rgba(212, 160, 64, 0.25), 0 2px 10px rgba(0, 0, 0, 0.5);
  text-align: center;
  cursor: default;
  animation: streak-card-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes streak-card-pop {
  0%   { transform: scale(0.7); opacity: 0; }
  60%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.streak-flash-badge {
  font-family: 'Cairo', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #D4A040;
  margin-bottom: 1.5rem;
}

.streak-flash-verse {
  font-family: 'Amiri', 'Times New Roman', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #EDD9A3;
  line-height: 1.9;
}

.streak-flash-ref {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: #A07840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Loading state ───────────────────────────────────────── */

.loading {
  text-align: center;
  padding: 4rem;
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: #C09A60;
}

/* ── Print masthead (hidden on screen, shown when printing) ── */

.print-masthead { display: none; }

/* ── Print ───────────────────────────────────────────────── */

@page { margin: 0.6in; }

@media print {
  /* suppress browser URL / date / page-number chrome */
  @page { margin: 0; }

  body {
    background: #fff;
    color: #000;
    margin: 0.6in;
  }

  .print-masthead {
    display: block;
    text-align: center;
    padding-bottom: 0.18in;
    margin-bottom: 0.18in;
    border-bottom: 2px solid #000;
    page-break-after: avoid;
  }

  .print-title-ar {
    font-family: 'Amiri', 'Times New Roman', serif;
    font-size: 3rem;
    font-weight: 700;
    direction: rtl;
    color: #000;
    line-height: 1.1;
    margin: 0;
  }

  .print-ref-line {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: #555;
    margin-top: 0.15rem;
    text-transform: uppercase;
  }

  .inner-header-top { display: none; }
  .inner-header-body { display: none; }
  .inner-header     { display: none; }
  .verse-play-btn   { display: none; }

  .ref-label {
    color: #333;
  }

  .ref-group {
    border-top-color: #ccc;
  }

  .verse-num    { color: #aaa; font-size: 2rem; }
  .verse-text,
  .compact-para { color: #000; }
  .compact-vnum { color: #aaa; }
  .verse-text-secondary,
  .compact-para-secondary { color: #444; }
  .verse-block  { border-bottom: 1px solid #eee; page-break-inside: avoid; }
  .ref-group    { page-break-before: auto; }
  .ref-group:only-child .ref-label { display: none; }
  .reading-main { padding: 0; }

  .w { background: none; color: inherit; }
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 540px) {
  .book-grid {
    gap: 0.75rem;
  }

  .book-card {
    flex-basis: calc(50% - 0.375rem);
    padding: 1.5rem 0.75rem 1.25rem;
  }

  .book-ar {
    font-size: 1.75rem;
  }

  .chapter-grid {
    gap: 0.65rem;
  }

  .chapter-card {
    flex-basis: calc(33.333% - 0.434rem);
  }

  .rating-row,
  .choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .study-stat {
    min-width: 90px;
    padding: 1rem 0.75rem;
  }
}
