/* HE'BREWS Daily: styling after the printed verse cards. */
:root {
  --bg: #eef4f1;
  --fg: #3f4a48;
  --muted: #66736f;
  --card: #f8fbfa;
  --mint: #cfe9df;
  --teal: #2f7f78;
  --line: #d5e4df;
  --field: #ffffff;
  --tab-h: 64px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12201e;
    --fg: #dfe9e6;
    --muted: #9db1ac;
    --card: #1b2d2a;
    --mint: #2a4a44;
    --teal: #8fd6c9;
    --line: #2b403c;
    --field: #162624;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body {
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  min-height: 100vh;
}
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px max(18px, env(safe-area-inset-right)) 12px max(18px, env(safe-area-inset-left));
  padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: .01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: block; flex: none; }
.topbar { align-items: center; }
.brand span { color: var(--teal); }
.date { font-size: .8rem; font-weight: 700; color: var(--muted); text-align: right; }

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}
.view { display: flex; flex-direction: column; gap: 20px; }

/* ---------- the verse card ---------- */
.hour-card { display: flex; flex-direction: column; align-items: center; gap: 10px; }
/* As wide as the phone allows, but short enough that the card and its label
   fit on screen under the top bar and above the tab bar. */
#hour-card {
  width: min(100%, 360px, calc((100svh - 220px) * 5 / 7.4));
  min-width: 220px;
}
.hour-label { margin: 0; font-size: .78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.vcard {
  container-type: inline-size;
  aspect-ratio: 5 / 7.4;
  width: 100%;
  margin-inline: auto;
  border-radius: 6cqw;
  padding: 4.5cqw 4.5cqw 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(165deg, var(--b1), var(--b2) 55%, var(--b3));
  box-shadow: 0 16px 34px -22px rgba(15, 40, 35, .6);
  animation: card-in .5s ease both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vcard { animation: none; } }
.vface {
  flex: 1;
  min-height: 0;
  border-radius: 3cqw 16cqw 0 0;
  background: linear-gradient(180deg, var(--f1), var(--f2));
  padding: 9cqw 9cqw 6cqw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5cqw;
  overflow: hidden;
}
.vface p {
  margin: 0;
  font-size: 7.3cqw;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--t);
  font-weight: var(--w);
  text-wrap: pretty;
  overflow-wrap: break-word;
  hyphens: auto;
}
.vface b { font-size: 5.6cqw; line-height: 1.2; color: var(--r); font-style: var(--st); }
.vland { height: 31%; margin: 0 -4.5cqw; }
.vland svg { display: block; width: 100%; height: 100%; }
.vlogo {
  position: absolute;
  left: 50%;
  bottom: 3.2cqw;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  font-size: 2.4cqw;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--lg);
}
.vlogo i {
  display: block;
  flex: none;
  width: 6.5cqw;
  height: 6.5cqw;
  border-radius: 50%;
  background: #fff url("../icons/nlwc-logo.png") center / 78% auto no-repeat;
}

/* ---------- panels and reading ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.panel h3 { margin: 0 0 4px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.panel p { margin: 0; font-size: .92rem; }

.reading {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px;
}
.eyebrow { margin: 0 0 4px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--teal); }
h1 { margin: 0 0 12px; font-size: 1.5rem; line-height: 1.25; font-weight: 800; text-wrap: balance; }
blockquote {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--mint);
  font-weight: 700;
  line-height: 1.45;
}
.ref { margin: 8px 0 0; font-weight: 800; font-size: .9rem; color: var(--muted); }
.body p { margin: 0 0 14px; }
.block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.block h3 { margin: 0 0 6px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.block p { margin: 0; }
.controls { display: flex; gap: 10px; margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.source { margin: 18px 0 0; }

/* ---------- buttons and fields ---------- */
.btn {
  font: inherit;
  font-weight: 800;
  font-size: .9rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--card);
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--teal); }
.btn.small { padding: 7px 14px; font-size: .82rem; }
.btn:focus-visible, .tab:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.field { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; }
.field > label, .field > .label { font-weight: 800; font-size: .9rem; }
select, input[type="time"], input[type="number"] {
  font: inherit;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--fg);
}
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--fg);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--card); }
.tchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  background: var(--mint);
  font-weight: 700;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
.tchip button { border: 0; background: transparent; color: var(--fg); cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 6px; }

.schedule { margin: 20px 0; }
.summary { margin: 0; font-weight: 800; }
.timeline { position: relative; height: 40px; margin: 12px 0 4px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.timeline .win { position: absolute; top: 0; bottom: 0; background: var(--mint); }
.timeline .tick { position: absolute; top: 7px; bottom: 7px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--teal); }
.tl-axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.nudge-times { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.nudge-times span { font-size: .8rem; font-weight: 700; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }

/* ---------- focus ---------- */
.switch { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-weight: 700; }
.switch input { width: 20px; height: 20px; accent-color: var(--teal); }
.streak { display: flex; align-items: baseline; gap: 8px; }
.streak span { font-size: 2.6rem; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; }

/* ---------- tab bar, install bar, toast ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  display: flex;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--card);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  font: inherit;
  font-weight: 800;
  font-size: .82rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tab.active { color: var(--teal); }

.install-bar, .toast {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, .4);
  font-weight: 700;
  font-size: .9rem;
}
.install-bar span { flex: 1; }
.toast { display: block; }
