:root {
  color-scheme: light;
  --bg: #fcf7ec;
  --surface: #fffdf7;
  --surface-2: #f4ead8;
  --ink: #261d18;
  --muted: #786a5d;
  --line: #e5d7c1;
  --accent: #8d3028;
  --accent-2: #375f57;
  --gold: #c99a49;
  --ok: #2f6b3f;
  --shadow: 0 16px 38px rgba(52, 34, 18, 0.11);
  --radius: 8px;
  --tap: 46px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1411;
  --surface: #17201a;
  --surface-2: #223029;
  --ink: #fff7ec;
  --muted: #c8baaa;
  --line: #3a4b42;
  --accent: #ff927d;
  --accent-2: #91b99f;
  --gold: #e5be75;
  --ok: #9ed0ae;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 154, 73, 0.14), transparent 34vw),
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(252, 247, 236, 0.98)),
    var(--bg);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(145, 185, 159, 0.08), transparent 42vw),
    linear-gradient(180deg, #101612 0%, #0f1411 56%, #0b0f0d 100%),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 92px;
}

@media (min-width: 768px) {
  .app-shell { padding-inline: 32px; }
}

@media (min-width: 1200px) {
  .app-shell { padding-inline: 64px; }
}

.topbar {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px 14px;
  background: transparent;
  backdrop-filter: none;
}

:root[data-theme="dark"] .topbar {
  background: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.brand-logo {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  filter: drop-shadow(0 8px 14px rgba(85, 49, 20, 0.12));
}

:root[data-theme="dark"] .brand-logo {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.38));
}

.brand-copy {
  min-width: 0;
}

@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .brand-lockup { gap: 8px; }
  .brand-logo {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }
  .header-actions { gap: 4px; }
  .header-actions .icon-button {
    width: 42px;
    height: 42px;
  }
  h1 { font-size: 1.18rem; }
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.48rem;
  line-height: 1.1;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.18;
}

h3 {
  font-size: 1.02rem;
  line-height: 1.25;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.view {
  display: none;
  min-width: 0;
}

.view.active {
  display: block;
  width: 100%;
}

.toolbar,
.section-heading,
.progress-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar {
  margin: 10px 0 14px;
  /* Les deux champs restent alignés même si un libellé passe à la ligne */
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field span,
.progress-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.field.wide {
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  /* iOS : sans min-width/max-width, input[type=date] garde sa largeur
     intrinsèque et déborde de sa colonne (chevauchement Date / Zone). */
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  resize: vertical;
  min-height: 88px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(46, 111, 104, 0.16);
}

.icon-button,
.bottom-nav button,
.primary-button,
.secondary-button,
.text-button,
.quick-action,
.segmented button {
  border: 0;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffdf8, #f8eedc);
  color: var(--accent);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 8px 18px rgba(52, 34, 18, 0.07);
}

:root[data-theme="dark"] .icon-button {
  background: #151c18;
  color: var(--accent);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 10px 22px rgba(0, 0, 0, 0.24);
}

svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.hero-panel,
.section-card,
.section-block,
.progress-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(255, 251, 242, 0.9)),
    var(--surface);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .hero-panel,
:root[data-theme="dark"] .section-card,
:root[data-theme="dark"] .section-block,
:root[data-theme="dark"] .progress-panel {
  background: rgba(23, 32, 26, 0.94);
}

.hero-panel {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
  min-height: 128px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(244, 234, 216, 0.86)),
    var(--surface);
}

:root[data-theme="dark"] .hero-panel {
  background:
    linear-gradient(135deg, rgba(23, 32, 26, 0.98), rgba(34, 48, 41, 0.86)),
    var(--surface);
}

.hero-panel p:last-child {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.hero-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff8ed, #ead8b8);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(201, 154, 73, 0.26);
}

:root[data-theme="dark"] .hero-mark {
  background: #223029;
  box-shadow: inset 0 0 0 1px rgba(145, 185, 159, 0.18);
}

