/* AeroGyan Bible — calm, reverent, readable. Family tokens (docs/design-family-2026.md in AeroGyan-Go) with the
   product's own accent: a deep burgundy with a quiet gold. Three looks: light, sepia (old paper), night. */
:root {
  --ag-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", "Noto Sans", sans-serif;
  --ag-space-1: 4px; --ag-space-2: 8px; --ag-space-3: 12px; --ag-space-4: 16px; --ag-space-5: 24px; --ag-space-6: 32px;
  --ag-radius-sm: 8px; --ag-radius: 12px; --ag-radius-lg: 16px; --ag-radius-xl: 24px;
  --ag-accent: #7b2433; --ag-accent-2: #9a6b14; --ag-accent-contrast: #ffffff; --accent-soft: rgba(123, 36, 51, .09);
  --ag-bg: #fbfaf7; --ag-surface: #ffffff; --ag-raised: #ffffff; --ag-line: rgba(30, 20, 15, .1); --ag-line-2: rgba(30, 20, 15, .18);
  --ag-text: #1f1a17; --ag-muted: #5f574f; --read: #231d19;
  --ag-ok: #15803d; --ag-warn: #b45309; --ag-err: #b91c1c; --ag-info: #1d4ed8;
  --wj: #a3141f; --xr: #7a6f64;
  --hl-y: #fdeb8a; --hl-g: #c9f0c4; --hl-b: #cfe3ff; --hl-p: #ffd3e2; --hl-o: #ffd9a8;
  --now: rgba(154, 107, 20, .18); --now-line: #9a6b14;
  --ag-shadow-1: 0 1px 2px rgba(30, 20, 15, .06), 0 1px 1px rgba(30, 20, 15, .04);
  --ag-shadow-2: 0 10px 28px -8px rgba(30, 20, 15, .22), 0 2px 6px rgba(30, 20, 15, .06);
  --ag-ease: cubic-bezier(.2, .8, .2, 1);
  --font-scale: 1; --read-lh: 1.75;
  --bar-h: 60px; --top-h: 58px;
  color-scheme: light;
}
:root[data-theme="sepia"] {
  --ag-bg: #f3ead6; --ag-surface: #f8f1e1; --ag-raised: #fbf6ea; --ag-line: rgba(70, 45, 15, .14); --ag-line-2: rgba(70, 45, 15, .24);
  --ag-text: #3a2c1c; --ag-muted: #6a5a45; --read: #33261a; --wj: #9a1a1a; --xr: #7c6a52;
  --hl-y: #f6dd78; --hl-g: #c7e2b5; --hl-b: #c7d9ef; --hl-p: #f0c8d2; --hl-o: #f2cb94;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ag-accent: #eeaab4; --ag-accent-2: #e2be72; --ag-accent-contrast: #2a0a10; --accent-soft: rgba(238, 170, 180, .12);
  --ag-bg: #0d1117; --ag-surface: #141a23; --ag-raised: #1a2230; --ag-line: rgba(255, 255, 255, .09); --ag-line-2: rgba(255, 255, 255, .18);
  --ag-text: #e9edf3; --ag-muted: #a2acbc; --read: #e4e8ee; --wj: #ff9aa0; --xr: #8f98a8;
  --hl-y: rgba(250, 220, 90, .28); --hl-g: rgba(110, 210, 120, .26); --hl-b: rgba(110, 160, 255, .28); --hl-p: rgba(255, 120, 170, .26); --hl-o: rgba(255, 160, 70, .28);
  --now: rgba(226, 190, 114, .16); --now-line: #e2be72;
  --ag-ok: #4ade80; --ag-err: #f87171;
  --ag-shadow-2: 0 12px 30px -8px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--ag-bg); color: var(--ag-text); font: 16px/1.5 var(--ag-font); min-height: 100dvh; }
:lang(hi) body, body:lang(hi) { line-height: 1.6; }
a { color: var(--ag-accent); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only, .offscreen { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ag-muted); } .small { font-size: .86rem; } .grow { flex: 1; min-width: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ag-accent); color: var(--ag-accent-contrast); padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--ag-accent); outline-offset: 2px; border-radius: 6px; }
.noscript { padding: 24px; }
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--ag-muted); }

