:root {
  --bg: #f6f2ea;
  --ink: #2c2418;
  --accent: #9b3f2b;
  --accent-soft: #d9b48a;
  --panel: #fffaf2;
  --shadow: rgba(43, 30, 16, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 10% 10%, #fcefdc 0%, transparent 60%),
    radial-gradient(900px 700px at 90% 20%, #f7dcc0 0%, transparent 55%),
    linear-gradient(160deg, #f1e5d4 0%, #efe7db 55%, #f5efe7 100%);
  min-height: 100vh;
}

.page {
  max-width: 840px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero {
  text-align: left;
  margin-bottom: 24px;
  animation: fadeIn 600ms ease-out;
}

.hero__headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.hero__headline .hero__title {
  margin: 0;
}

.hero__tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #4b2d16;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero__title {
  margin: 12px 0 6px;
  font-size: 34px;
  line-height: 1.1;
}

.hero__meta {
  font-size: 15px;
  color: #5b4631;
}

.nav {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav__btn {
  border: 1px solid rgba(44, 36, 24, 0.2);
  background: #fff6ea;
  color: #4b2d16;
  font-size: 13px;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.nav__btn--accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.nav__btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.nav__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(91, 70, 49, 0.18);
}

.nav__btn:active {
  transform: translateY(0);
}

.offline-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(44, 36, 24, 0.2);
  background: #ccc;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 300ms ease;
  padding: 0;
  flex-shrink: 0;
}

.offline-indicator:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(91, 70, 49, 0.25);
}

.offline-indicator:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.offline-indicator--green {
  background: #4caf50;
  border-color: #388e3c;
}

.offline-indicator--yellow {
  background: #ffc107;
  border-color: #ffa000;
}

.offline-indicator--updating {
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.panel {
  background: var(--panel);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 40px var(--shadow);
  border: 1px solid rgba(44, 36, 24, 0.08);
}


.panel__header {
  margin-bottom: 18px;
}

.panel__title {
  font-size: 20px;
  font-weight: 700;
}

.panel__subtitle {
  margin-top: 4px;
  color: #6d5740;
  font-size: 14px;
}

.reading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(44, 36, 24, 0.08);
  background: #fffdf9;
  margin-bottom: 12px;
  animation: riseIn 500ms ease-out;
}

.reading__title {
  font-size: 16px;
  font-weight: 600;
}

.reading__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b533b;
  margin-top: 4px;
}

.reading__meta-text {
  flex: 1;
}

.reading__badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4b2d16;
  background: #f1d8b7;
  padding: 4px 8px;
  border-radius: 999px;
  margin-right: 6px;
}

.reading__link {
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.reading__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(155, 63, 43, 0.25);
}

.reading__debug {
  font-size: 12px;
  color: #7a5c44;
  word-break: break-all;
}

.empty {
  color: #6b533b;
  font-size: 14px;
  padding: 12px 0;
}

/* Section divider shown between alternate reading sets on days with multiple
   valid masses (e.g. Ascension Sunday: Ascension + 7th Sunday of Easter). */
.reading__section {
  font-size: 17px;
  font-weight: 700;
  color: #4b2d16;
  letter-spacing: 0.01em;
  padding: 14px 4px 8px;
  margin-top: 8px;
  border-bottom: 1px solid rgba(155, 63, 43, 0.25);
}

.reading__section:first-child {
  padding-top: 0;
  margin-top: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .hero__title {
    font-size: 28px;
  }
  .hero__headline {
    flex-wrap: wrap;
  }
  .reading__meta {
    flex-wrap: wrap;
  }
}