.hero-mark svg {
  width: 40px;
  height: 40px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.quick-action {
  min-height: 72px;
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
}

.quick-action span {
  display: block;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-action small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.section-block {
  margin-top: 14px;
  padding: 15px;
}

.section-heading {
  margin-bottom: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(55, 95, 87, 0.11);
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

:root[data-theme="dark"] .status-pill {
  background: rgba(156, 199, 181, 0.13);
}

.reading-list,
.office-content,
.entry-list,
.archive-list,
.question-list {
  display: grid;
  gap: 12px;
}

.reading-item,
.office-section,
.question-item,
.entry-item,
.archive-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: var(--surface);
}

.reading-item h3,
.office-section h3 {
  margin-bottom: 6px;
}

.reading-meta,
.office-meta,
.helper-text {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.aelf-html {
  margin-top: 10px;
  color: #342b21;
  line-height: 1.62;
}

:root[data-theme="dark"] .aelf-html {
  color: #e9e0d4;
}

.aelf-html p + p {
  margin-top: 11px;
}

.aelf-html strong {
  color: #201812;
}

:root[data-theme="dark"] .aelf-html strong {
  color: #fff7eb;
}

.aelf-html .verse_number {
  color: var(--accent);
  font-size: 0.75em;
  font-weight: 800;
  margin-right: 3px;
}

.segmented {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.segmented button {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 13px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  white-space: nowrap;
}

.segmented button.active {
  background: var(--accent);
  color: #fffaf4;
  box-shadow: none;
}

.section-card {
  padding: 15px;
}

.rosary-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.rosary-card p:last-child {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.rosary-visual {
  position: relative;
  width: 82px;
  height: 82px;
}

.rosary-visual span,
.rosary-visual i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px rgba(143, 47, 36, 0.22);
}

.rosary-visual span {
  width: 18px;
  height: 18px;
}

.rosary-visual span:nth-child(1) { left: 32px; top: 2px; }
.rosary-visual span:nth-child(2) { right: 4px; top: 25px; }
.rosary-visual span:nth-child(3) { right: 13px; bottom: 8px; }
.rosary-visual span:nth-child(4) { left: 13px; bottom: 8px; }
.rosary-visual span:nth-child(5) { left: 4px; top: 25px; }

.rosary-visual i {
  left: 30px;
  top: 30px;
  width: 22px;
  height: 22px;
  background: var(--accent);
}

.progress-panel {
  margin-top: 14px;
  padding: 13px;
}

.progress-panel strong {
  display: block;
  margin-top: 3px;
  font-size: 1.1rem;
}

.progress-actions {
  display: flex;
  gap: 8px;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: var(--tap);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(180deg, #9e3b31, var(--accent));
  color: #fffaf4;
  box-shadow: 0 10px 20px rgba(141, 48, 40, 0.16);
}

:root[data-theme="dark"] .primary-button {
  background: #ff927d;
  color: #111613;
  box-shadow: 0 10px 22px rgba(255, 146, 125, 0.13);
}

.secondary-button {
  background: linear-gradient(180deg, #fffdf8, #f8eedc);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--line);
}

:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .back-button,
:root[data-theme="dark"] .cal-arrow {
  background: #151c18;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--line);
}

.text-button {
  min-height: 34px;
  padding: 5px 8px;
  background: transparent;
  color: var(--accent);
}

audio {
  width: 100%;
  margin-top: 12px;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 8px;
}

.source-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.rosary-experience {
  display: grid;
  gap: 20px;
  padding-bottom: 18px;
}

.rosary-hero {
  position: relative;
  min-height: 318px;
  margin-inline: calc(50% - 50vw);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 247, 220, 0.98), rgba(250, 231, 180, 0.9)),
    #fff1cc;
}

:root[data-theme="dark"] .rosary-hero {
  background:
    linear-gradient(180deg, rgba(37, 43, 39, 0.98), rgba(54, 47, 36, 0.92)),
    #252b27;
}

.rosary-back {
  position: absolute;
  top: 24px;
  left: max(18px, calc(50vw - 370px));
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #083d4b;
}

:root[data-theme="dark"] .rosary-back {
  color: #dcece8;
}

.resurrection-scene {
  position: absolute;
  left: 50%;
  bottom: 42px;
  width: min(520px, 88vw);
  height: 242px;
  transform: translateX(-50%);
}

.scene-halo {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 360px;
  max-width: 88vw;
  height: 232px;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 50% 54%, rgba(255, 178, 45, 0.38) 0 34%, rgba(255, 235, 182, 0.64) 35% 52%, rgba(250, 255, 235, 0.48) 53% 70%, transparent 71%);
  transform: translateX(-50%);
}

:root[data-theme="dark"] .scene-halo {
  background:
    radial-gradient(circle at 50% 52%, rgba(214, 164, 91, 0.38) 0 34%, rgba(113, 90, 49, 0.46) 35% 52%, rgba(117, 185, 173, 0.16) 53% 70%, transparent 71%);
}

.scene-cross,
.scene-crossbar {
  position: absolute;
  left: 50%;
  border-radius: 999px;
  background: linear-gradient(180deg, #7d391c, #4c1f10);
  box-shadow: 0 12px 28px rgba(95, 43, 18, 0.22);
  transform: translateX(-50%);
}

.scene-cross {
  bottom: 44px;
  width: 34px;
  height: 188px;
}

.scene-crossbar {
  bottom: 138px;
  width: 252px;
  height: 32px;
}

:root[data-theme="dark"] .scene-cross,
:root[data-theme="dark"] .scene-crossbar {
  background: linear-gradient(180deg, #995034, #63301f);
}

.scene-rays {
  position: absolute;
  left: 50%;
  bottom: 38px;
  width: 288px;
  height: 210px;
  border-radius: 50% 50% 0 0;
  background:
    conic-gradient(from 180deg at 50% 100%, transparent 0 10deg, rgba(255, 181, 42, 0.28) 12deg 18deg, transparent 20deg 42deg, rgba(255, 181, 42, 0.24) 44deg 50deg, transparent 52deg 84deg, rgba(255, 181, 42, 0.22) 86deg 92deg, transparent 94deg 136deg, rgba(255, 181, 42, 0.24) 138deg 144deg, transparent 146deg 170deg, rgba(255, 181, 42, 0.28) 172deg 180deg);
  opacity: 0.82;
  transform: translateX(-50%);
}

.scene-rosary {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 300px;
  height: 92px;
  border-bottom: 5px solid rgba(184, 122, 43, 0.46);
  border-radius: 0 0 180px 180px;
  transform: translateX(-50%);
}

.scene-rosary span {
  position: absolute;
  bottom: -13px;
  width: 24px;
  height: 24px;
  border: 4px solid #ffb11d;
  border-radius: 50%;
  background: #fff8de;
}

.scene-rosary span:nth-child(1) { left: 26px; bottom: 24px; }
.scene-rosary span:nth-child(2) { left: 78px; bottom: 1px; }
.scene-rosary span:nth-child(3) { left: 138px; bottom: -14px; }
.scene-rosary span:nth-child(4) { right: 78px; bottom: 1px; }
.scene-rosary span:nth-child(5) { right: 26px; bottom: 24px; }

:root[data-theme="dark"] .scene-rosary {
  border-bottom-color: rgba(214, 164, 91, 0.45);
}

:root[data-theme="dark"] .scene-rosary span {
  background: #2f2b23;
  border-color: #d6a45b;
}

.scene-figure {
  position: absolute;
  left: 50%;
  bottom: 40px;
  width: 226px;
  height: 260px;
  transform: translateX(-50%);
}

.figure-head {
  position: absolute;
  left: 50%;
  top: 48px;
  width: 54px;
  height: 60px;
  border: 7px solid #6a351d;
  border-radius: 45% 45% 48% 48%;
  background: #f7dfb6;
  box-shadow: 0 0 0 24px #f5b33c;
  transform: translateX(-50%);
}

.figure-body {
  position: absolute;
  left: 50%;
  top: 104px;
  width: 178px;
  height: 194px;
  border-radius: 45% 45% 30% 30%;
  background: #fffdf4;
  transform: translateX(-50%) rotate(-3deg);
}

.figure-arm {
  position: absolute;
  top: 110px;
  width: 92px;
  height: 36px;
  border-radius: 999px;
  background: #fffdf4;
}

.figure-arm.left {
  left: 0;
  transform: rotate(-28deg);
}

.figure-arm.right {
  right: -2px;
  transform: rotate(-34deg);
}

:root[data-theme="dark"] .figure-body,
:root[data-theme="dark"] .figure-arm {
  background: #f0eadf;
}

.scene-banner {
  position: absolute;
  right: 112px;
  top: 86px;
  width: 50px;
  height: 78px;
  background: #083d4b;
  clip-path: polygon(0 10%, 100% 0, 82% 100%, 42% 78%, 0 92%);
}

.scene-banner::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 22px;
  width: 22px;
  height: 28px;
  border-left: 4px solid #fffdf4;
  border-bottom: 4px solid #fffdf4;
  transform: rotate(-22deg);
}

.scene-ground {
  position: absolute;
  bottom: 0;
  width: 176px;
  height: 82px;
  border-radius: 60% 40% 0 0;
  background: #c8bda1;
}

.scene-ground.left {
  left: 24px;
}

.scene-ground.right {
  right: 24px;
}

.rosary-hero-actions {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  width: min(620px, calc(100vw - 40px));
  transform: translate(-50%, 50%);
}

.round-action,
.rosary-pray-button {
  border: 0;
  box-shadow: 0 10px 26px rgba(96, 64, 28, 0.18);
}

.round-action {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fffdf9;
  color: #f6aa21;
}

.rosary-pray-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 172px;
  min-height: 62px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb600, #ff7500);
  color: #fffdf9;
  font-size: clamp(1.1rem, 4vw, 1.45rem);
  font-weight: 900;
}

.rosary-pray-button svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.4;
}

.rosary-summary {
  display: grid;
  place-items: center;
  gap: 10px;
  padding-top: 24px;
  text-align: center;
}

.rosary-summary .rosary-pray-button {
  margin-top: 10px;
}

.rosary-summary svg,
.player-title svg {
  width: 44px;
  height: 44px;
  color: #ffb11d;
  stroke-width: 2.4;
}

.rosary-summary h2,
.player-title h2 {
  color: #073d4c;
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 400;
}

.rosary-summary p,
.player-title p {
  color: #777b82;
  font-size: clamp(1.05rem, 4vw, 1.55rem);
}

:root[data-theme="dark"] .rosary-summary h2,
:root[data-theme="dark"] .player-title h2 {
  color: #f1ded0;
}

:root[data-theme="dark"] .rosary-summary p,
:root[data-theme="dark"] .player-title p {
  color: #c9b8aa;
}

.rosary-track-list {
  display: grid;
  gap: 14px;
}

.rosary-track {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  width: 100%;
  border: 1px solid #dfe6e7;
  border-radius: 22px;
  padding: 12px 20px 12px 12px;
  background: rgba(249, 253, 252, 0.94);
  color: #073d4c;
  text-align: left;
}

.rosary-track.active,
.rosary-track.prayer.active {
  border-color: #cdebed;
  background: #e4f8fa;
}

:root[data-theme="dark"] .rosary-track {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .rosary-track.active,
:root[data-theme="dark"] .rosary-track.prayer.active {
  border-color: rgba(224, 184, 109, 0.5);
  background:
    linear-gradient(180deg, rgba(224, 184, 109, 0.14), rgba(224, 146, 126, 0.09)),
    var(--surface);
}

.track-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.track-copy strong {
  overflow: hidden;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-copy small {
  color: #0e8292;
  font-size: clamp(0.94rem, 3.7vw, 1.25rem);
}

:root[data-theme="dark"] .track-copy small {
  color: #75b9ad;
}

.track-duration {
  color: #0e8292;
  font-size: clamp(1.05rem, 4vw, 1.5rem);
  white-space: nowrap;
}

:root[data-theme="dark"] .track-duration {
  color: #96d3cc;
}

.track-art {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #fff3cf;
  color: #ffab1f;
}

.track-art::before,
.track-art::after {
  content: "";
  position: absolute;
}

.track-art.intro::before {
  width: 34px;
  height: 48px;
  border: 4px solid currentColor;
  border-radius: 14px;
}

.track-art.intro::after {
  width: 48px;
  height: 20px;
  border: 4px solid currentColor;
  border-radius: 12px;
}

.track-art.mystery {
  background: linear-gradient(145deg, #fff7df, #ffe5a5);
  color: #d88d13;
}

.track-art.mystery::before {
  width: 38px;
  height: 38px;
  border: 4px solid currentColor;
  border-radius: 50%;
}

.track-art.mystery::after {
  width: 18px;
  height: 28px;
  border-top: 4px solid currentColor;
  border-left: 4px solid currentColor;
  transform: rotate(45deg);
}

.track-art.prayer {
  border-radius: 50%;
  background: #dff5f6;
  color: #138396;
}

.track-art.prayer::before {
  width: 34px;
  height: 34px;
  border: 4px solid currentColor;
  border-radius: 50%;
}

.track-art.prayer::after {
  width: 18px;
  height: 10px;
  border-right: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  transform: rotate(-45deg);
}

.rosary-player {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto 1fr;
  justify-items: center;
  gap: 20px;
  overflow-y: auto;
  padding: 42px 18px 34px;
  background: var(--surface);
  color: var(--ink);
}

.player-close {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: #073d4c;
}

:root[data-theme="dark"] .player-close {
  color: #e9f4f1;
}

.player-title {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
}

.player-card {
  display: grid;
  place-items: center;
  width: min(78vw, 430px);
  aspect-ratio: 1 / 0.78;
  border: 1px solid #e1ded1;
  border-radius: 24px;
  background: #fff1cc;
  box-shadow: 0 13px 30px rgba(20, 29, 28, 0.22);
}

:root[data-theme="dark"] .player-card {
  border-color: #4a4231;
  background: #2f2b23;
}

.track-art.large {
  width: 136px;
  height: 136px;
  border-radius: 22px;
}

.track-art.large.prayer {
  border-radius: 50%;
}

#playerTrackBadge {
  align-self: end;
  margin-bottom: 24px;
  border-radius: 8px;
  padding: 4px 12px;
  background: rgba(143, 47, 36, 0.35);
  color: #fffdf9;
  font-size: 1rem;
}

#playerTrackTitle {
  color: #5a210d;
  font-size: clamp(1.55rem, 7vw, 2.25rem);
  text-align: center;
}

#playerTrackSubtitle {
  color: #0e8292;
  font-size: clamp(1rem, 4vw, 1.25rem);
  text-align: center;
}

:root[data-theme="dark"] #playerTrackTitle {
  color: #f1ded0;
}

.player-timeline {
  display: grid;
  grid-template-columns: auto minmax(120px, 460px) auto;
  align-items: center;
  gap: 16px;
  width: min(100%, 620px);
  color: #b56400;
  font-size: clamp(1.05rem, 4vw, 1.45rem);
}

.player-timeline input {
  min-height: 28px;
  padding: 0;
  accent-color: #bd6800;
  background: transparent;
}

.player-controls {
  display: grid;
  grid-template-columns: 54px 84px 54px;
  align-items: center;
  gap: 16px;
}

.player-controls button {
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #bd6800;
}

.player-controls svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.4;
}