/* ---------- top bar, navigation ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: var(--top-h); padding: 0 max(16px, env(safe-area-inset-left)); padding-top: env(safe-area-inset-top);
  background: var(--ag-bg); border-bottom: 1px solid var(--ag-line); }
@supports (backdrop-filter: blur(12px)) { .topbar { background: color-mix(in srgb, var(--ag-bg) 82%, transparent); backdrop-filter: blur(12px); } }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ag-text); font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.brand img { border-radius: 9px; }
.top-nav { display: flex; gap: 2px; margin-left: 12px; }
.tn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--ag-muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.tn:hover { background: var(--accent-soft); color: var(--ag-text); }
.tn.on { color: var(--ag-accent); background: var(--accent-soft); }
.tn .i { width: 18px; height: 18px; }
.top-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.ibtn, .icon-btn { display: inline-grid; place-items: center; min-width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; color: var(--ag-text); padding: 0 8px; }
.ibtn:hover, .icon-btn:hover { background: var(--accent-soft); }
.icon-btn.on, .ibtn.on { color: var(--ag-accent); background: var(--accent-soft); }
.lang-switch span { font-weight: 700; font-size: .95rem; }
.i { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bottom-nav { display: none; }
.main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 120px; outline: none; }

@media (max-width: 900px) {
  .top-nav { display: none; }
  .brand-name { font-size: 1.02rem; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--ag-surface); border-top: 1px solid var(--ag-line);
    padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
  .bn { flex: 1; display: grid; justify-items: center; align-content: center; gap: 2px; text-decoration: none; color: var(--ag-muted); font-size: .74rem; font-weight: 600; min-height: 44px; }
  .bn.on { color: var(--ag-accent); }
  .bn.on .i { stroke-width: 2.2; }
  .main { padding: 14px 16px calc(var(--bar-h) + 120px); }
}
@media (max-width: 420px) { .brand-name { display: none; } }

/* ---------- buttons, chips, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--ag-line-2); background: var(--ag-surface);
  color: var(--ag-text); font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .12s var(--ag-ease), background .15s; white-space: nowrap; }
.btn:hover { background: var(--accent-soft); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ag-accent); color: var(--ag-accent-contrast); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger, .btn.danger:hover { background: var(--ag-err); color: #fff; border-color: transparent; }
.danger-text { color: var(--ag-err); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.btn.lg { min-height: 52px; padding: 0 22px; font-size: 1.05rem; }
.btn.xl { min-height: 64px; padding: 0 28px; font-size: 1.2rem; border-radius: 18px; }
.btn[disabled] { opacity: .55; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ag-line-2); background: var(--ag-surface); cursor: pointer; font-weight: 600; }
.chip:hover { background: var(--accent-soft); }
.chip-static { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ag-accent); font-size: .82rem; font-weight: 600; width: max-content; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ag-line-2); background: var(--ag-surface); color: var(--ag-text); font: inherit; }
.input:focus { outline: 2px solid var(--ag-accent); outline-offset: 0; border-color: transparent; }
.time-input { width: auto; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--accent-soft); margin: 8px 0 14px; max-width: 100%; }
.seg-btn { border: 0; background: transparent; min-height: 38px; padding: 0 14px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--ag-muted); }
.seg-btn.on { background: var(--ag-surface); color: var(--ag-accent); box-shadow: var(--ag-shadow-1); }
.switch-row { justify-content: space-between; padding: 10px 0; cursor: pointer; position: relative; }
.switch-row input { position: absolute; opacity: 0; width: 44px; height: 26px; right: 0; margin: 0; cursor: pointer; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--ag-line-2); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--ag-shadow-1); transition: transform .15s var(--ag-ease); }
.switch-row input:checked + .switch { background: var(--ag-accent); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--ag-accent); outline-offset: 2px; }
.row-text { display: grid; }
.progress { height: 8px; border-radius: 99px; background: var(--ag-line); overflow: hidden; width: 100%; min-width: 80px; }
.progress span { display: block; height: 100%; background: var(--ag-accent); border-radius: 99px; transition: width .2s; }

/* ---------- cards, tiles ---------- */
.page-head { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.page-title { font-size: 1.5rem; margin: 0; flex: 1; }
.page-actions { display: flex; gap: 6px; }
.tile, .card { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--ag-radius-lg); background: var(--ag-surface); border: 1px solid var(--ag-line);
  color: var(--ag-text); text-decoration: none; box-shadow: var(--ag-shadow-1); transition: box-shadow .15s, transform .15s var(--ag-ease); }
