:root {
  color-scheme: light;
  --eucalyptus: #a7bfae;
  --sage: #b8c6b2;
  --sand: #e7ded1;
  --mist: #e3e3df;
  --offwhite: #f8f8f5;
  --graphite: #24302a;
  --moss: #49685b;
  --clay: #b49d83;
  --paper: #f4efe8;
  --line: rgba(36, 48, 42, 0.12);
  --soft-line: rgba(36, 48, 42, 0.08);
  --shadow: 0 24px 70px rgba(36, 48, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--offwhite) 0%, var(--paper) 48%, var(--offwhite) 100%);
  color: var(--graphite);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.noscript-message {
  margin: 12vh auto;
  max-width: 680px;
  padding: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(36, 48, 42, 0.08);
  background: rgba(248, 248, 245, 0.92);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  min-height: 72px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--graphite);
  padding: 0;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--eucalyptus);
  color: var(--graphite);
}

.brand-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: rgba(36, 48, 42, 0.62);
  font-size: 0.78rem;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.access-chip {
  display: inline-flex;
  max-width: 220px;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(36, 48, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(36, 48, 42, 0.72);
  padding: 8px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
}

.main-area {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.app-footer {
  border-top: 1px solid rgba(36, 48, 42, 0.08);
  padding: 24px 16px 36px;
  color: rgba(36, 48, 42, 0.62);
  text-align: center;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 11px 18px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--moss);
  color: var(--offwhite);
  font-weight: 800;
}

.button-primary:hover:not(:disabled) {
  background: var(--graphite);
}

.button-secondary {
  border-color: rgba(73, 104, 91, 0.22);
  background: rgba(255, 255, 255, 0.58);
  color: var(--graphite);
  font-weight: 800;
}

.button-secondary:hover:not(:disabled) {
  border-color: rgba(73, 104, 91, 0.36);
  background: rgba(255, 255, 255, 0.86);
}

.button-ghost {
  border-color: rgba(36, 48, 42, 0.1);
  background: transparent;
  color: rgba(36, 48, 42, 0.74);
  font-weight: 700;
}

.button-ghost:hover:not(:disabled) {
  border-color: rgba(73, 104, 91, 0.34);
  color: var(--graphite);
}

.button[disabled] {
  opacity: 0.58;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.dashboard-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: center;
  padding: 22px 0 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 800;
}

.page-title {
  max-width: 760px;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 0.98;
}

.lead {
  max-width: 680px;
  margin: 16px 0 0;
  color: rgba(36, 48, 42, 0.7);
  font-size: 1.05rem;
  line-height: 1.75;
}

.progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.cover-panel {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-left: 1px solid rgba(36, 48, 42, 0.08);
  padding-left: 28px;
}

.cover-panel img {
  width: min(430px, 100%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 40px rgba(36, 48, 42, 0.18));
}

.welcome-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.72fr);
  gap: 18px;
  align-items: start;
  border-block: 1px solid rgba(36, 48, 42, 0.1);
  margin: 0 0 28px;
  padding: 26px 0;
}

.welcome-copy h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.7rem;
  font-weight: 600;
  line-height: 1;
}

.welcome-copy p:last-child {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(36, 48, 42, 0.72);
  font-size: 1rem;
  line-height: 1.8;
}

.welcome-section .audio-panel {
  margin: 0;
}

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

.stat-box {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  padding: 18px;
}

.stat-label {
  margin: 0;
  color: rgba(36, 48, 42, 0.62);
  font-size: 0.85rem;
  font-weight: 700;
}

.stat-value {
  margin: 8px 0 0;
  color: var(--graphite);
  font-size: 1.8rem;
  font-weight: 800;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(36, 48, 42, 0.1);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--moss), var(--eucalyptus));
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0 16px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.3rem;
  font-weight: 600;
}

.section-heading p {
  margin: 8px 0 0;
  color: rgba(36, 48, 42, 0.66);
  line-height: 1.6;
}

.theme-list {
  display: grid;
  gap: 26px;
}

.theme-section {
  padding: 24px 0 4px;
  border-top: 1px solid rgba(36, 48, 42, 0.1);
}

.theme-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.theme-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.35;
}