.player-main-control {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #bd6800 !important;
  color: #fffdf9 !important;
}

.player-main-control svg {
  width: 36px;
  height: 36px;
}

.exam-settings-grid {
  display: grid;
  gap: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.toggle-row input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--accent);
}

.exam-category-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.exam-category-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 560px) {
  .exam-category-controls {
    grid-template-columns: 1fr 1fr;
  }

  .exam-category-controls .field {
    grid-column: 1 / -1;
    order: -1;
  }
}

.vault-gate {
  display: block;
}

.hidden {
  display: none !important;
}

.question-item {
  display: grid;
  gap: 10px;
}

.question-row,
.entry-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.question-row input,
.entry-top input {
  width: 22px;
  min-height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.question-row label,
.entry-top label {
  line-height: 1.45;
  font-weight: 700;
}

.question-category,
.entry-date {
  color: var(--accent-2);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
}

.entry-item {
  display: grid;
  gap: 8px;
}

.entry-item p {
  color: var(--muted);
  line-height: 1.45;
}

.entry-actions {
  display: flex;
  justify-content: flex-end;
}

.danger-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.archive-item summary {
  cursor: pointer;
  font-weight: 800;
}

.archive-item ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.96);
  backdrop-filter: blur(14px);
}

:root[data-theme="dark"] .bottom-nav {
  background: rgba(20, 27, 23, 0.95);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 66px;
  padding: 8px 2px;
  background: transparent;
  color: var(--muted);
}