a.tile:hover, a.card:hover { box-shadow: var(--ag-shadow-2); transform: translateY(-1px); }
.tile > div { display: grid; gap: 2px; min-width: 0; }
.tile.col { flex-direction: column; align-items: flex-start; }
.tile .i { color: var(--ag-accent); }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { flex-direction: column; align-items: flex-start; }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 40px 16px; color: var(--ag-muted); }
.empty-art { width: 120px; height: 80px; }
.empty-art .ea1 { fill: var(--accent-soft); stroke: var(--ag-accent); stroke-width: 2; }
.empty-art .ea2 { stroke: var(--ag-accent); stroke-width: 2; fill: none; opacity: .7; }
.skel { display: grid; gap: 10px; }
.skel-line, .votd-skel { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--ag-line) 25%, var(--accent-soft) 50%, var(--ag-line) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.votd-skel { height: 320px; border-radius: var(--ag-radius-lg); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- home ---------- */
.home { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .home { grid-template-columns: minmax(0, 640px) minmax(0, 1fr); align-items: start; } .home .greet { grid-column: 1 / -1; } }
.greet { margin: 0; font-size: 1.15rem; font-weight: 600; }
.votd { background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius-xl); overflow: hidden; box-shadow: var(--ag-shadow-1); padding-bottom: 18px; }
.votd-pic { margin: 0; aspect-ratio: 4 / 3; background: var(--accent-soft) center / cover no-repeat; overflow: hidden; }
.votd-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 640px) { .votd-pic { aspect-ratio: 16 / 10; } }
.pic-credit { margin: 6px 18px 0; font-size: .76rem; color: var(--ag-muted); }
.votd-h { margin: 14px 18px 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ag-accent-2); }
.votd-h:lang(hi), :lang(hi) .votd-h { text-transform: none; letter-spacing: 0; font-size: .95rem; }
.votd-text { margin: 4px 18px 0; font-size: calc(1.45rem * var(--font-scale)); line-height: 1.6; color: var(--read); }
.votd-text .wj { color: inherit; }
.votd-ref { margin: 10px 18px 14px; font-weight: 700; }
.votd-ref a { text-decoration: none; }
.votd-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 18px; }
.listen-big { flex: 1 1 100%; }
@media (min-width: 640px) { .listen-big { flex: 0 0 auto; } }
.home-side { display: grid; gap: 12px; align-content: start; }
.streak .i { color: #e0761a; }

/* ---------- reader ---------- */
.reader { max-width: 760px; margin: 0 auto; }
.reader-bar { position: sticky; top: var(--top-h); z-index: 20; display: flex; gap: 8px; align-items: center; padding: 8px 0; background: var(--ag-bg); }
.chip-ref { font-size: 1.02rem; max-width: 62vw; }
.chip-ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter { color: var(--read); font-size: calc(1.2rem * var(--font-scale)); line-height: var(--read-lh); padding-bottom: 12px; overflow-wrap: break-word; }
.chapter:lang(zh-Hans) { line-height: 1.9; }
.ch-title { display: flex; align-items: baseline; gap: 14px; margin: 10px 0 18px; font-weight: 600; font-size: 1.05em; color: var(--ag-muted); }
.ch-num { font-size: 2.6em; line-height: 1; color: var(--ag-accent); font-weight: 400; }
.intro { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--ag-radius); background: var(--accent-soft); font-size: .85em; }
.intro summary { cursor: pointer; font-family: var(--ag-font); font-weight: 600; }
.para { margin: 0 0 .7em; content-visibility: auto; contain-intrinsic-size: auto 6em; }
.pk-q, .pk-q2, .pk-q3, .pk-qr, .pk-qc { margin: 0 0 .1em; padding-left: 1.4em; text-indent: -1em; }
.pk-q2 { padding-left: 2.4em; } .pk-q3 { padding-left: 3.2em; } .pk-pi, .pk-li { padding-left: 1.2em; } .pk-pc, .pk-qc { text-align: center; } .pk-pr, .pk-qr { text-align: end; }
.pk-nb { margin-top: -.7em; }
.vbr { display: block; }
.sh { font-family: var(--ag-font); font-size: .82em; font-weight: 700; color: var(--ag-muted); margin: 1.4em 0 .5em; letter-spacing: .01em; }
.ms { font-size: .95em; text-align: center; color: var(--ag-accent); margin: 1.4em 0 .6em; }
.xrefs, .speaker { font-size: .78em; color: var(--xr); margin: -.3em 0 .6em; font-style: italic; }
.psalm-title { font-style: italic; font-size: .92em; color: var(--ag-muted); margin: .4em 0 .6em; }
.v { border-radius: 4px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s; padding: 1px 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.vn { font-family: var(--ag-font); font-size: .58em; font-weight: 700; color: var(--ag-accent); vertical-align: super; line-height: 0; margin-inline-end: .25em; user-select: none; }
.wj { color: var(--wj); } .add { font-style: italic; opacity: .92; } .nd { font-variant: small-caps; letter-spacing: .02em; } .qs { font-style: italic; } .it { font-style: italic; } .bd, .bdit { font-weight: 600; } .bdit { font-style: italic; }
.tl { font-style: italic; } .spk { display: inline-block; font-family: var(--ag-font); font-size: .76em; font-weight: 700; color: var(--ag-muted); text-transform: uppercase; letter-spacing: .04em; }
.sup { vertical-align: super; font-size: .7em; }
.xr { font-size: .7em; color: var(--xr); }
.fn { border: 0; background: transparent; color: var(--ag-accent); font: 700 .7em var(--ag-font); vertical-align: super; line-height: 0; cursor: pointer; padding: 0 3px; min-width: 22px; min-height: 22px; }
.v.hl-y { background: var(--hl-y); } .v.hl-g { background: var(--hl-g); } .v.hl-b { background: var(--hl-b); } .v.hl-p { background: var(--hl-p); } .v.hl-o { background: var(--hl-o); }
.v.bm .vn::after { content: " ▾"; color: var(--ag-accent-2); }
.v.has-note .vn::before { content: "✎ "; color: var(--ag-accent-2); }
.v.sel { outline: 2px dashed var(--ag-accent); outline-offset: 1px; }
.v.now { background: var(--now); box-shadow: inset 3px 0 0 var(--now-line); }
.v.now.approx { box-shadow: none; }
.v.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 40% { background: var(--now); } 100% { background: transparent; } }
.parallel { display: grid; gap: 0; }
.prow { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 8px 0; border-bottom: 1px solid var(--ag-line); }
.phead { font: 700 .8rem var(--ag-font); color: var(--ag-muted); position: sticky; top: calc(var(--top-h) + 56px); background: var(--ag-bg); z-index: 5; }
@media (max-width: 640px) { .prow { grid-template-columns: 1fr; gap: 4px; } .prow .pcell + .pcell { color: var(--ag-muted); font-size: .94em; padding-left: 10px; border-left: 3px solid var(--ag-line-2); } .phead { display: none; } }
.ch-nav { display: flex; justify-content: space-between; gap: 10px; margin: 26px 0 10px; }
.ch-nav .btn { max-width: 48%; overflow: hidden; }
.ch-nav .btn span { overflow: hidden; text-overflow: ellipsis; }
.listen-fab { position: fixed; z-index: 25; right: max(16px, env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 10px;
  min-height: 64px; padding: 0 24px 0 18px; border-radius: 999px; border: 0; background: var(--ag-accent); color: var(--ag-accent-contrast); font-weight: 700; font-size: 1.15rem; box-shadow: var(--ag-shadow-2); cursor: pointer; }
.listen-fab:active { transform: scale(.97); }
.listen-fab .i { width: 34px; height: 34px; }
@media (max-width: 900px) { .listen-fab { bottom: calc(var(--bar-h) + 16px + env(safe-area-inset-bottom)); } }
body.has-player .listen-fab { bottom: calc(110px + env(safe-area-inset-bottom)); }
@media (max-width: 900px) { body.has-player .listen-fab { bottom: calc(var(--bar-h) + 118px + env(safe-area-inset-bottom)); } }

/* verse actions (a bottom sheet) */
.verse-actions { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); width: min(560px, calc(100vw - 16px));
  background: var(--ag-raised); border: 1px solid var(--ag-line); border-radius: 20px; box-shadow: var(--ag-shadow-2); padding: 10px 12px 12px; animation: up .2s var(--ag-ease); }
