/* Nešpory: burgundy tone on tone, gold only on novena progress. Dark is the default. */
:root {
  --bg: #110D0E; --s1: #1D1618; --s2: #271E21; --ink: #F3EAE6; --mut: #A3959A; --line: #30262A;
  --hero: #5A1B28; --heroInk: #F7ECEA; --heroSoft: #EDB9C2;
  --acc: #C84B61; --onAcc: #FFFFFF; --soft: #E7A6B1; --gold: #E2B654;
  --ui: "DM Sans", system-ui, -apple-system, sans-serif;
  --disp: "Newsreader", Georgia, serif;
  --tabH: 62px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #FBF8F7; --s1: #F3ECEA; --s2: #EADFDC; --ink: #1C1214; --mut: #7C6A6E; --line: #E6DAD7;
  --hero: #7A1E2E; --heroInk: #FFF7F5; --heroSoft: #F0C2CA;
  --acc: #7A1E2E; --onAcc: #FFFFFF; --soft: #A3485A; --gold: #D4A43A;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--ui); font-size: 16px; line-height: 1.45; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: var(--ink); }
:focus-visible { outline: 2px solid var(--soft); outline-offset: 2px; border-radius: 6px; }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px calc(var(--tabH) + env(safe-area-inset-bottom, 0px) + 28px); display: flex; flex-direction: column; }
#app.notabs { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 110px); }

/* type */
.big-t { font-family: var(--disp); font-weight: 400; font-size: 36px; line-height: 1.05; margin: 10px 0 2px; }
.sub { font-size: 14px; color: var(--mut); margin: 0 0 20px; }
.sec-t { font-family: var(--disp); font-weight: 400; font-size: 22px; margin: 28px 0 12px; }
.small { font-size: 13px; color: var(--mut); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--s1); color: var(--mut); flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* hero */
.hero { background: var(--hero); color: var(--heroInk); border-radius: 24px; padding: 20px 20px 18px; position: relative; overflow: hidden; }
.hero .num { position: absolute; right: -2px; top: -26px; font-family: var(--disp); font-style: italic; font-size: 140px; line-height: 1; opacity: .1; pointer-events: none; }
.hero .lab { font-size: 13px; color: var(--heroSoft); margin: 0; position: relative; }
.hero h2 { font-family: var(--disp); font-weight: 400; font-size: 32px; line-height: 1.08; margin: 8px 0 4px; position: relative; text-wrap: balance; }
.hero .m { font-size: 14px; opacity: .78; margin: 0 0 18px; }
.hero .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pill-light { display: inline-flex; align-items: center; gap: 8px; background: var(--heroInk); color: var(--hero); font-weight: 600; font-size: 15px; padding: 11px 22px; border-radius: 99px; }
.pill-light svg { width: 11px; height: 11px; fill: currentColor; }
.prog { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--heroSoft); }
.prog i { width: 64px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); overflow: hidden; display: block; }
.prog i b { display: block; height: 100%; background: var(--heroInk); }
.hero .more { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--heroSoft); text-decoration: underline; text-underline-offset: 3px; }

/* lists */
.card { background: var(--s1); border-radius: 18px; padding: 0 16px; }
.row-i { display: flex; align-items: center; gap: 14px; padding: 14px 0; min-height: 56px; width: 100%; text-align: left; }
.row-i + .row-i { border-top: 1px solid var(--line); }
.row-i .t { flex: 1; min-width: 0; }
.row-i .t small { display: block; font-size: 13px; color: var(--mut); margin-top: 1px; }
.row-i .d { font-size: 13px; color: var(--mut); font-variant-numeric: tabular-nums; flex: none; }
.row-i .chev { width: 8px; height: 14px; stroke: var(--mut); stroke-width: 1.8; fill: none; flex: none; opacity: .7; }
.chk { width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--mut); flex: none; display: grid; place-items: center; opacity: .75; }
.chk.on { background: var(--acc); border-color: var(--acc); opacity: 1; }
.chk.on::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--onAcc); border-bottom: 2px solid var(--onAcc); transform: translateY(-1px) rotate(-45deg); }
.done-t { text-decoration: line-through; text-decoration-color: var(--mut); color: var(--mut); }
.link { color: var(--soft); font-weight: 600; font-size: 15px; padding: 14px 4px; display: inline-block; }
.area-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding: 16px 2px 0; border-top: 1px solid var(--line); font-size: 15px; width: 100%; text-align: left; }
.area-row small { display: block; font-size: 12px; color: var(--mut); }
.area-row .ch { color: var(--soft); font-weight: 600; font-size: 14px; }