.bottom-nav button.active {
  color: var(--accent);
  background: linear-gradient(180deg, rgba(201, 154, 73, 0.13), rgba(141, 48, 40, 0.06));
}

:root[data-theme="dark"] .bottom-nav button.active {
  background: rgba(255, 146, 125, 0.08);
}

.bottom-nav span {
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(0.59rem, 2.2vw, 0.72rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav svg {
  width: 22px;
  height: 22px;
}

svg.icon-filled {
  fill: currentColor;
  stroke: none;
}

.loading-block {
  min-height: 120px;
}

/* ─── GARDE D'HONNEUR ────────────────────────────────────────────────────────*/

.garde-settings {
  margin-bottom: 16px;
}

.garde-settings .section-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.garde-settings-subtitle {
  margin-top: 4px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.garde-fixed-times {
  margin-top: -6px;
  padding-left: 28px;
}

.garde-time-row {
  padding: 6px 0 4px;
}

.garde-prayer-card {
  display: grid;
  gap: 20px;
  padding: 28px 22px 32px;
  text-align: center;
}

.garde-cadran {
  display: grid;
  place-items: center;
}

.garde-cadran-svg {
  width: min(220px, 72vw);
  height: auto;
  color: var(--accent);
  overflow: visible;
}

.garde-cadran-ring,
.garde-cadran-inner {
  fill: rgba(255, 253, 247, 0.84);
  stroke: var(--gold);
}

.garde-cadran-ring {
  stroke-width: 5;
}

.garde-cadran-inner {
  fill: rgba(244, 234, 216, 0.66);
  stroke-width: 1.6;
}

.garde-cadran-hours line,
.garde-cadran-cross {
  stroke: currentColor;
  stroke-linecap: round;
}

.garde-cadran-hours line {
  stroke-width: 4;
}

.garde-cadran-number {
  fill: var(--muted);
  stroke: none;
  font-size: 15px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.garde-cadran-flame {
  fill: rgba(201, 154, 73, 0.28);
  stroke: var(--gold);
  stroke-width: 2;
}

.garde-cadran-heart {
  fill: rgba(141, 48, 40, 0.13);
  stroke: var(--accent);
  stroke-width: 4;
}

.garde-cadran-cross {
  stroke-width: 8;
}

.garde-cadran-center {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2;
}

:root[data-theme="dark"] .garde-cadran-ring,
:root[data-theme="dark"] .garde-cadran-inner {
  fill: rgba(23, 32, 26, 0.72);
}

:root[data-theme="dark"] .garde-cadran-flame {
  fill: rgba(229, 190, 117, 0.18);
}

:root[data-theme="dark"] .garde-cadran-heart {
  fill: rgba(255, 146, 125, 0.12);
}

.garde-prayer-title {
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 700;
  color: var(--accent);
}

.garde-prayer-intro {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.9;
}

.garde-prayer-body {
  display: grid;
  gap: 20px;
  line-height: 1.9;
  font-size: 1rem;
}

.garde-prayer-body em {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-style: italic;
}

.garde-ref {
  display: block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 2px;
}

.is-native .web-only {
  display: none;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#printZone {
  display: none;
}

@media print {
  .app-shell, #toast { display: none !important; }
  #printZone {
    display: block !important;
    font-family: Georgia, serif;
    color: #000;
    max-width: 580px;
    margin: 0 auto;
    padding: 24px;
    line-height: 1.7;
  }
  #printZone h1 {
    font-size: 1.4rem;
    margin-bottom: 4px;
    border-bottom: 2px solid #8f2f24;
    padding-bottom: 6px;
  }
  #printZone .print-date {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 16px;
  }
  #printZone h2 {
    font-size: 1.05rem;
    margin: 20px 0 8px;
    color: #8f2f24;
  }
  #printZone ul {
    padding-left: 1.4rem;
    margin: 0;
  }
  #printZone li {
    margin-bottom: 6px;
    font-size: 0.9rem;
  }
  #printZone .print-prayer {
    font-style: italic;
    border-left: 3px solid #8f2f24;
    padding-left: 14px;
    margin-top: 8px;
    font-size: 0.92rem;
    line-height: 1.8;
  }
}

