:root {
  color-scheme: light;
  --blue: #1e83b7;
  --deep-blue: #17638c;
  --pale-blue: #eaf5fb;
  --gold: #d8c99a;
  --ink: #243a47;
  --muted: #667b87;
  --paper: rgba(255, 255, 255, 0.94);
  --line: rgba(30, 131, 183, 0.18);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #edf6fb;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(238, 248, 253, 0.34), rgba(255, 252, 244, 0.78)),
    url("./assets/mountains.jpeg") center bottom / cover fixed;
}

button {
  font: inherit;
}

.record-person-link {
  display: flex;
  width: 100%;
  min-height: 68px;
  margin: 0 0 22px;
  padding: 13px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(216, 201, 154, 0.88);
  border-radius: 16px;
  color: var(--deep-blue);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(251,245,229,.88));
  box-shadow: 0 8px 22px rgba(34, 87, 116, 0.09);
  text-decoration: none;
}

.record-person-link span {
  font-weight: 800;
}

.record-person-link span::after {
  content: " 〉";
}

.record-person-link small {
  color: var(--muted);
  font-size: .75rem;
  text-align: right;
}

.record-person-link[hidden] {
  display: none;
}

.wall-preview-link {
  color: var(--deep-blue);
  font-weight: 700;
}

.app-shell {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(34px, env(safe-area-inset-bottom));
}

.masthead {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 28px rgba(41, 91, 119, 0.1);
  backdrop-filter: blur(10px);
}