/* buttons */
.btn { display: block; width: 100%; text-align: center; background: var(--acc); color: var(--onAcc); font-weight: 600; font-size: 16px; padding: 15px; border-radius: 16px; }
.btn.ghost { background: var(--s1); color: var(--ink); }
.btn.inline { display: inline-block; width: auto; padding: 12px 22px; border-radius: 99px; font-size: 15px; }
.btn[disabled] { opacity: .45; }
.note { background: var(--s1); border-radius: 18px; padding: 16px; font-size: 14px; color: var(--mut); margin-top: 16px; }
.note b { color: var(--ink); font-weight: 600; }
.note .btn { margin-top: 12px; }

/* segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--s1); border-radius: 12px; padding: 3px; font-size: 14px; text-align: center; margin: 0 0 18px; }
.seg button { padding: 8px; border-radius: 9px; color: var(--mut); }
.seg button.on { background: var(--s2); color: var(--ink); font-weight: 600; }

/* onboarding */
.q { font-family: var(--disp); font-weight: 400; font-size: 32px; line-height: 1.1; margin: 18px 0 6px; text-wrap: balance; }
.q2 { font-size: 14px; color: var(--mut); margin: 26px 4px 10px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 15px 0; width: 100%; text-align: left; font-size: 16px; }
.opt + .opt { border-top: 1px solid var(--line); }
.opt span { flex: 1; min-width: 0; }
.opt small { display: block; font-size: 13px; color: var(--mut); margin-top: 2px; }
.rd { width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--mut); flex: none; display: grid; place-items: center; opacity: .6; }
.rd.on { border-color: var(--acc); opacity: 1; }
.rd.on::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--acc); }
.foot-btn { margin-top: auto; padding-top: 28px; }

/* reader */
.rtop { position: fixed; top: 0; left: 0; right: 0; z-index: 5; background: var(--bg); display: flex; justify-content: space-between; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 10px) 20px 10px; border-bottom: 1px solid transparent; }
.rtop-sp { height: 40px; flex: none; }
.rtop.scrolled { border-bottom-color: var(--line); }
.rtop .back { color: var(--soft); font-size: 16px; display: flex; align-items: center; gap: 4px; min-width: 64px; }
.rtop .back svg { width: 10px; height: 17px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.rtop b { font-family: var(--disp); font-weight: 400; font-size: 21px; text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtop .aa { color: var(--soft); font-weight: 500; min-width: 64px; text-align: right; }
.text { font-family: var(--disp); font-size: var(--fs, 21px); line-height: 1.62; margin-top: 18px; }
.text p { margin: 0 0 14px; }
.text sup { font-family: var(--ui); font-size: 11px; font-weight: 600; color: var(--soft); margin-right: 5px; vertical-align: 6px; line-height: 0; }
.text .h { font-family: var(--ui); font-size: 14px; font-weight: 600; color: var(--soft); margin: 22px 0 6px; }
.text .h:first-child { margin-top: 0; }
.text .seg-t { font-family: var(--ui); font-size: 13px; color: var(--mut); margin: 26px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.text .seg-t:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; max-width: 560px; margin: 0 auto; background: var(--bg); display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 20px calc(env(safe-area-inset-bottom, 0px) + 14px); border-top: 1px solid var(--line); }
.rbar .pg { flex: 1; font-size: 13px; color: var(--mut); }
.rbar .pg i { display: block; height: 4px; border-radius: 2px; background: var(--s2); margin-top: 6px; overflow: hidden; }
.rbar .pg i b { display: block; height: 100%; background: var(--acc); }
.rbar .btn { width: auto; padding: 13px 24px; border-radius: 99px; font-size: 15px; }
.fs-pop { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.fs-pop button { background: var(--s1); border-radius: 10px; padding: 8px 14px; font-size: 14px; }

/* bible browser */
.tbar { font-size: 13px; color: var(--mut); margin: 22px 4px 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.grid a { background: var(--s1); border-radius: 12px; text-align: center; padding: 13px 0; font-variant-numeric: tabular-nums; font-size: 15px; }
.grid a.cur { background: var(--hero); color: var(--heroInk); }
.cnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.cnav a { background: var(--s1); border-radius: 99px; padding: 11px 18px; font-size: 14px; }
.search { width: 100%; background: var(--s1); border: 0; border-radius: 12px; padding: 12px 14px; margin: 0 0 6px; }

/* novena */
.nov { background: var(--hero); color: var(--heroInk); border-radius: 22px; padding: 18px; display: block; width: 100%; text-align: left; }
.nov .lab { font-size: 13px; color: var(--heroSoft); margin: 0; }
.nov h3 { font-family: var(--disp); font-weight: 400; font-size: 25px; margin: 4px 0 2px; }
.nov q { display: block; font-family: var(--disp); font-style: italic; font-size: 17px; color: var(--heroSoft); margin: 6px 0 14px; quotes: none; }
.days { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.days i { height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); }
.days i.f { background: var(--gold); }

/* prayer text */
.ptext { font-family: var(--disp); font-size: var(--fs, 21px); line-height: 1.6; margin-top: 18px; white-space: pre-line; }
.ptext p { margin: 0 0 14px; }
.refrain { font-family: var(--disp); font-style: italic; font-size: 20px; color: var(--soft); margin: 4px 0 18px; }

/* rosary */
.r-head { text-align: center; margin-top: 18px; }
.r-head .small { display: block; }
.r-head h2 { font-family: var(--disp); font-weight: 400; font-size: 26px; margin: 6px 0 0; text-wrap: balance; }
.r-myst { font-family: var(--disp); font-style: italic; color: var(--soft); font-size: 19px; text-align: center; margin: 8px 0 0; }
.beads { display: flex; justify-content: center; gap: 8px; margin: 22px 0 6px; flex-wrap: wrap; }
.beads i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--mut); opacity: .7; }
.beads i.f { background: var(--acc); border-color: var(--acc); opacity: 1; }
.tapzone { display: block; width: 100%; background: var(--s1); border-radius: 22px; padding: 18px; margin-top: 16px; text-align: left; }
.tapzone .ptext { margin-top: 0; }
.r-steps { display: flex; gap: 3px; margin: 14px 0 0; }
.r-steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--s2); }
.r-steps i.f { background: var(--acc); }