.garde-prayer-closing {
  font-weight: 800;
  color: var(--accent);
  font-size: 1rem;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}


/* ─── BOUTON OFFICES (vue Jour) ──────────────────────────────────────────── */

.offices-link {
  display: grid;
  grid-template-columns: 28px 1fr 20px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: var(--shadow);
  text-align: left;
  margin-bottom: 16px;
  color: var(--ink);
}

:root[data-theme="dark"] .offices-link {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}

.offices-link-icon { color: var(--accent); width: 22px; height: 22px; }
.offices-link-text { font-weight: 700; font-size: 0.95rem; }
.offices-link-sub { display: block; color: var(--muted); font-size: 0.75rem; margin-top: 2px; }
.offices-link-chevron { color: var(--muted); width: 18px; height: 18px; }

/* ─── VUE PRIÈRES ────────────────────────────────────────────────────────── */

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.prayer-btn {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 250, 240, 0.92)),
    var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
}

:root[data-theme="dark"] .prayer-btn {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}

.prayer-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
}

.prayer-btn:active { transform: scale(0.98); }

.prayer-btn-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}

.prayer-btn-text { min-width: 0; }

.prayer-btn-name {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.prayer-btn-cat {
  display: block;
  margin-top: 3px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-2);
}

.prayer-btn-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.prayer-btn-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(143, 47, 36, 0.1);
  border-radius: 4px;
  padding: 2px 7px;
}

/* ─── MODAL PRIÈRE ───────────────────────────────────────────────────────── */

.prayer-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12, 15, 14, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s;
  pointer-events: none;
}

.prayer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.prayer-modal {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding-bottom: max(env(safe-area-inset-bottom), 20px);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.prayer-overlay.open .prayer-modal {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .prayer-overlay { align-items: center; padding: 24px; }
  .prayer-modal {
    border-radius: 20px;
    max-width: 540px;
    max-height: 80vh;
    transform: translateY(12px) scale(0.97);
  }
  .prayer-overlay.open .prayer-modal { transform: translateY(0) scale(1); }
}

.prayer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.prayer-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.prayer-modal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.prayer-lang-btn {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  padding: 5px 11px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.prayer-lang-btn:hover,
.prayer-lang-btn.active {
  background: var(--accent);
  color: #fffdf9;
}

.prayer-modal-body {
  padding: 22px 24px 12px;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-line;
}

.skeleton {
  height: 74px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #eee2d1, #faf5eb, #eee2d1);
  background-size: 200% 100%;
  animation: pulse 1.3s infinite linear;
}

:root[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #251c18, #342820, #251c18);
}

.skeleton.short {
  height: 42px;
  width: 74%;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--muted);
  line-height: 1.45;
  background: rgba(255, 253, 249, 0.65);
}

:root[data-theme="dark"] .empty-state {
  background: rgba(23, 32, 26, 0.65);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 40;
  width: min(calc(100% - 28px), 420px);
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #251f19;
  color: #fffaf4;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

:root[data-theme="dark"] .toast {
  background: #f8efe6;
  color: #0f1411;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes pulse {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding-inline: 12px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel,
  .rosary-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .hero-mark {
    width: 52px;
    height: 52px;
  }

  .rosary-visual {
    width: 56px;
    height: 56px;
    transform: scale(0.72);
    transform-origin: left center;
  }

  .progress-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .progress-actions {
    grid-column: 1 / -1;
  }

  .progress-actions button {
    flex: 1;
  }
}

@media (min-width: 780px) {
  .content {
    padding: 10px 0 18px;
  }

  .view.active {
    max-width: 760px;
    margin: 0 auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   PHASE 0 — Plateforme : pôles (hubs), moteur de contenu, fiches.
   Réutilise les tokens warm existants (--surface, --line, --accent, --gold…).
   ═══════════════════════════════════════════════════════════════════════ */

/* Outils rapides (Accueil) : 2 colonnes même sur desktop */
.quick-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* En-tête de pôle / de collection */
.pole-header { margin: 6px 0 16px; }
.pole-header h2 { margin-top: 2px; }
.pole-header .pole-intro {
  margin-top: 8px;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.5;
}

/* Bouton retour */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  margin-bottom: 12px;
  padding: 6px 14px 6px 9px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffdf8, #f8eedc);
  color: var(--accent);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 8px 18px rgba(52, 34, 18, 0.07);
  font-weight: 800;
}
.back-button svg { width: 18px; height: 18px; }

/* Grille de cartes de hub */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 520px) { .hub-grid { grid-template-columns: 1fr; } }

.hub-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 250, 240, 0.92)),
    var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
:root[data-theme="dark"] .hub-card {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}
.hub-card:active { transform: scale(0.97); }
.hub-card:hover { border-color: rgba(201, 154, 73, 0.55); }

