/* Katolsk bønn — kirkekunst, rolig leseflate og brukerens eget utseende. */

:root {
  --bg: #11161F;
  --bg-2: #161D2B;
  --surface: #1C2533;
  --surface-2: #222D40;
  --line: #2B3850;
  --ink: #F2EAD8;
  --muted: #9AA3B5;
  --warm: #A89F8C;
  --gold: #E8B84B;
  --gold-deep: #C8A04B;
  --on-gold: #20190E;
  --page-bg: #0B0F16;
  --field-border: #748198;
  --reader-bg: #11161F;
  --reader-chrome: #1C2533;
  --reader-ink: #F2EAD8;
  --reader-muted: #BDB5A5;
  --reader-accent: #E8B84B;
  --reader-line: #566174;
  --red: #C90000;
  --green-ok: #7FBF8E;
  --serif: Georgia, "Times New Roman", serif;
  --reading-size: 1.18rem;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F3EAD6;
  --bg-2: #F8F2E5;
  --surface: #FBF7EE;
  --surface-2: #EDE3CF;
  --line: #D8CDB8;
  --ink: #2C2418;
  --muted: #65594A;
  --warm: #6B5639;
  --gold: #8B2926;
  --gold-deep: #805526;
  --on-gold: #FFF8EB;
  --green-ok: #2D5C3D;
  --page-bg: #E8DECA;
  --field-border: #88755C;
  --reader-bg: #F3EAD6;
  --reader-chrome: #EDE2CA;
  --reader-ink: #2C2418;
  --reader-muted: #65594A;
  --reader-accent: #8B2926;
  --reader-line: #AD9B7E;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.phone {
  position: relative;
  max-width: 1040px;
  min-height: 100dvh;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 32%);
  overflow: clip;
}

@media (min-width: 560px) {
  body { padding: 24px 0; }
  .phone {
    min-height: calc(100dvh - 48px);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.12);
  }
}

.view-stack { padding-bottom: 132px; }
.view { padding: 0 0 12px; }

/* ---------- I dag ---------- */

.day-head { padding: 14px 18px 6px; }

.brand-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.brand-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  align-self: center;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.brand-by {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.date-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.date-btn {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.date-btn[hidden] { display: none; }
.date-btn:disabled { opacity: 0.3; cursor: default; }
.date-btn--today { color: var(--gold); border-color: rgba(232, 184, 75, 0.45); }

.date-line { margin-top: 8px; color: var(--muted); font-weight: 650; letter-spacing: 0.01em; }

/* Hero med dagens kunst */

.hero {
  position: relative;
  min-height: 330px;
  margin: 10px 14px 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: flex-end;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 13, 20, 0.05) 30%, rgba(10, 13, 20, 0.62) 68%, rgba(10, 13, 20, 0.93) 100%);
}