/* forms */
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; color: var(--mut); margin: 0 4px 6px; }
.field input, .field textarea, .field select { width: 100%; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; }
.field textarea { min-height: 220px; resize: vertical; line-height: 1.5; }
.danger { color: var(--soft); font-size: 14px; padding: 12px 4px; }

/* tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); height: var(--tabH); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 500; color: var(--mut); }
.tabs a.on { color: var(--soft); }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabH) + env(safe-area-inset-bottom, 0px) + 16px); transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 14px; padding: 10px 18px; border-radius: 99px; z-index: 20; }
.empty { color: var(--mut); text-align: center; padding: 40px 10px; }
@media (prefers-reduced-motion: no-preference) { .view { animation: fade .18s ease-out; } }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* progress + daily verse */
.stats { background: var(--s1); border-radius: 18px; padding: 16px; margin-top: 12px; }
.stats .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats .nums div { display: flex; flex-direction: column; }
.stats .nums b { font-family: var(--disp); font-weight: 400; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.stats .nums span { font-size: 12px; color: var(--mut); margin-top: 4px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.wd { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--mut); }
.wd i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); }
.wd.f i { background: var(--acc); border-color: var(--acc); }
.wd.now { color: var(--ink); font-weight: 600; }
.wd.now i { border-color: var(--soft); }
.wd.f.now i { border-color: var(--acc); }
.vod { margin-top: 28px; padding: 20px; border-radius: 20px; border: 1px solid var(--line); }
.vod .lab { font-size: 13px; color: var(--soft); margin: 0 0 8px; }
.vod .vt { font-family: var(--disp); font-size: 21px; line-height: 1.45; margin: 0; text-wrap: pretty; }
.vod .vr { font-size: 13px; color: var(--mut); margin: 10px 0 0; }
.err { color: var(--soft); font-size: 14px; margin: 0 4px 10px; }
.done-mark { width: 76px; height: 76px; border-radius: 50%; background: var(--hero); margin: 36px auto 4px; position: relative; }
.done-mark::after { content: ""; position: absolute; left: 25px; top: 22px; width: 26px; height: 14px; border-left: 3px solid var(--heroInk); border-bottom: 3px solid var(--heroInk); transform: rotate(-45deg); }
.foot-btn .link { margin-top: 6px; }

