@font-face { font-family: Heebo; src: url(../fonts/heebo-hebrew.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Heebo; src: url(../fonts/heebo-latin.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2022, U+2026, U+20AC; }
@font-face { font-family: Frank; src: url(../fonts/frank-hebrew.woff2) format('woff2'); font-weight: 300 900; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }

:root {
  --bg: #f1f4f8; --card: #ffffff; --ink: #1c2430; --muted: #5c6777; --line: #e0e5ed;
  --navy: #16304f; --navy2: #24507f; --gold: #2d6bb4; --gold-ink: #24507f; --accent-soft: #dbe7f6; --green: #23805a; --green-bg: #e4f3ea; --red: #b3412e;
  --r: 18px; --shadow: 0 1px 2px rgba(22, 48, 79, .06), 0 6px 18px rgba(22, 48, 79, .07);
  --sans: Heebo, system-ui, "Segoe UI", Arial, sans-serif; --serif: Frank, "Frank Ruehl CLM", "David", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --bg: #0f141b; --card: #182029; --ink: #ebe6dc; --muted: #a3acb7; --line: #2a3440; --navy: #a9c8ee; --navy2: #6f9fd6; --gold: #5b9be0; --gold-ink: #8cbcf0; --accent-soft: #1d3550; --green: #4fbf8c; --green-bg: #17302a; --red: #ec8a76; --shadow: none; } }
:root[data-theme=dark] { --bg: #0f141b; --card: #182029; --ink: #ebe6dc; --muted: #a3acb7; --line: #2a3440; --navy: #a9c8ee; --navy2: #6f9fd6; --gold: #5b9be0; --gold-ink: #8cbcf0; --accent-soft: #1d3550; --green: #4fbf8c; --green-bg: #17302a; --red: #ec8a76; --shadow: none; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
body.reading { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; top: -60px; right: 12px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 10px; }
main { max-width: 640px; margin: 0 auto; padding: 0 14px; outline: none; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.small { font-size: 12px; }
.title { font-size: 26px; margin: calc(18px + env(safe-area-inset-top)) 4px 14px; color: var(--navy); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* hero */
.hero { margin: 0 -14px 16px; padding: calc(14px + env(safe-area-inset-top)) 16px 18px; color: #fff; border-radius: 0 0 28px 28px;
  background: radial-gradient(85% 75% at 92% 0%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 62%), linear-gradient(165deg, #3a7fcb 0%, #2560a6 50%, #1c4b87 100%); position: relative; overflow: hidden; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .hero { background: radial-gradient(85% 75% at 92% 0%, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 62%), linear-gradient(165deg, #2a609e, #1c4577 50%, #15365c); } }
:root[data-theme=dark] .hero { background: radial-gradient(85% 75% at 92% 0%, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 62%), linear-gradient(165deg, #2a609e, #1c4577 50%, #15365c); }
@media (min-width: 668px) { .hero { margin: 12px 0 16px; border-radius: 28px; } }
.daybar { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 1; }
.daybar .date { text-align: center; display: flex; flex-direction: column; align-items: center; }
.daybar h1 { font-size: 26px; margin: 0; font-weight: 800; letter-spacing: .2px; }
.daybar small { opacity: .8; font-size: 14px; }
.nav-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); font-size: 26px; line-height: 1; color: #fff; }
.summary { display: flex; align-items: center; gap: 14px; margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, .2); padding: 14px 2px 0; position: relative; z-index: 1; }
.summary > div:nth-child(2) { flex: 1; }
.summary b { display: block; font-size: 17px; }
.summary small { opacity: .85; }
.ring { --p: 0; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p) * 360deg), rgba(255, 255, 255, .22) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); }
.ring span { position: relative; font-weight: 800; font-size: 15px; }
.welcome { text-align: center; padding-top: calc(36px + env(safe-area-inset-top)); padding-bottom: 28px; }
.welcome img { border-radius: 18px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.welcome h1 { margin: 14px 0 6px; font-size: 26px; }
.welcome p { margin: 0; opacity: .85; }
.onb { padding-bottom: 20px; }

/* study tile */
.tile { --c: #3d6bb3; flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c)); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); letter-spacing: -.2px; }

/* cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 10px 10px 12px; box-shadow: var(--shadow); transition: background .2s, border-color .2s, transform .1s; }
.card.done { background: color-mix(in srgb, var(--green) 7%, var(--card)); border-color: color-mix(in srgb, var(--green) 45%, transparent); box-shadow: 0 1px 2px rgba(35, 128, 90, .08), 0 6px 16px rgba(35, 128, 90, .10); }
.card.off { opacity: .6; box-shadow: none; padding: 12px; }
.card .open { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; background: none; border: 0; padding: 2px; text-align: start; border-radius: 12px; }
.card .open:active { transform: scale(.99); }
.info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.info .h3, .card h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0; }
.portion { font-size: 17px; font-weight: 700; color: var(--ink); }
.sub { font-size: 14px; color: var(--muted); }
.card.done .portion { color: var(--green); }
.meter { display: block; height: 5px; background: var(--line); border-radius: 9px; overflow: hidden; margin-top: 6px; max-width: 180px; }
.meter i { display: block; height: 100%; background: var(--gold); border-radius: 9px; }
.card.done .meter i { background: var(--green); }

.check { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: inline-grid; place-items: center; padding: 0; transition: transform .12s, background .15s; }
.check svg { width: 22px; height: 22px; fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check:active { transform: scale(.9); }
.check:hover svg { stroke: var(--line); }
.check.on { background: var(--green); border-color: var(--green); }
.check.on svg { stroke: #fff; }
.check.part { border-color: var(--gold); border-style: dashed; }
.check.sm { width: 30px; height: 30px; }
.check.sm svg { width: 17px; height: 17px; }

/* backlog */
.behind { margin-top: 26px; }
.behind h2 { font-size: 20px; margin: 0 4px 2px; color: var(--navy); }
.behind > .muted { margin: 0 4px 10px; }
.bgroup { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; }
.bhead { display: flex; align-items: center; gap: 10px; }
.bhead .tile { width: 34px; height: 34px; border-radius: 10px; font-size: 10px; }
.bhead b { flex: 1; }
.pill { background: var(--gold); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 9px; font-weight: 700; }
.bgroup ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.bgroup li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.blink { background: none; border: 0; padding: 6px 0; text-align: start; flex: 1; }
.blink:hover { color: var(--navy2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 16px; font-weight: 600; color: var(--navy); text-decoration: none; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .btn.primary { color: #0f141b; } }
:root[data-theme=dark] .btn.primary { color: #0f141b; }
.btn.wide { width: 100%; padding: 14px; font-size: 17px; }
.onb .btn.wide { margin-top: 14px; }
.btn.tiny { padding: 4px 12px; font-size: 13px; border-radius: 999px; }
.btn.ghost { background: transparent; }
.btn.light { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn.danger { color: var(--red); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* pickers */
.pick { display: grid; gap: 8px; }
.pickrow { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; cursor: pointer; position: relative; }
.panel .pickrow { background: var(--bg); }
.pickrow input { position: absolute; opacity: 0; pointer-events: none; }
.ptext { flex: 1; }
.pickrow .box { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; background: var(--card); }
.pickrow .box svg { width: 18px; height: 18px; fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pickrow:has(input:checked) { border-color: color-mix(in srgb, var(--navy2) 45%, var(--line)); }
.pickrow input:checked ~ .box { background: var(--navy); border-color: var(--navy); }
.pickrow input:checked ~ .box svg { stroke: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .pickrow input:checked ~ .box svg { stroke: #0f141b; } }
:root[data-theme=dark] .pickrow input:checked ~ .box svg { stroke: #0f141b; }
.pickrow:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.pickrow b { display: block; font-size: 16px; font-weight: 600; }
.pickrow small { color: var(--muted); display: block; font-size: 13px; }
.pickrow .note { color: var(--gold-ink); }

/* panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 12px; font-size: 17px; color: var(--navy); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 8px 6px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.seg button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.seg button.on { background: var(--card); color: var(--navy); box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 0 0 1px var(--line); }
.promo { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 12px 4px; border-top: 1px solid var(--line); }
.promo:first-of-type { border-top: 0; }
.promo img { border-radius: 12px; flex: none; }
.promo b { display: block; font-size: 16px; }
.promo small { color: var(--muted); font-size: 13px; }
.promo > span:nth-of-type(1) { flex: 1; }
.promo .go { color: var(--muted); font-size: 22px; }
.promo:hover b { color: var(--navy2); }
.legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 18px 0 6px; font-size: 14px; }
.legal a { color: var(--navy2); }

/* tracking */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 6px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 28px; color: var(--navy); line-height: 1.2; font-weight: 800; }
.stat small { color: var(--muted); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wd { text-align: center; color: var(--muted); font-size: 12px; }
.cell { aspect-ratio: 1; border-radius: 9px; border: 0; padding: 0; font-size: 12px; display: grid; place-items: center; background: var(--bg); color: var(--muted); }
.cell.pad { background: transparent; }
.cell.fut { background: transparent; opacity: .45; }
.mname { font-size: 15px; color: var(--navy); margin: 10px 2px 6px; }
.months2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); column-gap: 28px; }
.months2 .cell { aspect-ratio: 1.45; }
.months2 .grid { gap: 4px; }
.cell.none { background: transparent; border: 1px dashed var(--line); }
.cell.l0 { background: var(--card); border: 1px solid var(--line); }
.cell.l2 { background: var(--accent-soft); color: var(--navy); font-weight: 600; }
.cell.l3 { background: var(--gold); color: #fff; font-weight: 700; }
.cell.now { outline: 2px solid var(--gold); outline-offset: 2px; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.legend .cell { width: 14px; height: 14px; aspect-ratio: auto; border-radius: 4px; margin-inline-start: 8px; }
.bar { display: grid; grid-template-columns: 30px 8.5em 1fr 3em; align-items: center; gap: 10px; font-size: 14px; margin: 8px 0; }
.bar .tile { width: 30px; height: 30px; border-radius: 9px; font-size: 9px; }
.bar .track { height: 8px; background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 99px; overflow: hidden; }
.bar .track i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.bar small { color: var(--muted); text-align: left; font-variant-numeric: tabular-nums; }

/* reader */
.reader { position: fixed; inset: 0; z-index: 20; background: var(--card); display: flex; flex-direction: column; }
.reader[hidden] { display: none; }
.rhead { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; border-bottom: 1px solid var(--line); background: var(--card); }
.rtitle { flex: 1; min-width: 0; }
.rtitle small { color: var(--muted); font-size: 12px; }
.rtitle h2 { margin: 0; font-size: 17px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon { flex: none; min-width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-weight: 700; font-size: 15px; color: var(--navy); padding: 0 8px; }
.ropts { display: flex; gap: 18px; padding: 8px 16px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); }
.ropts label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.ropts input { width: 18px; height: 18px; accent-color: var(--navy); }
.rbody { flex: 1; overflow-y: auto; padding: 8px 18px 30px; outline: none; -webkit-overflow-scrolling: touch; }
.rbody > * { max-width: 720px; margin-inline: auto; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }
.rpart { padding-top: 6px; }
.rpart + .rpart { border-top: 1px dashed var(--line); margin-top: 18px; }
.rpart h3 { font-size: 15px; color: var(--gold-ink); margin: 14px 0 6px; font-weight: 700; }
.text { font-family: var(--serif); font-size: var(--fs, 21px); line-height: 1.8; }
.text p { margin: 0 0 .55em; }
.text h4 { font-family: var(--sans); font-size: .75em; color: var(--navy); margin: 1.1em 0 .4em; }
.text .vn { font-family: var(--sans); font-size: .55em; color: var(--gold-ink); font-weight: 700; margin-inline-end: .35em; vertical-align: .45em; }
.text .hn { font-family: var(--sans); font-size: .6em; color: var(--gold-ink); margin-inline-end: .2em; }
.text .pm { font-family: var(--sans); font-size: .55em; color: var(--muted); margin-inline: .3em; }
.text big { font-size: 1.25em; }
.text small { font-size: .8em; color: var(--muted); }
.verse { margin-bottom: .2em; }
.rashi { font-size: .78em; line-height: 1.65; background: var(--bg); border-radius: 12px; padding: .5em .8em; margin: .2em 0 .9em; color: var(--ink); }
.rashi p { margin: 0 0 .35em; }
.rashi .rl { font-family: var(--sans); font-size: .7em; font-weight: 800; color: var(--gold-ink); display: block; }
.chumash .chap { text-align: center; }
.text .note { font-family: var(--sans); font-size: .7em; color: var(--muted); }
.err { font-family: var(--sans); color: var(--red); font-size: 15px; }
.pdone { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-weight: 600; color: var(--navy); }
.pdone.on { background: color-mix(in srgb, var(--green) 8%, var(--card)); color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.rfoot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.rfoot .btn { max-width: 640px; margin: 0 auto; display: flex; }

/* nav */
.nav { position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; justify-content: center; gap: 4px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.nav[hidden] { display: none; }
.tab { flex: 1; max-width: 160px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); padding: 6px 4px; border-radius: 14px; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: var(--navy); font-weight: 700; background: color-mix(in srgb, var(--navy2) 10%, transparent); }

.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 30; width: max-content; max-width: min(92vw, 520px); text-align: center; line-height: 1.4; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* icons and arrows: drawn for LTR, mirrored in RTL so "back" always points to where you came from */
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: block; }
[dir=rtl] .ic.dir { transform: scaleX(-1); }
.nav-arrow { display: grid; place-items: center; }
.icon .ic { margin: 0 auto; }
.promo .go .ic, .blink .go .ic { width: 18px; height: 18px; }
.blink { display: flex; align-items: center; gap: 4px; }
.blink .go { margin-inline-start: auto; color: var(--muted); }
.promo .go { display: grid; place-items: center; }

/* halacha marks: a light (ghost) check before each halacha */
.hal { position: relative; }
.hcheck { width: 1.25em; height: 1.25em; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); background: transparent;
  display: inline-grid; place-items: center; padding: 0; margin-inline-start: .25em; vertical-align: -.2em; opacity: .55; transition: opacity .15s, background .15s; }
.hcheck svg { width: 70%; height: 70%; fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hcheck:hover, .hcheck:focus-visible { opacity: 1; }
.hcheck.on { opacity: 1; background: var(--green); border: 1.5px solid var(--green); }
.hcheck.on svg { stroke: #fff; }
.hal.hdone { color: color-mix(in srgb, var(--ink) 62%, transparent); }

/* install banner */
.install { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); border-radius: var(--r); padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.install img { border-radius: 12px; flex: none; }
.install > div:nth-of-type(1) { flex: 1; }
.install b { display: block; }
.install small { color: var(--muted); font-size: 13px; }
.ibtns { display: flex; flex-direction: column; gap: 6px; }
.install.manual { display: grid; gap: 10px; }
.ihead { display: flex; align-items: center; gap: 12px; }
.install.manual > .btn { justify-self: end; }
.isteps { display: grid; gap: 8px; margin: 0; padding-inline-start: 22px; list-style: decimal; font-size: 15px; }
.isteps svg { width: 20px; height: 20px; vertical-align: -4px; margin-inline-start: 6px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.isteps svg circle { fill: var(--gold); stroke: none; }
.isteps small { display: block; color: var(--muted); font-size: 13px; }

/* onboarding language switch */
.onb-lang { position: relative; z-index: 1; max-width: 220px; margin: 0 auto 18px; }
.onb-lang .seg { background: rgba(255, 255, 255, .12); }
.onb-lang .seg button { color: #fff; }
.onb-lang .seg button.on { background: #fff; color: #16304f; }

/* calendar in Hebrew dates */
.months { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.cell { font-size: 11px; }

.tab span { display: block; }

/* walk mode: one paragraph at a time, big text, big buttons */
.icon.on { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .icon.on { color: #0f141b; } }
:root[data-theme=dark] .icon.on { color: #0f141b; }
.reader.walk .text { font-size: calc(var(--fs, 21px) + 5px); line-height: 1.9; font-weight: 500; }
.reader.walk .text p { opacity: .28; transition: opacity .2s; border-radius: 10px; }
.reader.walk .text p.cur { opacity: 1; background: color-mix(in srgb, var(--gold) 13%, transparent); box-shadow: 0 0 0 .35em color-mix(in srgb, var(--gold) 13%, transparent); }
.reader.walk .rashi { background: transparent; }
.reader.walk .rbody { padding-bottom: 45vh; padding-top: 30vh; cursor: pointer; }
.walkbar { display: flex; gap: 8px; margin: 0 auto 8px; max-width: 640px; }
.walkbar[hidden] { display: none; }
.wb { flex: 1; height: 56px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); color: var(--navy); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 17px; }
.wb .ic { width: 28px; height: 28px; }
.wb.speak { flex: 1.6; }
.wb.speak.on { background: var(--gold); border-color: var(--gold); color: #fff; }

/* personal Tehillim */
.card.setup { border-style: dashed; }
.card.setup .go { color: var(--muted); display: grid; place-items: center; }
.pname { flex: 1; min-width: 0; }
.pname b { display: block; }
.pname small { color: var(--muted); font-size: 13px; }
.pch { font-weight: 800; color: var(--navy); white-space: nowrap; }
.pform { display: grid; gap: 12px; background: var(--bg); border-radius: 14px; padding: 12px; }
.fl { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pform input, .pform select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; min-height: 44px; }
.hsel { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hsel select { flex: 1; min-width: 0; }
/* day narrow, month wide enough for its full name; the year wraps to its own line when the row is too narrow */
.hsel #pd { flex: 0 0 5.5em; }
.hsel #pm { flex: 1 1 8.5em; }
.hsel #py { flex: 1 1 9.5em; }
.civil summary { cursor: pointer; color: var(--navy2); font-size: 14px; }
.civil .hsel { margin-top: 8px; }
.pmode { margin-bottom: 8px; }
.pmode button { padding: 7px 4px; font-size: 13.5px; }
.agefl { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-weight: 500; color: var(--ink); }
.agefl input { width: 4.5em; text-align: center; }
.presult { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--navy); font-weight: 600; font-size: 15px; }
.presult:empty { display: none; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.chk input { min-height: 0; width: 18px; height: 18px; }
.ropts span { font-weight: 600; }
.comm .rl { color: var(--navy2); }

/* share */
.summary .share { flex: none; }
.icon.light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn.wa .ic { width: 20px; height: 20px; }
#voice .hsel { margin-bottom: 8px; }
#voice select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; min-height: 44px; }
#voice #vsel { flex: 1 1 100%; }
#voice #vrate { flex: 1; }
.daybar .date .btn { margin-top: 8px; }

#daystart .seg button { font-size: 14px; padding: 9px 4px; }
.locrow { margin: 10px 0 6px; }
.locrow select { flex: 1; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; min-height: 44px; }

/* new version bar */
.update { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; background: var(--ink); color: var(--bg); padding: 8px 8px 8px 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.25); white-space: nowrap; }
[dir=rtl] .update { padding: 8px 16px 8px 8px; }
.update .btn.primary { background: var(--gold); border-color: var(--gold); color: #1c2430; }

/* halacha: check at the end, long press to mark, flash on the next one */
.text .hal { scroll-margin-top: 14px; }
@media (pointer: coarse) { .text .hal { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }
.hcheck { width: 1.45em; height: 1.45em; }
@keyframes halflash { from { background: color-mix(in srgb, var(--gold) 28%, transparent); } to { background: transparent; } }
.text .hal.flash { animation: halflash 1.4s ease-out; border-radius: 8px; }

/* reading progress */
.rprog { height: 4px; background: var(--line); flex: none; }
.rprog i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s; }
[dir=rtl] .rprog i { margin-inline-start: 0; }
.rprog.full i { background: var(--green); }

/* reader header: five buttons, keep room for the title */
.rhead { gap: 4px; }
.rhead .icon { min-width: 38px; height: 38px; padding: 0 6px; font-size: 14px; border-radius: 11px; }
.rhead .icon .ic { width: 20px; height: 20px; }
.rtitle h2 { font-size: 16px; }

/* Google sign-in */
.btn.signin { gap: 10px; }
.gic { width: 20px; height: 20px; flex: none; }
.onb-signin { margin-top: 16px; position: relative; z-index: 1; font-size: 14px; padding: 8px 14px; }
.onb-signin .gic { background: #fff; border-radius: 50%; padding: 2px; width: 22px; height: 22px; }

:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }



/* settings */
.sec { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; margin: 22px 6px 8px; }
.title + .sec { margin-top: 4px; }
.rl { margin: 0 0 12px; font-size: 17px; font-weight: 800; color: var(--navy); }
.row .rl { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.panel.rows { padding: 4px 16px; }
.panel.rows > .row, .panel.rows > .lrow { padding: 14px 0; border-top: 1px solid var(--line); }
.panel.rows > :first-child { border-top: 0; }
.row .muted { margin: 8px 0 0; font-size: 14px; }
.row .btns { margin: 0; }
.btns.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn .plus, .chip .plus { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed color-mix(in srgb, var(--gold) 70%, transparent); background: transparent; color: var(--gold-ink);
  border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; text-align: start; color: inherit; text-decoration: none; font: inherit; cursor: pointer; }
.lrow .lt { flex: 1; display: grid; }
.lrow .lt b { font-size: 15px; color: var(--navy); }
.lrow .lt small { font-size: 13px; color: var(--muted); }
.lrow .go { color: var(--muted); display: grid; place-items: center; }
.lrow .go .ic { width: 18px; height: 18px; }
.lic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.lic.wa { background: #25d366; color: #fff; }
.lic .ic { width: 20px; height: 20px; }
.panel .pick { gap: 0; }
.panel .pickrow { background: none; border: 0; border-radius: 0; padding: 10px 2px; border-top: 1px solid var(--line); }
.panel .pickrow:first-child { border-top: 0; padding-top: 4px; }
.panel .pickrow:last-child { padding-bottom: 2px; }
.panel .pickrow:has(input:checked) { border-color: var(--line); }
.panel .pickrow:has(input:focus-visible) { outline-offset: -2px; border-radius: 10px; }
.panel .pickrow .tile { width: 40px; height: 40px; border-radius: 12px; font-size: 11px; }

/* dedication: one serif face, like the dedication page of a sefer */
.dedic { display: grid; justify-items: center; gap: 4px; text-align: center; margin: 30px auto 8px; padding: 18px 8px; max-width: 380px; font-family: var(--serif); color: var(--ink);
  border-top: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); }
.dedic small, .dedic .z, .dedic .orn { font-size: 17px; font-weight: 400; color: var(--muted); }
.dedic b { font-size: 26px; font-weight: 700; line-height: 1.3; color: var(--navy); }
.dedic .f { font-size: 19px; }
.dedic .orn { margin-top: 6px; }
.hero .dedic, .splash .dedic { color: rgba(255, 255, 255, .92); border-color: rgba(217, 180, 93, .5); margin: 18px auto 4px; position: relative; z-index: 1; }
.hero .dedic b, .splash .dedic b { color: #fff; }
.hero .dedic small, .hero .dedic .z, .hero .dedic .orn, .splash .dedic small, .splash .dedic .z, .splash .dedic .orn { color: rgba(255, 255, 255, .78); }
.splash .dedic { gap: 8px; padding: 26px 6px; }
.splash .dedic small, .splash .dedic .z, .splash .dedic .orn { font-size: clamp(19px, 6vw, 23px); }
.splash .dedic b { font-size: clamp(32px, 10.5vw, 44px); }
.splash .dedic .f { font-size: clamp(20px, 6.2vw, 27px); }

/* launch screen */
.splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px;
  padding: calc(24px + env(safe-area-inset-top)) 28px calc(24px + env(safe-area-inset-bottom)); color: #fff; background: radial-gradient(90% 60% at 90% 0%, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, 0) 60%), linear-gradient(170deg, #3a7fcb 0%, #2560a6 50%, #1c4b87 100%); transition: opacity .5s ease; }
.splash .sbrand { display: grid; justify-items: center; gap: 14px; }
.splash img { border-radius: 22px; }
.splash .sname { font-family: var(--serif); font-size: 34px; font-weight: 700; opacity: .95; }
.splash .dedic { width: min(100%, 460px); margin: 0; }
.splash.out { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .splash { transition: none; } }
:root[data-theme=dark] .seg button.on { background: #263240; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .seg button.on { background: #263240; } }

/* share a passage */
.text .vn, .text .hn { cursor: pointer; padding: 2px 3px; border-radius: 6px; }
.text .vn:hover, .text .hn:hover { background: color-mix(in srgb, var(--gold) 18%, transparent); }
.text .shared { background: color-mix(in srgb, var(--gold) 16%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 16%, transparent); border-radius: 6px; transition: background 2s, box-shadow 2s; }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(10, 18, 30, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-card { width: min(100%, 560px); background: var(--card); color: var(--ink); border-radius: 22px 22px 0 0; padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0, 0, 0, .2); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: 17px; color: var(--navy); }
.sheet-head .icon { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; padding: 0; }
.sheet-head .icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.sheet blockquote { margin: 0; padding: 14px 16px; font-family: var(--serif); font-size: 19px; line-height: 1.7; background: var(--bg); border: 0; border-radius: 14px;
  max-height: 34vh; overflow: auto; }
.sheet-src { margin: 10px 2px 14px; font-size: 13px; color: var(--muted); }
.sheet-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.selshare { position: fixed; z-index: 55; border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 15px; background: var(--navy); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.selshare[hidden] { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .selshare { color: #0f141b; } }
:root[data-theme=dark] .selshare { color: #0f141b; }

.pmove { display: grid; gap: 2px; flex: none; }
.pmove .icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.people .pname { flex: 1; min-width: 0; }
.pdel { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--red); display: grid; place-items: center; }
.pacts { flex: none; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.pact { width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; cursor: pointer; }
.pact:hover:not(:disabled) { background: var(--card); color: var(--navy); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pact:disabled { opacity: .3; cursor: default; }
.pact svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pact.pdel:hover { color: var(--red); }
.pact.pdel[data-armed] { width: auto; padding: 0 10px; color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); font-size: 13px; font-weight: 700; white-space: nowrap; }
.people li.pedit { display: block; }
.pdel:hover { background: color-mix(in srgb, var(--red) 10%, transparent); }
.pdel svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.btns.two .btn { white-space: nowrap; padding-inline: 10px; }
.pdel[data-armed] { width: auto; border-radius: 999px; padding: 0 12px; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--red) 12%, transparent); white-space: nowrap; }

.summary { position: relative; }
.hshare { margin-inline-start: auto; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
.hshare svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sheet blockquote.list { white-space: pre-line; font-family: var(--sans); font-size: 16px; line-height: 1.8; }
.text .rashi .rl { cursor: pointer; display: inline-block; padding: 1px 6px; margin-inline-start: -6px; border-radius: 6px; }
.text .rashi .rl:hover { background: color-mix(in srgb, var(--gold) 18%, transparent); }
.sheet blockquote { white-space: pre-line; }
.rhead [data-r=share] svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* only the text itself is selectable in the reader */
#reader button, #reader label, .rhead, .ropts, .rfoot, .rprog, .rpart > h3, .text .vn, .text .hn, .text .rl, .text .pm, .text h4, .selshare, .sheet-head, .sheet-btns {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sheet-btns .btn { height: 48px; padding: 0 10px; gap: 7px; white-space: nowrap; font-size: 15px; }
.sheet-btns .btn svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sheet-btns .btn.wa svg { stroke-width: 1.6; }
.sheet .sheet-btns .btn .ic, .sheet .sheet-btns .btn svg { width: 19px; height: 19px; stroke-width: 1.8; margin: 0; }

/* personal Tehillim list */
.people { list-style: none; margin: 0 0 14px; padding: 0; display: grid; }
.people li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; padding-top: 2px; }
.pbadge { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-content: center; text-align: center; line-height: 1.05; color: #fff;
  background: linear-gradient(160deg, #3a97b2, #22708a); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.pbadge small { font-size: 10.5px; font-weight: 600; opacity: .85; }
.pbadge b { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.people .pname b { font-size: 16px; color: var(--ink); }
.people .pname small { display: block; margin-top: 1px; }
.pmove .icon { width: 28px; height: 22px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; }
.pmove .icon:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--navy); }
.pmove .icon:disabled { opacity: .25; }

/* form fields in settings: one style for every dropdown and input */
.panel select, .panel input:not([type=checkbox]):not([type=radio]):not([type=file]) {
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 15px; color: var(--ink); background-color: var(--card);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 12px; min-height: 44px; padding: 9px 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.panel select { padding-inline-end: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; background-position: left 14px center, left 20px center; }
[dir=ltr] .panel select { background-position: right 20px center, right 14px center; }
.panel select:hover, .panel input:hover { border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
.panel select:focus-visible, .panel input:focus-visible { border-color: var(--navy2); outline: 3px solid color-mix(in srgb, var(--navy2) 25%, transparent); outline-offset: 0; }
.pform { background: color-mix(in srgb, var(--navy2) 5%, var(--card)); border: 1px solid var(--line); }
.pform .fl { font-size: 14px; font-weight: 600; color: var(--navy); }
.locrow .btn { min-height: 44px; }

/* About: the dedication inside a card */
.panel.dedic-card { padding: 22px 16px; }
.panel.dedic-card .dedic { margin: 0 auto; padding: 0; border: 0; }
/* every tab opens with the same blue header; on the inner tabs it holds just the title */
.page-hero { padding-bottom: 22px; }
.page-hero h1 { margin: 10px 4px 0; font-size: 26px; font-weight: 800; color: #fff; text-align: start; }
.page-hero + .sec { margin-top: 6px; }
.splash img { box-shadow: 0 8px 24px rgba(10, 30, 60, .25); }
.splash .dedic { border-color: rgba(255, 255, 255, .35); }

/* design pass: blue accent everywhere, quiet lines, one type scale */
.hero .ring::before { background: conic-gradient(#f3c96b calc(var(--p) * 360deg), rgba(255, 255, 255, .25) 0); }
.hero .ring.full::before { background: conic-gradient(#7ee2b8 360deg, transparent 0); }
.update .btn.primary { color: #fff; }
.dedic { border-top-color: color-mix(in srgb, var(--ink) 16%, transparent); border-bottom-color: color-mix(in srgb, var(--ink) 16%, transparent); }
.hero .dedic, .splash .dedic { border-color: rgba(255, 255, 255, .35); }
.people .pname b { font-size: 16px; font-weight: 600; }
#people .pform { margin-top: 12px; }
#people .chips { margin-top: 14px; }
.cards .card .h3 { font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { color-scheme: dark; } }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); }
/* expandable rows (male voice help, civil date): our own chevron instead of the browser triangle */
details.civil > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--navy2); font-weight: 600; font-size: 14px; padding: 4px 0; }
details.civil > summary::-webkit-details-marker { display: none; }
details.civil > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
details.civil[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
#main > .panel { margin-bottom: 16px; }
.waic { fill: none; stroke-width: 1.7; }
.lic .waic { width: 22px; height: 22px; }
.sheet .sheet-btns .btn .waic { width: 20px; height: 20px; stroke-width: 1.7; }

/* dedication: no rules; compact at the bottom of Today */
.dedic, .hero .dedic, .splash .dedic, .panel.dedic-card .dedic { border: 0; }
.dedic { padding: 6px 8px; }
.dedic-mini .dedic { margin: 22px auto 4px; padding: 0; gap: 1px; }
.dedic-mini .dedic small { font-size: 13px; }
.dedic-mini .dedic b { font-size: 17px; }
.dedic-mini .dedic .f { font-size: 14px; color: var(--muted); }
.pbadge b { font-size: 22px; }

/* 3.5: no-Tachanun note, Tehillim chapter picker, after-Shabbat prompt, confetti */
.daynote { position: relative; z-index: 1; margin: 10px auto 0; width: max-content; max-width: 100%; text-align: center; font-size: 13.5px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .95); }
.pickch { margin: 10px 0 14px; }
.lic.ps { background: color-mix(in srgb, #2f8a72 14%, var(--card)); color: #2f8a72; }
.lic.ps .ic { stroke-width: 2; }
.linkbtn .ic { width: 18px; height: 18px; stroke-width: 2; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; font: inherit; font-weight: 600; color: var(--navy); cursor: pointer; }
.picker { display: flex; flex-direction: column; max-height: 86vh; }
.chfind { display: flex; gap: 8px; margin: 2px 0 10px; }
.chfind input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 17px; background: var(--bg); color: var(--ink); }
.chfind .btn { flex: none; min-width: 84px; }
.chlegend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin: 0 2px 6px; }
.chlegend:empty { display: none; }
.chlegend span { display: inline-flex; align-items: center; gap: 6px; }
.chlegend i { width: 12px; height: 12px; border-radius: 4px; border: 2px solid; }
.chlegend i.today, .chgrid button.today { border-color: #2f8a72; }
.chlegend i.last, .chgrid button.last { border-color: var(--gold); border-style: dashed; }
.chgrid button.today { background: color-mix(in srgb, #2f8a72 10%, var(--bg)); }
.chbooks { overflow-y: auto; min-height: 0; padding: 0 2px 4px; }
.chbook { margin: 12px 0 6px; font-size: 14px; color: var(--navy); display: flex; align-items: baseline; gap: 8px; }
.chbook:first-child { margin-top: 2px; }
.chbook small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.chgrid button { height: 42px; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-family: var(--serif); font-size: 16px; cursor: pointer; }
.chgrid button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme=dark] .chgrid button.on { color: #0f141b; }
.restlist { max-height: 52vh; overflow-y: auto; margin: 4px 0 14px; }
.restlist .pickrow { background: var(--bg); }
.restlist + .sheet-btns .btn { flex: 1; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }
/* שניים מקרא ואחד תרגום: the verse, the verse again, then Targum Onkelos */
.shnayim .chap { text-align: center; }
.smv { margin-bottom: .9em; padding-bottom: .5em; border-bottom: 1px solid var(--line); }
.smv .again { color: color-mix(in srgb, var(--ink) 82%, var(--bg)); }
.smv .targum { font-size: .9em; color: var(--navy2); padding-inline-start: .6em; border-inline-start: 3px solid var(--accent-soft); }

/* wide screens: side menu with the day's studies, the picked study in the middle */
.side-only { display: none; }
@media (min-width: 1100px) {
  :root { --side: 300px; }
  body.withnav { padding-bottom: 32px; padding-inline-start: var(--side); }
  body.withnav { overflow-x: clip; }
  body.withnav main { max-width: 760px; padding: 0 28px; }
  /* the blue header spans the whole area next to the menu; its content stays in the middle column */
  body.withnav .hero { margin: 0 calc(50% - (100vw - var(--side)) / 2) 18px; border-radius: 0 0 32px 32px; padding: 22px 28px 26px; }
  body.withnav .hero > * { max-width: 704px; margin-inline: auto; }
  body.withnav .hero > .daynote { margin-top: 10px; }
  .nav { inset: 0 auto 0 auto; inset-inline-start: 0; width: var(--side); flex-direction: column; justify-content: flex-start; gap: 2px; overflow-y: auto;
    background: var(--card); backdrop-filter: none; border-top: 0; border-inline-end: 1px solid var(--line); padding: 18px 14px 24px; }
  .side-only { display: block; }
  .nav .tab.side-only { display: flex; }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 16px; text-decoration: none; color: var(--navy); font-family: var(--serif); font-size: 23px; font-weight: 700; }
  .side-brand img { border-radius: 10px; }
  .nav .tab { flex: none; max-width: none; flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 15px; padding: 9px 12px; border-radius: 12px; text-decoration: none; }
  .nav .tab span { display: inline; }
  .nav .tab svg { width: 22px; height: 22px; }
  .nav .tab:hover { background: var(--bg); color: var(--ink); }
  .nav .tab.on:hover { background: color-mix(in srgb, var(--navy2) 10%, transparent); color: var(--navy); }
  .sidelist { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
  .sidelist h2 { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 10px 8px; }
  .sidelist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .sitem { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 8px; border-radius: 14px; text-align: start; color: var(--ink); font: inherit; cursor: pointer; }
  .sitem:hover { background: var(--bg); }
  .sitem.on { background: color-mix(in srgb, var(--navy2) 13%, transparent); }
  .sitem .tile { width: 36px; height: 36px; border-radius: 11px; font-size: 11px; }
  .sitem .info .h3 { font-size: 12px; }
  .sitem .portion { font-size: 15px; line-height: 1.3; }
  .sitem .check.sm { pointer-events: none; }
  .sitem.free { margin-top: 6px; }
  .sitem.free .lic { width: 36px; height: 36px; flex: none; }
  body.withnav .reader { inset-inline-start: var(--side); border-inline-start: 0; }
  .rbody { padding-inline: 32px; }
  .toast { bottom: 28px; }
  /* sheets (share, chapter picker, after-Shabbat) become a dialog in the middle of the content area */
  body.withnav .sheet { align-items: center; padding: 32px; padding-inline-start: calc(var(--side) + 32px); }
  body.withnav .sheet-card { border-radius: 22px; padding-bottom: 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .28); max-height: calc(100dvh - 64px); overflow-y: auto; }
  body.withnav .sheet-card.picker { width: min(100%, 640px); height: min(760px, calc(100dvh - 64px)); overflow: hidden; }
  body.withnav .chgrid { grid-template-columns: repeat(10, 1fr); }
}
.btn.totoday { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 16px 6px 14px; font-size: 14px; font-weight: 700; background: #fff; color: #1c4b87; border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.btn.totoday .ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* personal Tehillim rows: a drag grip and bigger edit / remove buttons */
.people li { position: relative; background: var(--card); }
.people li.dragging { z-index: 2; border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); transition: none; }
.people li:not(.dragging) { transition: transform .15s; }
.pgrip { flex: none; width: 30px; height: 48px; margin-inline-end: -6px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; cursor: grab; touch-action: none; }
.pgrip:hover { color: var(--navy); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.dragging .pgrip { cursor: grabbing; }
.pgrip svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.pacts { gap: 4px; padding: 4px; border-radius: 14px; }
.pact { width: 44px; height: 44px; border-radius: 11px; }
.pact svg { width: 21px; height: 21px; }
.pact.pdel[data-armed] { font-size: 14px; }

/* Help screen (help.html is the app with the guide inside <main>) */
.helpdoc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px 20px 22px; margin-bottom: 16px; }
.helpdoc h2 { color: var(--navy); font-size: 19px; margin: 26px 0 8px; scroll-margin-top: 16px; }
.helpdoc p, .helpdoc li { font-size: 16px; }
.helpdoc ul { padding-inline-start: 22px; }
.helpdoc a { color: var(--navy2); }
.helpdoc .toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.helpdoc .toc a { font-size: 14px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); text-decoration: none; }
.helpdoc .shot { display: inline-block; vertical-align: top; width: min(240px, calc(50% - 10px)); margin: 8px 0 14px; margin-inline-end: 8px; }
.helpdoc .shot.wide { display: block; width: 100%; margin-inline-end: 0; }
.helpdoc .shot img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); }
.helpdoc .shot.wide img { border-radius: 12px; }
.helpdoc .shot figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 6px; }
.helpdoc .hstart { display: flex; justify-content: center; margin-top: 22px; }
.helpdoc .hcontact { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.helpdoc .hcontact .btn { min-width: 140px; }
.helpdoc .hcontact .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.helpdoc .hcontact .btn.wa svg path:last-child { fill: currentColor; stroke: none; }
.helpdoc a.btn { color: var(--navy); }
.helpdoc a.btn.wa { color: #fff; }