@media (max-width: 900px) { .verse-actions { bottom: calc(var(--bar-h) + 8px + env(safe-area-inset-bottom)); } }
.va-top { display: flex; align-items: center; gap: 8px; }
.va-colors { display: flex; gap: 10px; padding: 6px 0 10px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ag-line-2); cursor: pointer; display: grid; place-items: center; background: var(--ag-surface); }
.sw-y { background: var(--hl-y); } .sw-g { background: var(--hl-g); } .sw-b { background: var(--hl-b); } .sw-p { background: var(--hl-p); } .sw-o { background: var(--hl-o); }
.va-btns { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.va-btn { display: grid; justify-items: center; gap: 4px; border: 0; background: transparent; border-radius: 12px; padding: 8px 2px; cursor: pointer; font-size: .72rem; font-weight: 600; color: var(--ag-text); min-height: 56px; text-align: center; }
.va-btn:hover { background: var(--accent-soft); }
.va-btn .i { color: var(--ag-accent); }
@media (max-width: 420px) { .va-btns { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* pickers */
.tr-list { display: grid; gap: 6px; }
.tr-item { display: grid; grid-template-columns: 1fr auto; text-align: start; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ag-line); background: var(--ag-surface); cursor: pointer; }
.tr-item.on { border-color: var(--ag-accent); background: var(--accent-soft); }
.tr-name { font-size: 1.05rem; } .tr-sub { grid-column: 1; font-size: .8rem; color: var(--ag-muted); } .tr-off { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--ag-ok); }
.book-picker { display: grid; gap: 10px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.book { min-height: 44px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--ag-line); background: var(--ag-surface); cursor: pointer; text-align: start; font-size: 1rem; line-height: 1.25; }
.book.on, .chn.on { border-color: var(--ag-accent); color: var(--ag-accent); background: var(--accent-soft); }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.chn { min-height: 48px; border-radius: 10px; border: 1px solid var(--ag-line); background: var(--ag-surface); cursor: pointer; font-weight: 600; }
.sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ag-muted); margin: 12px 0 4px; }
:lang(hi) .sub { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.scale-out { min-width: 64px; text-align: center; font-weight: 700; }
.big-a { font-size: 1.2em; }
.note-text { white-space: pre-wrap; line-height: 1.6; }
.note-input { min-height: 140px; resize: vertical; }

/* player */
.player { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center;
  padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: var(--ag-raised); border-top: 1px solid var(--ag-line); box-shadow: var(--ag-shadow-2); }
@media (max-width: 900px) { .player { bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); padding-bottom: 10px; grid-template-columns: minmax(0, 1fr) auto; } .pl-more { grid-column: 1 / -1; justify-content: flex-start; } }
.pl-info { display: grid; min-width: 0; } .pl-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pl-sub { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-ctl, .pl-more { display: flex; align-items: center; gap: 6px; }
.pl-main { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--ag-accent); color: var(--ag-accent-contrast); display: grid; place-items: center; cursor: pointer; }
.pl-main .i { width: 30px; height: 30px; }
body.has-player .main { padding-bottom: 200px; }
@media (max-width: 900px) { body.has-player .main { padding-bottom: calc(var(--bar-h) + 260px); } }