.hub-card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(145deg, #f7ead4, #efe0c2);
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}
:root[data-theme="dark"] .hub-card-icon {
  background: #223029;
  color: #fff7ec;
  box-shadow: inset 0 0 0 1px rgba(145, 185, 159, 0.12);
}
:root[data-theme="dark"] .prayer-btn-icon,
:root[data-theme="dark"] .card-thumb {
  background: #223029;
  color: #fff7ec;
  box-shadow: inset 0 0 0 1px rgba(145, 185, 159, 0.12);
}
.hub-card-text { min-width: 0; }
.hub-card-name { display: block; font-weight: 800; line-height: 1.25; }
.hub-card-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}
.hub-card-chevron { color: var(--muted); }
.hub-card.is-soon { opacity: 0.6; }
.hub-card.is-soon .hub-card-chevron { display: none; }

/* Liste de fiches (collection) */
.content-list { display: grid; gap: 12px; }

.content-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 250, 240, 0.92)),
    var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform 0.12s ease;
}
:root[data-theme="dark"] .content-card {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}
.content-card:active { transform: scale(0.98); }

.card-thumb {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), var(--gold));
  color: #fff8ee;
  font-size: 26px;
  font-weight: 800;
}
.card-body { min-width: 0; align-self: center; }
.card-title { font-weight: 800; line-height: 1.2; }
.card-meta {
  margin-top: 3px;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 700;
}
.card-summary {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

/* Note de collection (contenu à vérifier) */
.collection-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Champ de filtre */
.filter-field { position: relative; margin-bottom: 14px; }
.filter-field input { padding-left: 38px; }
.filter-field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* Fiche article */
.article-hero {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 22px;
  border-radius: 12px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 248, 238, 0.18), transparent 42%),
    linear-gradient(145deg, var(--accent), var(--gold));
  color: #fff8ee;
}
.article-hero .article-emoji { font-size: 44px; line-height: 1; }
.article-hero h2 { color: #fff8ee; }
.article-hero .article-eyebrow {
  color: rgba(255, 248, 238, 0.85);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.article-meta .status-pill { background: var(--surface-2); color: var(--accent); }
.article-body { color: var(--ink); line-height: 1.62; }
.article-body p + p { margin-top: 12px; }
.article-sources {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.article-sources h3 { font-size: 0.9rem; }
.article-sources ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Calendrier liturgique */
.cal-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cal-bar input[type="date"] { flex: 1; min-width: 0; text-align: center; }
.cal-arrow {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffdf8, #f8eedc);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cal-day { display: flex; align-items: flex-start; gap: 14px; }
.cal-color {
  width: 24px;
  height: 24px;
  margin-top: 4px;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.cal-day-text { min-width: 0; }
.cal-day-text h3 { margin-top: 2px; }
.cal-color-label { margin-top: 6px; color: var(--muted); font-size: 0.82rem; }
.cal-links { display: flex; gap: 10px; margin-top: 14px; }
.cal-links .secondary-button { flex: 1; }

/* Accueil (tableau de bord, inspiré de miradei) */
.home-hero {
  margin-bottom: 14px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 154, 73, 0.18), transparent 34%),
    linear-gradient(140deg, rgba(141, 48, 40, 0.08), rgba(201, 154, 73, 0.13)),
    var(--surface);
}
:root[data-theme="dark"] .home-hero {
  border-color: rgba(229, 189, 114, 0.34);
  background:
    radial-gradient(circle at 100% 0%, rgba(229, 189, 114, 0.12), transparent 34%),
    linear-gradient(140deg, rgba(238, 161, 143, 0.08), rgba(229, 189, 114, 0.08)),
    var(--surface);
}
.home-hero h2 { margin-top: 4px; font-size: 1.5rem; line-height: 1.15; }
.home-hero-sub { margin-top: 8px; max-width: 46ch; color: var(--muted); line-height: 1.5; }

.home-day { display: flex; align-items: flex-start; gap: 14px; }
.home-day .cal-color { margin-top: 4px; }
.home-day-text { min-width: 0; }
.home-day-text h3 { margin-top: 2px; }

.home-gospel-text {
  margin: 10px 0 12px;
  color: var(--ink);
  line-height: 1.6;
}

.home-section { margin-top: 18px; }
.home-section > .eyebrow { display: block; margin-bottom: 10px; }

.home-saints { margin-top: 14px; }
.daily-saints-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}
.daily-saint-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}
.daily-saints-detail-title {
  margin: 16px 0 10px;
  font-weight: 800;
}
.daily-saints-note,
.daily-saints-source { margin-top: 12px; }
.daily-saints-source a { color: var(--accent); }

.home-feature {
  display: block;
  width: 100%;
  margin-top: 18px;
  text-align: left;
  border-left: 4px solid var(--accent);
}
.home-feature h3 { margin-top: 3px; }
.home-feature .helper-text { margin-top: 6px; }
.home-feature-cta {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 800;
}

/* Hero avec image + calendrier intégré à l'accueil */
.home-hero { padding: 0; overflow: hidden; }
.home-hero-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  line-height: 0;
  overflow: hidden;
  background: #ead3a6;
}
.home-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.02), rgba(252, 247, 236, 0.15));
}
.home-hero-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}
:root[data-theme="dark"] .home-hero-media {
  background: #2b1d16;
}
:root[data-theme="dark"] .home-hero-media::after {
  background:
    linear-gradient(180deg, rgba(15, 20, 17, 0.04), rgba(15, 20, 17, 0.42)),
    radial-gradient(circle at 50% 30%, transparent 0%, rgba(15, 20, 17, 0.15) 70%);
}
:root[data-theme="dark"] .home-hero-art {
  filter: brightness(0.78) saturate(0.94) contrast(1.04);
}
.home-hero-body { padding: 16px 18px 20px; }
.home-hero-title { margin-top: 4px; font-size: 1.5rem; line-height: 1.15; }
.cal-day-mount { min-height: 44px; }

