/* Same look as chitas.day: tokens, hero, panels, segments, bottom bar, launch screen. */
@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; --accent: #2d6bb4; --accent-soft: #dbe7f6; --green: #23805a; --red: #b3412e;
  --k-chag: #b3412e; --k-minor: #2d6bb4; --k-fast: #7a5a2a; --k-rc: #2f8a72; --k-chabad: #6a4fa8; --k-shabbat: #24507f; --k-modern: #5c6777; --k-own: #23805a; --k-g: #1a73e8;
  --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; --accent: #5b9be0; --accent-soft: #1d3550; --green: #4fbf8c; --red: #ec8a76;
  --k-chag: #ec8a76; --k-minor: #7fb2ea; --k-fast: #d2ac6e; --k-rc: #5cc3a5; --k-chabad: #b39ae6; --k-shabbat: #a9c8ee; --k-modern: #a3acb7; --k-own: #4fbf8c; --k-g: #8ab4f8; --shadow: none; } }
:root[data-theme=dark] { --bg: #0f141b; --card: #182029; --ink: #ebe6dc; --muted: #a3acb7; --line: #2a3440; --navy: #a9c8ee; --navy2: #6f9fd6; --accent: #5b9be0; --accent-soft: #1d3550; --green: #4fbf8c; --red: #ec8a76;
  --k-chag: #ec8a76; --k-minor: #7fb2ea; --k-fast: #d2ac6e; --k-rc: #5cc3a5; --k-chabad: #b39ae6; --k-shabbat: #a9c8ee; --k-modern: #a3acb7; --k-own: #4fbf8c; --k-g: #8ab4f8; --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.locked { 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(--accent); outline-offset: 2px; border-radius: 6px; }
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; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* hero */
.hero { margin: 0 -14px 14px; padding: calc(14px + env(safe-area-inset-top)) 16px 16px; 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%); }
@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 14px; border-radius: 28px; } }
.daybar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daybar .date { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; align-items: center; background: none; border: 0; color: #fff; padding: 2px; }
.daybar h1 { font-size: 24px; margin: 0; font-weight: 800; }
.daybar small { opacity: .82; font-size: 14px; }
.nav-arrow { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; padding: 0; }
.hctl { display: flex; gap: 8px; margin-top: 14px; align-items: center; justify-content: center; }
.hctl .seg { flex: 1; }
.hctl .seg:last-of-type { flex: .7; }
.page-hero { padding-bottom: 22px; }
.page-hero h1 { margin: 10px 4px 0; font-size: 26px; font-weight: 800; }

/* panels, rows, segments */
.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); }
.rl { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--navy); }
.panel.rows { padding: 4px 16px; }
.panel.rows > .row, .panel.rows > .lrow, .panel.rows > .kv { padding: 14px 0; border-top: 1px solid var(--line); }
.panel.rows > :first-child { border-top: 0; }
.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); white-space: nowrap; }
.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); }
:root[data-theme=dark] .seg button.on { background: #263240; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .seg button.on { background: #263240; } }
.seg.light { background: rgba(255, 255, 255, .14); }
.seg.light button { color: rgba(255, 255, 255, .85); padding: 6px 4px; }
.seg.light button.on { background: #fff; color: #1c4b87; box-shadow: none; }

/* 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; }
:root[data-theme=dark] .btn.primary { color: #0f141b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .btn.primary { color: #0f141b; } }
.btn.wide { width: 100%; padding: 13px; }
.btn.wide-l { width: 100%; justify-content: flex-start; min-height: 46px; background: var(--bg); }
.btn.tiny { padding: 5px 12px; font-size: 14px; border-radius: 999px; }
.btn.tiny .ic { width: 16px; height: 16px; }
.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; }
.gbtns { margin-top: 10px; }
.icon { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--navy); display: grid; place-items: center; padding: 0; }
.icon.light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; height: 38px; }

/* checkbox rows (as chitas) */
.pick { display: grid; }
.pickrow { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); cursor: pointer; position: relative; }
.pick .pickrow:first-child { border-top: 0; padding-top: 2px; }
.pickrow input { position: absolute; opacity: 0; pointer-events: none; }
.ptext { flex: 1; }
.pickrow b { font-size: 16px; font-weight: 600; }
.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 input:checked ~ .box { background: var(--navy); border-color: var(--navy); }
.pickrow input:checked ~ .box svg { stroke: #fff; }
:root[data-theme=dark] .pickrow input:checked ~ .box svg { stroke: #0f141b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .pickrow input:checked ~ .box svg { stroke: #0f141b; } }
.pickrow input:disabled ~ * { opacity: .45; }
.pickrow:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: -2px; border-radius: 10px; }

/* fields */
.panel select, .panel input:not([type=checkbox]), .sheet input.search {
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 16px; color: var(--ink); background-color: var(--card); width: 100%;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 12px; min-height: 46px; padding: 9px 12px; }
.panel select { padding-inline-end: 34px; 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; }
.panel input:focus-visible, .panel select:focus-visible, .sheet input.search:focus-visible { border-color: var(--navy2); outline: 3px solid color-mix(in srgb, var(--navy2) 25%, transparent); outline-offset: 0; }
.panel input[readonly] { background: var(--bg); }
.frow { display: grid; gap: 8px; margin-bottom: 8px; }
.frow.two { grid-template-columns: 1.4fr 1fr; }
.frow.three { grid-template-columns: .8fr 1.3fr 1fr; }
input[type=date], input[type=time] { direction: rtl; text-align: right; }

/* month grid */
.month { padding: 10px 6px 8px; }
.wd, .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.wd span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.wd span:last-child { color: var(--navy2); }
.cell { min-height: 74px; border: 0; border-radius: 10px; background: none; padding: 4px 2px 3px; display: flex; flex-direction: column; align-items: center; gap: 1px; overflow: hidden; position: relative; }
.cell.blank { pointer-events: none; }
.cell.sat { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.cell.chag .n { color: var(--k-chag); }
.cell .n { font-size: 17px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.cell .o { font-size: 11px; color: var(--muted); line-height: 1.1; }
.cell.today .n { background: var(--accent); color: #fff; border-radius: 999px; min-width: 30px; padding: 0 5px; }
:root[data-theme=dark] .cell.today .n { color: #0f141b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .cell.today .n { color: #0f141b; } }
.cell.sel { box-shadow: inset 0 0 0 2px var(--navy2); }
.chips { display: grid; gap: 2px; width: 100%; margin-top: 2px; }
.chip { display: block; font-style: normal; font-size: 10px; line-height: 1.35; padding: 0 3px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
  color: var(--kc); background: color-mix(in srgb, var(--kc) 13%, transparent); font-weight: 600; }
.chip.done { text-decoration: line-through; opacity: .6; }
.k-chag { --kc: var(--k-chag); } .k-minor { --kc: var(--k-minor); } .k-fast { --kc: var(--k-fast); } .k-rc { --kc: var(--k-rc); } .k-chabad { --kc: var(--k-chabad); }
.k-shabbat, .k-parsha { --kc: var(--k-shabbat); } .k-modern { --kc: var(--k-modern); } .k-own { --kc: var(--k-own); } .k-g { --kc: var(--k-g); }
.k-candles, .k-havdala { --kc: var(--k-shabbat); }
@media (min-width: 520px) { .cell { min-height: 86px; } .chip { font-size: 11px; } }

/* day details and lists */
.its { list-style: none; margin: 0; padding: 0; display: grid; }
.it { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.its > .it:first-child { border-top: 0; padding-top: 2px; }
.it.k-chag .t, .it.k-fast:not(:has(.tm)) .t { color: var(--k-chag); }
.it .t { font-weight: 500; font-size: 15px; }
.it .tm { font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 700; color: var(--ink); }
.it small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.it.empty { display: none; }
.it.u { grid-template-columns: auto 1fr; padding: 3px 0; }
.it.u .ut { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 10px; background: none; border: 0; padding: 4px 0; text-align: start; }
.it.u.done .t { text-decoration: line-through; color: var(--muted); }
.it.u:not(:has(.check)) { grid-template-columns: 1fr; }
.check { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: inline-grid; place-items: center; padding: 0; }
.check svg { width: 16px; height: 16px; fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check.on { background: var(--green); border-color: var(--green); }
.check.on svg { stroke: #fff; }
.day .dhead { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.day .dhead > div { flex: 1; }
.day .dhead .btn.tiny { margin-top: 4px; }
.day h2 { margin: 0; }
.day .dhead small { color: var(--muted); font-size: 14px; }
.day .its { margin-bottom: 12px; }
.zm summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 6px 0; }
.zm dl { margin: 6px 0 0; display: grid; }
.zm dl div { display: flex; justify-content: space-between; padding: 7px 2px; border-top: 1px solid var(--line); }
.zm dt { color: var(--ink); }
.zm dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy); }
.dlist { padding: 0 14px; }
.drow { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.drow:first-child { border-top: 0; }
.drow.today .dd b { color: var(--accent); }
.drow .dd { flex: none; width: 52px; display: grid; justify-items: center; text-align: center; line-height: 1.2; }
.drow .dd small { font-size: 12px; color: var(--muted); }
.drow .dd b { font-size: 22px; color: var(--navy); }
.drow .dd span { font-size: 12px; color: var(--muted); }
.drow .its { flex: 1; min-width: 0; }

/* weekly times */
.ztable { padding: 8px 4px; overflow-x: auto; }
.ztable table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ztable th, .ztable td { padding: 7px 2px; text-align: center; font-size: 13px; border-top: 1px solid var(--line); }
.ztable thead th { border-top: 0; line-height: 1.15; }
.ztable thead small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.ztable thead b { font-size: 15px; color: var(--navy); }
.ztable tbody th { text-align: start; font-weight: 600; font-size: 12.5px; color: var(--ink); padding-inline-start: 8px; width: 28%; }
.ztable .today { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ztable .sat { color: var(--navy2); font-weight: 700; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.kv b { font-variant-numeric: tabular-nums; color: var(--navy); }

/* converter */
.conv .res { margin-top: 10px; padding: 14px; border-radius: 14px; background: var(--accent-soft); text-align: center; display: grid; gap: 2px; }
.conv .res:empty { display: none; }
.conv .res b { font-family: var(--serif); font-size: 26px; color: var(--navy); }
.conv .res small { color: var(--muted); font-size: 14px; }
.conv .pickrow { border-top: 0; }

/* add button */
.fab { position: fixed; bottom: calc(80px + env(safe-area-inset-bottom)); left: max(16px, calc(50% - 304px)); z-index: 9; width: 56px; height: 56px; border-radius: 18px; border: 0;
  background: var(--navy); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(22, 48, 79, .3); }
.fab .ic { width: 26px; height: 26px; stroke-width: 2.4; }
:root[data-theme=dark] .fab { color: #0f141b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .fab { color: #0f141b; } }

/* sheet */
.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); max-height: 88vh; overflow: auto; 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: 10px; }
.sheet-head h2 { margin: 0; font-size: 18px; color: var(--navy); }
.sheet .form { border: 0; box-shadow: none; padding: 0; display: grid; gap: 10px; margin: 0; }
.sheet .form .frow { margin: 0; }
.sheet .form .pickrow { border-top: 0; padding: 4px 2px; }
.hdate { margin: -4px 2px 0; color: var(--muted); font-size: 14px; }
.hdate:empty { display: none; }
.sheet .search { margin-bottom: 8px; }
.clist { list-style: none; margin: 8px 0 0; padding: 0; }
.clist button { width: 100%; display: flex; justify-content: space-between; gap: 10px; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 4px; text-align: start; font-weight: 600; }
.clist button small { color: var(--muted); font-weight: 400; }
.clist button.on { color: var(--accent); }

/* about */
.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, .lrow .go { color: var(--muted); display: grid; place-items: center; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; text-align: start; color: inherit; text-decoration: none; min-height: 56px; }
.lrow .lt { flex: 1; display: grid; }
.lrow .lt b { font-size: 15px; color: var(--navy); }
.lrow .lt small { font-size: 13px; color: var(--muted); }
.lic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--navy2); }
.lic.wa { background: #25d366; color: #fff; }

/* dedication */
.dedic { display: grid; justify-items: center; gap: 4px; text-align: center; margin: 0 auto; max-width: 380px; font-family: var(--serif); color: var(--ink); }
.dedic small { font-size: 17px; color: var(--muted); }
.dedic b { font-size: 26px; font-weight: 700; line-height: 1.3; color: var(--navy); }
.dedic .f { font-size: 19px; }
.panel.dedic-card { padding: 22px 16px; }

/* 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; box-shadow: 0 8px 24px rgba(10, 30, 60, .25); }
.splash .sname { font-family: var(--serif); font-size: 34px; font-weight: 700; }
.splash .dedic { width: min(100%, 460px); gap: 8px; color: rgba(255, 255, 255, .92); }
.splash .dedic b { color: #fff; font-size: clamp(32px, 10.5vw, 44px); }
.splash .dedic small { color: rgba(255, 255, 255, .78); font-size: clamp(19px, 6vw, 23px); }
.splash .dedic .f { font-size: clamp(20px, 6.2vw, 27px); }
.splash.out { opacity: 0; pointer-events: none; }

/* bottom bar */
.nav { position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; justify-content: center; gap: 2px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.nav[hidden] { display: none; }
.tab { flex: 1; max-width: 140px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); padding: 6px 2px; 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: 70; width: max-content; max-width: min(92vw, 520px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
main:has(.fab) { padding-bottom: 76px; }
.lic .waic { width: 22px; height: 22px; }

/* ---- chitas.day 3.25+ design language: one blue, light-blue tracks and buttons, plain page tops ---- */
:root { --b9: #16304f; --b7: #2560a6; --b5: #3a7fcb; --b2: #d6e5f6; --b1: #eef4fb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --b7: #5b9be0; --b5: #7fb2ea; --b2: #22405f; --b1: #1b2c40; } }
:root[data-theme=dark] { --b7: #5b9be0; --b5: #7fb2ea; --b2: #22405f; --b1: #1b2c40; }
/* page tops (settings, converter, about): no colored block, the title in navy */
.hero.page-hero { background: none !important; color: var(--navy); margin: 0 0 6px; padding: calc(14px + env(safe-area-inset-top)) 2px 6px; border-radius: 0; }
.page-hero h1 { color: var(--navy); }
/* switches: a rounded light-blue track, the chosen one solid blue */
.seg { border-radius: 999px; padding: 4px; gap: 4px; background: var(--b1); border: 1px solid var(--b2); }
.seg button { border-radius: 999px; min-height: 38px; padding: 8px 10px; font-size: 14.5px; font-weight: 700; color: var(--b7); display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.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:hover:not(.on) { background: color-mix(in srgb, var(--b2) 60%, transparent); }
.seg button.on, :root[data-theme=dark] .seg button.on { background: #2560a6; color: #fff; box-shadow: 0 2px 6px rgba(37, 96, 166, .28); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .seg button.on { background: #2560a6; color: #fff; } }
/* on the blue header: a light track, the chosen one white */
.seg.light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); }
.seg.light button { color: #fff; min-height: 34px; padding: 6px 8px; }
.seg.light button:hover:not(.on) { background: rgba(255, 255, 255, .1); }
.seg.light button.on, :root[data-theme=dark] .seg.light button.on { background: #fff; color: #1c4b87; box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .seg.light button.on { background: #fff; color: #1c4b87; } }
/* buttons: plain ones light blue, the main one solid blue */
.btn { background: var(--b1); border-color: transparent; color: var(--b7); font-weight: 700; }
.btn:hover { background: var(--b2); }
.btn.primary, :root[data-theme=dark] .btn.primary { background: #2560a6; border-color: #2560a6; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .btn.primary { color: #fff; } }
.btn.primary:hover { background: #1f5492; }
.btn.danger { background: color-mix(in srgb, var(--red) 10%, var(--card)); color: var(--red); }
.btn.ghost { background: transparent; }
.btn.light { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .3); color: #fff; }
.icon { background: var(--b1); border-color: transparent; color: var(--b7); }
.sheet-head .icon { border-radius: 50%; }
.icon.light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.pickrow input:checked ~ .box { background: #2560a6; border-color: #2560a6; }
.fab, :root[data-theme=dark] .fab { background: #2560a6; color: #fff; box-shadow: 0 6px 18px rgba(37, 96, 166, .35); border-radius: 50%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .fab { color: #fff; } }
.lic { background: var(--b1); color: var(--b7); }
.lrow .go, .promo .go { color: var(--b5); }
/* settings: a heading per section, a line under it */
.rl.sechead { font-size: 17px; margin: 0; padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.rl.sechead + .row { border-top: 0 !important; }
/* the city picker (as chitas) */
.locpick { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--b2); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 600; text-align: start; }
.locpick span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.locpick .ic { width: 16px; height: 16px; color: var(--b7); }
.sheet input.search { border: 1px solid var(--b2); background: var(--b1); }
.sheet input.search:focus { background: var(--card); }
.clist button.on { color: var(--b7); }
/* the dedication: a solid navy block, white text */
.panel.dedic-card { background: linear-gradient(160deg, #24507f, #16304f); border: 0; box-shadow: 0 6px 18px rgba(22, 48, 79, .18); }
.dedic-card .dedic, .dedic-card .dedic b { color: #fff; }
.dedic-card .dedic small, .dedic-card .dedic .f { color: rgba(255, 255, 255, .85); }
.dedic b.sur { font-size: 22px; }
.conv .res { background: var(--b1); }
.ztable .today { background: var(--b1); }
.cell.today .n { background: #2560a6; color: #fff !important; }
.cell.sat { background: var(--b1); }
.cell.sel { box-shadow: inset 0 0 0 2px var(--b5); }

/* sheets (as MyMikveh): centered with a fade on a wide screen; from the bottom with a slide on a phone */
.sheet { align-items: center; padding: 24px; background: rgba(14, 22, 34, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: sheet-dim .25s ease-out; }
.sheet-card { width: min(100%, 480px); max-height: 86dvh; border-radius: 22px; padding: 16px 18px 18px; box-shadow: 0 18px 60px rgba(10, 20, 40, .35); animation: sheet-in .2s ease-out; }
.sheet.closing { animation: sheet-undim .2s ease-in forwards; }
.sheet.closing .sheet-card { animation: sheet-out .18s ease-in forwards; }
.sheet-card.swap { animation: none; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes sheet-dim { from { opacity: 0; } }
@keyframes sheet-undim { to { opacity: 0; } }
@media (max-width: 640px) {
  .sheet { align-items: flex-end; padding: 0; }
  .sheet-card { width: 100%; max-height: 88dvh; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -14px 44px rgba(10, 20, 40, .35); animation: sheet-up .34s cubic-bezier(.22, 1, .36, 1); }
  .sheet.closing { animation-duration: .26s; }
  .sheet.closing .sheet-card { animation: sheet-down .26s cubic-bezier(.4, 0, 1, 1) forwards; }
}
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-card, .sheet.closing, .sheet.closing .sheet-card { animation: none !important; } }
.zm h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 4px 0 2px; font-size: 15px; font-weight: 700; color: var(--navy); }
.zm h3 small { font-size: 13px; font-weight: 600; color: var(--muted); }
.zm dl { margin-top: 4px; }

/* weekly times: the names column and the day row stay put; the days scroll sideways */
.ztable { padding: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.ztable table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.ztable th, .ztable td { min-width: 58px; padding: 9px 6px; white-space: nowrap; background: var(--card); }
.ztable thead th { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); }
.ztable tbody th { position: sticky; inset-inline-start: 0; z-index: 1; min-width: 104px; width: auto; max-width: 140px; white-space: normal; line-height: 1.25; box-shadow: inset 1px 0 0 var(--line); }
.ztable thead th:first-child { inset-inline-start: 0; z-index: 3; box-shadow: inset 1px 0 0 var(--line); }
.ztable .today { background: color-mix(in srgb, var(--b1) 100%, var(--card)); }
.ztable thead th.today, .ztable td.today { background: var(--b1); }
