/* Soundarya Lahari: the app's own styles, on top of tokens.css (Dixith Labs 1.2).
 * Every colour is a token or mixed from one. Verses sit on solid (dark) or milk (light) cards,
 * never behind glass. Glass is for the tab bar, the sidebar, the scrolled header and sheets. */

/* ---------------------------------------------------------------- Indian scripts (6.3)
   Headings: Fraunces for Latin, Noto Serif 700 for Kannada and Devanagari, chosen by range.
   Verses: Noto Serif 400, upright. A browser fetches a file only when its script is on screen. */
@font-face { font-family: 'Fraunces'; src: local('Noto Serif Kannada Bold'), url('fonts/noto-serif-kannada-700.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0C80-0CFF, U+200C-200D, U+25CC; }
@font-face { font-family: 'Fraunces'; src: local('Noto Serif Devanagari Bold'), url('fonts/noto-serif-devanagari-700.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+A8E0-A8FF; }
@font-face { font-family: 'SL Verse'; src: local('Noto Serif Kannada'), url('fonts/noto-serif-kannada-400.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0C80-0CFF, U+200C-200D, U+25CC; }
@font-face { font-family: 'SL Verse'; src: local('Noto Serif Devanagari'), url('fonts/noto-serif-devanagari-400.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+A8E0-A8FF; }
@font-face { font-family: 'SL Verse'; src: local('Noto Serif Kannada Bold'), url('fonts/noto-serif-kannada-700.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0C80-0CFF, U+200C-200D, U+25CC; }
@font-face { font-family: 'SL Verse'; src: local('Noto Serif Devanagari Bold'), url('fonts/noto-serif-devanagari-700.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+A8E0-A8FF; }

:root {
  --verse: 'SL Verse', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --vs: 1;                                 /* reading size, set from Settings */
  --night: #0F1115; --night-2: #16191F; --night-ink: #E9E4DA; --night-ink-2: #A9A397;
  --tab-h: 64px;
  --col: 720px;
}
html[data-size="s"] { --vs: .9; } html[data-size="l"] { --vs: 1.14; } html[data-size="xl"] { --vs: 1.3; }
:lang(kn) { letter-spacing: 0; }

/* Milk cards without their own blur: beside faint colour fields the difference cannot be seen,
   and it keeps an everyday screen to two blurred layers (4.7). */
html:not([data-theme="dark"]):not(.auto-dark) :is(.card-list, .accent-card) { -webkit-backdrop-filter: none; backdrop-filter: none; }
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
html:not([data-theme="dark"]):not(.auto-dark) .card { background: var(--milk); box-shadow: var(--shadow-glass), inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px rgba(20, 22, 30, .05); }

.skip { position: absolute; left: 12px; top: -80px; min-height: 44px; display: inline-flex; align-items: center; z-index: 90; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow-2); }
.skip:focus { top: calc(10px + var(--safe-t)); }

/* ---------------------------------------------------------------- layout */
#view { display: block; max-width: calc(var(--col) + 32px); margin: 0 auto; padding: 0 16px calc(var(--tab-h) + 40px + var(--safe-b)); outline: none; }
.page { animation: enter .32s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.head { position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: calc(14px + var(--safe-t)) 16px 10px; border-bottom: 1px solid transparent; transition: background .2s, border-color .2s, padding .2s; }
body.scrolled .head { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); border-bottom-color: var(--line); }
.head-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.head h1 { font: 700 32px/1.12 var(--display); letter-spacing: -.015em; margin: 6px 0 2px; transition: font-size .2s var(--ease); padding: 2px 0; }
.head h1:lang(kn), :lang(kn) .head h1 { letter-spacing: 0; line-height: 1.3; }
.head .sub { color: var(--ink-2); font-size: 15px; margin: 0; transition: opacity .2s, height .2s; }
body.scrolled .head h1 { font-size: 22px; margin: 0; }
body.scrolled .head .sub { opacity: 0; height: 0; overflow: hidden; }
.head .grow { flex: 1; min-width: 0; }
.head .actions { display: flex; gap: 2px; margin-left: auto; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, var(--accent-2), var(--accent)); color: #fff; flex-shrink: 0; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font: 700 21px/1.2 var(--display); }

/* Bottom tabs (phone) */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; border-top: 1px solid var(--line); padding: 0 8px var(--safe-b); }
.tabs a { flex: 1; max-width: 120px; min-height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-2); font-size: 12px; font-weight: 600; text-decoration: none; border-radius: 14px; transition: color .15s; }
.tabs a svg { width: 25px; height: 25px; }
.tabs a[aria-current="page"] { color: var(--accent-ink); }
.tabs a:active { transform: scale(.96); }

/* Sidebar (900 px and wider) */
.side { display: none; }
@media (min-width: 900px) {
  .tabs { display: none; }
  .side { display: flex; flex-direction: column; gap: 4px; position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); padding: 22px 16px; border-right: 1px solid var(--line); z-index: 30; }
  .side .brand { padding: 4px 8px 18px; }
  .side a.nav { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink); font-weight: 550; font-size: 15px; text-decoration: none; }
  .side a.nav svg { width: 21px; height: 21px; color: var(--ink-2); }
  .side a.nav:hover { background: var(--hover); }
  .side a.nav[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
  .side a.nav[aria-current="page"] svg { color: var(--accent); }
  .side .side-label { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; padding: 18px 12px 6px; }
  .side .side-foot { margin-top: auto; padding: 8px 12px; }
  body { padding-left: var(--side); }
  #view { padding-bottom: 60px; }
  .head { margin: 0 -16px; }
}

/* ---------------------------------------------------------------- common bits */
.section-label { font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; margin: 26px 4px 10px; }
.section-label:lang(kn), :lang(kn) .section-label { text-transform: none; letter-spacing: 0; font-size: 14px; }
.stack { display: grid; gap: 12px; }
.num-tile { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; font: 700 18px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--accent-ink); background: var(--accent-soft); }
.chev { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }
.kn { font-family: var(--verse); }
.flourish { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--accent); margin: 2px 0 14px; }
.flourish::before, .flourish::after { content: ''; height: 1px; width: 56px; background: linear-gradient(90deg, transparent, var(--accent-line)); }
.flourish::after { transform: scaleX(-1); }
.flourish svg { width: 26px; height: 26px; }
.empty { text-align: center; padding: 40px 20px 20px; }
.empty svg.art { width: 120px; height: 120px; color: var(--accent); opacity: .9; }
.empty h2 { font: 700 22px/1.25 var(--display); margin: 10px 0 6px; }
.empty p { color: var(--ink-2); margin: 0 auto; max-width: 34ch; }
.line-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* ---------------------------------------------------------------- home */
.hero { padding: 22px 22px 20px; position: relative; overflow: hidden; }
.hero .eyebrow { color: var(--ink-2); font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.hero .vnum { font: 700 15px/1 var(--display); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.hero .first { font: 400 calc(21px * var(--vs))/1.7 var(--verse); margin: 6px 0 16px; padding: 2px 0; }
.hero .first > span { display: block; }
.hero .btn { width: 100%; }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%); pointer-events: none; }
.today { display: block; padding: 18px 20px; color: var(--ink); text-decoration: none; transition: transform .15s var(--ease); }
.today:hover { text-decoration: none; }
.today:active { transform: scale(.985); }
.today .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.today .top b { font-size: 14px; color: var(--ink-2); }
.today .top span { font: 700 14px/1 var(--display); color: var(--accent-ink); }
.today .lines { font: 400 calc(18px * var(--vs))/1.7 var(--verse); margin: 0 0 10px; padding: 2px 0; }
.today .lines > span { display: block; }
.today .gist { color: var(--ink-2); font-size: 15px; margin: 0; }
.row-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 72px; color: var(--ink); text-decoration: none; transition: transform .15s var(--ease); width: 100%; text-align: left; }
.row-card:hover { text-decoration: none; }
.row-card:active { transform: scale(.985); }
.row-card .txt { flex: 1; min-width: 0; }
.row-card b { display: block; font-size: 16px; font-weight: 650; }
.row-card small { display: block; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.row-card .icon-tile { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.row-card .icon-tile svg { width: 24px; height: 24px; }
.parts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.part { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 132px; color: var(--ink); text-decoration: none; transition: transform .15s var(--ease); }
.part:hover { text-decoration: none; }
.part:active { transform: scale(.98); }
.part .pname { font: 700 19px/1.3 var(--display); padding: 2px 0; }
.part .pnote { color: var(--ink-2); font-size: 14px; }
.part .pfoot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.bar { height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 2px; background: var(--accent); transition: width .6s var(--ease); }
@media (max-width: 360px) { .parts { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- the verse */
.vhead .num { font: 700 32px/1.1 var(--display); letter-spacing: -.015em; }
.vpart { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.script-seg { display: flex; justify-content: center; margin: 6px 0 14px; }
.script-seg .seg button { min-width: 84px; }
.seg button:lang(hi), .seg button.dv { font-family: var(--verse); }
.verse-card { padding: 26px 18px 22px; text-align: center; position: relative; overflow: hidden; }
.verse-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--accent-line), transparent); }
.verse-lines { display: inline-block; text-align: left; max-width: 100%; font-family: var(--verse); font-size: calc(20px * var(--vs)); line-height: 1.75; margin: 0; padding: 2px 0; overflow-wrap: anywhere; }
/* The site's half-line gaps: a run of no-break spaces, kept at its width (a no-break space is
   about a quarter of an em), but free to wrap on a narrow screen. */
.gap { display: inline-block; width: calc(var(--g, 8) * .25em); }
.nw { white-space: nowrap; }
.verse-lines > span { display: block; }
.verse-lines > span + span { margin-top: .15em; }
.verse-lines[data-script="ia"] { font-style: normal; font-size: calc(19px * var(--vs)); line-height: 1.6; }
.verse-lines .vn { color: var(--accent-ink); white-space: nowrap; display: inline; }
details.fold .ftile { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
details.fold .ftile svg { width: 22px; height: 22px; }
.pair { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-2); font-family: var(--verse); font-size: calc(15px * var(--vs)); line-height: 1.65; }
.pair > div { display: inline-block; text-align: left; max-width: 100%; }
.pair > div > span { display: block; }

.block { margin-top: 18px; padding: 18px 20px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.block-head h2 { font: 700 19px/1.3 var(--display); margin: 0; padding: 2px 0; }
.meaning p { margin: 0; font-size: calc(17px * var(--vs)); line-height: 1.65; }
.meaning p:lang(kn) { line-height: 1.8; }
.meaning p + p { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.meaning .lang-tag { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .04em; margin-bottom: 4px; }

details.fold { margin-top: 12px; padding: 0; }
details.fold > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 18px; min-height: 64px; cursor: pointer; border-radius: var(--r-lg); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary:hover { background: var(--hover); }
details.fold > summary .txt { flex: 1; min-width: 0; }
details.fold > summary b { display: block; font: 700 18px/1.3 var(--display); padding: 2px 0; }
details.fold > summary small { color: var(--ink-2); font-size: 14px; }
details.fold > summary .tw { width: 20px; height: 20px; color: var(--ink-2); transition: transform .25s var(--ease); }
details.fold[open] > summary .tw { transform: rotate(180deg); }
details.fold .fold-body { padding: 0 18px 18px; }
details.fold[open] .fold-body { animation: enter .28s var(--ease) both; }

.words { list-style: none; margin: 0; padding: 0; }
.words li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 4px 16px; padding: 11px 2px; border-top: 1px solid var(--line); }
.words li:first-child { border-top: 0; }
.words .w { font-family: var(--verse); font-size: calc(17px * var(--vs)); line-height: 1.6; padding: 2px 0; }
.words .w small { display: block; font-family: var(--font); font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.words .m { font-size: calc(15px * var(--vs)); line-height: 1.55; color: var(--ink); align-self: center; }
.words .m span { display: block; }
.words .m span + span { color: var(--ink-2); margin-top: 2px; }
@media (max-width: 420px) { .words li { grid-template-columns: 1fr; } .words .m { align-self: start; } }

.note { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 7%, transparent); box-shadow: inset 0 0 0 1px var(--accent-line); font-size: 14px; line-height: 1.55; color: var(--ink); margin-bottom: 14px; }
.note svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.note b { display: block; margin-bottom: 2px; }
.prac { margin: 0; }
.prac > div { display: grid; grid-template-columns: minmax(96px, .8fr) 2fr; gap: 4px 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.prac > div:first-child { border-top: 0; }
.prac dt { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.prac dd { margin: 0; font-size: calc(15px * var(--vs)); line-height: 1.55; }
.prac dd .alt { display: block; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.prac dd span + span:not(.alt) { display: block; color: var(--ink-2); }
@media (max-width: 420px) { .prac > div { grid-template-columns: 1fr; } }
.yantra { margin: 10px 0 2px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.yantra svg { width: min(240px, 100%); height: auto; border-radius: 14px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); box-shadow: inset 0 0 0 1px var(--line); }
.yantra .s { fill: none; stroke: var(--yantra); stroke-linecap: round; stroke-linejoin: round; }
.yantra .sp { fill: color-mix(in srgb, var(--accent) 5%, var(--surface)); stroke: var(--yantra); }
.yantra .p { fill: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.yantra .f { fill: var(--yantra); }
.yantra .t { fill: var(--ink); font-family: var(--verse); }
.yantra figcaption { font-size: 13px; color: var(--ink-2); text-align: center; }
:root { --yantra: #8D1F1A; }
:root[data-theme="dark"], :root.auto-dark { --yantra: #E48A73; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; min-height: 72px; color: var(--ink); text-decoration: none; transition: transform .15s var(--ease); }
.pager a:hover { text-decoration: none; }
.pager a:active { transform: scale(.98); }
.pager a.next { text-align: right; align-items: flex-end; }
.pager small { color: var(--accent-ink); font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.pager small svg { width: 16px; height: 16px; }
.pager span { font-family: var(--verse); font-size: 16px; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; padding: 2px 0; }
.pager .ghost-cell { visibility: hidden; }
.swipe-out-l { animation: outl .16s var(--ease) both; } .swipe-out-r { animation: outr .16s var(--ease) both; }
.swipe-in-l { animation: inl .26s var(--ease) both; } .swipe-in-r { animation: inr .26s var(--ease) both; }
@keyframes outl { to { opacity: 0; transform: translateX(-24px); } } @keyframes outr { to { opacity: 0; transform: translateX(24px); } }
@keyframes inl { from { opacity: 0; transform: translateX(24px); } } @keyframes inr { from { opacity: 0; transform: translateX(-24px); } }

.icon-btn.on { color: var(--accent); }
.icon-btn.on svg path { fill: currentColor; }

/* ---------------------------------------------------------------- list */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 4px -2px 0; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters .chip { flex-shrink: 0; }
.part-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 4px 8px; }
.part-head h2 { font: 700 20px/1.3 var(--display); margin: 0; padding: 2px 0; }
.part-head span { color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.vlist { list-style: none; margin: 0; padding: 0; }
.vlist a { display: flex; align-items: center; gap: 14px; padding: 10px 8px; min-height: 64px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.vlist a:hover { background: var(--hover); text-decoration: none; }
.vlist a:active { background: var(--press); }
.vlist li + li a { box-shadow: 0 -1px 0 var(--line); }
.vlist .txt { flex: 1; min-width: 0; }
.vlist .t1 { display: block; font-family: var(--verse); font-size: 17px; line-height: 1.6; padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlist .t2 { display: block; font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlist .marks { display: flex; align-items: center; gap: 6px; }
.vlist .marks svg { width: 18px; height: 18px; color: var(--accent); }
.vlist .num-tile.seen { background: transparent; box-shadow: inset 0 0 0 1px var(--accent-line); }
.vlist .num-tile.unseen { background: var(--bg-2); color: var(--ink-2); }

/* ---------------------------------------------------------------- search */
.search-box { position: relative; margin: 6px 0 4px; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-2); pointer-events: none; }
.search-box .field { padding-left: 44px; padding-right: 48px; min-height: 52px; border-radius: 16px; font-size: 17px; }
.search-box .clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.count-line { color: var(--ink-2); font-size: 14px; font-weight: 600; margin: 12px 4px 4px; }
.hits { list-style: none; margin: 0; padding: 0; }
.hits a { display: flex; gap: 14px; padding: 12px 8px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.hits a:hover { background: var(--hover); text-decoration: none; }
.hits li + li a { box-shadow: 0 -1px 0 var(--line); }
.hits .txt { flex: 1; min-width: 0; }
.hits .t1 { display: block; font-family: var(--verse); font-size: 16px; line-height: 1.6; padding: 2px 0; }
.hits .snip { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.55; margin-top: 2px; }
.hits .snip.kn { font-family: var(--font); }
mark { background: color-mix(in srgb, var(--accent) 20%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.tries { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }

/* ---------------------------------------------------------------- settings */
.set-row .seg { flex-shrink: 0; }
.set-row.stack-row { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 18px 14px; }
.set-row.stack-row .seg { display: flex; }
.set-row.stack-row .seg button { flex: 1; }
.about-card { padding: 18px 20px; }
.about-card p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; }
.about-card p:last-child { margin-bottom: 0; }
.about-card .fine { margin-top: 12px; }
.about-card a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.set-row.toggle input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.set-row.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .22s var(--ease); }
.set-row.toggle input:checked { background: var(--accent); }
.set-row.toggle input:checked::after { transform: translateX(18px); }
.set-row.toggle { cursor: pointer; }

/* ---------------------------------------------------------------- welcome */
.welcome { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; justify-content: center; max-width: 460px; margin: 0 auto; padding: calc(28px + var(--safe-t)) 4px 28px; }
.welcome-art { width: 104px; height: 104px; margin: 0 0 22px; filter: drop-shadow(0 14px 24px color-mix(in srgb, var(--accent) 34%, transparent)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-5px); } }
.welcome h1 { font: 700 46px/1.05 var(--display); letter-spacing: -.02em; margin: 0 0 4px; }
.welcome .alt { font: 700 22px/1.4 var(--display); color: var(--ink-2); margin: 0 0 14px; padding: 2px 0; }
.welcome .lede { font-size: 19px; color: var(--ink-2); margin: 0 0 22px; line-height: 1.45; }
.points { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 14px; }
.points li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
.points .tile { width: 34px; height: 34px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.points .tile svg { width: 20px; height: 20px; }
.welcome .lang-pick { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.welcome .pick-label { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; }
.welcome .seg { display: flex; }
.welcome .seg button { flex: 1; min-height: 44px; }
.welcome .fine { text-align: center; }

/* ---------------------------------------------------------------- continuous reading: a night surface (4.6) */
.night { position: fixed; inset: 0; z-index: 70; background: var(--night); color: var(--night-ink); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.night-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 6px; padding: calc(8px + var(--safe-t)) 10px 8px; background: linear-gradient(180deg, var(--night) 70%, transparent); transition: opacity .3s; }
.night-bar .title { flex: 1; min-width: 0; font: 700 17px/1.3 var(--display); color: var(--night-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 0; }
.night .icon-btn { color: var(--night-ink-2); }
.night .icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--night-ink); }
.night .ntoggle { min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--night-ink-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.night .ntoggle[aria-pressed="true"] { color: var(--night-ink); background: rgba(255, 255, 255, .08); }
.night-body { max-width: 680px; margin: 0 auto; padding: 8px 22px calc(60px + var(--safe-b)); }
.nv { padding: 34px 0; text-align: center; border-top: 1px solid rgba(255, 255, 255, .06); scroll-margin-top: 60px; }
.nv:first-child { border-top: 0; }
.nv .nnum { font: 700 14px/1 var(--display); color: color-mix(in srgb, var(--accent) 70%, var(--night-ink-2)); letter-spacing: .08em; margin-bottom: 14px; }
.nv .verse-lines { font-size: calc(21px * var(--vs)); line-height: 1.8; }
.nv .verse-lines .vn { color: var(--night-ink-2); }
.nv .nmean { margin: 16px auto 0; max-width: 56ch; color: var(--night-ink-2); font-size: calc(16px * var(--vs)); line-height: 1.7; text-align: left; }
.npart { text-align: center; padding: 30px 0 6px; font: 700 22px/1.4 var(--display); color: var(--night-ink); }
.npart small { display: block; font: 400 14px/1.4 var(--font); color: var(--night-ink-2); margin-top: 4px; }
.nend { text-align: center; padding: 40px 0 10px; color: var(--night-ink-2); }
.nend .btn { margin-top: 14px; color: var(--night-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.night.dim .night-body, .night.dim .night-bar .title { opacity: .52; }
.night.dim .night-bar { opacity: .4; }
.night.dim .night-bar:hover, .night.dim .night-bar:focus-within { opacity: 1; }
.night .flourish { color: color-mix(in srgb, var(--accent) 70%, var(--night-ink-2)); }
.night .flourish::before, .night .flourish::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16)); }
body.night-open { overflow: hidden; }
body.night-open .tabs, body.night-open .side { visibility: hidden; }

/* ---------------------------------------------------------------- loading */
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--ink-2); }
.loading svg { width: 64px; height: 64px; color: var(--accent); animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .5; transform: scale(.96); } }

@media (pointer: coarse) {
  .seg button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-art, .loading svg { animation: none; }
}
@media print {
  .tabs, .side, .head .actions, .pager, .script-seg, .skip { display: none !important; }
  body { padding-left: 0; }
}

/* Search: one clear button, ours. */
.search-box input::-webkit-search-cancel-button, .search-box input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
/* Wider screens: the verse can breathe. */
@media (min-width: 700px) {
  .verse-card { padding: 34px 28px 28px; }
  .verse-lines { font-size: calc(23px * var(--vs)); }
  .verse-lines[data-script="ia"] { font-size: calc(21px * var(--vs)); }
  .nv .verse-lines { font-size: calc(24px * var(--vs)); }
}
@media (max-width: 400px) {
  .verse-lines { font-size: calc(18.5px * var(--vs)); }
  .nv .verse-lines { font-size: calc(19px * var(--vs)); }
  .hero .first { font-size: calc(19px * var(--vs)); }
  .verse-card { padding-left: 12px; padding-right: 12px; }
}

/* ---------------------------------------------------------------- my note and account (1.1) */
.mynote .block-head { margin-bottom: 8px; }
.note-lock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.note-lock svg { width: 15px; height: 15px; }
.note-field {
  display: block; width: 100%; min-height: 96px; max-height: 60vh; padding: 12px 14px; margin: 0;
  font: 400 16px/1.6 var(--font, inherit); color: var(--ink); resize: vertical;
  background: var(--surface); border: 1px solid var(--line-2, var(--line)); border-radius: 13px;
  -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s;
}
.note-field:lang(kn) { font-family: var(--verse, inherit); }
.note-field::placeholder { color: var(--ink-3); }
.note-field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.note-status { margin: 8px 2px 0; font-size: 13px; color: var(--ink-2); min-height: 18px; }
.note-status a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.vlist .t2.mine { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--ink); font-style: italic; }
.vlist .marks { padding-left: 4px; }
.acct-slot { margin-top: 18px; }
.acct-slot:empty { display: none; }
.set-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 14px 16px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.set-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.signin-page { max-width: 460px; margin: 8px auto 0; }
.signin-page .dxa-signin { max-width: 460px; margin: 0 auto; }
.dxa-fine a, .set-note a { text-decoration: underline; text-underline-offset: 2px; }