/* routine editor */
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-row .edit { color: var(--soft); font-weight: 600; font-size: 14px; padding: 8px 0 8px 12px; }
.mv { width: 34px; height: 34px; border-radius: 50%; background: var(--s2); display: grid; place-items: center; flex: none; }
.mv svg { width: 14px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.mv[disabled] { opacity: .3; }
.rm { font-size: 13px; color: var(--soft); padding: 6px 0 6px 4px; flex: none; }
.addp { font-size: 13px; color: var(--soft); font-weight: 600; flex: none; }
.fs-pop[hidden] { display: none; }

/* compact streak line on Dnes */
.sline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 0 4px; font-size: 14px; color: var(--mut); }
.sline .dots { display: flex; gap: 6px; }
.sline .dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); }
.sline .dots i.f { background: var(--acc); border-color: var(--acc); }
.sline .dots i.now { border-color: var(--soft); }
.sline .dots i.f.now { border-color: var(--acc); }

/* lock setup */
.steps-ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.5; }
.steps-ol b { font-weight: 600; }
.mono-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--ink); background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 6px 0 8px; word-break: break-all; user-select: all; -webkit-user-select: all; }
.note .btn.ghost { margin-top: 4px; background: var(--s2); }

/* audio player: one compact row */
.aud { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; padding: 6px 4px; }
.aud-b { width: 30px; height: 30px; border-radius: 50%; background: var(--acc); color: var(--onAcc); display: grid; place-items: center; flex: none; }
.aud-b svg { width: 10px; height: 10px; fill: currentColor; }
.aud-p { flex: 1; min-width: 0; display: block; height: 3px; border-radius: 2px; background: var(--s2); overflow: hidden; cursor: pointer; }
.aud-p b { display: block; width: 0; height: 100%; background: var(--acc); }
.aud-t { font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
.aud-r { font-size: 12px; font-weight: 600; color: var(--soft); background: var(--s1); border-radius: 99px; padding: 4px 9px; flex: none; font-variant-numeric: tabular-nums; }

/* lock page: dark, text only */
.lock { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; max-width: 420px; margin: 0 auto; padding: 24px 8px; }
.lock h1 { font-family: var(--disp); font-weight: 400; font-size: 44px; line-height: 1.1; margin: 0 0 28px; }
.lock blockquote { font-family: var(--disp); font-style: italic; font-size: 21px; line-height: 1.5; color: var(--soft); margin: 0 0 8px; }
.lock cite { display: block; font-style: normal; font-size: 13px; color: var(--mut); margin-bottom: 40px; }
.lock p { font-size: 16px; line-height: 1.55; color: var(--mut); margin: 0; }

/* hidden always wins over display rules (search filters, hidden fields) */
[hidden] { display: none !important; }

/* goal line + last night's intention on Dnes */
.goal { font-size: 14px; color: var(--mut); margin: -14px 0 20px; }
.goal span { color: var(--ink); }
.vod.y { margin-top: 16px; padding: 16px 18px; }
.vod.y .vt { font-size: 19px; }

/* "Čo to znamená pre teba" under the reading */
.bz { background: var(--s1); border-radius: 20px; padding: 18px 18px 6px; margin-top: 26px; font-size: 16px; line-height: 1.55; }
.bz .lab { font-size: 13px; color: var(--soft); margin: 0 0 6px; }
.bz h3 { font-family: var(--disp); font-weight: 400; font-size: 23px; line-height: 1.2; margin: 0 0 10px; text-wrap: balance; }
.bz p { margin: 0 0 12px; }
.bz .krok { padding-top: 12px; border-top: 1px solid var(--line); }
.bz .krok b { font-weight: 600; }
.bz .mod { font-family: var(--disp); font-style: italic; font-size: 18px; color: var(--soft); }

/* reminders: time + switch */
.tm { background: var(--s2); border: 0; border-radius: 10px; padding: 7px 10px; font-size: 15px; font-variant-numeric: tabular-nums; flex: none; }
.tm[disabled] { opacity: .4; }
.sw { width: 46px; height: 28px; border-radius: 14px; background: var(--s2); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--mut); transition: transform .15s, background .15s; }
.sw.on { background: var(--acc); }
.sw.on::after { transform: translateX(18px); background: var(--onAcc); }

/* evening talk + grouped prayer lists */
.field textarea.sm { min-height: 150px; }
.grp-t { margin: 14px 4px 6px; }