.logo {
  display: block;
  width: 54px;
  height: 44px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--deep-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0;
  color: var(--deep-blue);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.36rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.day-picker {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 3px 12px;
  padding: 8px 10px 8px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.day-picker label {
  flex: 0 0 auto;
  color: var(--deep-blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.day-picker select {
  width: 100%;
  min-height: 44px;
  padding: 8px 36px 8px 12px;
  border: 1px solid rgba(30, 131, 183, 0.25);
  border-radius: 10px;
  color: var(--deep-blue);
  background: rgba(255, 255, 255, 0.94);
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
}

.day-picker select:focus-visible {
  outline: 3px solid rgba(30, 131, 183, 0.35);
  outline-offset: 2px;
}

.devotion-card {
  overflow: hidden;
  padding: 24px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(34, 87, 116, 0.18);
  backdrop-filter: blur(10px);
}

.day-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 800;
}

#day-number {
  letter-spacing: 0.08em;
}

.week {
  margin: 20px 0 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

h2 {
  margin: 0 0 23px;
  color: var(--deep-blue);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.55rem, 6.1vw, 2.05rem);
  line-height: 1.45;
  letter-spacing: 0.025em;
}

.section-label {
  margin: 0 0 8px;
  color: var(--deep-blue);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.scripture-block,
.reading-block,
.prayer-block {
  margin: 0 0 18px;
}

.scripture-block {
  padding: 15px 16px;
  border-left: 4px solid var(--blue);
  border-radius: 4px 14px 14px 4px;
  background: var(--pale-blue);
}

.scripture {
  margin: 0;
  color: var(--deep-blue);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.18rem;
  font-weight: 700;
}

.bible-links {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.bible-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 48px;
  padding: 9px 12px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(30, 131, 183, 0.34);
  border-radius: 12px;
  color: var(--deep-blue);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 14px rgba(34, 87, 116, 0.07);
  text-decoration: none;
}

.bible-link::before {
  content: "🎧";
  grid-column: 1;
  grid-row: 1 / span 2;
  margin-right: 1px;
  font-size: 1.12rem;
}

.bible-link-label {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.94rem;
  font-weight: 800;
}

.bible-link small {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.bible-link::after {
  content: "開く ↗";
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.bible-link:hover {
  border-color: rgba(30, 131, 183, 0.58);
  background: #fff;
}

.bible-link:focus-visible {
  outline: 3px solid rgba(30, 131, 183, 0.35);
  outline-offset: 2px;
}

.body-copy {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.95;
}

.prayer-block {
  padding: 16px;
  border: 1px solid rgba(216, 201, 154, 0.62);
  border-radius: 16px;
  background: rgba(251, 245, 229, 0.72);
}

.one-person {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 20px 0 23px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
}

.open-full {
  display: flex;
  width: 100%;
  min-height: 62px;
  margin: 4px 0 10px;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(30, 131, 183, 0.38);
  border-radius: 15px;
  color: var(--deep-blue);
  background: rgba(234, 245, 251, 0.68);
  text-align: left;
  cursor: pointer;
}

.pastor-comment-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  margin: 0 0 19px;
  padding: 11px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(191, 145, 40, 0.34);
  border-radius: 15px;
  color: #725315;
  background: rgba(252, 246, 226, 0.72);
  text-align: left;
}

.pastor-comment-button.is-ready { cursor: pointer; }
.pastor-comment-button:disabled { cursor: default; opacity: 0.68; }
.pastor-comment-button span { flex: 0 0 auto; font-weight: 800; }
.pastor-comment-button span::before { content: "♪ "; }
.pastor-comment-button span::after { content: " 〉"; }
.pastor-comment-button.is-open span::after { content: " ﹀"; }
.pastor-comment-button small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: right;
}

.pastor-comment-player {
  margin: -9px 0 19px;
  padding: 13px 15px 15px;
  border: 1px solid rgba(191, 145, 40, 0.25);
  border-radius: 15px;
  background: rgba(255, 253, 246, 0.9);
}

.pastor-comment-player p {
  margin: 0 0 9px;
  color: #725315;
  font-size: 0.85rem;
  font-weight: 800;
}

.pastor-comment-player audio { width: 100%; min-height: 42px; }

.open-full span {
  flex: 0 0 auto;
  font-weight: 800;
}

.open-full span::after {
  content: " 〉";
}

.open-full small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: right;
}

.one-person-mark {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 1.4rem;
  font-weight: 300;
}

.one-person p {
  margin: 0 0 3px;
  color: var(--deep-blue);
  font-weight: 800;
}

.one-person div span {
  color: var(--muted);
  font-size: 0.85rem;
}

.page-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.page-nav button {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--deep-blue);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.page-nav button:last-child {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.page-nav button:disabled {
  opacity: 0.36;
  cursor: default;
}

.detail-view {
  padding-top: 20px;
}

.back-link {
  min-height: 44px;
  margin: 0 0 22px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--deep-blue);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.detail-meta {
  margin-top: 2px;
}

.detail-section {
  margin: 0 0 24px;
}

.linked-copy {
  white-space: normal;
}

.column-actions {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.column-link {
  display: flex;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(30, 131, 183, 0.32);
  border-radius: 12px;
  color: var(--deep-blue);
  background: var(--pale-blue);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.column-link::after {
  content: "読む 〉";
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 0.8rem;
}

.prayer-points ul,
.prayer-points {
  margin-bottom: 24px;
}

.prayer-points ul {
  margin-top: 0;
  padding-left: 1.35em;
}

.prayer-points li {
  margin-bottom: 10px;
  padding-left: 3px;
  font-size: 1rem;
  line-height: 1.85;
}

.practice-block {
  padding: 15px 16px;
  border: 1px solid rgba(216, 201, 154, 0.62);
  border-radius: 16px;
  background: rgba(251, 245, 229, 0.72);
}

.detail-scripture {
  margin-top: 2px;
}

.takeaway {
  margin-top: 12px;
  color: #3e5865;
  font-size: 0.96rem;
}

.bottom-back {
  width: 100%;
  margin: 5px 0 0;
}

.column-number {
  display: inline-block;
  margin: 2px 0 9px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.column-body p {
  margin: 0 0 1.15em;
  font-size: 1.01rem;
  line-height: 1.95;
}

[hidden] {
  display: none !important;
}

#progress {
  min-width: 42px;
  color: var(--muted);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
}

footer {
  margin: 17px 10px 0;
  color: #365767;
  text-align: center;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95);
}

footer p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.75;
}

button:focus-visible {
  outline: 3px solid rgba(30, 131, 183, 0.35);
  outline-offset: 2px;
}

@media (min-width: 700px) {
  .app-shell {
    padding-top: 34px;
  }

  .devotion-card {
    padding: 32px 34px 23px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .devotion-card {
    animation: enter 420ms ease-out both;
  }

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