/* search, plans, saved, more */
.search-form { display: flex; gap: 8px; }
.search-input { font-size: 1.1rem; }
.results { display: grid; gap: 10px; margin-top: 8px; }
.hits { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.hits a, .saved-list a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--ag-text); background: var(--ag-surface); border: 1px solid var(--ag-line); }
.hits a:hover, .saved-list a:hover { border-color: var(--ag-accent); }
.hits strong, .saved-list strong { color: var(--ag-accent); font-size: .92rem; }
.hit-text { font-size: calc(1.05rem * var(--font-scale)); line-height: 1.6; color: var(--read); }
.goto { border-color: var(--ag-accent); }
.plan-card .progress { margin-top: 6px; }
.plan-days { list-style: none; padding: 0; display: grid; gap: 6px; }
.plan-day { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--ag-surface); border: 1px solid var(--ag-line); }
.plan-day.next { border-color: var(--ag-accent); box-shadow: var(--ag-shadow-1); }
.plan-day.done .pd-refs { opacity: .6; }
.pd-n { font-weight: 700; font-size: .85rem; color: var(--ag-muted); }
.tick { border: 2px solid var(--ag-line-2); border-radius: 10px; color: transparent; }
.tick.on { background: var(--ag-ok); border-color: var(--ag-ok); color: #fff; }
.saved-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.saved-list li.hl-y a { border-left: 6px solid var(--hl-y); } .saved-list li.hl-g a { border-left: 6px solid var(--hl-g); } .saved-list li.hl-b a { border-left: 6px solid var(--hl-b); } .saved-list li.hl-p a { border-left: 6px solid var(--hl-p); } .saved-list li.hl-o a { border-left: 6px solid var(--hl-o); }
.more-view, .about-view, .legal-view, .search-view, .plans-view, .saved-view { max-width: 760px; margin: 0 auto; }
.set-sec { padding: 14px 0 18px; border-bottom: 1px solid var(--ag-line); }
.set-h { font-size: 1.05rem; margin: 6px 0 10px; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.lang-btn { min-height: 44px; border-radius: 12px; border: 1px solid var(--ag-line); background: var(--ag-surface); cursor: pointer; display: grid; place-items: center; padding: 4px; }
.lang-btn.on { border-color: var(--ag-accent); color: var(--ag-accent); background: var(--accent-soft); font-weight: 700; }
.lang-btn[disabled] { opacity: .55; cursor: default; }
.lang-btn small { font-size: .68rem; color: var(--ag-muted); }
.row-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--ag-line); background: var(--ag-surface); color: var(--ag-text); text-decoration: none; cursor: pointer; text-align: start; margin-bottom: 6px; }
.dl-list { display: grid; gap: 6px; }
.dl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--ag-line); }
.dl-row .progress { width: 140px; }
.ok { color: var(--ag-ok); display: inline-flex; align-items: center; gap: 4px; }
.lic-list { padding-left: 18px; display: grid; gap: 12px; }
.links { display: grid; margin-top: 8px; }
.ag-india-row { margin-top: 18px; display: flex; justify-content: center; }