/* ══════════════ LARGE : tablette & ordinateur ══════════════
   On garde la barre du bas, mais on élargit le contenu et on
   passe en multi-colonnes. Les textes longs restent lisibles. */
@media (min-width: 768px) {
  .view.active { max-width: 900px; }

  .hub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Tuiles « journée de foi » et hub Prières : 2 colonnes (plus larges) */
  .home-section .hub-grid,
  #view-prieres-hub .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Confort de lecture : on borne la largeur des textes longs */
  .aelf-html,
  .article-body,
  .home-gospel-text { max-width: 72ch; }

  /* Barre du bas : pilule centrée flottante (moins « appli mobile ») */
  .bottom-nav {
    width: min(560px, calc(100% - 32px));
    bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .bottom-nav button { min-height: 60px; }
  .home-hero-media { aspect-ratio: 16 / 7; }
}

@media (min-width: 1024px) {
  .view.active { max-width: 1120px; }

  /* Accueil : gauche = calendrier + « journée de foi », droite = évangile */
  .home-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
  }

  .content-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ══════════════ CHAPELET ══════════════ */
.chapelet-hero { margin-bottom: 16px; text-align: center; }
.chapelet-title {
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.1;
}
.chapelet-intro {
  margin: 10px auto 0;
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.55;
}

.chapelet-today {
  display: block;
  width: 100%;
  margin-bottom: 18px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0%, rgba(201, 154, 73, 0.18), transparent 34%),
    linear-gradient(140deg, rgba(141, 48, 40, 0.08), rgba(201, 154, 73, 0.13)),
    var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s ease;
}
:root[data-theme="dark"] .chapelet-today {
  background:
    radial-gradient(circle at 100% 0%, rgba(224, 184, 109, 0.14), transparent 34%),
    linear-gradient(140deg, rgba(224, 146, 126, 0.10), rgba(224, 184, 109, 0.10)),
    var(--surface);
}
.chapelet-today:active { transform: scale(0.99); }
.chapelet-today h3 { margin-top: 4px; font-size: 1.4rem; }
.chapelet-today-sub { margin-top: 4px; color: var(--muted); font-size: 0.9rem; }
.chapelet-today-cta { display: inline-block; margin-top: 12px; color: var(--accent); font-weight: 800; }

.chapelet-choose { display: block; margin-bottom: 10px; }
.chapelet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.chapelet-card {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 250, 240, 0.92)),
    var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
:root[data-theme="dark"] .chapelet-card {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}
.chapelet-card:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.chapelet-card.is-soon { opacity: 0.62; }
.chapelet-dot { width: 12px; height: 12px; border-radius: 50%; }
.chapelet-card-name { display: block; font-weight: 800; line-height: 1.2; }
.chapelet-card-days { display: block; margin-top: 3px; color: var(--muted); font-size: 0.8rem; }

/* Lecteur */
.chapelet-player { max-width: 560px; margin: 0 auto; }
.chapelet-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.chapelet-player-head .back-button { margin-bottom: 0; }
.chapelet-mystery { flex: 1; text-align: center; color: var(--accent); font-weight: 800; font-size: 0.9rem; }
.chapelet-counter { flex-shrink: 0; color: var(--muted); font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; }

.chapelet-beads { margin: 6px auto 4px; }
.chapelet-beads-svg { display: block; width: 100%; max-width: 208px; height: auto; margin: 0 auto; }
.chapelet-bead { transition: stroke 0.1s ease; }
.chapelet-bead:hover { stroke: var(--accent-2); stroke-width: 2.2; }
.chapelet-bead.is-active { stroke: var(--gold); stroke-width: 3; }
/* La zone tactile de la croix ne doit jamais être dessinée (sinon cadre visible) */
.chapelet-bead .chapelet-hit { stroke: none !important; fill: transparent !important; }

.chapelet-audio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.chapelet-play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fffaf4;
}
.chapelet-play svg { width: 22px; height: 22px; }
.chapelet-play .chapelet-play-icon { fill: currentColor; stroke: none; }
/* Bouton de mode : Audio ↔ Silence */
.chapelet-mode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  min-height: 38px;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.chapelet-mode svg { width: 17px; height: 17px; }
.chapelet-mode.is-audio {
  background: var(--accent);
  color: #fffaf4;
}

.chapelet-playback {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.chapelet-playback.hidden { display: none !important; }
.chapelet-seek { flex: 1; min-height: 24px; padding: 0; background: transparent; border: 0; }

.chapelet-hint { margin: 12px 0; text-align: center; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }

.chapelet-step { padding: 22px 20px; min-height: 130px; text-align: center; }
.chapelet-step-eyebrow {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.chapelet-step-title {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}
.chapelet-step-text {
  margin-top: 14px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.75;
  white-space: pre-line;
}

.chapelet-controls { display: flex; gap: 12px; margin-top: 16px; }
.chapelet-controls button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.chapelet-controls button:disabled { opacity: 0.45; cursor: default; }
.chapelet-controls svg { width: 18px; height: 18px; }

.chapelet-keys { margin-top: 14px; text-align: center; color: var(--muted); font-size: 0.75rem; }

/* ══════════════ COMPTEURS DE PRIÈRE ══════════════ */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  display: grid;
  gap: 2px;
  padding: 18px 16px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .stat-card {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}
.stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-label { font-weight: 700; font-size: 0.9rem; }
.stat-sub { color: var(--muted); font-size: 0.78rem; }

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.stat-row:first-of-type { border-top: 0; }
.stat-row strong { font-variant-numeric: tabular-nums; color: var(--accent); }

.account-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.account-info-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

:root[data-theme="dark"] .account-info-row {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}

.account-info-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.account-info-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .account-info-grid { grid-template-columns: 1fr; }
}

.prayer-modal-foot {
  padding: 4px 24px 18px;
}
.prayer-modal-foot .primary-button { width: 100%; }

/* ══════════════ BIBLE ══════════════ */

/* Accueil du module */
.bible-resume,
.bible-marks-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  cursor: pointer;
}
:root[data-theme="dark"] .bible-resume,
:root[data-theme="dark"] .bible-marks-link {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}
.bible-resume { flex-direction: column; align-items: flex-start; gap: 4px; }
.bible-resume strong { font-size: 1.05rem; }
.bible-marks-link span:first-child { font-weight: 800; }