.hero[data-liturgical-color="rød"] .hero-veil {
  background:
    radial-gradient(120% 80% at 50% 12%, rgba(169, 0, 20, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(10, 13, 20, 0.05) 30%, rgba(72, 0, 9, 0.66) 70%, rgba(14, 0, 2, 0.95) 100%);
}

.hero[data-liturgical-color="grønn"] .hero-veil {
  background:
    radial-gradient(120% 80% at 50% 12%, rgba(91, 140, 110, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(10, 13, 20, 0.05) 30%, rgba(13, 53, 35, 0.66) 70%, rgba(5, 18, 12, 0.95) 100%);
}

.hero[data-liturgical-color="hvit"] .hero-veil {
  background:
    radial-gradient(120% 80% at 50% 12%, rgba(232, 223, 200, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(10, 13, 20, 0.04) 30%, rgba(70, 59, 35, 0.6) 70%, rgba(16, 13, 8, 0.94) 100%);
}

.hero[data-liturgical-color="fiolett"] .hero-veil {
  background:
    radial-gradient(120% 80% at 50% 12%, rgba(155, 127, 190, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(10, 13, 20, 0.05) 30%, rgba(54, 35, 85, 0.66) 70%, rgba(18, 12, 28, 0.95) 100%);
}

.hero--plain .hero-veil {
  background: radial-gradient(120% 90% at 50% 0%, rgba(232, 184, 75, 0.13), transparent 55%),
    linear-gradient(180deg, rgba(10, 13, 20, 0) 40%, rgba(10, 13, 20, 0.8) 100%);
}

.hero-body { position: relative; padding: 18px 18px 16px; width: 100%; }

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  padding: 4px 11px;
  border: 1px solid rgba(242, 234, 216, 0.35);
  border-radius: 99px;
  background: rgba(10, 13, 20, 0.45);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.hero-chip[data-liturgical-color="rød"] {
  border-color: rgba(255, 190, 178, 0.7);
  background: linear-gradient(135deg, rgba(169, 0, 20, 0.96), rgba(89, 0, 10, 0.9));
  color: #FFF8F2;
  box-shadow:
    0 10px 26px rgba(99, 0, 10, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-chip[data-liturgical-color="grønn"] {
  border-color: rgba(167, 224, 184, 0.72);
  background: linear-gradient(135deg, rgba(43, 107, 70, 0.96), rgba(15, 58, 35, 0.92));
  color: #F5FFF8;
  box-shadow:
    0 10px 26px rgba(7, 56, 32, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-chip[data-liturgical-color="hvit"] {
  border-color: rgba(255, 246, 221, 0.82);
  background: linear-gradient(135deg, rgba(255, 247, 226, 0.96), rgba(213, 184, 118, 0.92));
  color: #241C0E;
  box-shadow:
    0 10px 26px rgba(83, 60, 18, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.hero-chip[data-liturgical-color="fiolett"] {
  border-color: rgba(220, 200, 255, 0.72);
  background: linear-gradient(135deg, rgba(114, 82, 157, 0.96), rgba(57, 35, 92, 0.92));
  color: #FFF8FF;
  box-shadow:
    0 10px 26px rgba(42, 25, 72, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.hero-chip[data-liturgical-color="rød"] .dot {
  background: #FF2A22 !important;
  box-shadow:
    0 0 0 3px rgba(255, 236, 224, 0.18),
    0 0 16px rgba(255, 61, 46, 0.78);
}

.hero-chip[data-liturgical-color="grønn"] .dot {
  background: #62D487 !important;
  box-shadow:
    0 0 0 3px rgba(224, 255, 231, 0.18),
    0 0 16px rgba(98, 212, 135, 0.72);
}

.hero-chip[data-liturgical-color="hvit"] .dot {
  background: #FFF4D7 !important;
  box-shadow:
    0 0 0 3px rgba(255, 244, 215, 0.32),
    0 0 16px rgba(255, 226, 150, 0.78);
}

.hero-chip[data-liturgical-color="fiolett"] .dot {
  background: #B797EA !important;
  box-shadow:
    0 0 0 3px rgba(236, 224, 255, 0.2),
    0 0 16px rgba(183, 151, 234, 0.78);
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.18;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.hero-sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-credit {
  margin: 10px 0 0;
  color: rgba(242, 234, 216, 0.55);
  font-size: 0.68rem;
}

/* Dagens lyd */

.range-notice {
  margin: 10px 14px 0;
  padding: 10px 14px;
  border: 1px solid var(--gold-deep);
  border-radius: 12px;
  background: rgba(232, 184, 75, 0.1);
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.5;
}

.day-error {
  margin: 16px 14px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  display: grid;
  gap: 12px;
  justify-items: start;
}

/* display:grid over overstyrer nettleserens [hidden] — må slås av eksplisitt. */
.day-error[hidden] { display: none; }
.range-notice[hidden] { display: none; }

.day-error p { margin: 0; color: var(--ink); font-size: 0.95rem; }

.day-error-btn {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: var(--gold);
  color: var(--on-gold);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.playday {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 14px 14px 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.playday:active { transform: scale(0.99); }

.playday-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.playday-text { display: grid; gap: 1px; }
.playday-text strong {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.playday-text span { color: var(--muted); font-size: 0.82rem; }

/* Køen */

.queue {
  margin: 4px 14px;
  padding: 4px 4px;
  list-style: none;
  display: grid;
}

.queue-item {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
}

.queue-action {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 11px 10px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.queue-item:last-child { border-bottom: none; }
.queue-item:hover { background: rgba(34, 45, 64, 0.55); }

.queue-thumb {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #17120f;
}
.queue-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.queue-item.is-active .queue-thumb { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232, 184, 75, 0.4); }
.queue-item.is-done .queue-thumb img { filter: brightness(0.55) saturate(0.7); }
.queue-badge {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  background: rgba(7, 9, 12, 0.82);
  color: var(--ink);
}
.queue-item.is-done .queue-badge { color: var(--green-ok); }
.queue-item.is-active .queue-badge { background: var(--gold); color: var(--on-gold); }

.queue-text { display: grid; }
.queue-text strong { font-size: 0.95rem; font-weight: 600; }
.queue-text span { color: var(--muted); font-size: 0.76rem; }

.queue-item.is-done .queue-text strong { color: var(--muted); }
.queue-item.is-active .queue-text strong { color: var(--gold); }

.queue-dur { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.queue-item.is-active .queue-dur { color: var(--gold); }

/* Lesninger øverst */
.readings-top { margin: 14px 14px 0; }

/* Messe-direkte — fast, responsiv spiller i dagens innhold */
.mass-embed-card {
  scroll-margin-block: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #060B14;
}

.mass-embed-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.mass-embed-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.mass-embed-fallback {
  margin: 0;
  padding: 10px 14px 12px;
  color: rgba(242, 234, 216, 0.68);
  font-size: 0.78rem;
  text-align: center;
}

.mass-embed-fallback a { color: var(--gold); }

/* Innholdsseksjoner */

.sections { margin: 18px 14px 0; display: grid; gap: 14px; }

.sec {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
}

.sec-head {
  display: flex;
  width: 100%;
  align-items: baseline;
  gap: 10px;
  padding: 15px 16px;
  border: none;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sec-eyebrow {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sec-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
}

.sec-head .sec-arrow {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.sec.is-open .sec-arrow { transform: rotate(180deg); }

.sec-body { display: none; padding: 0 16px 16px; }
.sec.is-open .sec-body { display: block; }

.sec-intro { margin: 0 0 10px; color: var(--muted); font-size: 0.85rem; }

/* Lesninger — tappbare rader som åpner pergament-leseside */

.reading-row {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  padding: 12px 2px;
  border: none;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.reading-row:first-child { border-top: none; }
.reading-row-text { flex: 1; display: grid; gap: 2px; }
.reading-row .pb-row-arrow { color: var(--muted); font-size: 1.1rem; }
.reading-row:hover .pb-row-arrow { color: var(--gold); }

.reading-label { color: var(--gold); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.reading-ref { font-family: var(--serif); font-size: 1.06rem; }
.reading-subtitle { color: var(--warm); font-size: 0.84rem; font-style: italic; }

/* Omkved/refreng på pergament-lesesiden (salmenes responsorium) */
.reader-body .refrain {
  margin: 0 0 14px;
  padding: 11px 15px;
  border-left: 3px solid var(--reader-accent);
  background: rgba(158, 43, 35, 0.06);
  border-radius: 0 10px 10px 0;
}

.reader-body .refrain b { display: block; color: var(--reader-accent); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.reader-body .refrain p { margin: 5px 0 0; }
.reader-body .refrain p.lead::first-letter { float: none; font-size: inherit; padding: 0; color: inherit; }

/* Lydrader */

.audio-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.audio-row:first-child { border-top: none; }

.audio-row-play {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.audio-row.is-active .audio-row-play { background: var(--gold); color: var(--on-gold); }
.audio-row.is-playing .audio-row-play { box-shadow: 0 0 0 4px rgba(232, 184, 75, 0.12); }

.audio-row-text { display: grid; }
.audio-row-text strong { font-size: 0.93rem; font-weight: 600; }
.audio-row-text span { color: var(--muted); font-size: 0.78rem; }

/* Rosenkrans — hvert mysterium med sitt kunstverk */

.mystery { border-top: 1px solid var(--line); }
.mystery:first-child { border-top: none; }

.mystery-row {
  display: flex;
  width: 100%;
  gap: 13px;
  align-items: center;
  padding: 11px 0;
  border: none;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mystery-art {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: contain;
  background: #17120F;
  border: 1px solid rgba(232, 184, 75, 0.3);
}

.mystery-num-badge {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.3rem;
}

.mystery-text-col { display: grid; gap: 1px; min-width: 0; flex: 1; }
.mystery-eyebrow { color: var(--gold); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.mystery-text-col strong { font-family: var(--serif); font-weight: 600; font-size: 0.99rem; line-height: 1.3; }
.mystery-credit { color: var(--muted); font-size: 0.72rem; }

.mystery .sec-arrow { color: var(--muted); transition: transform 0.2s ease; }
.mystery.is-open .sec-arrow { transform: rotate(180deg); }

.mystery-scripture { display: none; padding: 0 0 14px 71px; }
.mystery.is-open .mystery-scripture { display: block; }
.mystery-scripture p {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(232, 184, 75, 0.07);
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
}

@media (max-width: 420px) {
  .mystery-scripture { padding-left: 0; }
}

/* Gave + notis */

.give-card {
  margin: 22px 14px 0;
  padding: 16px;
  border: 1px solid rgba(232, 184, 75, 0.35);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(232, 184, 75, 0.1), rgba(232, 184, 75, 0.02));
}

.give-eyebrow { margin: 0; color: var(--gold); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.give-card p { margin: 6px 0 10px; color: var(--ink); font-size: 0.9rem; }

.give-btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.proto-note { margin: 18px 18px 8px; color: rgba(154, 163, 181, 0.65); font-size: 0.72rem; text-align: center; }

/* ---------- Sidehoder og bønnebok ---------- */

.page-head { padding: 26px 18px 8px; }
.page-head h1 { margin: 0; font-family: var(--serif); font-size: 1.7rem; font-weight: 600; }
.page-lead { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }

.search {
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.search::placeholder { color: var(--muted); }

.pb-cat { margin: 18px 14px 0; }
.pb-cat h2 {
  margin: 0 4px 8px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold);
}

/* Indeks: rolige rader, én linje hver, med en liten gull-stjerne å bla etter. */
.pb-item { border-bottom: 1px solid var(--line); }
.pb-cat .pb-item:last-child { border-bottom: none; }

.pb-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 13px 6px;
  border: none;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pb-mark { color: var(--gold-deep); font-size: 0.9rem; flex: none; }
.pb-row-title { flex: 1; font-family: var(--serif); font-size: 1.04rem; }
.pb-row-arrow { color: var(--muted); font-size: 1.1rem; }
.pb-row:hover .pb-row-arrow { color: var(--gold); }

.pb-empty { margin: 24px 18px; color: var(--muted); text-align: center; }

/* ---------- Bønneside (full leseside) ---------- */

.reader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--page-bg);
}

.reader[hidden] { display: none; }

.reader-head,
.reader-nav,
.reader-scroll { width: min(560px, 100%); }

.reader-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--reader-chrome);
  border-bottom: 1px solid var(--reader-line);
}

.reader-back {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(124, 31, 26, 0.08);
  color: var(--reader-accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reader-cat {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--reader-accent);
}

.reader-scroll {
  flex: 1;
  overflow-y: auto;
  background: var(--reader-bg);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.reader-art {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #17120F;
}

.reader-art[hidden] { display: none; }

.reader--support-image .reader-art {
  height: min(44vh, 360px);
  object-fit: contain;
  padding: 10px 0;
}

/* Bilder kan trykkes for å åpne i full størrelse. */
.reader-art, .hero-art { cursor: zoom-in; }

.reader-page { padding: 26px 22px 30px; }

.reader-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.18;
  color: var(--reader-ink);
}

.reader-sub {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: calc(0.98rem * var(--reading-scale, 1));
  color: var(--reader-muted);
}

.reader-sub[hidden] { display: none; }

.reader-title + .reader-body { margin-top: 12px; }

.reader-body p {
  margin: 0 0 1.15em;
  font-family: var(--serif);
  font-size: var(--reading-size);
  line-height: 1.85;
  color: var(--reader-ink);
  white-space: pre-line;
}

.reader-body--prayer p {
  margin-bottom: 1.28em;
  line-height: 1.78;
}

.reader-body p.prayer-line {
  margin-bottom: 0.48em;
  line-height: 1.62;
}

.reader-body p.prayer-line.lead::first-letter {
  float: none;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
  color: inherit;
}

.reader-artcredit {
  margin-top: 14px;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--reader-muted);
  white-space: normal;
}

/* Kildehenvisning nederst på en bønn (f.eks. «Hentet fra En liten katolsk bønnebok»). */
.reader-source {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid rgba(124, 92, 56, 0.22);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--reader-muted);
  white-space: normal;
}

/* Bilde inne i en bønn (korsveiens stasjoner). */
.reader-fig {
  margin: 18px 0 6px;
  text-align: center;
}
.reader-figimg {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}
.reader-figcap {
  margin-top: 8px;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--reader-muted);
}

/* Bilde-fremviser: trykk et kunstverk for å se det stort i fullskjerm. */
.imgview {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: rgba(8, 6, 5, 0.985);
  animation: imgview-in 0.18s ease;
}
.imgview[hidden] { display: none; }
@keyframes imgview-in { from { opacity: 0; } to { opacity: 1; } }
.imgview-scroll {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px 12px;
}
.imgview-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}
.imgview-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #F2EAD8;
  cursor: pointer;
}
.imgview-cap {
  margin: 0;
  padding: 10px 16px max(14px, env(safe-area-inset-bottom));
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  color: rgba(242, 234, 216, 0.82);
}
.imgview-cap:empty { display: none; }

/* Stor forbokstav på første ledd — som i en trykt bønnebok. */
.reader-body p.lead::first-letter {
  float: left;
  font-size: calc(3.3rem * var(--reading-scale, 1));
  line-height: 0.8;
  padding: 6px 10px 0 0;
  color: var(--reader-accent);
  font-family: var(--serif);
}

.reader-body h3 {
  margin: 18px 0 8px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--reader-accent);
}

.reader-body .pb-response {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--reader-line);
}

.reader-body .pb-response .call { font-family: var(--serif); font-size: var(--reading-size); line-height: 1.55; color: var(--reader-ink); }
.reader-body .pb-response .resp { align-self: end; color: var(--reader-accent); font-size: calc(1.06rem * var(--reading-scale, 1)); font-style: italic; text-align: right; }

.reader-nav {
  display: flex;
  gap: 8px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  background: var(--reader-chrome);
  border-top: 1px solid var(--reader-line);
}

.reader-prev,
.reader-next {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 9px 12px;
  border: 1px solid var(--reader-line);
  border-radius: 11px;
  background: var(--reader-bg);
  color: var(--reader-ink);
  font: inherit;
  cursor: pointer;
}

.reader-next { text-align: right; }
.reader-prev[hidden], .reader-next[hidden] { visibility: hidden; display: grid; }

.reader-nav-dir { font-size: 0.72rem; font-weight: 700; color: var(--reader-accent); }

.reader-pos {
  align-self: center;
  flex: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--reader-muted);
  white-space: nowrap;
}

/* Hint om at kunsten kan trykkes for full størrelse */
.art-zoom-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 12, 18, 0.55);
  color: #F2EAD8;
  pointer-events: none;
  z-index: 3;
}
.hero-art[hidden] + .art-zoom-hint { display: none; }
.reader-art[hidden] + .art-zoom-hint { display: none; }
.reader-scroll { position: relative; }
.reader-scroll .art-zoom-hint { top: 14px; right: 16px; }
.reader-nav-title {
  font-family: var(--serif);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-back:focus-visible,
.reader-prev:focus-visible,
.reader-next:focus-visible {
  outline: 2px solid var(--reader-accent);
  outline-offset: 2px;
}

/* ---------- Lys ---------- */

.map-wrap {
  margin: 10px 14px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: radial-gradient(140% 100% at 50% 0%, #1A2438 0%, #0D1320 70%);
}

.norway-map { width: 100%; height: auto; display: block; }

.kommune { fill: rgba(56, 74, 110, 0.34); stroke: rgba(200, 160, 75, 0.28); stroke-width: 0.5; }

.candle-core {
  fill: #FFF3CC;
  stroke: #FFE19A;
  stroke-width: 0.65;
}
.candle-halo { fill: url(#candle-halo); }
/* Brukerens eget lys — stille gullring, lett å finne igjen */
.candle-mine-ring {
  fill: none;
  stroke: #F4B740;
  stroke-width: 1.1;
  opacity: 0.9;
}

.candle-ring {
  fill: none;
  stroke: #FFE9B0;
  stroke-width: 1.2;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .candle-live { animation: proto-flicker 4.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
  .candle-born { animation: candle-birth 1.5s ease-out, proto-flicker 4.2s ease-in-out 1.5s infinite; transform-origin: center; transform-box: fill-box; }
  .candle-ring { animation: candle-ring 2.4s ease-out forwards; transform-origin: center; transform-box: fill-box; }
  @keyframes proto-flicker {
    0%, 100% { opacity: 1; }
    35% { opacity: 0.72; }
    60% { opacity: 0.9; }
    80% { opacity: 0.65; }
  }
  @keyframes candle-birth {
    from { opacity: 0; transform: scale(0.25); }
    60% { opacity: 1; }
    to { opacity: 1; transform: scale(1); }
  }
  @keyframes candle-ring {
    from { opacity: 0.7; transform: scale(0.4); }
    to { opacity: 0; transform: scale(2.8); }
  }
}

.candle-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 14px 18px;
}

.candle-field {
  display: grid;
  gap: 6px;
  text-align: left;
}

.candle-field span {
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.candle-field input {
  min-height: 48px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.candle-btn {
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--gold);
  color: var(--on-gold);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.candle-btn--secondary {
  background: transparent;
  border-color: rgba(232, 184, 75, 0.45);
  color: var(--gold);
}

.candle-btn:disabled { opacity: 0.62; cursor: wait; }

.candle-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.candle-note[data-tone="success"] { color: #9BE3B6; }
.candle-note[data-tone="warning"] { color: #F1C27A; }

@media (max-width: 520px) {
  .candle-actions { grid-template-columns: 1fr; }
}

/* ---------- Mer ---------- */

.mer-card {
  margin: 14px 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.mer-card h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.08rem; font-weight: 600; }
.mer-card p { margin: 0 0 8px; color: var(--ink); font-size: 0.9rem; }
.mer-hint { color: var(--muted) !important; font-size: 0.78rem !important; }
.mer-card--quiet { background: transparent; }

.mer-link { color: var(--gold); font-weight: 600; text-decoration: none; }

.week { display: flex; gap: 6px; margin: 6px 0 10px; }

.week span {
  flex: 1;
  padding: 8px 0 6px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
  display: grid;
  gap: 2px;
}

.week span.done { color: var(--green-ok); }
.week span.today { outline: 1px solid var(--gold); color: var(--gold); }

.textsize-row { display: flex; gap: 14px; align-items: center; }

.ts-btn {
  min-width: 52px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.credits { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.credits li { color: var(--muted); font-size: 0.78rem; }
.credits li b { color: var(--ink); font-weight: 600; }

/* Varsler og kreditering */

.notice-slot { margin: 10px 14px 0; }

.notice-card, .credit-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 14px;
}

.notice-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.notice-card p, .credit-card p {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.84rem;
}

.notice-card p:last-child, .credit-card p:last-child { margin-bottom: 0; }
.credit-card a { color: var(--gold); text-decoration: none; }
.credit-card--today { margin: 18px 14px 0; }

.notice-hide {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.notice-check {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.86rem;
}

.notice-check input { accent-color: var(--gold); }

.notice-controls {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.time-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.time-field input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.notice-button, .notice-card--collapsed button {
  min-height: 42px;
  border: none;
  border-radius: 12px;
  background: var(--gold);
  color: var(--on-gold);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.notice-button { padding: 0 14px; }
.notice-status[data-tone="success"] { color: var(--green-ok); }

/* ---------- Mini-spiller ---------- */

.mini {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: min(496px, calc(100% - 24px));
  display: flex;
  align-items: center;
  border-radius: 16px;
  background: #2A2F25;
  background: linear-gradient(135deg, #3A3322 0%, #2B2718 100%);
  border: 1px solid rgba(232, 184, 75, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 30;
}

.mini-bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(232, 184, 75, 0.18); }
.mini-bar span { display: block; width: 0; height: 2px; background: var(--gold); }

.mini-main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 9px 12px;
  border: none;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mini-art { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex: none; }

.mini-text { display: grid; min-width: 0; }
.mini-text strong { font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text span { color: rgba(242, 234, 216, 0.65); font-size: 0.72rem; }

.mini-toggle {
  flex: none;
  width: 52px;
  align-self: stretch;
  border: none;
  border-left: 1px solid rgba(232, 184, 75, 0.25);
  background: none;
  color: var(--gold);
  cursor: pointer;
}

/* ---------- Faner ---------- */

.tabs {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 100%);
  display: flex;
  border-top: 1px solid var(--line);
  background: rgba(13, 17, 26, 0.94);
  backdrop-filter: blur(14px);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}

.tab {
  flex: 1;
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 9px 0 8px;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}

.tab.is-active { color: var(--gold); }

/* ---------- Fullskjerm-spiller ---------- */

.player {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0B0F16;
  display: flex;
  justify-content: center;
}

.player-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.player-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 22, 0.34) 0%, rgba(11, 15, 22, 0.55) 45%, rgba(11, 15, 22, 0.96) 78%);
}

.player-inner {
  position: relative;
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  padding: 14px 20px calc(22px + env(safe-area-inset-bottom));
}

.player-top { display: flex; align-items: center; justify-content: space-between; }

.player-close {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(11, 15, 22, 0.45);
  color: var(--ink);
  cursor: pointer;
}

.player-pos { color: rgba(242, 234, 216, 0.75); font-size: 0.78rem; letter-spacing: 0.04em; }

.player-spacer { flex: 1; }

.player-eyebrow { margin: 0; color: var(--gold); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.player-title {
  margin: 6px 0 2px;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.player-meta { margin: 0 0 18px; color: rgba(242, 234, 216, 0.7); font-size: 0.88rem; }

.player-progress {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.player-progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: rgba(242, 234, 216, 0.22);
}

.player-fill {
  position: absolute;
  left: 0;
  width: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--gold);
}

.player-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}

.player-times { display: flex; justify-content: space-between; color: rgba(242, 234, 216, 0.6); font-size: 0.74rem; font-variant-numeric: tabular-nums; }

.player-controls {
  display: flex;
  gap: 34px;
  align-items: center;
  justify-content: center;
  margin: 16px 0 6px;
}

.pc-skip {
  position: relative;
  width: 54px;
  height: 54px;
  border: none;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.pc-skip span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.56rem; font-weight: 700; padding-top: 4px; }

.pc-main {
  width: 76px;
  height: 76px;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  color: #11161F;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.pc-main:active { transform: scale(0.95); }

.player-next {
  margin: 8px auto 0;
  padding: 8px 14px;
  border: none;
  border-radius: 99px;
  background: rgba(242, 234, 216, 0.1);
  color: rgba(242, 234, 216, 0.8);
  font-size: 0.8rem;
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player[hidden], .mini[hidden] { display: none; }

/* Fokus */

button:focus-visible, .search:focus-visible, [role="slider"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Driftssider: messekalender, pushstatistikk, innholdsstatus ---------- */

body.admin-page {
  color-scheme: light;
  --ink: #25221F;
  --muted: #5F656C;
  --paper: #FBF8F3;
  --surface: #FFFFFF;
  --surface-warm: #F5EFE6;
  --line: #D8D0C5;
  --line-strong: #BDAA92;
  --ewtn-red: #C90000;
  --ewtn-red-dark: #8E0000;
  --accent: var(--ewtn-red);
  --gold-text: #7D5F3B;
  --shadow: 0 18px 48px rgba(37, 34, 31, 0.08);
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(201, 0, 0, 0.12), transparent 310px),
    var(--paper);
  color: var(--ink);
}

body.admin-page button,
body.admin-page input,
body.admin-page select,
body.admin-page textarea {
  font: inherit;
}

body.admin-page .app-shell {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 0 max(36px, env(safe-area-inset-bottom));
}

body.admin-page .app-header {
  padding: 16px 0 14px;
}

body.admin-page .brand-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ewtn-red);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(142, 0, 0, 0.2);
}

body.admin-page .brand-logo-white {
  display: block;
  width: auto;
  height: 34px;
  max-width: 132px;
  object-fit: contain;
}

body.admin-page .brand-title {
  min-width: 0;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.05;
}

body.admin-page .eyebrow {
  margin: 0 0 7px;
  color: var(--gold-text);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.admin-page h1,
body.admin-page h2,
body.admin-page h3 {
  margin: 0;
  letter-spacing: 0;
}

body.admin-page h1 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 9vw, 4rem);
  line-height: 0.98;
}

body.admin-page h2 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 5vw, 2rem);
  line-height: 1.05;
}

body.admin-page .privacy-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

body.admin-page .back-link {
  color: var(--ewtn-red-dark);
  font-weight: 900;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

@media (max-width: 520px) {
  body.admin-page .app-shell {
    width: min(100% - 20px, 760px);
    padding-top: max(12px, env(safe-area-inset-top));
  }

  body.admin-page .brand-bar {
    min-height: 50px;
    border-radius: 8px;
  }

  body.admin-page .brand-logo-white {
    height: 28px;
  }
}

/* ── Bønnebok: visuelt rutenett (kategori → liste) ── */
.pb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 4px 16px 12px; }
.pb-card { position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; aspect-ratio: 1 / 1.28; cursor: pointer; padding: 0; background: var(--surface); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); text-align: left; }
.pb-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-card-veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(7, 9, 12, 0.94) 10%, rgba(7, 9, 12, 0.25) 50%, rgba(7, 9, 12, 0) 80%); }
.pb-card-lab { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 13px; }
.pb-card-t { font-family: var(--serif); font-size: 1.05rem; line-height: 1.13; color: var(--ink); }
.pb-card-s { color: var(--gold-deep); font-size: 0.68rem; font-weight: 700; margin-top: 3px; }

.pb-cathead { display: flex; align-items: center; padding: 4px 16px 2px; }
.pb-back { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.pb-banner { position: relative; margin: 6px 16px 16px; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 8; border: 1px solid var(--line); }
.pb-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-banner-veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(7, 9, 12, 0.9), rgba(7, 9, 12, 0.15) 62%); }
.pb-banner-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px; }
.pb-banner-body h2 { font-family: var(--serif); font-size: 1.5rem; margin: 0; }
.pb-banner-body p { color: #cfc6b2; font-size: 0.8rem; margin: 3px 0 0; }

.pb-list { display: flex; flex-direction: column; gap: 11px; padding: 0 16px; }
.pb-prow { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; color: var(--ink); }
.pb-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; object-position: 50% 22%; flex: 0 0 auto; }
.pb-thumb--blank { display: grid; place-items: center; background: var(--surface-2); color: var(--gold-deep); }
.pb-prow-text { flex: 1; min-width: 0; display: grid; }
.pb-prow-text b { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; }
.pb-prow-text span { color: var(--muted); font-size: 0.74rem; }
.pb-prow-arr { color: var(--gold-deep); font-size: 1.2rem; }
.pb-reshead { color: var(--muted); font-size: 0.82rem; margin: 2px 18px 12px; }


/* Minispilleren glir inn nedenfra når den dukker opp, så den blir lagt merke til. */
@keyframes mini-slide-in {
  from { transform: translate(-50%, 84px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.mini:not([hidden]) { animation: mini-slide-in 0.35s ease; }

/* Rolig puls på hero-en mens en dag hentes over nett (settes etter 150 ms). */
@keyframes hero-loading {
  50% { opacity: 0.55; }
}
.hero.is-loading { animation: hero-loading 1.1s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .mini:not([hidden]) { animation: none; }
  .hero.is-loading { animation: none; opacity: 0.7; }
}

/* ---------- Daglig bønn: tydelig start, lesbare valg, samme tema overalt ---------- */

button, input, select, textarea { font: inherit; }
button, input, select, textarea, summary, a { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea, summary { touch-action: manipulation; }
a { color: var(--gold); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [role="slider"]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
button:disabled { cursor: default; }
input, select, textarea { border-color: var(--field-border); }
.search, .candle-field input, .time-field input, .ts-btn { border-color: var(--field-border); }
.search:focus, .candle-field input:focus, .time-field input:focus { scroll-margin-block: 100px; }
.credit-card a, .credits a, .mer-link, .reader-source a, .reader-artcredit a,
.reader-body a, .mass-embed-fallback a { text-decoration: underline; }
.reader-body a, .reader-source a, .reader-artcredit a { color: var(--reader-accent); }

.brand-row { flex-wrap: wrap; row-gap: 3px; }
.brand-name { font-size: 1.12rem; }
.brand-by { font-size: 0.8125rem; letter-spacing: 0.04em; }
.day-head { padding: max(14px, env(safe-area-inset-top)) 18px 5px; }
.date-line { font-size: 1rem; color: var(--ink); }
.date-btn { font-size: 1rem; border-color: var(--field-border); font-weight: 600; }
.date-btn--today { border-color: var(--gold); }
.today-focus { margin: 10px 14px 0; }
.hero { display: block; min-height: 0; margin: 0; border: 1px solid var(--line); border-radius: 18px; }
.hero-art { position: static; display: block; height: 215px; object-position: center 30%; }
.hero-art[hidden] { display: block; visibility: hidden; }
/* Keep the artwork's space while it loads. Reveal the content below only when
   its first date is ready, so the empty queue never jumps down the screen. */
.is-initial-loading .today-focus ~ *, .is-initial-loading .daily-actions { visibility: hidden; }
.hero-veil { display: none; }
.hero-body { background: var(--surface); padding: 13px 16px 14px; }
.hero-chip { font-size: 0.8125rem; line-height: 1.35; letter-spacing: 0.025em; text-transform: none; margin-bottom: 8px; background: var(--surface-2); color: var(--ink); border-color: var(--line); backdrop-filter: none; }
.hero-chip[data-liturgical-color] { box-shadow: none; }
.hero-chip .dot { box-shadow: none !important; }
.hero-title { font-size: clamp(1.35rem, 5.5vw, 1.7rem); font-weight: 500; line-height: 1.22; color: var(--ink); text-shadow: none; overflow-wrap: anywhere; }
.hero-sub { font-size: 0.875rem; line-height: 1.45; color: var(--muted); }
.hero-sub:empty, .hero-credit:empty { display: none; }
.hero-credit { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; margin-top: 7px; }
.hero-credit a { color: var(--gold); text-decoration: underline; }
.daily-actions { display: grid; gap: 9px; margin-top: 12px; }
.playday { width: 100%; min-width: 0; min-height: 76px; margin: 0; padding: 13px 16px; background: var(--gold); border-color: var(--gold); color: var(--on-gold); border-radius: 14px; }
.playday-icon { width: 38px; height: 38px; background: transparent; color: var(--on-gold); }
.playday-text { min-width: 0; gap: 3px; }
.playday-text strong { color: var(--on-gold); font-size: 1.0625rem; letter-spacing: 0; line-height: 1.35; text-transform: none; }
.playday-text span { color: var(--on-gold); font-size: 0.875rem; line-height: 1.45; }
.art-zoom-button { position: absolute; z-index: 3; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 11px; border: 1px solid rgba(242, 234, 216, 0.6); border-radius: 11px; background: #11161F; color: #F2EAD8; font-size: 0.875rem; line-height: 1.3; cursor: zoom-in; }
.hero-art[hidden] + .art-zoom-button, .reader-art[hidden] + .art-zoom-button { display: none; }
.art-zoom-button:focus-visible { outline-color: #FFF8EB; box-shadow: 0 0 0 6px #11161F; }
.daily-audio { margin: 21px 14px 0; min-width: 0; }
.daily-section-title { margin: 0 4px 7px; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; line-height: 1.35; }
.daily-audio .queue { margin: 0; padding: 0; }
.queue-action { grid-template-columns: 48px minmax(0, 1fr) auto; }
.queue-thumb { width: 48px; height: 48px; }
.queue-text { min-width: 0; }
.queue-text strong { font-size: 1rem; line-height: 1.4; }
.queue-text span, .queue-dur { font-size: 0.8125rem; line-height: 1.5; }
.queue-item:hover { background: var(--surface-2); }
.queue-badge { color: #F2EAD8; }
.queue-item.is-done .queue-badge { color: #A8E1B6; }
.queue-item.is-active .queue-badge { color: var(--on-gold); }
.sec-head { flex-wrap: wrap; align-items: center; }
.sec-eyebrow, .reading-label, .mystery-eyebrow, .give-eyebrow { font-size: 0.8125rem; letter-spacing: 0.035em; }
.mystery-credit, .audio-row-text span { font-size: 0.8125rem; }
.sec-head h2 { flex: 1; min-width: 130px; font-size: 1.2rem; font-weight: 500; }
.mass-embed-card { background: var(--surface); }
.mass-embed-fallback { color: var(--muted); font-size: 0.875rem; }
.give-card { border-color: var(--line); }
.give-btn { min-height: 44px; font-size: 1rem; }
.page-lead { font-size: 1rem; line-height: 1.6; }
.pb-card-t, .pb-banner-body h2 { color: #F2EAD8; }
.pb-card-s { color: #E8C878; font-size: 0.8125rem; }
.pb-card { display: flex; flex-direction: column; aspect-ratio: auto; box-shadow: none; }
.pb-card img { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.pb-card-veil { display: none; }
.pb-card-lab { position: static; width: 100%; flex: 1; background: #11161F; }
.pb-card-t { overflow-wrap: anywhere; }
.pb-banner { display: grid; aspect-ratio: auto; }
.pb-banner img { aspect-ratio: 16 / 7; height: auto; object-fit: cover; }
.pb-banner-veil { display: none; }
.pb-banner-body { position: static; background: #11161F; }
.pb-banner-body h2, .pb-banner-body p { overflow-wrap: anywhere; }
.pb-back { width: 44px; height: 44px; border-color: var(--field-border); background: var(--surface); }
.pb-prow-text span, .pb-banner-body p { font-size: 0.875rem; }
.prayer-shortcuts:empty, .settings-slot:empty { display: none; }
.daily-actions[hidden], .today-streams[hidden], .sections[hidden], .prayer-shortcuts[hidden] { display: none; }
.prayer-shortcuts { margin: 15px 16px 22px; display: grid; gap: 12px; }
.prayer-shortcuts h2 { margin: 0 0 8px; font: 500 1.2rem/1.35 var(--serif); }
.prayer-shortcuts .pb-prow + .pb-prow { margin-top: 8px; }
.prayer-shortcuts .mer-card { margin: 0; }
.prayer-shortcuts .pb-list { padding: 0; }

.candle-actions { margin: 14px 18px 18px; grid-template-columns: minmax(0, 1fr) auto; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.candle-field span { font-size: 0.875rem; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--ink); }
.candle-note { font-size: 0.875rem; line-height: 1.55; text-align: left; }
.candle-note[data-tone="success"] { color: var(--green-ok); }
.candle-note[data-tone="warning"] { color: var(--gold); }
.candle-btn--secondary { color: var(--gold); }
.map-wrap { max-width: 600px; }
.mer-card h2 { font-size: 1.25rem; font-weight: 500; }
.mer-card p { font-size: 1rem; }
.mer-hint { font-size: 0.875rem !important; line-height: 1.6; }
.settings-subheading { margin: 18px 0 8px; font-size: 1rem; font-weight: 600; }
.settings-actions, .reader-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.settings-button { min-height: 44px; padding: 9px 13px; border: 1px solid var(--field-border); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: 1rem; line-height: 1.45; cursor: pointer; }
.settings-button[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.appearance-field { display: grid; gap: 6px; margin: 10px 0; font-size: 0.875rem; color: var(--muted); }
.appearance-field select { min-height: 44px; max-width: 100%; width: 100%; padding: 9px 36px 9px 12px; border: 1px solid var(--field-border); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: 1rem; }
.textsize-row { flex-wrap: wrap; gap: 12px; }
.textsize-row [data-ts-label] { font-size: 0.875rem; }
.credits li, .notice-card p, .credit-card p { font-size: 0.875rem; line-height: 1.6; }
.notice-hide { min-height: 44px; padding: 8px 12px; font-size: 0.875rem; border-color: var(--field-border); }
.notice-check { min-height: 44px; font-size: 1rem; }
.notice-check input { width: 20px; height: 20px; flex: 0 0 20px; }
.notice-controls { flex-wrap: wrap; }
.time-field { font-size: 0.875rem; letter-spacing: 0; text-transform: none; }
.time-field input { min-height: 44px; font-size: 1rem; }
.notice-button, .notice-card--collapsed button { min-height: 44px; font-size: 1rem; }
.week span { font-size: 0.8125rem; }
.download-list { display: grid; gap: 12px; list-style: none; margin: 12px 0; padding: 0; }
.download-item { display: grid; gap: 7px; border-top: 1px solid var(--line); padding-top: 12px; overflow-wrap: anywhere; }
.download-progress { width: 100%; accent-color: var(--gold); }
.settings-slot > .notice-card { margin: 14px 14px 0; }

.reader { background: var(--page-bg); color: var(--reader-ink); }
.reader-head, .reader-nav, .reader-scroll { width: min(680px, 100%); }
.reader-head { padding-top: max(10px, env(safe-area-inset-top)); }
.reader-cat { min-width: 0; font-size: 0.8125rem; letter-spacing: 0.04em; line-height: 1.5; overflow-wrap: anywhere; }
.reader-back { flex: 0 0 44px; background: var(--reader-bg); border: 1px solid var(--reader-line); }
.reader-tools { padding: 0 18px; background: var(--reader-chrome); border-bottom: 1px solid var(--reader-line); }
.reader-tools summary { min-height: 48px; padding: 11px 0; font-size: 1rem; cursor: pointer; color: var(--reader-accent); }
.reader-tools-content { display: grid; gap: 14px; padding: 3px 0 18px; }
.reader-textsize { display: grid; gap: 6px; font-size: 0.875rem; color: var(--reader-muted); }
.reader-tools .appearance-field { margin: 0; color: var(--reader-muted); }
.reader-tools .settings-button, .reader-tools .ts-btn, .reader-tools select { color: var(--reader-ink); background: var(--reader-bg); border-color: var(--reader-line); }
.reader-tools .settings-button[aria-pressed="true"] { color: var(--on-gold); background: var(--gold); }
.reader-art-frame { position: relative; }
.reader-page { padding: 25px 24px 32px; }
.reader-title { font-size: calc(1.85rem * var(--reading-scale, 1)); line-height: 1.25; font-weight: 500; overflow-wrap: anywhere; }
.reader-body { overflow-wrap: anywhere; }
.reader-body .pb-response { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
.reader-body h3 { font-size: calc(1.2rem * var(--reading-scale, 1)); }
.reader-body .refrain { background: var(--reader-chrome); }
.reader-body .refrain b { font-size: calc(0.8125rem * var(--reading-scale, 1)); }
.reader-source { border-color: var(--reader-line); }
.reader-artcredit, .reader-source, .reader-figcap { font-size: calc(0.875rem * var(--reading-scale, 1)); line-height: 1.65; }
.reader-nav { align-items: stretch; }
.reader-prev, .reader-next { min-height: 52px; padding: 8px 10px; }
.reader-nav-dir { font-size: 0.875rem; }
.reader-nav-title { white-space: normal; font-size: 0.875rem; line-height: 1.3; overflow-wrap: anywhere; }
.reader-pos { font-size: 0.8125rem; }
.reader-status { font-size: 0.875rem; color: var(--reader-muted); margin: 0; }

.tabs { width: min(1040px, 100%); background: var(--surface); backdrop-filter: none; }
.tab { position: relative; min-width: 0; min-height: 66px; padding: 9px 3px 10px; font-size: 0.8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.tab.is-active { background: var(--surface-2); font-weight: 600; }
.tab.is-active::before { content: ""; position: absolute; top: 0; left: calc(50% - 18px); width: 36px; height: 3px; border-radius: 0 0 3px 3px; background: currentColor; }
.mini { bottom: calc(76px + env(safe-area-inset-bottom)); width: min(620px, calc(100% - 24px)); background: var(--surface-2); border-color: var(--field-border); }
.mini-text strong { font-size: 1rem; line-height: 1.35; }
.mini-text span { color: var(--muted); font-size: 0.8125rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-status { display: block; min-width: 0; }
.mini-status:empty { display: none; }
.mini-toggle { min-height: 56px; border-color: var(--line); }
.player { background: var(--bg); color: var(--ink); }
.player-veil { background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 65%, transparent) 38%, var(--bg) 73%); }
.player-inner { overflow-y: auto; }
.player-info { background: var(--bg); padding: 16px; margin-inline: -16px; border-radius: 18px; }
.player-info > .reader-status { margin: 8px 0; color: var(--muted); }
.player-info > .settings-button { margin-block: 6px; }
.player-spacer { min-height: 50px; }
.player-close { color: var(--ink); background: var(--surface); border: 1px solid var(--field-border); flex: 0 0 44px; }
.player-pos { background: var(--surface); color: var(--muted); border-radius: 10px; padding: 6px 10px; font-size: 0.8125rem; }
.player-title { color: var(--ink); text-shadow: none; font-weight: 500; }
.player-eyebrow { font-size: 0.8125rem; }
.player-meta, .player-times { color: var(--muted); }
.player-times { font-size: 0.875rem; }
.player-progress { min-height: 44px; }
.player-progress::before { background: var(--line); }
.pc-main { background: var(--gold); color: var(--on-gold); }
.pc-skip span { font-size: 0.8125rem; }
.player-next { min-height: 44px; color: var(--ink); background: var(--surface); font-size: 1rem; border: 1px solid var(--field-border); white-space: normal; line-height: 1.45; overflow-wrap: anywhere; }
.view-stack { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }

@media (min-width: 740px) {
  .phone { width: calc(100% - 48px); }
  .day-head, .page-head { padding-left: 28px; padding-right: 28px; }
  .date-nav { max-width: 440px; }
  .today-focus { margin: 14px 24px 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.9fr); gap: 22px; align-items: center; }
  .hero-art { height: 275px; }
  .hero-body { padding: 18px 20px; }
  .hero-title { font-size: 1.8rem; }
  .daily-actions { margin: 0; gap: 12px; }
  .playday { min-height: 92px; }
  .today-streams { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin: 25px 24px 0; align-items: start; }
  .today-streams .readings-top, .today-streams .daily-audio { margin: 0; }
  .daily-section-title { margin-bottom: 12px; }
  .sections { margin: 22px 24px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px; }
  .sections--rosary { grid-template-columns: 1fr; }
  .give-card, .credit-card--today, .mer-card { margin: 22px 24px 0; padding: 22px; }
  .pb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px 24px 20px; gap: 20px; }
  .pb-list { padding: 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prayer-shortcuts { margin-left: 24px; margin-right: 24px; }
  .prayer-shortcuts .pb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-view="mer"] { max-width: 760px; margin-inline: auto; }
  [data-view="lys"] { max-width: 720px; margin-inline: auto; }
  .map-wrap { margin-inline: auto; }
  .tabs { width: min(1040px, calc(100% - 48px)); }
  .reader-page { padding: 30px 40px 40px; }
  .reader-tools-content { grid-template-columns: 1fr 1fr; }
  .reader-actions { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .candle-actions { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 360px) {
  .brand-by { width: 100%; margin-left: 17px; font-size: 0.8125rem; }
  .day-head { padding-inline: 14px; }
  .hero-art { height: 165px; }
  .hero-body { padding-inline: 13px; }
  .hero-title { font-size: 1.3rem; }
  .playday { padding-inline: 12px; gap: 8px; }
  .queue-action { grid-template-columns: 42px minmax(0, 1fr); gap: 8px; padding-inline: 3px; }
  .queue-thumb { width: 42px; height: 42px; }
  .queue-dur { grid-column: 2; margin-top: -4px; }
  .reader-page { padding-inline: 18px; }
  .reader-nav { gap: 5px; padding-inline: 8px; }
  .reader-body .pb-response { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .reader-body .pb-response .resp { text-align: left; }
}
