:root {
  --bg: #f6f4ef;
  --text: #1c1b19;
  --text-muted: #5c5852;
  --accent: #3d4a5c;
  --accent-soft: rgba(61, 74, 92, 0.2);
  --rule: rgba(28, 27, 25, 0.1);
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0 auto;
  padding:
    max(env(safe-area-inset-top, 0px), clamp(2rem, 6vw, 4rem))
    clamp(1.25rem, 5vw, 1.75rem)
    max(env(safe-area-inset-bottom, 0px), clamp(1.75rem, 5vw, 3.5rem));
}

.content {
  width: 100%;
  max-width: 38rem;
  transform: translateY(clamp(-1.5rem, -5vh, -3rem));
}

@media (max-width: 768px) {
  .page {
    justify-content: flex-start;
    padding:
      env(safe-area-inset-top, 0px)
      clamp(1.25rem, 5vw, 1.75rem)
      max(env(safe-area-inset-bottom, 0px), clamp(1.5rem, 5vw, 2.5rem));
  }

  .content {
    transform: none;
    margin-top: clamp(1.5rem, 6vh, 2.75rem);
  }
}

.byline {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.profile {
  width: clamp(5.5rem, 18vw, 7rem);
  height: clamp(5.5rem, 18vw, 7rem);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
}

.name {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.podcast-title {
  margin: 0 0 1.75rem;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
}

.verse-ref {
  margin: 0 0 0.75rem;
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  font-style: italic;
  color: var(--accent);
  text-align: center;
}

.verse {
  margin: 0;
  padding: 1.25rem 0 1.25rem 1.25rem;
  border-left: 3px solid var(--accent-soft);
  text-align: left;
}

.verse p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
}

.songs {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.songs h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--accent);
  text-align: center;
  letter-spacing: 0.04em;
}

.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding-bottom: 6rem;
}

.track {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem;
  border-radius: 0.375rem;
  transition: background 0.15s;
}

.track:hover {
  background: var(--accent-soft);
}

.track.playing {
  background: var(--accent-soft);
}

.track-play {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}

.track-play:hover,
.track-play.is-playing {
  background: var(--accent);
  color: var(--bg);
}

.track-play .icon-play {
  width: 0.8125rem;
  height: 0.8125rem;
}

.track-play .icon-pause {
  display: none;
  width: 0.8125rem;
  height: 0.8125rem;
}

.track-play.is-playing .icon-play {
  display: none;
}

.track-play.is-playing .icon-pause {
  display: block;
}

.track-title {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  min-width: 0;
}

.track.playing .track-title {
  color: var(--accent);
  font-weight: 500;
}

.track-download {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}

.track-download svg {
  width: 1.125rem;
  height: 1.125rem;
}

.track:hover .track-download,
.track.playing .track-download {
  opacity: 0.7;
}

.track-download:hover {
  opacity: 1 !important;
  color: var(--accent);
}

.now-playing-play {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s;
  order: -1;
}

.now-playing-play .icon-play {
  width: 0.875rem;
  height: 0.875rem;
}

.now-playing-play .icon-pause {
  display: none;
  width: 0.875rem;
  height: 0.875rem;
}

.now-playing-play.is-playing .icon-play {
  display: none;
}

.now-playing-play.is-playing .icon-pause {
  display: block;
}

.now-playing {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  z-index: 10;
}

.now-playing-inner {
  max-width: 38rem;
  margin: 0 auto;
  padding: 0.75rem clamp(1.25rem, 5vw, 1.75rem) 2.5rem;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 4px;
  background: var(--accent-soft);
  border-radius: 2px;
  cursor: pointer;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  bottom: -8px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.now-playing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  gap: 0.75rem;
}

.now-playing-title {
  font-size: 1rem;
  font-style: italic;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.time-display {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .track {
    gap: 0.625rem;
    padding: 0.45rem 0.375rem;
  }

  .track-play {
    width: 1.75rem;
    height: 1.75rem;
  }

  .track-title {
    font-size: 0.875rem;
  }

  .track-download {
    opacity: 0.6;
  }

  .track:hover .track-download,
  .track.playing .track-download {
    opacity: 0.8;
  }
}