.bible-book-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}
.bible-book {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 11px 13px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
:root[data-theme="dark"] .bible-book {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}
.bible-book:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.bible-book-abbr {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}
.bible-book-name {
  font-weight: 700;
  line-height: 1.2;
  font-size: 0.92rem;
  overflow-wrap: normal;
  word-break: normal;
}
.bible-book-meta { color: var(--muted); font-size: 0.75rem; }

@media (min-width: 720px) {
  .bible-book-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* Chapitres */
.bible-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
}
.bible-chapter {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
:root[data-theme="dark"] .bible-chapter {
  background:
    linear-gradient(180deg, rgba(23, 32, 26, 0.97), rgba(18, 24, 21, 0.94)),
    var(--surface);
}
.bible-chapter:hover { border-color: var(--accent-2); color: var(--accent); }

/* Lecteur */
.bible-reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.bible-reader-head .back-button { margin-bottom: 0; }
.bible-reader-title { flex: 1; text-align: center; font-weight: 800; }
.bible-reader-count { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

.bible-text { padding: 20px; max-width: 72ch; margin-inline: auto; }
.bible-verse-wrap + .bible-verse-wrap { margin-top: 6px; }
.bible-verse {
  margin: 0;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1.75;
  cursor: pointer;
  transition: background 0.12s ease;
}
.bible-vnum {
  margin-right: 5px;
  color: var(--accent);
  font-size: 0.72em;
  font-weight: 800;
  vertical-align: super;
}
.bible-verse:hover { background: var(--surface-2); }
.bible-verse.is-selected { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.bible-verse.is-target { animation: pulse-target 2s ease; }
@keyframes pulse-target {
  0%, 100% { background: transparent; }
  25% { background: var(--surface-2); }
}
.bible-verse[data-mark="jaune"] { background: rgba(227, 179, 65, 0.28); }
.bible-verse[data-mark="vert"] { background: rgba(74, 157, 110, 0.24); }
.bible-verse[data-mark="bleu"] { background: rgba(74, 127, 181, 0.24); }
.bible-verse[data-mark="rose"] { background: rgba(199, 106, 146, 0.24); }
.bible-note-flag { margin-left: 6px; color: var(--accent); font-size: 0.85em; }
.bible-note-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
  cursor: pointer;
}
:root[data-theme="dark"] .bible-note-toggle {
  background: #17221d;
  color: var(--accent);
}
.bible-note-inline {
  margin: 4px 0 10px 28px;
  padding: 9px 11px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: pre-line;
}
:root[data-theme="dark"] .bible-note-inline { background: #17221d; }

.bible-nav { display: flex; gap: 10px; margin-top: 16px; }
.bible-nav .secondary-button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.bible-nav .secondary-button:disabled { opacity: 0.45; cursor: default; }
.bible-nav svg { width: 18px; height: 18px; }
.bible-credit { margin-top: 12px; text-align: center; font-size: 0.75rem; }

/* Barre d'actions sur un verset */
.bible-actions {
  position: fixed;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 45;
  width: min(560px, calc(100% - 24px));
  transform: translateX(-50%);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(50, 38, 24, 0.22);
}
:root[data-theme="dark"] .bible-actions { background: #1f2320; }
.bible-actions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.bible-swatches { display: flex; gap: 8px; margin-bottom: 12px; }
.bible-swatch {
  width: 34px;
  height: 34px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}
.bible-swatch.is-on { border-color: var(--ink); }
.bible-swatch.is-none {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
}
.bible-act-row { display: flex; gap: 8px; flex-wrap: wrap; }
.bible-act-row .secondary-button { flex: 1; min-width: 110px; padding: 9px 10px; font-size: 0.85rem; }
.bible-act-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Modale (note / dossiers) */
.bible-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: flex-end;
  background: rgba(12, 15, 14, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.bible-overlay.open { opacity: 1; pointer-events: all; }
.bible-modal {
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
  transform: translateY(100%);
  transition: transform 0.28s ease;
}
.bible-overlay.open .bible-modal { transform: translateY(0); }
.bible-modal-body { padding: 18px 20px; display: grid; gap: 8px; }
.bible-modal-foot { padding: 0 20px 16px; }
.bible-modal-foot .primary-button { width: 100%; }

.bible-study-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.bible-local-search { margin-top: 10px; }
.bible-note-only-toggle { margin-top: 10px; }
.bible-marks-actions,
.bible-bulk-bar,
.bible-folder-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.bible-marks-actions .secondary-button,
.bible-bulk-bar .secondary-button,
.bible-folder-row-actions .secondary-button {
  flex: 1 1 150px;
}
.bible-bulk-bar {
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
:root[data-theme="dark"] .bible-bulk-bar { background: #17221d; }
.bible-bulk-bar strong {
  flex: 1 0 100%;
  color: var(--accent);
}
.bible-mark-card.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.bible-mark-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.bible-mark-badges span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}
.bible-folder-manager { display: grid; gap: 12px; }
.bible-folder-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
:root[data-theme="dark"] .bible-folder-row { background: #151c18; }
.bible-folder-create {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
@media (min-width: 640px) {
  .bible-overlay { align-items: center; padding: 24px; }
  .bible-modal { max-width: 520px; border-radius: 20px; transform: translateY(12px) scale(0.97); }
  .bible-overlay.open .bible-modal { transform: translateY(0) scale(1); }
}

/* ══════════════ NOTIFICATIONS PUSH ══════════════ */
.push-status {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.push-status .cal-links { margin-top: 0; }
.push-status .primary-button { width: 100%; }