.theme-range {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(167, 191, 174, 0.3);
  color: var(--graphite);
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.day-card {
  min-height: 142px;
  width: 100%;
  border: 1px solid rgba(36, 48, 42, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--graphite);
  padding: 15px;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.day-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(73, 104, 91, 0.28);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(36, 48, 42, 0.1);
}

.day-card:disabled {
  background: rgba(255, 255, 255, 0.36);
}

.day-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.day-number {
  color: var(--moss);
  font-weight: 900;
}

.day-title {
  display: block;
  margin-top: 18px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-completed {
  background: rgba(73, 104, 91, 0.12);
  color: var(--moss);
}

.status-available {
  background: rgba(180, 157, 131, 0.18);
  color: #765d44;
}

.status-locked {
  background: rgba(36, 48, 42, 0.08);
  color: rgba(36, 48, 42, 0.62);
}

.reader-shell {
  max-width: 850px;
  margin: 0 auto;
}

.reader-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.reader-kicker {
  margin: 0 0 10px;
  color: var(--moss);
  font-weight: 800;
}

.reader-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.reader-content {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.content-panel,
.audio-panel,
.note-panel,
.locked-panel,
.celebration-panel {
  border: 1px solid rgba(36, 48, 42, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  padding: 22px;
}

.content-panel h2,
.audio-panel h2,
.note-panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.verse-text {
  margin: 0;
  color: var(--graphite);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.25;
}

.body-text {
  margin: 0;
  color: rgba(36, 48, 42, 0.74);
  font-size: 1rem;
  line-height: 1.85;
}

.practice-text {
  margin: 0;
  color: rgba(36, 48, 42, 0.76);
  font-weight: 600;
  line-height: 1.75;
}

.audio-panel {
  background: rgba(167, 191, 174, 0.16);
}

.audio-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.audio-heading-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(73, 104, 91, 0.12);
  color: var(--moss);
}

.audio-support {
  margin: 0;
  color: rgba(36, 48, 42, 0.68);
  line-height: 1.65;
}

.audio-description {
  margin: 14px 0 0;
  color: rgba(36, 48, 42, 0.6);
  font-size: 0.9rem;
  line-height: 1.6;
}

.audio-box {
  margin-top: 16px;
}

[data-audio-element] {
  display: none;
}

.custom-audio-player {
  display: grid;
  gap: 15px;
  border-radius: 8px;
  border: 1px solid rgba(73, 104, 91, 0.14);
  background: rgba(248, 248, 245, 0.62);
  padding: 14px;
}

.audio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.audio-control-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(73, 104, 91, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--graphite);
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.audio-control-button:hover,
.audio-control-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(73, 104, 91, 0.42);
  background: rgba(255, 255, 255, 0.95);
  outline: 0;
}

.audio-primary-control {
  width: 50px;
  height: 50px;
  background: var(--moss);
  color: var(--offwhite);
}

.audio-primary-control:hover,
.audio-primary-control:focus-visible {
  background: var(--graphite);
}

.audio-timeline {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.audio-progress {
  width: 100%;
  accent-color: var(--moss);
}

.audio-time {
  min-width: 42px;
  color: rgba(36, 48, 42, 0.66);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.audio-time:last-child {
  text-align: right;
}

.audio-state {
  margin: 0;
  color: rgba(36, 48, 42, 0.62);
  font-size: 0.88rem;
  line-height: 1.55;
}

.audio-empty-state {
  border-radius: 8px;
  border: 1px dashed rgba(73, 104, 91, 0.24);
  background: rgba(248, 248, 245, 0.46);
  padding: 14px;
}

.empty-audio {
  margin: 0;
  color: rgba(36, 48, 42, 0.66);
  font-weight: 600;
  line-height: 1.6;
}

.note-panel textarea {
  display: block;
  min-height: 150px;
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(36, 48, 42, 0.14);
  border-radius: 8px;
  background: rgba(248, 248, 245, 0.72);
  color: var(--graphite);
  padding: 14px;
  line-height: 1.65;
}

.note-panel textarea:focus {
  border-color: rgba(73, 104, 91, 0.46);
  box-shadow: 0 0 0 4px rgba(167, 191, 174, 0.28);
  outline: 0;
}

.note-helper {
  margin: 10px 0 0;
  color: rgba(36, 48, 42, 0.58);
  font-size: 0.86rem;
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.completed-note {
  margin: 4px 0 0;
  color: var(--moss);
  font-weight: 800;
}

.locked-panel {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}

.locked-panel .icon-wrap,
.celebration-panel .icon-wrap {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  background: rgba(167, 191, 174, 0.3);
  color: var(--moss);
}

.locked-panel h1,
.celebration-panel h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1.05;
}

.locked-panel p,
.celebration-panel p {
  margin: 14px auto 0;
  max-width: 620px;
  color: rgba(36, 48, 42, 0.7);
  line-height: 1.75;
}

.celebration-panel {
  max-width: 780px;
  margin: 22px auto 0;
  padding: 32px;
  text-align: center;
}

.celebration-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 920px) {
  .dashboard-intro,
  .welcome-section {
    grid-template-columns: 1fr;
  }

  .cover-panel {
    justify-content: start;
    border-left: 0;
    border-top: 1px solid rgba(36, 48, 42, 0.08);
    padding: 24px 0 0;
  }

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

@media (max-width: 640px) {
  .topbar-inner,
  .main-area {
    width: min(100% - 24px, 1180px);
  }

  .topbar-inner {
    min-height: 66px;
  }

  .topbar-actions {
    display: none;
  }

  .brand-subtitle {
    display: none;
  }

  .main-area {
    padding-top: 24px;
  }

  .page-title {
    font-size: 2.55rem;
  }

  .welcome-copy h2 {
    font-size: 2.3rem;
  }

  .reader-title {
    font-size: 2.35rem;
  }

  .locked-panel h1,
  .celebration-panel h1 {
    font-size: 2.2rem;
  }

  .stats-grid,
  .day-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .theme-header,
  .reader-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-range {
    flex: 0 1 auto;
  }

  .button {
    width: 100%;
  }

  .reader-actions,
  .celebration-actions,
  .progress-actions {
    width: 100%;
  }

  .content-panel,
  .audio-panel,
  .note-panel,
  .locked-panel,
  .celebration-panel {
    padding: 18px;
  }

  .audio-heading {
    gap: 11px;
  }

  .audio-timeline {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .audio-time,
  .audio-time:last-child {
    min-width: 0;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
