@font-face {
  font-family: 'Tiro Devanagari Sanskrit';
  src: url('fonts/TiroDevanagariSanskrit-Regular.woff2') format('woff2'), url('fonts/TiroDevanagariSanskrit-Regular.ttf') format('truetype');
  font-display: swap;
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: 'Tiro Devanagari Sanskrit';
  src: url('fonts/TiroDevanagariSanskrit-Italic.woff2') format('woff2'), url('fonts/TiroDevanagariSanskrit-Italic.ttf') format('truetype');
  font-display: swap;
  font-weight: normal; font-style: italic;
}

:root {
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-2: #fbf2df;
  --ink: #231f20;
  --muted: #8a7f6a;
  --rule: #e8ddc8;
  --accent: #a51512;
  --accent-dark: #7a0f0d;
  --gold: #c45911;
  --blue: #1066b1;
  --sidebar-bg: #2b1210;
  --sidebar-ink: #f3e6c8;
  --shadow: 0 2px 10px rgba(60,40,10,0.08);
  --radius: 14px;
}
:root[data-theme="dark"] {
  --bg: #0f131a;
  --surface: #171c24;
  --surface-2: #1f2630;
  --ink: #e9edf3;
  --muted: #94a0b3;
  --rule: #2a3340;
  --accent: #e2564f;
  --accent-dark: #c23d36;
  --gold: #e08a3e;
  --blue: #4ea3e8;
  --sidebar-bg: #0b0e14;
  --sidebar-ink: #f3e6c8;
  --shadow: 0 2px 14px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body, button, input {
  font-family: 'Tiro Devanagari Sanskrit', 'Noto Sans Devanagari', Georgia, serif;
}
body {
  background: var(--bg);
  color: var(--ink);
  transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }

/* ---------- app shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

:root { --sidebar-w: 160px; --sidebar-collapsed-w: 68px; }

.sidebar {
  width: var(--sidebar-collapsed-w); flex-shrink: 0;
  background: var(--sidebar-bg); color: var(--sidebar-ink);
  display: flex; flex-direction: column;
  padding: .7rem 0 .6rem; position: fixed; top: 0; left: 0; height: 100vh; z-index: 120;
  font-family: Calibri, Arial, 'Tiro Devanagari Sanskrit', 'Noto Sans Devanagari', sans-serif;
  overflow-x: hidden; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none;
  transition: width .18s ease, box-shadow .18s ease;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-header { display: flex; align-items: center; gap: .4rem; padding: .2rem .9rem .6rem; }
.sidebar-logo-mark {
  display: inline-block; width: 24px; height: 24px; flex-shrink: 0;
  background-color: var(--sidebar-ink);
  -webkit-mask: url('assets/logo-mark.svg') no-repeat center / contain;
  mask: url('assets/logo-mark.svg') no-repeat center / contain;
}
.sidebar-wordmark {
  font-size: 1.1rem; color: var(--sidebar-ink); letter-spacing: .01em; white-space: nowrap;
  opacity: 0; transition: opacity .1s ease;
}
.sidebar-nav { display: flex; flex-direction: column; gap: .05rem; width: 100%; padding: 0 .5rem; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.12); margin: .3rem .8rem; }
.sidebar-nav-bottom { margin-top: auto; padding-top: .3rem; border-top: 1px solid rgba(255,255,255,.12); }
.side-link {
  display: flex; flex-direction: row; align-items: center; gap: .55rem;
  width: 100%; padding: .38rem .55rem; border-radius: 10px; color: var(--sidebar-ink);
  opacity: .8; font-size: 1rem;
}
.side-link .ic { font-size: 1.05rem; flex: 0 0 auto; width: 1.2rem; text-align: center; }
.side-link span:not(.ic) {
  white-space: nowrap; opacity: 0; transition: opacity .1s ease;
}
.side-link .sidebar-om { font-family: 'Tiro Devanagari Sanskrit', 'Noto Sans Devanagari', serif; font-size: 1.25rem; }
button.side-link { background: none; border: 0; font-family: inherit; text-align: left; cursor: pointer; }
.side-lang-label b { font-weight: normal; opacity: .55; }
.side-lang-label b.on { font-weight: bold; opacity: 1; color: #ffd9a0; }
.side-link:hover { opacity: 1; background: rgba(255,255,255,.08); }
.side-link.active { opacity: 1; background: var(--accent); color: #fff; }
/* a group of links under one heading (प्रश्नावली): opens on click, and by itself when one of its pages is open */
.side-caret { margin-left: auto; font-style: normal; font-size: .8rem; opacity: 0; transition: transform .15s ease, opacity .1s ease; }
.side-group.is-open .side-caret { transform: rotate(90deg); }
.side-sub { display: none; flex-direction: column; gap: .05rem; margin: .05rem 0 .15rem .45rem; padding-left: .3rem; border-left: 1px solid rgba(255,255,255,.16); }
.side-group.is-open .side-sub { display: flex; }
.side-sub .side-link { padding-left: .45rem; font-size: .95rem; }
.side-group.has-active > .side-group-btn { opacity: 1; color: #ffd9a0; }

/* Icon-rail collapse + hover-to-expand -- desktop only (≥861px); the mobile off-canvas
   drawer below (≤860px) sets its own width/left regardless of :hover, so this block is
   scoped out of that range entirely rather than relying on specificity to not collide. */
@media (min-width: 861px) {
  .sidebar:hover { width: var(--sidebar-w); box-shadow: 6px 0 24px rgba(0,0,0,.3); }
  .sidebar:hover .sidebar-wordmark,
  .sidebar:hover .side-link span:not(.ic) { opacity: 1; transition-delay: .06s; }
  .sidebar:hover .side-caret { opacity: .75; transition-delay: .06s; }
}

.sidebar-scrim {
  display: none; position: fixed; inset: 0; background: rgba(20,14,12,.5); z-index: 110;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sidebar-scrim.show { opacity: 1; pointer-events: auto; }

.main-col { flex: 1; min-width: 0; margin-left: var(--sidebar-collapsed-w); }

:root { --topbar-h: 64px; }

.hamburger-btn {
  display: none; border: none; background: rgba(255,255,255,0.16); color: #fff;
  width: 36px; height: 36px; border-radius: 50%; font-size: 1.05rem; flex: 0 0 auto;
}
.topbar.scrolled .hamburger-btn { background: var(--surface-2); color: var(--ink); }

.topbar {
  display: flex; align-items: center; justify-content: flex-end; gap: 1rem;
  padding: .8rem 1.5rem; height: var(--topbar-h);
  position: fixed; top: 0; left: var(--sidebar-collapsed-w); right: 0; z-index: 40;
  background: transparent; border-bottom: 1px solid transparent; color: #fff;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, color .25s ease, left .2s ease;
}
.topbar.scrolled {
  background: var(--surface); border-bottom-color: var(--rule); box-shadow: var(--shadow); color: var(--ink);
}
/* pages without a hero (non-home) reserve space for the fixed topbar */
body:not(.is-home) #viewRoot { padding-top: var(--topbar-h); }

.topbar-left { display: flex; align-items: center; gap: .6rem; margin-right: auto; color: #fff; transition: color .25s ease; }
.topbar.scrolled .topbar-left { color: var(--accent); }
.logo-mark {
  display: inline-block; width: 62px; height: 37px; flex-shrink: 0;
  background-color: currentColor; transition: width .25s ease, height .25s ease;
  -webkit-mask: url('assets/logo-mark.svg') no-repeat center / contain;
  mask: url('assets/logo-mark.svg') no-repeat center / contain;
}
@media (min-width: 861px) {
  /* desktop: logo starts oversized over the transparent hero, then shrinks to fit the bar on scroll */
  .topbar:not(.scrolled) .logo-mark { width: 150px; height: 91px; }
}

/* transparent (unscrolled, home) control styling */
.topbar:not(.scrolled) .global-search-btn,
.topbar:not(.scrolled) .profile-btn {
  background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); color: #fff;
}
.topbar:not(.scrolled) .theme-switch .track { background: rgba(255,255,255,0.35); }

.theme-switch { position: relative; width: 42px; height: 22px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-switch .track { position: absolute; inset: 0; background: var(--rule); border-radius: 20px; transition: .2s; }
.theme-switch .track:before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.theme-switch input:checked + .track { background: var(--accent); }
.theme-switch input:checked + .track:before { transform: translateX(20px); }

.profile-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 1rem; }

.content-pad { max-width: 1200px; margin: 0 auto; padding: 1.2rem 1.5rem 4rem; }

/* ---------- page preloader (shown until the first render replaces #viewRoot) ---------- */
.page-preloader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; min-height: 70vh; text-align: center;
}
.page-preloader-mark {
  font-family: 'Tiro Devanagari Sanskrit', 'Noto Sans Devanagari', serif;
  font-size: 2.6rem; color: var(--accent); line-height: 1;
  animation: page-preloader-pulse 1.6s ease-in-out infinite;
}
.page-preloader-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--rule); border-top-color: var(--accent);
  animation: load-more-spin .8s linear infinite;
}
.page-preloader-text { color: var(--muted); font-size: .88rem; letter-spacing: .02em; }
@keyframes page-preloader-pulse {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.14); }
}