/* dialogs, menus, toasts (dom.js) */
.pop-menu-back { position: fixed; inset: 0; z-index: 60; }
.pop-menu { position: fixed; min-width: 200px; max-width: calc(100vw - 16px); background: var(--ag-raised); border: 1px solid var(--ag-line); border-radius: 14px; box-shadow: var(--ag-shadow-2); padding: 6px; display: grid; }
.pop-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; text-align: start; }
.pop-item:hover, .pop-item:focus-visible { background: var(--accent-soft); }
.dlg-back { position: fixed; inset: 0; background: rgba(15, 10, 8, .45); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.dlg { width: min(480px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--ag-raised); border-radius: 22px; box-shadow: var(--ag-shadow-2); border: 1px solid var(--ag-line); }
.dlg.wide { width: min(760px, 100%); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 14px 10px 6px 20px; }
.dlg-head h2 { flex: 1; margin: 0; font-size: 1.12em; }
.dlg-ic { color: var(--ag-accent); display: grid; }
.dlg-body { padding: 6px 20px 16px; overflow-y: auto; }
.dlg-buttons { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px 16px; flex-wrap: wrap; }
.dlg .i { stroke: currentColor; }
@media (max-width: 640px) {
  .dlg-back { place-items: end stretch; padding: 0; }
  .dlg { width: 100%; border-radius: 22px 22px 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); animation: up .22s var(--ag-ease); }
}
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); display: grid; gap: 8px; z-index: 80; width: max-content; max-width: calc(100vw - 32px); }
@media (min-width: 901px) { #toasts { left: auto; right: 24px; transform: none; bottom: 24px; } }
@media (max-width: 900px) { #toasts { bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom)); } }
.toast { background: #2a211c; color: #fff; padding: 11px 16px; border-radius: 14px; box-shadow: var(--ag-shadow-2); font-size: .92em; animation: pop .18s var(--ag-ease); }
.toast.out { opacity: 0; transition: opacity .3s; }
.toast .btn { margin-left: 8px; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(24px); opacity: 0; } } @keyframes pop { from { transform: scale(.96); opacity: 0; } }
.verse-actions { animation-name: upx; } @keyframes upx { from { transform: translate(-50%, 24px); opacity: 0; } }

/* AeroGyan apps switcher (family.js) */
.apps-pop { position: fixed; z-index: 70; width: min(360px, calc(100vw - 16px)); background: var(--ag-raised); border: 1px solid var(--ag-line); border-radius: 18px; box-shadow: var(--ag-shadow-2); padding: 12px; }
.apps-head { display: grid; padding: 4px 6px 10px; } .apps-head small { color: var(--ag-muted); }
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.app-tile { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; text-decoration: none; color: var(--ag-text); text-align: center; font-size: .82rem; }
.app-tile:hover, .app-tile:focus-visible { background: var(--accent-soft); }
.app-tile small { color: var(--ag-muted); font-size: .68rem; line-height: 1.2; }
.app-tile.here { background: var(--accent-soft); }
.app-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; }
.apps-all { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; padding: 8px; border-radius: 10px; text-decoration: none; font-weight: 600; }

/* install sheet (install.js) */
.inst-wrap { display: contents; }
.inst-big { gap: 12px; text-align: left; max-width: 100%; white-space: normal; }
.inst-big .inst-txt { display: grid; line-height: 1.2; }
.inst-big .inst-txt small { font-weight: 500; color: var(--ag-muted); font-size: .8em; }
.inst-done { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inst-ok { color: var(--ag-ok); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.inst-steps { padding-left: 20px; line-height: 1.7; }
.inst-note { color: var(--ag-muted); font-size: .9em; }
.inst-copy-field { position: fixed; opacity: 0; }
.inst-alt { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ag-line); }
.inst-or { margin: 0 0 8px; color: var(--ag-muted); font-size: .88em; font-weight: 600; }
.inst-native { display: flex; flex-wrap: wrap; gap: 8px; }
.inst-native .inst-file { max-width: 100%; white-space: normal; text-align: left; height: auto; padding-top: 6px; padding-bottom: 6px; }
.inst-file { gap: 8px; }
.inst-file small, .inst-meta { color: var(--ag-muted); font-weight: 500; font-size: .84em; }
.inst-all { margin: 12px 0 0; font-size: .92em; }
.inst-sum { font-size: .74em; color: var(--ag-muted); overflow-wrap: anywhere; margin: 10px 0 0; }
.inst-sum code, .inst-steps code { font-size: .92em; background: var(--accent-soft); border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
[aria-busy="true"].inst-big, [aria-busy="true"].inst-btn { opacity: .7; cursor: progress; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { .topbar, .bottom-nav, .listen-fab, .player, .reader-bar, .ch-nav { display: none !important; } .chapter { color: #000; } }
.btn.primary .inst-txt small { color: inherit; opacity: .88; }

/* admin */
.admin { max-width: 1100px; margin: 0 auto; padding: 20px 16px 80px; }
.admin table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin th, .admin td { text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--ag-line); vertical-align: top; }
.admin .grid-art { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.admin .art-cell { display: grid; gap: 4px; font-size: .74rem; border: 1px solid var(--ag-line); border-radius: 10px; padding: 6px; background: var(--ag-surface); }
.admin .art-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.admin .art-cell.hidden-art { opacity: .45; }
.admin .kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.admin .kpi { padding: 12px 14px; border-radius: 14px; background: var(--ag-surface); border: 1px solid var(--ag-line); }
.admin .kpi b { display: block; font-size: 1.4rem; }
.admin code { background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; font-size: .85em; overflow-wrap: anywhere; }
/* scripts without a true italic (Indic, Arabic, Myanmar, Chinese): no fake slant — the IRV's marked phrases get a quiet dotted underline */
.chapter:not(.scr-Latn):not(.scr-Cyrl) .it, .chapter:not(.scr-Latn):not(.scr-Cyrl) .add, .chapter:not(.scr-Latn):not(.scr-Cyrl) .bdit { font-style: normal; }
.chapter:not(.scr-Latn):not(.scr-Cyrl) .it { text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: .3em; }
.home-foot { grid-column: 1 / -1; }