/* ---------- hero ---------- */
.hero-banner {
  background-image: url('assets/hero_banner_light.webp');
  background-size: cover; background-position: center;
  min-height: 380px; display: flex; align-items: center; position: relative;
}
.hero-overlay {
  width: 100%; max-width: 540px; margin: 0 auto 0 200px; padding: 1.5rem;
  background: rgba(250,247,240,0.72); border-radius: 18px; backdrop-filter: blur(2px);
}
:root[data-theme="dark"] .hero-overlay { background: rgba(20,14,12,0.72); }
.hero-title { font-size: 1.9rem; color: var(--accent-dark); margin: 0 0 .5rem; line-height: 1.25; white-space: nowrap; }
:root[data-theme="dark"] .hero-title { color: #ffb199; }
.hero-sub { color: var(--gold); margin: 0 0 1rem; font-style: italic; white-space: nowrap; }
.hero-search input {
  width: 100%; padding: .8rem 1.1rem; border-radius: 26px; border: none;
  font-size: 1rem; box-shadow: var(--shadow); font-family: inherit;
}
.hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.hero-chips .chip {
  border: 1px solid var(--gold); background: rgba(196,89,17,0.12); color: var(--gold);
  padding: .35rem .85rem; border-radius: 16px; font-size: .82rem;
}
.hero-chips .chip:hover { background: var(--gold); color: #fff; }

/* ---------- category tabs ---------- */
.cat-tabs-wrap { position: relative; max-width: 1200px; margin: 0 auto; border-bottom: 1px solid var(--rule); }
.cat-tabs-wrap .row-nav { top: 50%; }
.cat-tabs {
  display: flex; flex-wrap: nowrap; gap: .5rem; padding: 1rem 1.5rem;
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
@media (max-width: 860px) {
  .cat-tabs-wrap .row-nav { display: none; }
}
.cat-tab {
  border: 1px solid var(--rule); background: var(--surface); padding: .5rem 1rem;
  border-radius: 20px; font-size: .88rem; white-space: nowrap;
}
.cat-tab .cnt { opacity: .65; font-size: .82em; }
.cat-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-tab.active .cnt { color: rgba(255,255,255,.85); }

/* ---------- rows / carousels ---------- */
.row-section { margin: 1.8rem 0; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .7rem; flex-wrap: wrap; gap: .4rem; }
.row-head h2 { margin: 0; font-size: 1.15rem; color: var(--gold); }
.row-sub { color: var(--muted); font-size: .78rem; font-weight: normal; }
.view-all { color: var(--blue); font-size: .85rem; white-space: nowrap; }

.row-scroll-wrap { position: relative; }
.row-scroll {
  display: flex; gap: 1rem; overflow-x: auto; scroll-behavior: smooth; padding: .2rem .1rem .6rem;
  scrollbar-width: none; -ms-overflow-style: none;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-nav {
  position: absolute; top: 40%; transform: translateY(-50%); z-index: 5;
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rule);
  background: var(--surface); box-shadow: var(--shadow); font-size: 1.1rem;
}
.row-nav.prev { left: -14px; } .row-nav.next { right: -14px; }

.book-row-item { flex: 0 0 210px; display: flex; gap: .6rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: .6rem; }
.book-row-body { min-width: 0; display: flex; flex-direction: column; gap: .3rem; justify-content: center; }
.book-row-body .book-title { font-weight: bold; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-pct { font-size: .75rem; color: var(--muted); }

/* ---------- covers ---------- */
.cover { position: relative; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; overflow: hidden; flex-shrink: 0; }
.cover-sm { width: 52px; height: 68px; }
.cover-md { width: 100%; aspect-ratio: 3/4; }
.cover-letter { font-size: 1.8rem; font-weight: bold; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.cover-mark { position: absolute; bottom: 4px; right: 6px; opacity: .5; font-size: .8rem; }
.cover.has-img { background: var(--surface-2); }
.cover.has-img img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }

/* ---------- book grid / cards ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.1rem; }
.book-card { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: .6rem; box-shadow: var(--shadow); }
.book-card-body { margin-top: .5rem; }
.book-card .book-title { display: block; font-weight: bold; font-size: .92rem; margin-bottom: .15rem; }
.book-card .book-author { font-size: .75rem; color: var(--muted); }
.fav-toggle { position: absolute; top: .8rem; right: .8rem; border: none; background: rgba(255,255,255,.85); width: 30px; height: 30px; border-radius: 50%; color: var(--accent); font-size: 1rem; }
.fav-toggle.active { background: var(--accent); color: #fff; }

.progress-track { background: var(--rule); border-radius: 6px; height: 6px; overflow: hidden; margin-top: .3rem; }
.progress-fill { background: var(--accent); height: 100%; border-radius: 6px; }

/* ---------- category slider (horizontal, next tile peeks half-visible at the edge) ---------- */
.cat-scroll { gap: .8rem; align-items: flex-start; }
.cat-tile {
  flex: 0 0 138px; align-self: flex-start; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: .75rem .5rem;
  text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.cat-tile-icon {
  font-size: 1.15rem; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cat-tile-label {
  font-size: 1rem; font-weight: bold; color: var(--ink); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-tile-count { color: var(--muted); font-size: 1rem; }
.cat-tile:hover { border-color: var(--accent); }

/* ---------- home: पंचांग + AI ask cards ---------- */
.home-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.5rem 0; align-items: stretch; }
@media (max-width: 960px) { .home-top-grid { grid-template-columns: 1fr; } }

.panchang-card, .ai-ask-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.2rem;
}
.panchang-card {
  background: url('assets/panchang-bg.webp');
  background-size: cover; background-position: center; border-color: var(--gold);
  padding-left: 35%;
}
.ai-ask-card {
  background: url('assets/ai-ask-bg.webp');
  background-size: cover; background-position: center; border-color: var(--gold);
  padding-left: 20%;
}
:root[data-theme="dark"] .panchang-card, :root[data-theme="dark"] .ai-ask-card { border-color: var(--rule); }
:root[data-theme="dark"] .panchang-card { background: url('assets/panchang-bg-dark.webp'); background-size: cover; background-position: center; }
:root[data-theme="dark"] .ai-ask-card { background: url('assets/ai-ask-bg-dark.webp'); background-size: cover; background-position: center; }
@media (max-width: 860px) {
  .panchang-card, .ai-ask-card { padding: 20px; max-width: 100%; overflow: hidden; }
  /* Wash the background photo with a 10%-opaque white layer so it reads as a muted
     backdrop rather than competing with the card's text. */
  .panchang-card { background-image: linear-gradient(rgba(255,255,255,.1), rgba(255,255,255,.1)), url('assets/panchang-bg.webp'); }
  .ai-ask-card { background-image: linear-gradient(rgba(255,255,255,.1), rgba(255,255,255,.1)), url('assets/ai-ask-bg.webp'); }
  /* Dark theme uses its own (already-dark) photo, so wash with a translucent layer of
     the dark-theme bg color instead of the light-theme's white wash. */
  :root[data-theme="dark"] .panchang-card { background-image: linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,.7)), url('assets/panchang-bg-dark.webp'); }
  :root[data-theme="dark"] .ai-ask-card { background-image: linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,.7)), url('assets/ai-ask-bg-dark.webp'); }
}
.pc-head, .ai-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.pc-head-icon, .ai-head-icon { font-size: 1.2rem; color: var(--accent); }
.ai-head-icon { font-family: 'Tiro Devanagari Sanskrit', 'Noto Sans Devanagari', serif; }
.pc-head h3, .ai-head h3 { margin: 0; font-size: 1.05rem; color: var(--accent-dark); flex: 1; }
:root[data-theme="dark"] .pc-head h3, :root[data-theme="dark"] .ai-head h3 { color: #ffb199; }
.ai-head-icon-badge { flex: 0 0 auto; width: 44px; height: 44px; object-fit: contain; }
.ai-badge { background: var(--accent); color: #fff; font-size: 1rem; font-weight: bold; padding: .15rem .5rem; border-radius: 10px; }
.pc-city { border: 1px solid var(--rule); border-radius: 10px; padding: .3rem .5rem; background: var(--surface); color: var(--ink); font-family: inherit; font-size: 1rem; }
.pc-date { font-weight: bold; color: var(--ink); font-size: 1rem; }
.pc-tithi-line { color: var(--gold); margin: .15rem 0 .8rem; font-size: 1rem; }
/* two mini-tables side by side: within each column, glyph in one column and a left-aligned
   data column next to it, so every row's text in that column starts at the same x. */
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .1rem 1rem; margin-bottom: .9rem; }
.pc-col { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.pc-fact { display: flex; align-items: flex-start; gap: .5rem; font-size: 1rem; padding: .32rem 0; min-width: 0; }
.pc-fact .pc-ic { flex: 0 0 auto; width: 1.5rem; font-size: 1rem; text-align: center; }
.pc-fact-data { text-align: left; display: flex; flex-direction: column; line-height: 1.3; color: var(--accent); }
.pc-fact b { color: #000; font-weight: normal; font-size: 1rem; }
:root[data-theme="dark"] .pc-fact b { color: var(--ink); }
:root[data-theme="dark"] .ai-sub, :root[data-theme="dark"] .ai-footer-note { color: var(--ink); }
.pc-full-btn { display: block; text-align: center; width: 100%; }

.ai-sub { color: #000; font-size: 1rem; margin: 0 0 .8rem; line-height: 1.5; }
.ai-ask-form {
  display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; position: relative;
  background: var(--surface); border-radius: 26px; box-shadow: var(--shadow); padding: .3rem .3rem .3rem 1.1rem;
}
.ai-ask-search-ic { flex: 0 0 auto; color: var(--muted); font-size: 1.05rem; }
.ai-ask-form input {
  flex: 1; padding: .5rem .3rem; border: none; background: transparent;
  color: var(--ink); font-family: inherit; font-size: 1rem;
}
.ai-ask-form input:focus { outline: none; }
.ai-ask-send {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 1.05rem; box-shadow: var(--shadow);
}
.ai-ask-send:hover { background: var(--accent-dark); }
.ai-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .2rem; }
.ai-chips .chip {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font-weight: bold;
  padding: .5rem 1rem; border-radius: 20px; font-size: 1rem;
}
.ai-chips .chip .chip-ic { font-size: .95em; }
.ai-chips .chip:hover { border-color: var(--accent); }
.ai-chips .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.ai-footer-note {
  display: flex; align-items: center; gap: .4rem; justify-content: center; margin-top: 1rem;
  color: #000; font-size: 1rem;
}

/* ---------- home: आज के लिए विशेष ---------- */
.today-special-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1.2rem; align-items: stretch; }
@media (max-width: 860px) { .today-special-grid { grid-template-columns: 1fr; } }
.festival-banner {
  background: linear-gradient(135deg, var(--gold), var(--accent)); color: #fff; border-radius: var(--radius);
  padding: 1.2rem; display: flex; gap: .8rem; align-items: flex-start; box-shadow: var(--shadow);
}
.festival-icon { font-size: 2.2rem; flex: 0 0 auto; }
.festival-body h4 { margin: 0 0 .35rem; font-size: 1.05rem; }
.festival-body p { margin: 0 0 .8rem; font-size: 1rem; opacity: .92; line-height: 1.5; }
/* .btn-outline (defined further down) would otherwise win and paint the button red on the red card */
.btn-outline.festival-cta { border-color: #fff; color: #fff; background: rgba(255,255,255,.12); }
.btn-outline.festival-cta:hover { background: #fff; color: var(--accent); }
.special-book-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .8rem; }
.special-book-tile {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .6rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .25rem;
}
.special-book-title { font-weight: bold; font-size: 1rem; margin-top: .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.special-book-sub { color: var(--muted); font-size: 1rem; }
.special-book-cta { color: var(--blue); font-size: 1rem; margin-top: .2rem; }

/* ---------- home: नये आगमन (mobile becomes a full-width list) ---------- */
@media (max-width: 860px) {
  .new-arrivals-row .row-scroll { flex-direction: column; overflow: visible; }
  .new-arrivals-row .book-row-item { flex: 1 1 auto; align-items: center; position: relative; padding-right: 1.8rem; }
  .new-arrivals-row .book-row-item::after { content: "›"; position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.3rem; }
  .new-arrivals-row .row-nav { display: none; }
}

/* ---------- home: आज क्या पढ़ें CTA ---------- */
.cta-banner {
  display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--accent-dark), var(--accent)); position: relative; min-height: 140px;
}
.cta-banner-body { padding: 1.3rem 1.4rem; color: #fff; max-width: 480px; }
.cta-banner-body h3 { margin: 0 0 .35rem; font-size: 1.15rem; }
.cta-banner-body p { margin: 0 0 .9rem; font-size: 1rem; opacity: .92; line-height: 1.5; }
.cta-banner-body .btn-primary { background: #fff; color: var(--accent-dark); display: inline-block; }
.cta-banner:hover .btn-primary { background: var(--surface-2); }

/* ---------- home: विशेष संग्रह ---------- */
.collections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.collection-tile {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem; display: flex; flex-direction: column; gap: .3rem; box-shadow: var(--shadow);
}
.collection-tile:hover { border-color: var(--accent); }
.collection-icon { font-size: 1.5rem; }
.collection-label { font-weight: bold; color: var(--ink); font-size: 1rem; }
.collection-sub { color: var(--muted); font-size: 1rem; }

/* ---------- home: लोकप्रिय लेखक ---------- */
.authors-row { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.author-tile { display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 92px; text-align: center; }
.author-avatar-photo { background-size: cover; background-position: center 25%; background-repeat: no-repeat; }
.author-avatar {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem; font-weight: bold; box-shadow: var(--shadow);
}
.author-name { font-size: 1rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 92px; }

/* ---------- page header / filters ---------- */
.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; padding: 1rem 0 .3rem; }
.page-header h1, .page-header h2 { margin: 0; font-size: 1.4rem; color: var(--accent-dark); }
:root[data-theme="dark"] .page-header h1, :root[data-theme="dark"] .page-header h2 { color: #ffb199; }
.page-header .cnt { color: var(--muted); font-size: .9rem; font-weight: normal; }
.lib-search input { padding: .55rem 1rem; border-radius: 20px; border: 1px solid var(--rule); font-family: inherit; min-width: 220px; }

.filter-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: .8rem 0 1.2rem; }
.filter-tab { border: 1px solid var(--rule); padding: .4rem .9rem; border-radius: 16px; font-size: .82rem; background: var(--surface); }
.filter-tab.active { background: var(--gold); border-color: var(--gold); color: #fff; }

.load-more-wrap { text-align: center; margin-top: 1.5rem; padding: 1rem 0; }
.load-more-spinner {
  display: inline-block; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--rule); border-top-color: var(--accent);
  animation: load-more-spin .7s linear infinite;
}
@keyframes load-more-spin { to { transform: rotate(360deg); } }
.btn-outline { border: 1px solid var(--accent); color: var(--accent); background: transparent; padding: .55rem 1.2rem; border-radius: 20px; font-size: 1rem; }
.btn-outline.active { background: var(--accent); color: #fff; }
.btn-primary { display: inline-block; border: none; background: var(--accent); color: #fff; padding: .6rem 1.3rem; border-radius: 20px; font-size: 1rem; }
.btn-primary:hover { background: var(--accent-dark); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .btn-primary { margin-top: 1rem; }

/* ---------- book detail ---------- */
.back-link { display: inline-block; margin-bottom: 1rem; color: var(--blue); }
.book-detail-grid { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; }
.book-detail-cover-col { display: flex; flex-direction: column; gap: .8rem; }
.book-detail-cover { border-radius: var(--radius); aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center; color: #fff; position: relative; box-shadow: var(--shadow); overflow: hidden; }
.book-detail-cover .cover-letter { font-size: 3.5rem; }
.book-detail-cover.has-img { background: var(--surface-2); }
.book-detail-cover.has-img img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.book-detail-info h1 { margin: 0 0 .5rem; color: var(--accent-dark); }
:root[data-theme="dark"] .book-detail-info h1 { color: #ffb199; }

/* ---------- affiliate buy buttons ---------- */
.affiliate-buttons { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.affiliate-btn { display: block; width: 75%; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.affiliate-btn:hover { transform: translateY(-2px); }
.affiliate-btn img { display: block; width: 100%; height: auto; }

/* ---------- listen to this book ---------- */
.btn-listen {
  display: inline-flex; align-items: center; gap: .5rem; border: none; border-radius: 24px;
  background: linear-gradient(135deg, var(--gold), var(--accent)); color: #fff; font-size: 1rem;
  font-weight: normal; padding: .7rem 1.5rem; margin-bottom: .9rem; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.btn-listen:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(60,40,10,0.18); }
.btn-listen-icon { font-size: 1.1rem; }
.meta-line { color: var(--muted); font-size: .9rem; margin-bottom: .3rem; }
.meta-line .meta-label { font-weight: bold; }
.meta-line a { color: var(--accent); }
.meta-line a:hover { text-decoration: underline; }
.tag-row { margin: .6rem 0 1rem; }
.tag { display: inline-block; background: var(--surface-2); color: var(--gold); border-radius: 14px; padding: .3rem .8rem; font-size: .8rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.3rem; }
.progress-block { margin-bottom: 1.5rem; max-width: 420px; }
.progress-block label { display: block; margin-bottom: .4rem; font-size: .9rem; }
.progress-block input[type=range] { width: 100%; accent-color: var(--accent); }
.about-block h3 { color: var(--gold); margin-bottom: .4rem; }
.about-block p { color: var(--ink); line-height: 1.6; max-width: 640px; }

/* ---------- book detail: tabs (परिचय / विषय सूची / टिप्पणियाँ) ---------- */
.detail-tabs { display: flex; gap: .5rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.2rem; flex-wrap: wrap; }
.detail-tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--muted); padding: .6rem .3rem; margin-right: 1rem; font-size: .92rem; cursor: pointer; }
.detail-tab:hover { color: var(--ink); }
.detail-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: bold; }
.detail-tab-panel { display: none; max-width: 640px; }
.detail-tab-panel.active { display: block; }
.empty-state.small { padding: 1.2rem .5rem; text-align: left; font-size: .9rem; }

.toc-accordion { max-height: 480px; overflow-y: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.toc-section { border-bottom: 1px solid var(--rule); }
.toc-section:last-child { border-bottom: none; }
.toc-section-header { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; font-weight: bold; color: var(--accent-dark); background: var(--surface-2); }
.toc-section-header a, .toc-section-header span { color: inherit; text-decoration: none; flex: 1; min-width: 0; }
.toc-section-header a:hover { color: var(--accent); }
.toc-toggle {
  flex: 0 0 auto; width: 1.4rem; height: 1.4rem; border: none; background: transparent; cursor: pointer;
  color: var(--accent-dark); font-size: .85rem; display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.toc-section-header .toc-toggle-spacer { flex: 0 0 auto; width: 1.4rem; }
.toc-section.open > .toc-section-header .toc-toggle { transform: rotate(90deg); }
.toc-children { list-style: none; margin: 0; padding: 0; display: none; }
.toc-section.open > .toc-children { display: block; }
.toc-item { border-top: 1px solid var(--rule); }
.toc-item a, .toc-item span { display: block; padding: .55rem .9rem; color: var(--ink); text-decoration: none; }
.toc-item a:hover { background: var(--surface-2); color: var(--accent); }
.toc-item.toc-level-2 a, .toc-item.toc-level-2 span { padding-left: 1.6rem; }
.toc-item.toc-level-3 a, .toc-item.toc-level-3 span { padding-left: 2.4rem; font-size: .9rem; color: var(--muted); }
.toc-item.toc-level-4 a, .toc-item.toc-level-4 span { padding-left: 3.2rem; font-size: .87rem; color: var(--muted); }

/* ---------- comments ---------- */
.comment-login-gate { background: var(--surface-2); border: 1px dashed var(--rule); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1.2rem; font-size: .9rem; }
.comment-login-gate .muted-note { display: block; color: var(--muted); font-size: .8rem; margin-top: .2rem; }
.comment-form { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.4rem; }
.comment-form textarea { width: 100%; resize: vertical; border: 1px solid var(--rule); border-radius: 10px; padding: .6rem .8rem; font-family: inherit; font-size: .92rem; background: var(--surface); color: var(--ink); }
.comment-form .btn-primary { align-self: flex-start; }
.comment-list { display: flex; flex-direction: column; gap: .8rem; }
.comment-item { border: 1px solid var(--rule); border-radius: var(--radius); padding: .7rem .9rem; background: var(--surface); }
.comment-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; }
.comment-head b { color: var(--accent-dark); }
.comment-time { color: var(--muted); font-size: .78rem; }
.comment-item p { margin: 0; line-height: 1.55; color: var(--ink); }

/* ---------- my reads ---------- */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0 1.6rem; }
.stat-card { background: var(--surface-2); border-radius: var(--radius); padding: 1.2rem; text-align: center; }
.stat-num { font-size: 1.6rem; font-weight: bold; color: var(--accent); }
.stat-label { color: var(--muted); font-size: .82rem; margin-top: .2rem; }
.continue-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.5rem; }
.continue-label { color: var(--gold); font-weight: bold; margin-bottom: .6rem; }
.continue-body { display: flex; align-items: center; gap: 1rem; }
.continue-body > div { flex: 1; min-width: 0; }
.history-list { display: flex; flex-direction: column; gap: .7rem; }
.history-item { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: .6rem .9rem; }
.history-body { flex: 1; min-width: 0; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: .6rem 1.2rem; border-radius: 20px;
  opacity: 0; transition: .2s; z-index: 100; font-size: .85rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,14,12,0.55); display: flex;
  align-items: center; justify-content: center; z-index: 200; padding: 1rem;
}
.modal-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.8rem 1.6rem; max-width: 360px; width: 100%; position: relative; text-align: center;
}
.modal-close {
  position: absolute; top: .6rem; right: .7rem; background: none; border: none;
  color: var(--muted); font-size: 1.1rem; line-height: 1; padding: .3rem;
}
.subscribe-modal-icon { font-size: 2.4rem; margin-bottom: .4rem; }
.subscribe-modal h3 { margin: 0 0 .5rem; color: var(--accent-dark); }
:root[data-theme="dark"] .subscribe-modal h3 { color: #ffb199; }
.subscribe-modal p { color: var(--muted); margin: 0 0 1.1rem; font-size: .92rem; }
.subscribe-modal .btn-primary { width: 100%; }

/* ---------- Home page: all text scaled up 12% (40% increase, then reduced 20%) ---------- */
/* Home page: text scaled up 12%, with a 16px floor (min font size on the home page is 1rem). */
body.is-home .hero-title { font-size: max(1rem, calc(1.9rem * 1.12)); }
body.is-home .hero-sub { font-size: max(1rem, calc(1rem * 1.12)); }
body.is-home .hero-search input { font-size: max(1rem, calc(1rem * 1.12)); }
body.is-home .hero-chips .chip { font-size: max(1rem, calc(.82rem * 1.12)); }
body.is-home .cat-tab { font-size: max(1rem, calc(.88rem * 1.12)); }
body.is-home .row-head h2 { font-size: max(1rem, calc(1.15rem * 1.12)); }
body.is-home .row-sub { font-size: max(1rem, calc(.78rem * 1.12)); }
body.is-home .view-all { font-size: max(1rem, calc(.85rem * 1.12)); }
body.is-home .row-nav { font-size: max(1rem, calc(1.1rem * 1.12)); }
body.is-home .book-row-body .book-title { font-size: max(1rem, calc(.92rem * 1.12)); }
body.is-home .book-row-body .book-author { font-size: max(1rem, calc(1rem * 1.12)); }
body.is-home .progress-pct { font-size: max(1rem, calc(.72rem * 1.12)); }
body.is-home .cover-letter { font-size: max(1rem, calc(1.8rem * 1.12)); }
body.is-home .cover-mark { font-size: max(1rem, calc(.8rem * 1.12)); }

/* ---------- mobile bottom nav ---------- */
.bottom-nav { display: none; }

@media (max-width: 860px) {
  .sidebar {
    left: -88%; width: 82%; max-width: 300px; transition: left .22s ease; box-shadow: var(--shadow);
  }
  /* The off-canvas drawer always shows full labels -- it has no hover affordance on
     touch, so it doesn't use the desktop icon-rail collapse (≥861px, above). */
  .sidebar-wordmark, .side-link span:not(.ic), .side-caret { opacity: 1; }
  .sidebar.open { left: 0; }
  .sidebar-scrim { display: block; }
  .hamburger-btn { display: flex; align-items: center; justify-content: center; }
  .main-col { margin-left: 0; }
  .topbar { left: 0; }
  /* Unscrolled (home, before scrolling) topbar: an 80%-opaque wash of the eventual
     solid color -- not fully see-through -- with red icons/hamburger, rather than the
     white-on-transparent-hero look desktop keeps. Once .scrolled is added (see
     updateTopbarSolidity() in swadhyay-app.js) it's the existing fully-opaque bar. */
  .topbar:not(.scrolled) { background: rgba(255,255,255,.5); }
  :root[data-theme="dark"] .topbar:not(.scrolled) { background: rgba(27,21,18,.5); }
  .topbar:not(.scrolled) .topbar-left,
  .hamburger-btn { color: var(--accent); }
  .hamburger-btn { background: rgba(165,21,18,.12); }
  .topbar:not(.scrolled) .global-search-btn,
  .topbar:not(.scrolled) .profile-btn {
    background: rgba(165,21,18,.1); border-color: var(--accent); color: var(--accent);
  }
  .topbar:not(.scrolled) .theme-switch .track { background: rgba(165,21,18,.25); }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--rule); box-shadow: 0 -2px 10px rgba(60,40,10,0.08);
    justify-content: space-around; padding: 0;
  }
  .bottom-nav .side-link {
    width: auto; flex: 1; flex-direction: column; color: var(--muted); opacity: 1; padding: 0 .35rem;
  }
  .bottom-nav .side-link .ic {
    width: 100%; height: 44px; border-radius: 10px; display: flex; align-items: center;
    justify-content: center; font-size: 1.25rem; margin: 0 auto;
  }
  .bottom-nav .side-link.active .ic { background: var(--accent); color: #fff; }
  /* Icon-only -- no label, so there's no row reserved for text (active or not). */
  .bottom-nav .side-link span:not(.ic) { display: none; }
  body { padding-bottom: 44px; }
  .content-pad { padding: 1rem 1rem 3rem; }
  .hero-overlay { margin: 0 1rem; max-width: none; }
  /* The fixed top bar floats over the hero picture, so the white card starts below it
     instead of sliding underneath. */
  .hero-banner { align-items: flex-start; padding: calc(var(--topbar-h, 64px) + .6rem) 0 1.1rem; min-height: 0; }
  .hero-banner { background-image: url('assets/hero_banner_mobile_light.webp'); }
  :root[data-theme="dark"] .hero-banner { background-image: url('assets/hero_banner_mobile_dark.webp'); }
  /* clamp(), not a fixed size, so the title shrinks to fit its one line (white-space:
     nowrap, set above) at any phone width instead of wrapping or overflowing. */
  body.is-home .hero-title { font-size: clamp(1rem, 6.3vw, calc(1.4rem * 1.12)); }
  body.is-home .hero-sub { font-size: clamp(.68rem, 4.1vw, calc(1rem * 1.12)); }
  /* Smaller pills so the 6 topic chips pack into 2 rows (3+3) instead of 3. */
  body.is-home .hero-chips .chip { font-size: .78rem; padding: .3rem .6rem; }
  .book-detail-grid { grid-template-columns: 1fr; }
  .book-detail-cover-col { max-width: 220px; }
  .btn-listen { width: 100%; justify-content: center; }
  .stats-row { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .stat-card { padding: .7rem; }
  .stat-num { font-size: 1.2rem; }
  .topbar { padding: .6rem 1rem; left: 0; }
}

/* ==================== in-app book reader ==================== */
body.reader-active { overflow: hidden; }

.reader-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 500;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
}
.reader-overlay.show { display: flex; }

.reader-topbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: .4rem;
  height: 52px; padding: 0 .6rem; border-bottom: 1px solid var(--rule);
  background: var(--surface); box-shadow: var(--shadow);
}
.reader-icon-btn {
  width: 38px; height: 38px; flex: 0 0 auto; border: none; background: transparent;
  color: var(--ink); font-size: 1.15rem; border-radius: 50%; cursor: pointer;
}
.reader-icon-btn:hover { background: var(--surface-2); }
.reader-title {
  flex: 1 1 auto; min-width: 0; text-align: center; font-size: .92rem; font-weight: bold;
  color: var(--accent-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 .3rem;
}

.reader-body { position: relative; flex: 1 1 auto; overflow: hidden; }

.reader-content { position: absolute; inset: 0; }
.reader-iframe { width: 100%; height: 100%; border: none; display: block; background: #fff; }

.reader-scrim {
  position: absolute; inset: 0; background: rgba(20,14,12,.45); z-index: 5;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.reader-scrim.show { opacity: 1; pointer-events: auto; }

.reader-drawer {
  position: absolute; top: 0; bottom: 0; left: -85%; width: 85%; max-width: 320px; z-index: 6;
  background: var(--surface); box-shadow: var(--shadow); overflow-y: auto;
  transition: left .22s ease;
}
.reader-drawer.open { left: 0; }

.reader-drawer-tabs {
  display: flex; position: sticky; top: 0; background: var(--surface); z-index: 1;
  border-bottom: 1px solid var(--rule);
}
.reader-drawer-tab {
  flex: 1; border: none; background: transparent; color: var(--ink); opacity: .65;
  padding: .9rem .5rem; font-size: .85rem; font-weight: bold; cursor: pointer;
  border-bottom: 2px solid transparent; font-family: inherit;
}
.reader-drawer-tab.active { opacity: 1; color: var(--accent); border-bottom-color: var(--accent); }

.reader-drawer-panel { display: none; }
.reader-drawer-panel.active { display: block; }

.reader-toc { list-style: none; margin: 0; padding: .4rem 0; }
.reader-toc-group { list-style: none; }
.reader-toc-item {
  display: flex; align-items: center; gap: .4rem;
  padding: .65rem 1.1rem; font-size: .9rem; cursor: pointer; border-left: 3px solid transparent;
  color: var(--ink);
}
.reader-toc-item:hover { background: var(--surface-2); }
.reader-toc-item.active { border-left-color: var(--accent); color: var(--accent); font-weight: bold; background: var(--surface-2); }
.reader-toc-star { color: var(--gold); }

.reader-toc-expand {
  flex: 0 0 auto; width: 20px; height: 20px; border: none; background: transparent;
  color: var(--ink); opacity: .6; font-size: .75rem; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.reader-toc-expand:hover { opacity: 1; }
.reader-toc-expand-spacer { flex: 0 0 auto; width: 20px; }

.reader-toc-subs {
  list-style: none; margin: 0; padding: 0; max-height: 0; overflow: hidden;
}
.reader-toc-subs.open { max-height: none; }
.reader-toc-subitem {
  padding: .5rem 1.1rem .5rem 3rem; font-size: .82rem; cursor: pointer;
  color: var(--ink); opacity: .82; border-left: 3px solid transparent;
}
.reader-toc-subitem:hover { background: var(--surface-2); opacity: 1; }

.reader-bm-empty { margin: 1rem; }
.reader-bookmarks-ul { list-style: none; margin: 0; padding: .4rem 0; }
.reader-bm-item {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .55rem .6rem .55rem 1.1rem; font-size: .88rem; color: var(--gold);
}
.reader-bm-item:hover { background: var(--surface-2); }
.reader-bm-label { cursor: pointer; flex: 1; }
.reader-bm-remove {
  border: none; background: transparent; color: var(--ink); opacity: .5; cursor: pointer;
  font-size: .8rem; padding: .3rem .5rem; flex: 0 0 auto;
}
.reader-bm-remove:hover { opacity: 1; color: var(--accent); }

#readerBookmarkToggle.active { color: var(--gold); }

.reader-settings {
  position: absolute; top: 0; bottom: 0; right: -85%; width: 85%; max-width: 300px; z-index: 6;
  background: var(--surface); box-shadow: var(--shadow); overflow-y: auto;
  transition: right .22s ease; padding: 1rem 1.1rem;
}
.reader-settings.open { right: 0; }
.reader-settings-row { margin-bottom: 1.2rem; }
.reader-settings-row > span { display: block; font-weight: bold; color: var(--accent-dark); margin-bottom: .5rem; font-size: .88rem; }
.reader-theme-btns { display: flex; gap: .4rem; }
.rdr-theme-btn {
  flex: 1; border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink);
  border-radius: 10px; padding: .5rem .3rem; font-size: .8rem; cursor: pointer;
}
.rdr-theme-btn.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.reader-font-btns { display: flex; align-items: center; gap: .8rem; }
.reader-font-btns button {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--rule);
  background: var(--surface-2); color: var(--ink); font-size: .95rem; cursor: pointer;
}
#readerFontVal { font-size: .9rem; min-width: 44px; text-align: center; }
.reader-lineheight-ctl { display: flex; align-items: center; gap: .8rem; }
.reader-lineheight-ctl input[type="range"] { flex: 1; accent-color: var(--accent); }
#readerLineHeightVal { font-size: .9rem; min-width: 44px; text-align: center; }

.reader-bottomnav {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  height: 50px; padding: 0 .9rem; border-top: 1px solid var(--rule); background: var(--surface);
}
.reader-nav-btn {
  border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink);
  border-radius: 18px; padding: .45rem 1rem; font-size: .85rem; cursor: pointer;
}
.reader-nav-btn:disabled { opacity: .4; cursor: default; }
.reader-page-ind { font-size: .8rem; color: var(--ink); opacity: .75; }

@media (max-width: 860px) {
  .reader-title { font-size: .82rem; }
}

/* ---------------- chat / सहायक ---------------- */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 1.5rem); }
.chat-shell {
  flex: 1; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; min-height: 0;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .7rem; }
.chat-msg { display: flex; }
.chat-msg-user { justify-content: flex-end; }
.chat-msg-bot { justify-content: flex-start; flex-direction: column; align-items: flex-start; }
.chat-bubble {
  max-width: 78%; padding: .65rem .95rem; border-radius: 16px; line-height: 1.55;
  font-size: .95rem; white-space: normal; word-break: break-word;
}
.chat-msg-user .chat-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-bot .chat-bubble { background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-typing { display: inline-flex; gap: 4px; align-items: center; height: 1em; }
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: chat-typing-bounce 1.1s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-typing-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
.chat-error { color: var(--accent-dark); font-size: .88rem; }
.chat-sources { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; max-width: 78%; }
.chat-source-chip {
  font-size: .78rem; padding: .25rem .6rem; border-radius: 12px; border: 1px solid var(--rule);
  background: var(--surface); color: var(--accent-dark); text-decoration: none;
}
a.chat-source-chip:hover { border-color: var(--accent); color: var(--accent); }
.chat-input-row {
  flex: 0 0 auto; display: flex; gap: .6rem; padding: .8rem 1rem; border-top: 1px solid var(--rule); background: var(--surface);
}
.chat-input-row input {
  flex: 1; padding: .65rem 1rem; border-radius: 22px; border: 1px solid var(--rule);
  background: var(--surface-2); color: var(--ink); font-family: inherit; font-size: .95rem;
}
.chat-input-row .btn-primary:disabled { opacity: .55; cursor: default; }
@media (max-width: 860px) {
  .chat-page { height: calc(100vh - var(--topbar-h) - 60px - 1rem); }
  .chat-bubble, .chat-sources { max-width: 90%; }
}

/* ---------------- पंचांग पेज ---------------- */
.panchang-page { max-width: 640px; margin: 0 auto; }
.panchang-week-wrap { position: relative; }
.panchang-week-wrap .row-nav { top: 50%; }
@media (max-width: 860px) { .panchang-week-wrap .row-nav { display: none; } }
.panchang-week-strip {
  display: flex; gap: .6rem; overflow-x: auto; padding: .2rem .1rem 1rem; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.panchang-week-strip::-webkit-scrollbar { display: none; }
.pw-day {
  position: relative; flex: 0 0 68px; text-align: center; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; padding: .6rem .3rem; box-shadow: var(--shadow);
  font-family: inherit; color: inherit; cursor: pointer; transition: background .12s ease, border-color .12s ease;
}
.pw-day:hover { border-color: var(--accent); }
.pw-day.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pw-day.is-today:not(.active) { border-color: var(--accent); border-width: 2px; }
.pw-month {
  font-size: .62rem; font-weight: bold; color: var(--accent); white-space: nowrap;
  margin-bottom: .15rem;
}
.pw-day.active .pw-month { color: rgba(255,255,255,.9); }
.pw-weekday { font-size: .75rem; opacity: .75; }
.pw-date { font-size: 1.15rem; font-weight: bold; margin: .1rem 0; }
.pw-tithi { font-size: .75rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.panchang-detail-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.3rem 1.4rem; max-width: 640px;
}
.pd-date-head h2 { margin: 0; color: var(--accent-dark); font-size: 1.2rem; }
:root[data-theme="dark"] .pd-date-head h2 { color: #ffb199; }
.pd-sub { color: var(--gold); font-size: .9rem; margin: .2rem 0 1.1rem; }
.pd-section-title { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; margin: 1.1rem 0 .5rem; }
.pd-rows { display: flex; flex-direction: column; gap: .1rem; }
.pd-row { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--rule); font-size: .92rem; }
.pd-row:last-child { border-bottom: none; }
.pd-ic { flex: 0 0 auto; font-size: 1.05rem; width: 1.4rem; text-align: center; }
.pd-label { flex: 1; color: var(--muted); }
.pd-val { font-weight: bold; color: var(--ink); text-align: right; }
.pd-disclaimer { color: var(--muted); font-size: .78rem; line-height: 1.6; margin-top: 1.3rem; padding-top: 1rem; border-top: 1px dashed var(--rule); }

/* ---------------- सहायता ---------------- */
.help-faq-list { display: flex; flex-direction: column; gap: .7rem; max-width: 680px; margin-bottom: 1.2rem; }
.help-faq-item {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .3rem 1.1rem; box-shadow: var(--shadow);
}
.help-faq-item summary { padding: .85rem 0; font-weight: bold; color: var(--accent-dark); cursor: pointer; list-style: none; }
:root[data-theme="dark"] .help-faq-item summary { color: #ffb199; }
.help-faq-item summary::-webkit-details-marker { display: none; }
.help-faq-item summary::before { content: "▸ "; color: var(--accent); }
.help-faq-item[open] summary::before { content: "▾ "; }
.help-faq-item p { margin: 0 0 .9rem; color: var(--ink); line-height: 1.6; font-size: .92rem; }
.help-contact { color: var(--muted); font-size: .92rem; }
.help-contact a { color: var(--blue); }

/* ---------------- विषय सुधार ---------------- */
.feedback-intro { color: var(--muted); max-width: 620px; line-height: 1.6; margin-bottom: 1.2rem; }
.feedback-form { display: flex; flex-direction: column; gap: .9rem; max-width: 560px; margin-bottom: 2rem; }
.feedback-form label { display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; color: var(--muted); }
.feedback-form input, .feedback-form textarea {
  border: 1px solid var(--rule); border-radius: 10px; padding: .6rem .8rem; font-family: inherit;
  font-size: .92rem; background: var(--surface); color: var(--ink); resize: vertical;
}
.feedback-form .btn-primary { align-self: flex-start; }

@media (max-width: 860px) {
  .today-special-grid, .home-top-grid { gap: .9rem; }
  .authors-row { gap: .8rem; justify-content: space-between; }
  .author-tile { width: 72px; }
  .author-avatar { width: 52px; height: 52px; font-size: 1.2rem; }
  .author-name { max-width: 72px; font-size: .75rem; }
}

/* ---------------- auth pages (login/signup) ---------------- */
.is-hidden { display: none !important; }
.auth-page { max-width: 420px; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.auth-form label { display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; color: var(--muted); }
.auth-form input {
  border: 1px solid var(--rule); border-radius: 10px; padding: .65rem .85rem;
  font-family: inherit; font-size: .95rem; background: var(--surface); color: var(--ink);
}
.auth-error { color: var(--accent-dark); font-size: .88rem; min-height: 1.1em; }
.auth-switch { margin-top: 1rem; color: var(--muted); font-size: .9rem; }
.auth-switch a { color: var(--accent); }
.google-signin-btn { margin: 1rem 0 .5rem; display: flex; justify-content: center; }
.auth-divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .82rem; margin: .5rem 0 1rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ---------------- खाता / सेटिंग्स ---------------- */
.account-card {
  background: var(--surface-2); border-radius: 14px; padding: 1.2rem 1.4rem;
  max-width: 460px; display: flex; flex-direction: column; gap: .7rem; align-items: flex-start;
}
.account-name { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.account-email { color: var(--muted); font-size: .9rem; margin-top: -.5rem; }
.admin-role-badge {
  display: inline-block; font-size: .7rem; padding: .15rem .55rem; border-radius: 10px;
  background: var(--surface); color: var(--muted); vertical-align: middle; margin-left: .4rem;
}
.admin-role-badge.admin { background: var(--accent); color: #fff; }
.admin-settings-link { margin-top: .3rem; }

/* ---------------- लेखक (authors) ---------------- */
.author-photo.cover { position: relative; overflow: hidden; border-radius: 50%; }
.author-photo.cover.has-img img { object-fit: cover; object-position: center 25%; padding: 0; }
.author-photo.cover-sm { width: 52px; height: 52px; aspect-ratio: 1/1; }
.author-photo.cover-md { width: 120px; height: 120px; aspect-ratio: 1/1; margin: 0 auto; }
.author-photo.cover-lg { width: 150px; height: 150px; aspect-ratio: 1/1; }
.authors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1.2rem; }
.author-card { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; text-decoration: none; }
.author-card-name { color: var(--ink); font-weight: 600; font-size: .95rem; }
.author-card-count { color: var(--muted); font-size: .8rem; }
.authors-group { margin-bottom: 2rem; }
.authors-group-title { font-size: 1.1rem; color: var(--accent-dark); margin: 0 0 .9rem; border-bottom: 1px solid var(--rule); padding-bottom: .4rem; }
.authors-group-title .cnt { color: var(--muted); font-size: .85rem; font-weight: normal; }
:root[data-theme="dark"] .authors-group-title { color: #ffb199; }
.author-role-label { color: var(--gold); font-size: .9rem; margin-top: .2rem; }
.taxlang-toggle {
  border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 16px;
  padding: .35rem .8rem; font-size: .8rem; font-weight: bold; cursor: pointer; margin-left: .5rem;
}
.taxlang-toggle:hover { background: var(--accent); color: #fff; }
.lib-search { display: flex; align-items: center; }
.taxlang-card { margin-top: 1.2rem; }
.taxlang-options { display: flex; gap: .6rem; margin-top: .6rem; }
.author-detail-head { display: flex; gap: 1.4rem; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.author-detail-head h1 { margin: 0 0 .4rem; }
.author-bio { color: var(--ink); line-height: 1.6; max-width: 640px; }
.tag-row-topics { margin-top: -.6rem; }
.tag-topic { text-decoration: none; cursor: pointer; }
.tag-topic:hover { background: var(--accent); color: #fff; }

/* ---------------- एडमिन पैनल ---------------- */
.admin-page { max-width: 900px; }
.admin-nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-top: 1rem; }
.admin-nav-card {
  display: flex; flex-direction: column; align-items: center; gap: .6rem; text-decoration: none;
  background: var(--surface-2); border-radius: 14px; padding: 1.6rem 1rem; color: var(--ink); text-align: center;
}
.admin-nav-card:hover { background: var(--surface); outline: 1px solid var(--accent); }
.admin-nav-icon { font-size: 2rem; }
.admin-nav-label { font-weight: 600; }

.admin-book-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.admin-book-row { background: var(--surface-2); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.admin-book-head { display: flex; align-items: center; gap: .8rem; }
.admin-book-head .cover { width: 42px; aspect-ratio: 3/4; flex: 0 0 auto; }
.admin-book-title { font-weight: 600; color: var(--ink); }
.admin-book-author { font-size: .82rem; color: var(--muted); }
.admin-cat-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.admin-cat-chip {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--muted);
  background: var(--surface); border-radius: 10px; padding: .25rem .6rem; cursor: pointer;
}
.admin-cat-chip input:checked ~ * { color: var(--accent); }
.admin-cat-chip:has(input:checked) { color: var(--accent-dark); background: var(--surface); outline: 1px solid var(--accent); }
.admin-tags-label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; color: var(--muted); max-width: 420px; }
.admin-tags-input, .admin-author-name, .admin-author-bio {
  border: 1px solid var(--rule); border-radius: 8px; padding: .5rem .7rem; font-family: inherit;
  font-size: .88rem; background: var(--surface); color: var(--ink);
}
.admin-save-status { font-size: .8rem; color: var(--muted); margin-left: .6rem; }
.admin-pager { display: flex; align-items: center; gap: 1rem; margin-top: 1.2rem; }

.admin-inline-form { display: flex; gap: .6rem; margin: 1rem 0; }
.admin-inline-form input { border: 1px solid var(--rule); border-radius: 10px; padding: .55rem .8rem; font-family: inherit; background: var(--surface); color: var(--ink); flex: 1; max-width: 320px; }
.admin-author-list, .admin-user-list, .admin-comment-list { display: flex; flex-direction: column; gap: .9rem; margin-top: .5rem; }
.admin-author-row { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface-2); border-radius: 12px; padding: 1rem; }
.admin-author-fields { flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.admin-author-fields textarea { resize: vertical; }
.admin-photo-label { font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; gap: .3rem; }
.admin-author-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }

.admin-user-row { display: flex; align-items: center; gap: 1rem; background: var(--surface-2); border-radius: 12px; padding: .9rem 1.1rem; }
.admin-user-row > div:first-child { flex: 1; }
.admin-user-email { font-size: .82rem; color: var(--muted); }

.admin-comment-row { background: var(--surface-2); border-radius: 12px; padding: 1rem; }
.admin-comment-book { font-size: .8rem; color: var(--accent-dark); font-weight: 600; margin: .2rem 0; }
.admin-comment-actions { display: flex; gap: .6rem; margin-top: .6rem; }

@media (max-width: 860px) {
  .authors-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .author-photo.cover-md { width: 90px; height: 90px; }
  .admin-author-row { flex-direction: column; }
  .admin-author-actions { align-items: flex-start; flex-direction: row; }
}

/* ======================================================================
   एडमिन पैनल शेल — persistent sidenav + topbar, used by every admin page
   (replaces the old "<main class=content-pad admin-page> + back-link"
   pattern with a proper dashboard-style layout). Full-bleed, independent
   of .content-pad's reading-width constraint.
   ====================================================================== */
.admin-shell { display: flex; min-height: calc(100vh - 56px); margin: -1rem; }
.admin-sidenav {
  width: 220px; flex: 0 0 auto; background: var(--surface-2); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; padding: 1.2rem 0;
}
.admin-sidenav-brand { font-weight: 700; font-size: 1.05rem; color: var(--accent-dark); padding: 0 1.2rem 1.2rem; }
.admin-sidenav nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.admin-sidenav-link {
  display: flex; align-items: center; gap: .7rem; padding: .7rem 1.2rem; color: var(--ink);
  text-decoration: none; font-size: .92rem; border-left: 3px solid transparent;
}
.admin-sidenav-link:hover { background: var(--surface); }
.admin-sidenav-link.active { border-left-color: var(--accent); background: var(--surface); color: var(--accent-dark); font-weight: 600; }
.admin-sidenav-icon { font-size: 1.1rem; width: 1.4rem; text-align: center; }
.admin-sidenav-exit { margin-top: 1rem; border-top: 1px solid var(--rule); padding-top: 1rem; color: var(--muted); }

.admin-main { flex: 1; min-width: 0; padding: 1.4rem 1.8rem 3rem; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem; }
.admin-topbar h1 { margin: 0; font-size: 1.35rem; }
.admin-topbar-actions { display: flex; gap: .6rem; align-items: center; }

.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.admin-stat-card { background: var(--surface-2); border-radius: 12px; padding: 1.2rem 1.4rem; }
.admin-stat-value { font-size: 1.8rem; font-weight: 700; color: var(--accent-dark); }
.admin-stat-label { color: var(--muted); font-size: .85rem; margin-top: .2rem; }

.btn-primary-sm, .btn-outline-sm {
  display: inline-block; border-radius: 16px; padding: .4rem .9rem; font-size: .82rem; text-decoration: none;
  cursor: pointer; font-family: inherit;
}
.btn-primary-sm { background: var(--accent); color: #fff; border: none; }
.btn-outline-sm { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-primary-sm:disabled, .btn-outline-sm:disabled { opacity: .55; cursor: default; }

.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.admin-search-input {
  border: 1px solid var(--rule); border-radius: 10px; padding: .55rem .8rem; font-family: inherit;
  font-size: .9rem; background: var(--surface); color: var(--ink); min-width: 240px;
}
.admin-toolbar-count { color: var(--muted); font-size: .85rem; }

.admin-table-wrap { overflow-x: auto; background: var(--surface-2); border-radius: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { text-align: left; padding: .8rem 1rem; color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid var(--rule); }
.admin-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-td-cover { width: 44px; }
.admin-td-cover .cover { width: 36px; aspect-ratio: 3/4; }
.admin-table-title { font-weight: 600; color: var(--ink); }
.admin-table-sub { font-size: .76rem; color: var(--muted); margin-top: .1rem; }
.admin-table-bio-cell { color: var(--muted); max-width: 320px; }
.admin-td-chips { display: flex; flex-wrap: wrap; gap: .3rem; max-width: 220px; }
.admin-td-actions { text-align: right; white-space: nowrap; }
.chip-sm { display: inline-block; font-size: .74rem; padding: .15rem .55rem; border-radius: 10px; background: var(--surface); color: var(--muted); }
.chip-sm-tag { color: var(--accent-dark); }

.admin-author-edit-row td { padding: 0 1rem 1rem; border-bottom: 1px solid var(--rule); }
.admin-author-edit-panel { background: var(--surface); border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; max-width: 480px; }

.admin-form { max-width: 640px; display: flex; flex-direction: column; gap: 1.6rem; }
.admin-form-section { background: var(--surface-2); border-radius: 12px; padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.admin-form-section h3 { margin: 0; font-size: 1rem; color: var(--accent-dark); }
.admin-form-field { display: flex; flex-direction: column; gap: .4rem; font-size: .88rem; color: var(--muted); }
.admin-form-field input[type="text"], .admin-form-field input[type="file"], .admin-form-field select, .admin-form-field textarea {
  border: 1px solid var(--rule); border-radius: 8px; padding: .55rem .75rem; font-family: inherit;
  font-size: .9rem; background: var(--surface); color: var(--ink);
}
.admin-new-author-field { margin-top: -.4rem; }
.admin-form-actions { display: flex; align-items: center; gap: 1rem; }
.admin-error { color: var(--accent-dark); font-size: .88rem; min-height: 1.1em; }

@media (max-width: 860px) {
  .admin-shell { flex-direction: column; margin: -1rem -1rem 0; }
  .admin-sidenav { width: 100%; flex-direction: row; overflow-x: auto; padding: .6rem; border-right: none; border-bottom: 1px solid var(--rule); }
  .admin-sidenav nav { flex-direction: row; }
  .admin-sidenav-link { border-left: none; border-bottom: 3px solid transparent; padding: .5rem .8rem; white-space: nowrap; }
  .admin-sidenav-link.active { border-left-color: transparent; border-bottom-color: var(--accent); }
  .admin-sidenav-exit { margin-top: 0; border-top: none; padding-top: 0; }
  .admin-sidenav-brand { display: none; }
  .admin-main { padding: 1.2rem 1rem 2.5rem; }
}

/* Crawler-facing copy of a page, put into #viewRoot by the server (server/lib/seo.js).
   The app replaces it on first render; it only shows for visitors without JavaScript. */
.seo-content { max-width: 860px; margin: 0 auto; padding: 1rem 1.25rem 3rem; color: var(--ink); line-height: 1.7; }
.seo-content a { color: var(--accent); }
.seo-content ul { padding-left: 1.2rem; }
.seo-content nav { font-size: .9rem; color: var(--muted); margin: .5rem 0; }

/* =====================================================================
   Audio: home panel, /audio page, mini-player dock and full player sheet
   (markup + behaviour in swadhyay-audio.js)
   ===================================================================== */

/* ---------- home: two-column lower area (banner / collections / authors | audio) ---------- */
.home-lower-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas: "cta audio" "coll audio" "auth audio"; column-gap: 1.5rem; align-items: start;
}
.home-lower-grid > * { min-width: 0; }
.hl-cta { grid-area: cta; } .hl-coll { grid-area: coll; } .hl-auth { grid-area: auth; }
.home-audio { grid-area: audio; position: relative; min-height: 440px; margin: 1.8rem 0; align-self: stretch; }
.home-audio .audio-panel { position: absolute; inset: 0; }
.home-lower-grid .collections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .home-lower-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cta" "audio" "coll" "auth"; }
  .home-audio { min-height: 0; }
  .home-audio .audio-panel { position: relative; }
  .home-audio .ap-list { max-height: 330px; }
}
/* Special Collections: two tiles per row on phones */
@media (max-width: 640px) {
  .collections-grid, .home-lower-grid .collections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .collection-tile { padding: .85rem .8rem; }
}

/* ---------- the panel ---------- */
.audio-panel {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; width: 100%; position: relative;
}
.audio-panel::before {
  content: ""; display: block; height: 4px; flex: none;
  background: linear-gradient(90deg, var(--accent-dark), var(--gold), var(--accent-dark));
}
.ap-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .9rem 1.2rem .5rem; flex: none; }
.ap-h { margin: 0; font-size: 1.2rem; color: var(--gold); }
body.is-home .ap-h { font-size: 1.3rem; }
.ap-sub { margin: .1rem 0 0; color: var(--muted); font-size: .92rem; }
.ap-body { display: flex; flex-direction: column; gap: .8rem; padding: 0 1rem 1rem; flex: 1; min-height: 0; }
.ap-lists { display: flex; flex-direction: column; gap: .6rem; flex: 1; min-height: 0; }

/* ---------- the player deck ---------- */
.ap-deck {
  --g1: #a51512; --g2: #5c0b0a; position: relative; overflow: hidden; color: #fff; flex: none;
  border-radius: 18px; padding: .95rem .95rem .7rem;
  background: radial-gradient(120% 140% at 0% 0%, var(--g1) 0%, var(--g2) 78%);
  box-shadow: 0 8px 22px -8px var(--g2);
}
.ap-deck::after {
  content: "ॐ"; position: absolute; right: -.4rem; bottom: -2.2rem; font-size: 8.5rem; line-height: 1;
  color: #fff; opacity: .1; pointer-events: none;
}
.ap-deck > * { position: relative; z-index: 1; }
.ap-deck-empty { min-height: 120px; display: grid; place-items: center; text-align: center; }
.ap-deck-top { display: flex; align-items: center; gap: .8rem; }
.ap-meta { min-width: 0; flex: 1; }
.ap-kicker { font-size: .8rem; opacity: .85; letter-spacing: .02em; }
.ap-title { font-size: 1.15rem; font-weight: bold; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ap-artist { font-size: .9rem; opacity: .85; }

.ap-art {
  --g1: #a51512; --g2: #5c0b0a; position: relative; flex: none; display: grid; place-items: center; overflow: hidden;
  width: 48px; height: 48px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, var(--g1), var(--g2));
}
.ap-art-lg { width: 66px; height: 66px; border-radius: 17px; border: 2px solid rgba(255, 255, 255, .35); }
.ap-art-sm { width: 42px; height: 42px; border-radius: 11px; }
.ap-art-glyph { font-size: 1.5rem; line-height: 1; }
.ap-art-lg .ap-art-glyph { font-size: 2rem; }
.ap-eq { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 22%; background: rgba(0, 0, 0, .42); }
.ap-eq i { display: block; width: 3px; border-radius: 2px; background: #fff; height: 30%; animation: ap-bar .9s ease-in-out infinite; }
.ap-eq i:nth-child(2) { animation-delay: -.3s; } .ap-eq i:nth-child(3) { animation-delay: -.6s; } .ap-eq i:nth-child(4) { animation-delay: -.15s; }
.ap-deck.is-playing .ap-art .ap-eq, .ap-row.is-playing .ap-art .ap-eq { display: flex; }
.ap-row.is-playing .ap-art-glyph, .ap-deck.is-playing .ap-art-glyph { opacity: .25; }
@keyframes ap-bar { 0%, 100% { height: 22%; } 50% { height: 78%; } }

.ap-seekrow { display: flex; align-items: center; gap: .6rem; margin-top: .85rem; }
.ap-t { font-size: .8rem; min-width: 2.7em; font-variant-numeric: tabular-nums; opacity: .92; }
.ap-t.ap-dur { text-align: right; }
input[type=range].ap-seek {
  -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 99px; outline: none; cursor: pointer; margin: 0;
  background: linear-gradient(to right, #ffd98a 0, #ffd98a var(--p, 0%), rgba(255, 255, 255, .28) var(--p, 0%), rgba(255, 255, 255, .28) 100%);
}
input[type=range].ap-seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  border: 3px solid #ffd98a; box-shadow: 0 1px 6px rgba(0, 0, 0, .4);
}
input[type=range].ap-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid #ffd98a; }
.ap-ctrls { display: flex; align-items: center; justify-content: space-between; gap: .1rem; margin-top: .45rem; }
.ap-ctrl-spacer { width: 40px; flex: none; }
.ap-btn {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #fff; transition: background .15s, transform .1s;
}
.ap-btn svg { width: 24px; height: 24px; }
.ap-btn:hover { background: rgba(255, 255, 255, .16); }
.ap-btn:active { transform: scale(.94); }
.ap-btn-main { width: 56px; height: 56px; background: #fff; color: var(--g2, #7a0f0d); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.ap-btn-main:hover { background: #fff3da; }
.ap-btn-main svg { width: 28px; height: 28px; }
.ap-btn-sm { font-size: .85rem; font-weight: bold; }
.ap-rate { font-size: .85rem; font-weight: bold; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 99px; padding: .12rem .45rem; }
.ap-fav-btn { align-self: flex-start; }
.ap-fav-btn.is-on { color: #ff9db0; }
.ap-volrow { display: flex; align-items: center; gap: .3rem; width: 96px; flex: none; }
.ap-volrow svg { width: 20px; height: 20px; flex: none; }
.ap-vol { width: 100%; accent-color: #ffd98a; }

/* ---------- category tabs + track list ---------- */
.ap-tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; flex: none; }
.ap-tabs::-webkit-scrollbar { display: none; }
.ap-tab {
  flex: none; display: flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: 99px;
  border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); font-size: .95rem;
}
.ap-tab small { opacity: .6; font-size: .8rem; }
.ap-tab:hover { border-color: var(--accent); }
.ap-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px -4px var(--accent); }
.ap-tab.is-empty:not(.is-active) { opacity: .65; }
.ap-list { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.ap-list-head { display: flex; align-items: center; gap: .4rem; margin: .5rem .25rem .2rem; color: var(--gold); font-size: .85rem; font-weight: bold; }
.ap-list-head:first-child { margin-top: 0; }
.ap-count { color: var(--muted); font-weight: normal; }
.ap-heart-ic { display: inline-grid; color: #e0405e; } .ap-heart-ic svg { width: 14px; height: 14px; }
.ap-row {
  display: flex; align-items: center; gap: .7rem; padding: .45rem .5rem; border-radius: 13px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.ap-row:hover { background: var(--surface-2); }
.ap-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ap-row.is-current { background: var(--surface-2); border-color: var(--rule); }
.ap-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ap-row-title { font-weight: bold; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-row.is-current .ap-row-title { color: var(--accent); }
.ap-row-sub { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-heart { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.ap-heart svg { width: 20px; height: 20px; }
.ap-heart:hover { background: rgba(224, 64, 94, .1); color: #e0405e; }
.ap-heart.is-on { color: #e0405e; }
.ap-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: 1.6rem 1rem; color: var(--muted); }
.ap-empty strong { color: var(--ink); }
.ap-empty-ic { font-size: 2rem; }

/* ---------- /audio page ---------- */
.audio-page-wrap { max-width: 1040px; margin: 0 auto; }
.audio-panel-page .ap-body { flex-direction: row; align-items: flex-start; gap: 1.4rem; padding: .4rem 1.2rem 1.3rem; }
.audio-panel-page .ap-deck-wrap { width: 380px; flex: none; position: sticky; top: 76px; }
.audio-panel-page .ap-lists { min-width: 0; }
.audio-panel-page .ap-list { max-height: none; overflow: visible; }
@media (max-width: 820px) {
  .audio-panel-page .ap-body { flex-direction: column; }
  .audio-panel-page .ap-deck-wrap { width: 100%; position: static; }
}

/* ---------- mini-player dock ---------- */
.audio-dock {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 35; width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: .3rem; padding: .5rem .55rem .5rem .6rem; border-radius: 18px; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent)); box-shadow: 0 12px 32px rgba(0, 0, 0, .38);
}
.audio-dock[hidden], .audio-sheet[hidden] { display: none; }
.ap-dock-bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, .22); }
.ap-dock-bar i { display: block; height: 100%; width: 0; background: #ffd98a; }
.ap-dock-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .65rem; padding: .1rem; border: 0; background: none; color: inherit; text-align: left; }
.ap-dock-info { min-width: 0; display: flex; flex-direction: column; }
.ap-dock-title { font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-dock-sub { font-size: .82rem; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-btn-dock { width: 44px; height: 44px; }
.ap-btn-dock svg { width: 24px; height: 24px; }
.ap-dock-x { width: 34px; height: 34px; opacity: .8; }
.ap-dock-x svg { width: 18px; height: 18px; }
body.audio-page .audio-dock, body.reader-active .audio-dock { display: none; }
body.has-audio-dock:not(.audio-page) .content-pad { padding-bottom: 6.5rem; }
@media (max-width: 760px) {
  .audio-dock { bottom: 72px; }
  body.has-audio-dock:not(.audio-page) { padding-bottom: 136px; }
}
@media (max-width: 480px) { .ap-dock-hide-sm { display: none; } }

/* ---------- full player sheet ---------- */
.audio-sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ap-sheet-scrim { position: absolute; inset: 0; background: rgba(24, 8, 8, .6); backdrop-filter: blur(5px); }
.ap-sheet-card { position: relative; width: min(460px, 100%); background: var(--surface); border-radius: 26px; padding: 1.1rem 1rem 1rem; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.ap-sheet-x { position: absolute; top: .5rem; right: .5rem; z-index: 3; color: var(--ink); width: 36px; height: 36px; }
.ap-sheet-x:hover { background: var(--surface-2); }
.ap-sheet-deck { padding-top: 1.6rem; }
.ap-deck-big { padding: 1.3rem 1.1rem 1rem; }
.ap-deck-big .ap-deck-top { flex-direction: column; text-align: center; gap: .7rem; }
.ap-deck-big .ap-art-lg { width: 150px; height: 150px; border-radius: 26px; }
.ap-deck-big .ap-art-glyph { font-size: 3.6rem; }
.ap-deck-big .ap-title { font-size: 1.3rem; -webkit-line-clamp: 3; }
.ap-deck-big .ap-fav-btn { position: absolute; top: .6rem; right: .6rem; }
.ap-deck-big .ap-ctrls { margin-top: .8rem; }
body.audio-sheet-open { overflow: hidden; }
@media (max-width: 760px) { .audio-sheet { align-items: flex-end; padding: 0; } .ap-sheet-card { border-radius: 26px 26px 0 0; width: 100%; } }

@media (prefers-reduced-motion: reduce) { .ap-eq i { animation: none; height: 55%; } }

.ap-deck-big .ap-eq { gap: 5px; padding-bottom: 28%; }
.ap-deck-big .ap-eq i { width: 6px; }

/* =====================================================================
   Quote of the day -- a slide per revered saint inside the white hero card
   ===================================================================== */
.hero-quote { margin: 0; min-height: 9.5rem; display: flex; flex-direction: column; justify-content: center; }
.hero-quote .hero-sub { margin: 0; white-space: normal; }
.qs {
  position: relative; padding: .7rem 1rem .5rem; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 252, 244, .92), rgba(251, 242, 223, .86));
  border: 1px solid rgba(196, 89, 17, .28); box-shadow: 0 6px 18px -10px rgba(122, 15, 13, .45);
}
.qs::before {
  content: ""; position: absolute; left: 0; top: .8rem; bottom: .8rem; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(var(--accent), var(--gold));
}
.qs-label { display: flex; align-items: center; gap: .35rem; font-size: .78rem; letter-spacing: .05em; font-weight: bold; color: var(--gold); margin-bottom: .2rem; }
.qs-mark { font-size: 1.6rem; line-height: .6; color: var(--accent); }
.qs-track { display: grid; }
.qs-slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .55s ease, transform .55s ease, visibility 0s linear .55s; }
.qs-slide.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.qs-text { margin: 0; font-size: 1.08rem; line-height: 1.55; color: var(--ink); font-style: italic; }
.qs-by { margin-top: .35rem; font-size: .88rem; color: var(--muted); }
.qs-name { font-weight: bold; color: var(--accent-dark); }
.qs-name a, .qs-book a { color: inherit; }
.qs-name a:hover, .qs-book a:hover { text-decoration: underline; }
.qs-nav { display: flex; align-items: center; justify-content: space-between; margin-top: .3rem; }
.qs-dots { display: flex; gap: .45rem; }
.qs-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(138, 127, 106, .45); transition: width .25s, background .25s; }
.qs-dot.is-active { width: 22px; border-radius: 6px; background: var(--accent); }
.qs-arrow { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--accent-dark); font-size: 1.35rem; line-height: 1; }
.qs-arrow:hover { background: rgba(165, 21, 18, .1); }
:root[data-theme="dark"] .qs { background: linear-gradient(135deg, rgba(34, 26, 22, .88), rgba(26, 20, 18, .84)); border-color: rgba(224, 138, 62, .35); }
:root[data-theme="dark"] .qs-name { color: #ffb199; }
:root[data-theme="dark"] .qs-arrow { color: #ffb199; }
body.is-home .qs-text { font-size: max(1rem, 1.08rem); }
@media (max-width: 760px) {
  .hero-quote { min-height: 11.5rem; }
  .qs { padding: .6rem .8rem .45rem; }
  .qs-text { font-size: 1rem; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) { .qs-slide { transition: none; } }

/* hero motto: the verse, with its source underneath */
.hero-title-src { margin: -.25rem 0 .8rem; color: var(--gold); font-style: italic; font-size: .95rem; }
body.is-home .hero-title-src { font-size: max(.95rem, calc(.95rem * 1.12)); }

/* hero motto: verse centred, its source on the right */
.hero-title { text-align: center; }
.hero-title-src { text-align: right; }

/* =====================================================================
   Quote share: the button on the quote card and the share dialog
   (swadhyay-quote-share.js)
   ===================================================================== */
.qs-share {
  position: absolute; top: .45rem; right: .55rem; z-index: 2; width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center; border: 1px solid rgba(196, 89, 17, .35); border-radius: 50%;
  background: rgba(255, 255, 255, .8); color: var(--accent-dark); transition: background .15s, transform .1s;
}
.qs-share:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.qs-share:active { transform: scale(.93); }
:root[data-theme="dark"] .qs-share { background: rgba(34, 26, 22, .9); color: #ffb199; border-color: rgba(224, 138, 62, .45); }
.qs-label { padding-right: 2.4rem; }

.qsh { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.qsh-scrim { position: absolute; inset: 0; background: rgba(24, 8, 8, .62); backdrop-filter: blur(5px); }
.qsh-card {
  position: relative; width: min(460px, 100%); max-height: 100%; overflow-y: auto; padding: 1.1rem 1.1rem 1rem;
  background: var(--surface); color: var(--ink); border-radius: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.qsh-x { position: absolute; top: .55rem; right: .6rem; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.1rem; }
.qsh-x:hover { background: var(--surface-2); color: var(--ink); }
.qsh-h { margin: 0 0 .7rem; font-size: 1.15rem; color: var(--gold); }
.qsh-tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-bottom: .8rem; }
.qsh-tabs::-webkit-scrollbar { display: none; }
.qsh-tab {
  flex: none; display: flex; align-items: baseline; gap: .35rem; padding: .35rem .75rem; border-radius: 99px;
  border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); font-size: .92rem;
}
.qsh-tab small { opacity: .6; font-size: .75rem; }
.qsh-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.qsh-preview { display: grid; place-items: center; margin: 0 auto .9rem; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .5); background: var(--surface-2); }
.qsh-preview canvas { display: block; width: 100%; height: auto; max-height: 52vh; object-fit: contain; }
.qsh-preview.ratio-story { width: min(100%, 240px); }
.qsh-preview.ratio-post { width: min(100%, 300px); }
.qsh-preview.ratio-square { width: min(100%, 340px); }
.qsh-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.qsh-actions button {
  padding: .6rem .5rem; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); font-size: .95rem;
}
.qsh-actions button:hover { border-color: var(--accent); }
.qsh-actions .qsh-primary { grid-column: 1 / -1; background: linear-gradient(135deg, var(--accent-dark), var(--accent)); color: #fff; border-color: transparent; font-weight: bold; padding: .75rem; }
body.qsh-open { overflow: hidden; }
@media (max-width: 760px) {
  .qsh { align-items: flex-end; padding: 0; }
  .qsh-card { width: 100%; border-radius: 22px 22px 0 0; }
}

/* =====================================================================
   Ram Shalaka game (swadhyay-shalaka.js)
   ===================================================================== */
.sh-wrap { max-width: 760px; margin: 0 auto; }
.sh-head h1 { margin: .2rem 0 .3rem; font-size: 1.5rem; color: var(--accent-dark); }
.sh-head p { margin: 0 0 .8rem; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.sh-stats { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: .5rem; margin-bottom: .9rem; }
.sh-stat { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .7rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--rule); min-width: 0; }
.sh-stat b { font-size: 1rem; color: var(--ink); white-space: nowrap; }
.sh-stat span { font-size: .72rem; color: var(--muted); }
.sh-bar { display: block; height: 6px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.sh-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width .5s; }

.sh-tabs { display: flex; gap: .4rem; margin-bottom: .9rem; overflow-x: auto; scrollbar-width: none; }
.sh-tabs::-webkit-scrollbar { display: none; }
.sh-tab { flex: none; padding: .45rem .95rem; border-radius: 99px; border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); font-size: .95rem; }
.sh-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.sh-stage { text-align: center; padding: .6rem .4rem 1rem; }
.sh-stage.sh-left { text-align: left; }
.sh-stage h2 { margin: .2rem 0 .4rem; font-size: 1.2rem; color: var(--accent-dark); }
.sh-stage p { margin: .2rem auto .6rem; max-width: 34em; color: var(--ink); line-height: 1.55; }
.sh-cnt { color: var(--muted); font-size: .9rem; font-weight: normal; }
.sh-btn { padding: .6rem 1.2rem; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); font-size: .98rem; }
.sh-btn:hover { border-color: var(--accent); }
.sh-primary { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); color: #fff; border-color: transparent; font-weight: bold; }
.sh-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .8rem 0; }

/* dhyan */
.sh-diya { position: relative; width: 120px; height: 120px; margin: .4rem auto .6rem; display: grid; place-items: center; }
.sh-flame { font-size: 3.4rem; filter: drop-shadow(0 0 14px rgba(255, 170, 40, .7)); transition: transform .4s; }
.sh-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--rule); }
.sh-dhyan.is-on .sh-flame { animation: sh-flicker 1.1s ease-in-out infinite; }
.sh-dhyan.is-on .sh-ring { border-color: var(--gold); box-shadow: 0 0 0 0 rgba(224, 138, 62, .5); animation: sh-pulse 2.1s ease-out infinite; }
.sh-mantra { min-height: 1.6em; color: var(--gold); font-size: 1.05rem; letter-spacing: .02em; }
@keyframes sh-flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12) rotate(2deg); } }
@keyframes sh-pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 138, 62, .5); } 100% { box-shadow: 0 0 0 28px rgba(224, 138, 62, 0); } }

/* the grid */
.sh-grid { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); max-width: 620px; margin: .4rem auto; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--surface); }
.sh-cell {
  aspect-ratio: 1; display: grid; place-items: center; padding: 0; min-width: 0; overflow: hidden; white-space: nowrap;
  border: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink);
  font-size: clamp(8px, 2.6vw, 15px); line-height: 1; transition: background .15s, transform .15s, color .15s;
}
.sh-cell:nth-child(15n) { border-right: 0; }
.sh-cell:nth-last-child(-n+15) { border-bottom: 0; }
.sh-cell.is-matra { color: var(--muted); }
.sh-grid.is-pick .sh-cell:hover, .sh-grid.is-practice .sh-cell:hover { background: rgba(224, 138, 62, .28); transform: scale(1.12); position: relative; z-index: 1; }
.sh-grid.is-pick .sh-cell { cursor: pointer; animation: sh-twinkle 5s ease-in-out infinite; }
.sh-grid.is-pick .sh-cell:nth-child(3n) { animation-delay: -1.7s; }
.sh-grid.is-pick .sh-cell:nth-child(5n) { animation-delay: -3.2s; }
@keyframes sh-twinkle { 0%, 100% { background: transparent; } 50% { background: rgba(224, 138, 62, .1); } }
.sh-cell.is-hit { background: rgba(224, 138, 62, .4); color: var(--accent-dark); font-weight: bold; }
.sh-cell.is-start { background: var(--accent); color: #fff; font-weight: bold; }
.sh-cell.is-now { background: var(--gold); color: #fff; font-weight: bold; box-shadow: 0 0 0 2px var(--gold); position: relative; z-index: 1; animation: sh-glow 1s ease-in-out infinite; }
.sh-cell.is-hint { background: #2e9b5e; color: #fff; animation: sh-glow .5s ease-in-out 3; }
.sh-cell.is-bad { background: #c0392b; color: #fff; animation: sh-shake .4s; }
@keyframes sh-glow { 50% { transform: scale(1.18); } }
@keyframes sh-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
:root[data-theme="dark"] .sh-cell.is-hit { color: #ffd9a3; }

.sh-count { font-size: 1.05rem; color: var(--gold); font-weight: bold; }
.sh-hintline { min-height: 1.5em; color: var(--muted) !important; font-size: .9rem; }
.sh-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; max-width: 620px; margin: .7rem auto; min-height: 2.2rem; }
.sh-tray span { padding: .15rem .45rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--rule); font-size: 1.05rem; animation: sh-pop .25s ease-out; }
@keyframes sh-pop { from { transform: scale(.4); opacity: 0; } }

/* result card */
.sh-card { position: relative; max-width: 560px; margin: .6rem auto; padding: 1.2rem 1.1rem 1rem; border-radius: 20px; text-align: center; background: var(--surface); border: 2px solid var(--rule); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .35); animation: sh-rise .5s ease-out; }
.sh-card.is-good { border-color: #d9a441; background: linear-gradient(180deg, rgba(255, 224, 150, .22), var(--surface) 55%); }
.sh-card.is-doubt { border-color: #c98a5a; background: linear-gradient(180deg, rgba(220, 150, 110, .16), var(--surface) 55%); }
@keyframes sh-rise { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.sh-new { position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%); padding: .2rem .8rem; border-radius: 99px; background: linear-gradient(135deg, #d9822b, #a51512); color: #fff; font-size: .85rem; white-space: nowrap; }
.sh-verdict { display: inline-block; margin-top: .4rem; padding: .25rem .8rem; border-radius: 99px; font-size: .9rem; font-weight: bold; }
.sh-verdict.is-good { background: rgba(46, 155, 94, .16); color: #1f7a48; }
.sh-verdict.is-doubt { background: rgba(201, 138, 90, .2); color: #a2561f; }
:root[data-theme="dark"] .sh-verdict.is-good { color: #6fd39c; }
:root[data-theme="dark"] .sh-verdict.is-doubt { color: #f0b38a; }
.sh-chaupai { margin: .9rem 0 .7rem; padding: 0; }
.sh-chaupai p { margin: .15rem 0; font-size: 1.35rem; line-height: 1.5; color: var(--accent-dark); font-weight: bold; }
:root[data-theme="dark"] .sh-chaupai p { color: #ffb199; }
.sh-meta { margin: .4rem 0 0; text-align: left; font-size: .95rem; line-height: 1.55; }
.sh-meta dt { margin-top: .5rem; color: var(--gold); font-weight: bold; font-size: .85rem; }
.sh-meta dd { margin: .1rem 0 0; }
.sh-gain { margin: .7rem 0 0; color: var(--gold); font-size: .9rem; min-height: 1.2em; }
.sh-note { margin: .6rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }

/* practice */
.sh-rules { text-align: left; max-width: 34em; margin: .4rem auto .8rem; padding-left: 1.2rem; line-height: 1.55; font-size: .95rem; }
.sh-best { color: var(--gold); }
.sh-stars { font-size: 2.2rem; margin: .2rem 0; letter-spacing: .15em; }

/* collection */
.sh-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: .5rem 0 .7rem; }
.sh-mini { aspect-ratio: 1.15; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: .4rem; border-radius: 14px; border: 2px solid var(--rule); background: var(--surface-2); color: var(--ink); text-align: center; min-width: 0; }
.sh-mini small { color: var(--muted); font-size: .72rem; }
.sh-mini-t { font-size: .88rem; line-height: 1.3; font-weight: bold; color: var(--accent-dark); }
:root[data-theme="dark"] .sh-mini-t { color: #ffb199; }
.sh-mini.is-good { border-color: #d9a441; background: linear-gradient(180deg, rgba(255, 224, 150, .25), var(--surface-2)); }
.sh-mini.is-doubt { border-color: #c98a5a; background: linear-gradient(180deg, rgba(220, 150, 110, .2), var(--surface-2)); }
.sh-mini.is-open { box-shadow: 0 0 0 3px rgba(224, 138, 62, .45); }
.sh-mini.is-locked { opacity: .6; border-style: dashed; }
.sh-q { font-size: 1.8rem; color: var(--muted); }
.sh-detail { margin-top: .4rem; }
.sh-badges { list-style: none; margin: .4rem 0 .6rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.sh-badge { display: flex; gap: .6rem; align-items: center; padding: .5rem .65rem; border-radius: 14px; border: 1px solid var(--rule); background: var(--surface-2); opacity: .55; }
.sh-badge.is-got { opacity: 1; border-color: #d9a441; background: linear-gradient(180deg, rgba(255, 224, 150, .22), var(--surface-2)); }
.sh-bi { font-size: 1.5rem; }
.sh-badge b { display: block; font-size: .92rem; }
.sh-badge small { color: var(--muted); font-size: .74rem; }

@media (max-width: 560px) {
  .sh-stats { grid-template-columns: 1fr 1fr; }
  .sh-stat-rank { grid-column: 1 / -1; }
  .sh-badges { grid-template-columns: 1fr; }
  .sh-chaupai p { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-grid.is-pick .sh-cell, .sh-dhyan.is-on .sh-flame, .sh-dhyan.is-on .sh-ring, .sh-cell.is-now, .sh-card, .sh-tray span { animation: none; }
}

/* =====================================================================
   Hanuman Prashnavali game (swadhyay-hanuman.js) -- reuses the .sh-* classes above
   ===================================================================== */
.hn-yantra { display: block; width: 100%; max-width: 640px; margin: .6rem auto; height: auto; }
.hn-t polygon { fill: #fbe1d2; stroke: #963826; stroke-width: 2.5; stroke-linejoin: round; transition: fill .15s; }
.hn-t.is-up polygon { fill: var(--surface); }
.hn-t text { font-size: 20px; font-weight: 600; fill: #5a1811; text-anchor: middle; dominant-baseline: central; pointer-events: none; font-family: inherit; }
.hn-frame { fill: none; stroke: #963826; stroke-width: 3.5; stroke-linejoin: round; pointer-events: none; }
:root[data-theme="dark"] .hn-t polygon { fill: #3a2420; stroke: #d98a6a; }
:root[data-theme="dark"] .hn-t.is-up polygon { fill: var(--surface-2); }
:root[data-theme="dark"] .hn-t text { fill: #ffd9c6; }
:root[data-theme="dark"] .hn-frame { stroke: #d98a6a; }
.hn-yantra.is-pick .hn-t { cursor: pointer; }
.hn-yantra.is-pick .hn-t:hover polygon { fill: rgba(224, 138, 62, .45); }
.hn-t.is-cursor polygon { fill: #e8751a !important; stroke: #7a0f0d; stroke-width: 3.5; }
.hn-t.is-cursor text { fill: #fff !important; }
.hn-t.is-landed polygon { animation: hn-land .8s ease-in-out 2; }
@keyframes hn-land { 50% { fill: #ffd34e; } }
.hn-t:focus-visible polygon { stroke: var(--accent); stroke-width: 4; }
/* the collection view */
.hn-t.is-empty polygon { fill: transparent; stroke-dasharray: 5 4; opacity: .55; }
.hn-t.tone-g polygon { fill: #bfe6cf; }
.hn-t.tone-r polygon { fill: #fbdca0; }
.hn-t.tone-c polygon { fill: #f4c3b6; }
.hn-yantra.is-mine .hn-t.is-empty { cursor: default; }
.hn-yantra.is-mine .hn-t:not(.is-empty) { cursor: pointer; }
:root[data-theme="dark"] .hn-t.tone-g polygon { fill: #2c5a43; }
:root[data-theme="dark"] .hn-t.tone-r polygon { fill: #6b5226; }
:root[data-theme="dark"] .hn-t.tone-c polygon { fill: #6a3a30; }
.hn-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; margin: .3rem 0 .2rem; color: var(--muted); font-size: .85rem; }
.hn-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: .25rem; vertical-align: -2px; border: 1px solid #963826; }
.hn-legend i.tone-g { background: #bfe6cf; }
.hn-legend i.tone-r { background: #fbdca0; }
.hn-legend i.tone-c { background: #f4c3b6; }

/* the vidhi steps */
.hn-method { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin: .5rem 0 .8rem; }
.hn-check { display: flex; align-items: center; justify-content: center; gap: .55rem; margin: .4rem auto; max-width: 30em; text-align: left; line-height: 1.4; cursor: pointer; }
.hn-check input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.sh-btn[disabled] { opacity: .45; cursor: not-allowed; }
.hn-mantra { font-size: 1.35rem; font-weight: bold; color: var(--accent-dark); margin: .4rem 0 .6rem; }
:root[data-theme="dark"] .hn-mantra { color: #ffb199; }
.hn-beads { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; max-width: 22em; margin: .3rem auto .5rem; }
.hn-beads i { width: 16px; height: 16px; border-radius: 50%; background: var(--rule); transition: background .2s, transform .2s; }
.hn-beads i.on { background: radial-gradient(circle at 35% 30%, #ffd9a3, var(--gold)); transform: scale(1.15); }
.hn-tap { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; width: 120px; height: 120px; margin: .5rem auto; border-radius: 50%; border: 0; font-size: 2rem; color: #fff; background: radial-gradient(circle at 35% 30%, #f0883a, var(--accent-dark)); box-shadow: 0 10px 22px -8px rgba(122, 15, 13, .6); transition: transform .08s; }
.hn-tap span { font-size: .85rem; }
.hn-tap:active { transform: scale(.92); }
.hn-vidhi { max-width: 36em; margin: 1rem auto 0; text-align: left; border: 1px solid var(--rule); border-radius: 14px; padding: .6rem .9rem; background: var(--surface-2); }
.hn-vidhi summary { cursor: pointer; font-weight: bold; color: var(--accent-dark); }
.hn-vidhi ol { margin: .5rem 0 .2rem; padding-left: 1.2rem; line-height: 1.55; font-size: .93rem; }

/* the answer */
.hn-num { display: inline-grid; place-items: center; min-width: 4.2rem; height: 4.2rem; padding: 0 .6rem; border-radius: 50%; margin-bottom: .3rem; font-size: 2rem; font-weight: bold; color: #fff; background: radial-gradient(circle at 35% 30%, #f0883a, var(--accent-dark)); box-shadow: 0 8px 18px -8px rgba(122, 15, 13, .7); }
.hn-answer { margin: .9rem 0 .4rem; font-size: 1.2rem; line-height: 1.6; font-weight: bold; color: var(--accent-dark); }
:root[data-theme="dark"] .hn-answer { color: #ffb199; }
.sh-verdict.is-remedy { background: rgba(217, 164, 65, .22); color: #8a5a00; }
:root[data-theme="dark"] .sh-verdict.is-remedy { color: #f1cf86; }
.sh-card.is-remedy { border-color: #d9a441; background: linear-gradient(180deg, rgba(255, 224, 150, .22), var(--surface) 55%); }
.hn-next { margin: .6rem 0 0; color: var(--muted); font-size: .9rem; }
.hn-next b { color: var(--gold); font-variant-numeric: tabular-nums; }

/* the mala */
.hn-mala { position: relative; width: 220px; height: 220px; margin: .6rem auto; }
.hn-mala svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hn-ring-bg { fill: none; stroke: var(--rule); stroke-width: 7; }
.hn-ring-fg { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .2s; }
.hn-tap-big { position: absolute; inset: 30px; width: auto; height: auto; margin: 0; font-size: 3rem; }
.hn-malacount { font-size: .9rem; }

@media (prefers-reduced-motion: reduce) { .hn-t.is-landed polygon { animation: none; } }

/* =====================================================================
   Ram Shalaka page redesign (.sr-*): hero banner, three steps, three cards
   ===================================================================== */
.sr-wrap { max-width: 1240px; }

/* hero */
.sr-hero {
  position: relative; overflow: hidden; color: #3b1812;
  background: #fbeacb url('assets/images/shalaka/hero.webp') right 28% / cover no-repeat;
  border-bottom: 1px solid var(--rule);
}
.sr-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 248, 232, .94) 0, rgba(255, 248, 232, .72) 38%, rgba(255, 248, 232, 0) 66%); }
.sr-hero-in { position: relative; max-width: 1240px; margin: 0 auto; padding: 1.7rem 1.5rem 1.5rem; min-height: 320px; display: flex; flex-direction: column; justify-content: space-between; gap: 1.2rem; }
.sr-title { display: flex; gap: 1rem; align-items: flex-start; max-width: 640px; }
.sr-bow { flex: none; width: 104px; margin: -.2rem 0 0 -.2rem; filter: drop-shadow(0 4px 6px rgba(120, 70, 10, .35)); }
.sr-bow img { display: block; width: 100%; height: auto; }
.sr-title h1 { margin: 0; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.05; color: #4a120d; }
.sr-tag { margin: .4rem 0 .15rem; font-size: clamp(1.05rem, 2vw, 1.4rem); color: #3b1812; }
.sr-desc { margin: 0; color: #6b4a3a; font-size: 1rem; }
.sr-stats { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: .7rem; max-width: 760px; }
.sr-stat {
  display: flex; align-items: center; gap: .65rem; padding: .7rem .8rem; border-radius: 16px; min-width: 0; text-align: left;
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(6px); border: 1px solid rgba(196, 150, 90, .45); color: #3b1812;
  box-shadow: 0 4px 12px -8px rgba(90, 40, 10, .5); transition: transform .12s, box-shadow .12s;
}
.sr-stat:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -8px rgba(90, 40, 10, .6); }
.sr-stat-ic { font-size: 2rem; line-height: 1; flex: none; }
.sr-stat-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.sr-stat-tx b { font-size: 1.35rem; line-height: 1.1; white-space: nowrap; }
.sr-stat-tx small { color: #7a5a48; font-size: .8rem; }
.sr-chev { font-style: normal; font-size: 1.6rem; color: #a8590d; flex: none; }
:root[data-theme="dark"] .sr-hero { color: #f3e6d6; background-color: #2a2018; }
:root[data-theme="dark"] .sr-hero::before { background: linear-gradient(90deg, rgba(20, 15, 12, .94) 0, rgba(20, 15, 12, .7) 38%, rgba(20, 15, 12, .1) 70%); }
:root[data-theme="dark"] .sr-title h1, :root[data-theme="dark"] .sr-tag { color: #ffe6cf; }
:root[data-theme="dark"] .sr-desc { color: #d8c2ad; }
:root[data-theme="dark"] .sr-stat { background: rgba(32, 24, 20, .82); border-color: rgba(224, 138, 62, .4); color: #f3e6d6; }
:root[data-theme="dark"] .sr-stat-tx small { color: #c9b39e; }

/* the three steps */
.sr-steps { list-style: none; margin: 1.1rem 0 1rem; padding: 0 .4rem; display: flex; align-items: center; gap: .7rem; }
.sr-step { display: flex; align-items: center; gap: .6rem; flex: none; color: var(--muted); font-size: 1.05rem; }
.sr-step + .sr-step { flex: 1; }
.sr-step + .sr-step::before { content: ""; flex: 1; min-width: 14px; border-top: 2px dotted var(--rule); margin-right: .2rem; }
.sr-dot { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: bold; font-size: 1.1rem; border: 2px solid var(--rule); background: var(--surface); color: var(--muted); }
.sr-step.is-cur { color: var(--accent-dark); font-weight: bold; }
.sr-step.is-cur .sr-dot { background: linear-gradient(135deg, #e2872e, #b8530d); border-color: #c45911; color: #fff; box-shadow: 0 0 0 5px rgba(226, 135, 46, .22); }
.sr-step.is-done { color: var(--ink); }
.sr-step.is-done .sr-dot { background: #fff3dc; border-color: #d9a441; color: #b8530d; }
:root[data-theme="dark"] .sr-step.is-cur { color: #ffb199; }

/* the cards */
.sr-cols { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.4fr) minmax(0, 1.05fr); gap: 1.1rem; align-items: start; }
.sr-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 26px -18px rgba(90, 40, 10, .5); }
.sr-body { padding: 1rem 1.1rem .9rem; }
.sr-card h2, .sr-ans-title { margin: 0 0 .35rem; font-size: 1.3rem; color: var(--accent-dark); text-align: center; }
.sr-card p { margin: .2rem 0 .6rem; line-height: 1.55; text-align: center; }
:root[data-theme="dark"] .sr-card h2, :root[data-theme="dark"] .sr-ans-title { color: #ffb199; }

.sr-photo { position: relative; height: 230px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 78%, #ffc15a 0, #b5541b 30%, #4a1a0c 68%, #1f0a06 100%); }
.sr-halo { position: absolute; width: 190px; height: 190px; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -48%); background: radial-gradient(circle, rgba(255, 210, 120, .55), rgba(255, 210, 120, 0) 70%); }
.sr-flame { position: relative; z-index: 1; font-size: 6.2rem; filter: drop-shadow(0 0 22px rgba(255, 180, 60, .85)); }
.sr-photo.is-on .sr-flame { animation: sh-flicker 1.1s ease-in-out infinite; }
.sr-photo.is-on .sr-halo { animation: sr-breathe 2.4s ease-in-out infinite; }
@keyframes sr-breathe { 50% { transform: translate(-50%, -48%) scale(1.25); opacity: .75; } }
.sr-action { text-align: center; margin: .4rem 0 .9rem; min-height: 2.6rem; }
.sr-done { color: #1f7a48; font-weight: bold; margin: .3rem 0; }
:root[data-theme="dark"] .sr-done { color: #6fd39c; }
.sr-tips { background: rgba(255, 232, 190, .45); border: 1px solid var(--rule); border-radius: 14px; padding: .7rem .9rem; }
:root[data-theme="dark"] .sr-tips { background: rgba(224, 138, 62, .1); }
.sr-tips h3 { margin: 0 0 .3rem; font-size: 1rem; color: var(--accent-dark); }
:root[data-theme="dark"] .sr-tips h3 { color: #ffb199; }
.sr-tips ul { margin: 0; padding-left: 1.15rem; line-height: 1.55; font-size: .95rem; }

.sr-gridcard .sr-body { padding-bottom: .4rem; }
.sr-gridwrap { position: relative; padding: 0 .9rem .9rem; }
.sr-gridwrap .sh-grid { margin: 0 auto; max-width: none; }
.sh-grid.is-locked { opacity: .5; pointer-events: none; }
.sr-lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: .5rem 1rem; border-radius: 99px; background: rgba(58, 22, 12, .86); color: #ffe9c9; font-size: .95rem; pointer-events: none; white-space: nowrap; }
.sr-gridcard .sh-count, .sr-gridcard .sh-actions { text-align: center; }
.sr-gridcard .sh-count { margin: .2rem 0; }
.sr-gridcard .sh-tray { padding: 0 .9rem; }

.sr-ans-title { margin-top: .2rem; }
.sr-result { margin: .4rem 0 .9rem; max-width: none; }
.sr-orn { color: var(--gold); font-size: 1.2rem; line-height: 1; margin: .2rem 0 .1rem; opacity: .85; }
.sr-orn::before, .sr-orn::after { content: ""; display: inline-block; width: 3.2rem; border-top: 1px solid var(--rule); vertical-align: middle; margin: 0 .6rem; }
.sr-empty { display: grid; place-items: center; gap: .3rem; min-height: 220px; margin: .4rem 0 .9rem; border: 2px dashed var(--rule); border-radius: 18px; color: var(--muted); background: var(--surface); }
.sr-empty span { font-size: 2.6rem; opacity: .6; }
.sr-empty p { margin: 0; }
.sr-remember { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 16px; background: rgba(255, 214, 200, .4); border: 1px solid rgba(200, 120, 90, .3); }
.sr-remember > span { font-size: 1.7rem; }
.sr-remember b { color: var(--accent-dark); }
.sr-remember p { margin: .15rem 0 0; font-size: .88rem; line-height: 1.5; color: var(--muted); }
:root[data-theme="dark"] .sr-remember { background: rgba(224, 86, 79, .1); }
:root[data-theme="dark"] .sr-remember b { color: #ffb199; }

/* on a phone: one card at a time -- the one for the current step */
@media (max-width: 999px) {
  .sr-cols { grid-template-columns: minmax(0, 1fr); }
  .sr-col:not(.is-active) { display: none; }
  .sr-photo { height: 200px; }
}
@media (max-width: 640px) {
  .sr-wrap { padding-left: .8rem; padding-right: .8rem; }
  .sr-hero { background-image: url('assets/images/shalaka/hero-m.webp'); background-position: 82% center; background-size: cover; }
  .sr-hero::before { background: linear-gradient(180deg, rgba(255, 248, 232, .96) 0, rgba(255, 248, 232, .85) 20%, rgba(255, 248, 232, 0) 36%, rgba(255, 248, 232, 0) 66%, rgba(255, 248, 232, .45) 100%); }
  :root[data-theme="dark"] .sr-hero::before { background: linear-gradient(180deg, rgba(20, 15, 12, .97) 0, rgba(20, 15, 12, .9) 24%, rgba(20, 15, 12, .05) 40%, rgba(20, 15, 12, .05) 62%, rgba(20, 15, 12, .6) 100%); }
  .sr-hero-in { padding: 1rem 1rem .9rem; min-height: 470px; gap: 0; }
  .sr-bow { width: 62px; margin: 0; }
  .sr-tag, .sr-desc { text-shadow: 0 0 6px rgba(255, 248, 232, .95), 0 0 2px rgba(255, 248, 232, .9); }
  .sr-title h1 { font-size: 1.8rem; }
  .sr-stats { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .sr-stat-rank { grid-column: 1 / -1; }
  .sr-stat { padding: .55rem .65rem; }
  .sr-stat-ic { font-size: 1.6rem; }
  .sr-stat-tx b { font-size: 1.15rem; }
  .sr-steps { gap: .35rem; padding: 0; }
  .sr-step { font-size: .8rem; gap: .35rem; flex-direction: column; text-align: center; }
  .sr-step + .sr-step { flex: 1; flex-direction: column; }
  .sr-step + .sr-step::before { display: none; }
  .sr-step { flex: 1 !important; }
  .sr-dot { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .sr-photo.is-on .sr-flame, .sr-photo.is-on .sr-halo { animation: none; } }

/* =====================================================================
   Home page: the three daily cards (swadhyay-daily.js) -- Gita study, Ramcharitmanas pathways, daily sankirtan
   The cards keep their warm light look in both themes (they sit on pictures).
   ===================================================================== */
.dd-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin: 1.2rem 0 1.5rem; }
.dd-card {
  position: relative; display: flex; flex-direction: column; min-height: 480px; padding: 1rem 1rem .9rem; overflow: hidden; border-radius: 20px;
  color: #3b1812; border: 1px solid rgba(214, 170, 100, .55); box-shadow: 0 12px 28px -18px rgba(110, 50, 10, .6);
  background: linear-gradient(180deg, #fbe6bf 0%, #fdf1d9 100%); isolation: isolate;
}
/* the picture spans the full width of the card, pinned to its top, and fades into the card's colour towards the bottom */
.dd-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 16 / 9; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 246, 228, .9) 0, rgba(255, 246, 228, .55) 18%, rgba(255, 246, 228, 0) 38%), var(--dd-bg) top center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 50%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, #000 50%, transparent 100%);
}
.dd-card.is-loading > * { visibility: hidden; }
.dd-card.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%); background-size: 200% 100%; animation: dd-shine 1.4s linear infinite; }
@keyframes dd-shine { to { background-position: -200% 0; } }

.dd-head { text-align: right; }
.dd-head h3 { margin: .1rem 0 .15rem; font-size: 1.4rem; color: #7a1a0f; line-height: 1.2; }
.dd-head p { margin: 0; font-size: .9rem; color: #5b3a2c; line-height: 1.4; }
.dd-pills { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.dd-pill { padding: .2rem .55rem; border-radius: 99px; border: 1px solid rgba(160, 90, 40, .45); background: rgba(255, 250, 240, .8); color: #7a1a0f; font-size: .78rem; white-space: nowrap; }
.dd-pill.is-on { background: #8f1a12; border-color: #8f1a12; color: #fff; }

.dd-badge { margin: auto 0 .55rem auto; display: flex; align-items: center; gap: .55rem; max-width: 62%; padding: .45rem .75rem .45rem .55rem; border-radius: 14px;
  background: rgba(255, 252, 245, .9); box-shadow: 0 6px 14px -8px rgba(100, 50, 10, .55); }
.dd-badge-ic { font-size: 1.6rem; line-height: 1; }
.dd-badge b { display: block; font-size: .88rem; color: #8f1a12; }
.dd-badge span:not(.dd-badge-ic) { display: block; font-size: .8rem; color: #3b1812; line-height: 1.3; }

.dd-text { padding: .8rem .9rem; min-height: 6.4rem; border-radius: 16px; background: rgba(255, 252, 246, .92); text-align: center; box-shadow: 0 8px 18px -12px rgba(100, 50, 10, .5);
  display: flex; flex-direction: column; justify-content: center; }
.dd-text p { margin: .12rem 0; font-size: 1.12rem; line-height: 1.55; font-weight: 600; color: #2b120d; }
.dd-text.is-mid p { font-size: 1rem; }
.dd-text.is-long p { font-size: .9rem; }
.dd-text.is-panel { align-items: stretch; text-align: left; }
.dd-text.is-panel p { font-size: .93rem; font-weight: 500; line-height: 1.55; }
.dd-speaker { font-size: .8rem !important; font-weight: 700 !important; color: #8f1a12 !important; }
.dd-sub-h { font-weight: bold; color: #8f1a12; font-size: .88rem; margin-bottom: .15rem; }
.dd-meaning { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; }
.dd-stat { margin: .2rem 0 !important; }
.dd-meter { height: 8px; border-radius: 99px; background: rgba(160, 100, 50, .22); overflow: hidden; margin: .35rem 0; }
.dd-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #d9822b, #a51512); }
.dd-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: .45rem; }
.dd-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(160, 100, 50, .25); }
.dd-dots i.on { background: #2e9b5e; }
.dd-dots i.cur { box-shadow: 0 0 0 2px #d9822b; }
.dd-fail p { text-align: center !important; color: #6b4a3a !important; }

.dd-track { display: flex; align-items: center; gap: .65rem; text-align: left; }
.dd-track-ic { flex: none; width: 3.1rem; height: 3.1rem; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; color: #fff;
  background: linear-gradient(135deg, #e2872e, #b8300f); }
.dd-track-tx { flex: 1; min-width: 0; line-height: 1.3; }
.dd-track-tx small { display: block; color: #8f1a12; font-size: .75rem; font-weight: 600; }
.dd-track-tx b { display: block; font-size: 1.05rem; color: #2b120d; }
.dd-track-tx span { display: block; font-size: .8rem; color: #6b4a3a; }
.dd-play { flex: none; width: 2.7rem; height: 2.7rem; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: .95rem; color: #fff;
  background: radial-gradient(circle at 35% 30%, #d3382a, #8f1a12); box-shadow: 0 6px 14px -6px rgba(143, 26, 18, .8); }
.dd-play.is-playing { background: radial-gradient(circle at 35% 30%, #2e9b5e, #176b3d); }
.dd-dur { flex: none; font-size: .82rem; color: #5b3a2c; font-variant-numeric: tabular-nums; }

.dd-cta { margin-top: .7rem; width: 100%; padding: .78rem 1rem; border: 0; border-radius: 14px; color: #fff; font-size: 1.02rem; font-weight: bold;
  background: linear-gradient(135deg, #7a0f0d, #b3201a); box-shadow: 0 10px 20px -10px rgba(122, 15, 13, .85); transition: transform .12s, filter .12s; }
.dd-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.dd-cta i { font-style: normal; }
.dd-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .15rem; margin-top: .65rem; padding: .3rem .2rem; border-radius: 14px; background: rgba(255, 252, 246, .75); }
.dd-act { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem .1rem; border: 0; border-radius: 10px; background: transparent; color: #8f1a12; font-size: .78rem; line-height: 1.2; }
.dd-act-ic { font-size: 1.25rem; line-height: 1; }
.dd-act:hover, .dd-act.is-on { background: rgba(224, 138, 62, .22); }

@media (max-width: 1100px) and (min-width: 901px) { .dd-head h3 { font-size: 1.2rem; } .dd-text p { font-size: 1rem; } }
@media (max-width: 900px) {
  .dd-trio { display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 1rem -.2rem 1.2rem; padding: 0 .2rem .5rem; }
  .dd-trio::-webkit-scrollbar { display: none; }
  .dd-card { flex: 0 0 86%; scroll-snap-align: center; min-height: 450px; }
}
@media (prefers-reduced-motion: reduce) { .dd-card.is-loading::after { animation: none; } }

/* the small play button on a shloka with a recording (daily Gita card) */
.dd-text { position: relative; }
.dd-shloka { cursor: pointer; border-radius: 10px; }
.dd-shloka:hover { background: rgba(224, 138, 62, .1); }
.dd-sh-play { position: absolute; right: .45rem; top: .45rem; width: 1.9rem; height: 1.9rem; border: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: .7rem; color: #fff; background: radial-gradient(circle at 35% 30%, #d3382a, #8f1a12); box-shadow: 0 4px 10px -4px rgba(143, 26, 18, .8); }
.dd-sh-play.is-playing { background: radial-gradient(circle at 35% 30%, #2e9b5e, #176b3d); }

/* =====================================================================
   श्रीरामचरितमानस पाठ-संकल्प (swadhyay-sankalp.js): the home card's two states and the /sankalp page
   ===================================================================== */
/* the home card */
.sk-eyebrow { display: block; font-size: .78rem; letter-spacing: .04em; color: #a8590d; font-weight: 700; }
.sk-pitch p { text-align: center; }
.sk-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-top: .55rem; }
.sk-tile { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .5rem .2rem; border-radius: 14px; border: 1px solid rgba(196, 150, 90, .55); background: rgba(255, 249, 236, .95); color: #7a1a0f; line-height: 1.2; transition: transform .12s, background .12s; }
.sk-tile:hover { transform: translateY(-2px); background: #fff3dc; }
.sk-tile span { font-size: 1.5rem; }
.sk-tile b { font-size: .88rem; }
.sk-tile small { font-size: .78rem; color: #6b4a3a; }
.sk-lead { font-weight: 700; font-size: 1.08rem; color: #7a1a0f; text-align: center; margin-bottom: .3rem; }
.dd-text .sk-sm, .sk-sm { font-size: .84rem !important; font-weight: 500 !important; color: #5b3a2c; margin: .2rem 0; line-height: 1.5; }
.dd-text .sk-warn, .sk-warn { font-size: .86rem !important; font-weight: 700 !important; color: #a8300d; margin: .25rem 0 0; text-align: center; }
.sk-timer-big { font-variant-numeric: tabular-nums; font-size: 2.4rem; font-weight: 700; color: #7a1a0f; text-align: center; letter-spacing: .03em; margin: .3rem 0; }
.sk-center { text-align: center; }

/* page */
.sk-hero { position: relative; overflow: hidden; color: #3b1812; background: #fbeacb url('assets/images/daily/manas.webp') right center / cover no-repeat; border-bottom: 1px solid var(--rule); }
.sk-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 248, 232, .95) 0, rgba(255, 248, 232, .8) 45%, rgba(255, 248, 232, .1) 100%); }
.sk-hero-in { position: relative; max-width: 1100px; margin: 0 auto; padding: 1.6rem 1.2rem 1.5rem; }
.sk-hero small { color: #a8590d; font-weight: 700; letter-spacing: .04em; }
.sk-hero h1 { margin: .15rem 0 .2rem; font-size: clamp(1.7rem, 4.2vw, 2.8rem); line-height: 1.1; color: #4a120d; }
.sk-hero p { margin: 0; font-size: 1.05rem; color: #6b4a3a; }
:root[data-theme="dark"] .sk-hero { color: #f3e6d6; background-color: #2a2018; }
:root[data-theme="dark"] .sk-hero::before { background: linear-gradient(90deg, rgba(20, 15, 12, .95) 0, rgba(20, 15, 12, .8) 45%, rgba(20, 15, 12, .2) 100%); }
:root[data-theme="dark"] .sk-hero h1 { color: #ffe6cf; }
:root[data-theme="dark"] .sk-hero p { color: #d8c2ad; }
.sk-wrap { max-width: 920px; margin: 0 auto; padding-bottom: 2rem; }
.sk-loading { text-align: center; padding: 2rem; color: var(--muted); }
.sk-steps { margin-top: 1rem; }
.sk-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; padding: 1.1rem 1.2rem; margin: 0 0 1rem; box-shadow: 0 10px 26px -20px rgba(90, 40, 10, .5); }
.sk-card h2 { margin: 0 0 .4rem; font-size: 1.3rem; color: var(--accent-dark); }
:root[data-theme="dark"] .sk-card h2 { color: #ffb199; }
.sk-card p { line-height: 1.6; }
.sk-card.sk-inner { box-shadow: none; background: var(--surface-2); padding: .8rem 1rem; margin: .8rem 0; }
.sk-sub { margin: 0 0 .8rem; color: var(--muted); }
.sk-note { background: var(--surface-2); border: 1px solid var(--rule); border-radius: 12px; padding: .65rem .85rem; font-size: .9rem; color: var(--muted); }
.sk-h3 { margin: 1rem 0 .3rem; font-size: 1.05rem; }

.sk-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.sk-type { text-align: left; display: flex; flex-direction: column; gap: .35rem; padding: 1rem; border-radius: 16px; border: 2px solid var(--rule); background: var(--surface); color: var(--ink); transition: border-color .12s, box-shadow .12s, transform .12s; }
.sk-type:hover { transform: translateY(-2px); }
.sk-type.is-on { border-color: #c45911; box-shadow: 0 0 0 4px rgba(226, 135, 46, .22); background: var(--surface-2); }
.sk-type-ic { font-size: 2rem; line-height: 1; }
.sk-type-h { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.sk-type-h b { font-size: 1.15rem; color: var(--accent-dark); }
:root[data-theme="dark"] .sk-type-h b { color: #ffb199; }
.sk-type-h i { font-style: normal; font-size: .85rem; padding: .1rem .5rem; border-radius: 99px; background: rgba(196, 89, 17, .14); color: var(--gold); white-space: nowrap; }
.sk-type em { font-style: normal; font-weight: 600; }
.sk-type ul { margin: .1rem 0; padding-left: 1.05rem; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.sk-type small { color: var(--muted); }
.sk-ideal { font-style: italic; }

.sk-row { display: flex; gap: .7rem; margin-top: 1rem; justify-content: space-between; align-items: center; }
.sk-row-r { justify-content: flex-end; }
.sk-row-c { justify-content: center; flex-wrap: wrap; }
.sk-wrap-row { flex-wrap: wrap; justify-content: flex-start; }
.sk-btn { padding: .65rem 1.1rem; border: 0; border-radius: 12px; font-size: 1rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #7a0f0d, #b3201a); box-shadow: 0 8px 16px -10px rgba(122, 15, 13, .85); transition: filter .12s, transform .12s; }
.sk-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.sk-btn:disabled { opacity: .45; cursor: not-allowed; }
.sk-btn-big { padding: .85rem 1.5rem; font-size: 1.08rem; }
.sk-btn-ghost { background: var(--surface); color: var(--accent-dark); border: 1.5px solid var(--rule); box-shadow: none; }
:root[data-theme="dark"] .sk-btn-ghost { color: #ffb199; }
.sk-btn-ok { background: linear-gradient(135deg, #1f7a48, #2e9b5e); box-shadow: 0 8px 16px -10px rgba(31, 122, 72, .85); }
.sk-btn-danger { background: transparent; color: #a8300d; border: 1.5px solid rgba(168, 48, 13, .4); box-shadow: none; }
.sk-link { background: none; border: 0; padding: .3rem 0; color: var(--accent); font-weight: 700; text-decoration: underline; }
.sk-histlink { text-align: center; }

.sk-acc { border: 1px solid var(--rule); border-radius: 12px; margin: .4rem 0; background: var(--surface); }
.sk-acc summary { cursor: pointer; padding: .65rem .9rem; font-weight: 700; color: var(--accent-dark); }
:root[data-theme="dark"] .sk-acc summary { color: #ffb199; }
.sk-acc ul { margin: 0; padding: 0 1rem .8rem 2rem; line-height: 1.65; }
.sk-check { display: flex; gap: .55rem; align-items: flex-start; margin: .6rem 0; line-height: 1.5; cursor: pointer; }
.sk-check input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: #b3201a; flex: none; }
.sk-form { display: flex; flex-direction: column; gap: .8rem; }
.sk-form > label:not(.sk-check) { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; }
.sk-form input[type="date"], .sk-form input[type="time"], .sk-form input[type="text"], .sk-form select { padding: .6rem .7rem; border-radius: 10px; border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); font-size: 1rem; max-width: 360px; font-family: inherit; }
.sk-presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.sk-chipbtn { padding: .3rem .75rem; border-radius: 99px; border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); font-size: .88rem; }
.sk-chipbtn.is-on { background: #8f1a12; border-color: #8f1a12; color: #fff; }
.sk-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1rem; }
.sk-sum > div, .sk-meta > div { background: var(--surface-2); border: 1px solid var(--rule); border-radius: 12px; padding: .6rem .75rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.sk-sum small, .sk-meta small { color: var(--muted); font-size: .8rem; }
.sk-meta i { font-style: normal; font-size: .76rem; color: var(--muted); }
.sk-dl { margin: .6rem 0; }
.sk-dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed var(--rule); }
.sk-dl dt { color: var(--muted); }
.sk-dl dd { margin: 0; font-weight: 700; text-align: right; }

.sk-today-top { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; flex-wrap: wrap; }
.sk-today-top small { color: var(--gold); font-weight: 700; }
.sk-today-top h2 { margin: .1rem 0 0; }
.sk-chip { padding: .3rem .8rem; border-radius: 99px; background: rgba(196, 89, 17, .14); color: var(--gold); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.sk-chip.is-done { background: rgba(31, 122, 72, .15); color: #1f7a48; }
:root[data-theme="dark"] .sk-chip.is-done { color: #6fd39c; }
.sk-prog { display: flex; gap: 1rem; align-items: center; margin: .9rem 0; }
.sk-prog p { margin: .1rem 0; font-size: .88rem; color: var(--muted); }
.sk-ring { --p: 0; flex: none; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#b3201a calc(var(--p) * 1%), var(--rule) 0); position: relative; }
.sk-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.sk-ring b { position: relative; font-size: 1.15rem; }
.sk-portion { background: var(--surface-2); border: 1px solid var(--rule); border-radius: 14px; padding: .8rem 1rem; }
.sk-portion small { color: var(--muted); }
.sk-portion h3 { margin: .1rem 0 .5rem; font-size: 1.3rem; color: var(--accent-dark); }
:root[data-theme="dark"] .sk-portion h3 { color: #ffb199; }
.sk-mark { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; }
.sk-mark > span { flex: none; min-width: 6.2rem; font-weight: 700; color: #1f7a48; font-size: .9rem; }
.sk-mark-end > span { color: #a8300d; }
.sk-mark p { margin: 0; line-height: 1.55; font-weight: 600; }
.sk-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .9rem; }
.sk-meta b { font-size: .95rem; line-height: 1.3; }

.sk-missed { border-color: rgba(200, 120, 90, .5); background: rgba(255, 214, 200, .25); }
:root[data-theme="dark"] .sk-missed { background: rgba(224, 86, 79, .08); }
.sk-opts { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; margin: .7rem 0; }
.sk-opts .sk-btn { text-align: left; }
.sk-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .45rem; margin-top: .5rem; }
.sk-day { display: flex; flex-direction: column; align-items: center; padding: .4rem 0; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); font-weight: 700; line-height: 1.1; }
.sk-day i { font-style: normal; font-size: .8rem; height: .9rem; }
.sk-day.is-done { background: rgba(31, 122, 72, .14); border-color: #2e9b5e; color: #1f7a48; }
.sk-day.is-today { border-color: #c45911; box-shadow: 0 0 0 3px rgba(226, 135, 46, .3); }
.sk-day.is-missed { background: rgba(255, 214, 200, .45); border-color: rgba(200, 120, 90, .6); color: #a8300d; }
.sk-day.is-future { color: var(--muted); }
.sk-day.is-sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.sk-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .82rem; color: var(--muted); margin: .6rem 0 0; }
.sk-dayinfo { margin-top: .8rem; padding: .8rem 1rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--rule); }
.sk-dayinfo b { display: block; }
.sk-dayinfo span { color: var(--accent-dark); font-weight: 700; }
.sk-dayinfo p { margin: .35rem 0; }

.sk-complete { text-align: center; }
.sk-om { font-size: 3rem; line-height: 1; }
.sk-complete .sk-dl, .sk-complete .sk-inner { text-align: left; }
.sk-complete .sk-check { justify-content: center; }
.sk-complete .sk-wrap-row { justify-content: center; }
.sk-hist { list-style: none; margin: .6rem 0; padding: 0; }
.sk-hist li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px dashed var(--rule); }
.sk-hist small { color: var(--muted); }
.sk-hist.sk-small li { padding: .3rem 0; font-size: .88rem; }
.sk-checklist { list-style: none; padding: 0; margin: 0; }

.sk-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 1rem; background: rgba(30, 14, 8, .55); }
.sk-sheet { width: min(440px, 100%); background: var(--surface); color: var(--ink); border-radius: 18px; padding: 1.2rem; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); }
.sk-sheet h3 { margin: 0 0 .5rem; color: var(--accent-dark); }
:root[data-theme="dark"] .sk-sheet h3 { color: #ffb199; }
.sk-sheet-b p { line-height: 1.6; margin: .3rem 0; }
.sk-sheet-a { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }

@media (max-width: 900px) {
  .sk-types { grid-template-columns: 1fr; }
  .sk-sum, .sk-meta { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sk-hero::before { background: linear-gradient(180deg, rgba(255, 248, 232, .96) 0, rgba(255, 248, 232, .85) 60%, rgba(255, 248, 232, .4) 100%); }
  :root[data-theme="dark"] .sk-hero::before { background: linear-gradient(180deg, rgba(20, 15, 12, .96) 0, rgba(20, 15, 12, .85) 60%, rgba(20, 15, 12, .45) 100%); }
  .sk-wrap { padding-left: .8rem; padding-right: .8rem; }
  .sk-card { padding: .9rem; }
  .sk-steps .sr-step { font-size: .72rem; }
  .sk-mark { flex-direction: column; gap: .1rem; }
  .sk-row { flex-wrap: wrap; }
  .sk-row .sk-btn { flex: 1 1 auto; }
  .sk-sheet-a .sk-btn { flex: 1; }
}
.sk-pitch { margin-top: auto; }
.dd-head + .sk-pitch, .dd-head + .dd-fail { margin-top: auto; }
.dd-manas { min-height: 500px; }

/* the strip under the reader's top bar while today's पाठ-संकल्प portion is being read */
.sk-readbar { flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; background: #fff3dc; color: #3b1812; border-bottom: 1px solid #e4c78d; font-size: .82rem; line-height: 1.35; }
.sk-rb-tx { flex: 1; min-width: 0; }
.sk-rb-tx b { color: #8f1a12; margin-right: .3rem; }
.sk-rb-tx span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #5b3a2c; }
.sk-readbar em { font-style: normal; font-weight: 700; color: #1f7a48; white-space: nowrap; }
.sk-rb-ok { flex: none; padding: .35rem .7rem; border: 0; border-radius: 10px; background: linear-gradient(135deg, #1f7a48, #2e9b5e); color: #fff; font-weight: 700; font-size: .82rem; white-space: nowrap; }
.sk-rb-x { flex: none; border: 0; background: transparent; color: #8f1a12; font-size: 1rem; padding: .2rem .4rem; }

/* =====================================================================
   Vrats & festivals: the "Special for Today" banner, /vrat (all) and /vrat/<slug> (one)
   ===================================================================== */
.festival-body { min-width: 0; }
.festival-when { display: block; opacity: .85; font-size: .82rem; margin-bottom: .15rem; }
.festival-body p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.festival-more { margin: .5rem 0 .7rem; font-size: .84rem; display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.festival-more span { opacity: .85; }
.festival-more a { color: #fff; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); border-radius: 99px; padding: .12rem .6rem; text-decoration: none; }
.festival-more a:hover { background: rgba(255, 255, 255, .3); }

.vrat-wrap { max-width: 1000px; margin: 0 auto; padding-bottom: 2rem; }
.vrat-loading { text-align: center; padding: 2rem 0; color: var(--muted); }
.vrat-empty { text-align: center; color: var(--muted); }
.vrat-back { display: inline-block; margin: .2rem 0 .8rem; color: var(--accent); font-weight: 600; text-decoration: none; }

.vrat-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.vh-ic { flex: none; width: 3.6rem; height: 3.6rem; display: grid; place-items: center; font-size: 2rem; border-radius: 16px; background: linear-gradient(135deg, #d9822b, #a51512); }
.vrat-head h1 { margin: 0 0 .35rem; font-size: clamp(1.5rem, 4vw, 2.1rem); color: var(--accent-dark); line-height: 1.2; }
:root[data-theme="dark"] .vrat-head h1 { color: #ffb199; }
.vrat-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.vrat-chip { padding: .15rem .65rem; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--rule); font-size: .85rem; }
.vrat-chip.is-today { background: #a51512; border-color: #a51512; color: #fff; font-weight: 700; }
.vrat-alias { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; }
.vrat-sec { margin: 0 0 1.2rem; }
.vrat-sec h3 { margin: 0 0 .4rem; font-size: 1.1rem; color: var(--accent-dark); }
:root[data-theme="dark"] .vrat-sec h3 { color: #ffb199; }
.vrat-sec p { line-height: 1.75; margin: .3rem 0; }
.vrat-more { border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); margin: .5rem 0; }
.vrat-more summary { cursor: pointer; padding: .65rem .9rem; font-weight: 700; color: var(--accent-dark); }
:root[data-theme="dark"] .vrat-more summary { color: #ffb199; }
.vrat-more > .vrat-sec { padding: 0 .9rem; }
.vrat-src { border-left: 4px solid var(--gold); background: var(--surface-2); border-radius: 0 12px 12px 0; padding: .7rem .9rem; margin: .6rem 0; }
.vs-head { font-weight: 700; }
.vs-meta { color: var(--muted); font-size: .85rem; margin: .1rem 0 .3rem; }
.vrat-src p { margin: .25rem 0; font-size: .92rem; line-height: 1.65; }
.vs-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.vs-tags span { font-size: .76rem; padding: .05rem .5rem; border-radius: 99px; border: 1px solid var(--rule); color: var(--muted); }
.pd-vrats { display: flex; flex-wrap: wrap; gap: .4rem; padding: .2rem 0 .6rem; }
.pd-vrat { display: inline-flex; gap: .35rem; align-items: center; padding: .3rem .75rem; border-radius: 99px; border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: .9rem; }
.pd-vrat:hover { border-color: var(--gold); }
@media (max-width: 640px) { .vrat-head { gap: .7rem; } .vh-ic { width: 3rem; height: 3rem; font-size: 1.6rem; } }

/* next probable date of a vrat */
.vrat-note { margin: -.3rem 0 1rem; padding: .55rem .8rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--rule); font-size: .88rem; color: var(--muted); line-height: 1.5; }
.vrat-next { margin: .5rem 0 0; padding: .45rem .8rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--gold); font-size: .92rem; line-height: 1.5; }

/* =====================================================================
   व्रत एवं पर्व list page: hero + search, today, months
   ===================================================================== */
.vrat-count { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: .05rem .5rem; margin-left: .3rem; }
.vrat-page [hidden] { display: none !important; }
.vrat-hero { position: relative; overflow: hidden; background: #fbeacb url('assets/images/vrat/hero.webp') right center / cover no-repeat; }
.vrat-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 249, 236, .92) 0, rgba(255, 249, 236, .6) 48%, rgba(255, 249, 236, 0) 78%); }
.vrat-hero-in { position: relative; max-width: 1240px; margin: 0 auto; padding: 2rem 1.5rem 3.6rem; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.vh-lotus { font-size: 2.3rem; line-height: 1; margin-left: 5.2rem; filter: drop-shadow(0 2px 3px rgba(180, 90, 20, .35)); }
.vrat-hero h1 { margin: 0; font-size: clamp(2.2rem, 5.4vw, 4rem); line-height: 1.05; color: #7a1a0f; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.vrat-hero p { margin: 0; max-width: 620px; font-size: clamp(.98rem, 1.8vw, 1.2rem); color: #4a2a1c; font-weight: 500; }
.vh-search { margin-top: .6rem; width: min(100%, 780px); display: flex; align-items: center; gap: .6rem; padding: .35rem .4rem .35rem 1.1rem; border-radius: 99px; background: rgba(255, 255, 255, .96); border: 1px solid rgba(214, 170, 100, .7); box-shadow: 0 10px 26px -14px rgba(110, 50, 10, .6); }
.vh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1.05rem; color: #3b1812; font-family: inherit; padding: .5rem 0; }
.vh-search button { flex: none; padding: .7rem 1.7rem; border: 0; border-radius: 99px; background: linear-gradient(135deg, #7a0f0d, #b3201a); color: #fff; font-size: 1.02rem; font-weight: 700; }
.vh-pop { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .4rem; color: #5b3a2c; font-size: .95rem; }
.vh-chip { padding: .35rem 1.05rem; border-radius: 99px; border: 1px solid rgba(196, 150, 90, .6); background: rgba(255, 252, 244, .9); color: #4a2a1c; font-size: .95rem; }
.vh-chip:hover { background: #fff; border-color: #c45911; }
:root[data-theme="dark"] .vrat-hero::before { background: linear-gradient(90deg, rgba(20, 15, 12, .92) 0, rgba(20, 15, 12, .6) 48%, rgba(20, 15, 12, .05) 78%); }
:root[data-theme="dark"] .vrat-hero h1 { color: #ffb199; text-shadow: none; }
:root[data-theme="dark"] .vrat-hero p, :root[data-theme="dark"] .vh-pop { color: #e8d3bd; }

.vrat-sheet { position: relative; max-width: 1240px; margin: -2rem auto 0; padding: 1.5rem 1.4rem 2.5rem; border-radius: 28px 28px 0 0; background: var(--bg); box-shadow: 0 -12px 30px -18px rgba(110, 50, 10, .45); }
.vs { margin: 0 0 1.7rem; }
.vs-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; margin-bottom: .8rem; }
.vs-ic { font-size: 1.7rem; line-height: 1; }
.vs-head h2 { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.75rem); color: #8f1a12; }
:root[data-theme="dark"] .vs-head h2 { color: #ffb199; }
.vs-pill { padding: .2rem .75rem; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--rule); font-size: .82rem; color: var(--muted); }
.vs-now { padding: .2rem .75rem; border-radius: 99px; background: #a51512; color: #fff; font-size: .82rem; font-weight: 700; }
.vs-date { display: inline-flex; gap: .4rem; align-items: center; padding: .35rem .9rem; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--rule); color: var(--accent-dark); font-size: .9rem; font-weight: 600; text-decoration: none; }
.vs-date i, .vs-all i { font-style: normal; font-size: 1.1rem; }
.vs-all { margin-left: auto; background: none; border: 0; color: #8f1a12; font-weight: 700; font-size: .98rem; display: inline-flex; gap: .3rem; align-items: center; }
:root[data-theme="dark"] .vs-all { color: #ffb199; }
.vs-grid { display: grid; gap: .8rem; }
.vs-today .vs-grid { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.vs-tile .vs-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.vs-row .vs-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.vs:not(.is-open) [data-extra] { display: none; }
.vrat-page.is-searching [data-extra] { display: grid; }
.vrat-page.is-searching .vs-all { display: none; }
.vc-go { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 1.3rem; line-height: 1; color: #a8590d; background: #fff1d6; border: 1px solid rgba(196, 150, 90, .5); }
:root[data-theme="dark"] .vc-go { background: rgba(224, 138, 62, .16); color: #ffb199; }
.vc-ic { flex: none; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff6e2, #f9dfb2); }
.vc-tx { min-width: 0; display: flex; flex-direction: column; gap: .1rem; line-height: 1.3; }
.vc-tx b, .vtile b, .vt-body b { color: var(--ink); }
.vc-tx small, .vtile small, .vt-body small { color: var(--muted); font-size: .82rem; }
small.vc-next { color: var(--gold) !important; font-weight: 600; margin-top: .1rem; }

/* today: a wide card */
.vtoday { position: relative; display: flex; align-items: stretch; gap: 0; min-height: 138px; border-radius: 18px; overflow: hidden; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .12s; }
.vtoday:hover { transform: translateY(-2px); }
.vt-thumb { flex: none; width: 150px; display: grid; place-items: center; font-size: 3.4rem; background: linear-gradient(135deg, #ffe3b3, #f4b35e 60%, #d9822b); }
.vt-body { flex: 1; min-width: 0; padding: .9rem 1rem; display: flex; flex-direction: column; justify-content: center; gap: .25rem; }
.vt-body b { font-size: 1.3rem; color: #8f1a12; line-height: 1.2; }
:root[data-theme="dark"] .vt-body b { color: #ffb199; }
.vt-btn { align-self: flex-start; margin-top: .35rem; padding: .35rem 1.1rem; border-radius: 99px; background: #fff1d6; border: 1px solid rgba(196, 150, 90, .55); color: #8f1a12; font-weight: 700; font-size: .9rem; }
.vtoday .vc-go { position: absolute; right: .8rem; bottom: .8rem; }

/* the running month: upright tiles */
.vtile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding: 1rem .8rem 2.6rem; border-radius: 18px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .12s; }
.vtile:hover { transform: translateY(-3px); }
.vtile .vc-ic { width: 4.6rem; height: 4.6rem; font-size: 2.4rem; margin-bottom: .4rem; }
.vtile b { font-size: 1rem; line-height: 1.3; }
.vtile .vc-go { position: absolute; right: .7rem; bottom: .7rem; }

/* every other month and group: rows */
.vrow { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 16px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .12s; }
.vrow:hover { transform: translateY(-2px); }
.vrow .vc-ic { width: 3.6rem; height: 3.6rem; font-size: 1.9rem; }
.vrow .vc-tx { flex: 1; }
.vrow .vc-tx b { font-size: .98rem; }
.vs.is-now .vtile, .vs.is-today .vtoday { border-color: rgba(196, 89, 17, .45); }
.vrat-note { margin: 1rem 0 0; padding: .55rem .8rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--rule); font-size: .85rem; color: var(--muted); line-height: 1.5; }

@media (max-width: 820px) {
  .vrat-hero { background-image: url('assets/images/vrat/hero-m.webp'); background-position: 70% center; }
  .vrat-hero::before { background: linear-gradient(180deg, rgba(255, 249, 236, .94) 0, rgba(255, 249, 236, .8) 55%, rgba(255, 249, 236, .35) 100%); }
  :root[data-theme="dark"] .vrat-hero::before { background: linear-gradient(180deg, rgba(20, 15, 12, .94) 0, rgba(20, 15, 12, .8) 55%, rgba(20, 15, 12, .4) 100%); }
  .vrat-hero-in { padding: 1.4rem 1rem 3.2rem; }
  .vh-lotus { margin-left: 0; }
  .vs-today .vs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .vrat-sheet { padding: 1.1rem .8rem 2rem; margin-top: -1.6rem; border-radius: 22px 22px 0 0; }
  .vs-tile .vs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vs-row .vs-grid { grid-template-columns: 1fr; }
  .vt-thumb { width: 104px; font-size: 2.6rem; }
  .vh-search { padding-left: .8rem; } .vh-search button { padding: .6rem 1.1rem; }
  .vs-all { margin-left: 0; }
}
