:root {
  --ink: #17201d;
  --muted: #5f6b66;
  --soft: #eef4ee;
  --mist: #f7f3ea;
  --sky: #dcebf0;
  --leaf: #17463b;
  --leaf-2: #2f7c62;
  --path: #b5844e;
  --clay: #a64d3c;
  --blue: #365f91;
  --line: rgba(23, 70, 59, 0.16);
  --shadow: rgba(14, 33, 29, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: linear-gradient(180deg, var(--sky) 0%, var(--soft) 48%, var(--mist) 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.walk-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 26px;
  align-items: stretch;
  min-height: 360px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7f1;
  box-shadow: 0 22px 52px var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px);
}

.kicker {
  margin: 0 0 8px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 10ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.55rem, 7vw, 5.2rem);
  color: var(--leaf);
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3.4vw, 2.35rem);
}

.intro {
  max-width: 46ch;
  margin-top: 18px;
  color: #304842;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.5;
}

#routeCanvas {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: #dcebf0;
}

.now-playing,
.chapter-panel,
.walk-card,
.transcript-panel,
.feedback-panel,
.medical-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(14, 33, 29, 0.1);
}

.now-playing {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
}

.episode-meta {
  display: grid;
  gap: 8px;
}

.episode-meta p:not(.kicker) {
  max-width: 78ch;
  color: var(--muted);
  line-height: 1.55;
}

audio {
  width: 100%;
  min-height: 44px;
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.plain-button,
.tool-button {
  min-height: 44px;
  border-radius: 7px;
  font-weight: 820;
}

.primary-button {
  border: 0;
  padding: 0 18px;
  color: white;
  background: var(--leaf);
  box-shadow: 0 10px 22px rgba(23, 70, 59, 0.22);
}

.plain-button {
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--leaf);
  background: #ffffff;
}

.tool-button {
  display: grid;
  place-items: center;
  width: 46px;
  border: 1px solid var(--line);
  color: var(--leaf);
  background: white;
  font-size: 1.8rem;
  line-height: 1;
}

.walk-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.walk-stats span {
  padding: 7px 10px;
  border: 1px solid rgba(54, 95, 145, 0.18);
  border-radius: 999px;
  color: #23446d;
  background: rgba(220, 235, 240, 0.72);
  font-size: 0.88rem;
  font-weight: 760;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.chapter-panel,
.walk-card,
.transcript-panel,
.feedback-panel {
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.chapter-list {
  display: grid;
  gap: 8px;
}

.chapter-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  border: 1px solid rgba(23, 70, 59, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
  background: rgba(247, 243, 234, 0.62);
}

.chapter-button.active {
  border-color: rgba(23, 70, 59, 0.4);
  background: rgba(47, 124, 98, 0.12);
}

.chapter-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  background: var(--leaf-2);
  font-size: 0.9rem;
  font-weight: 850;
}

.chapter-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chapter-title strong,
.chapter-title span {
  overflow-wrap: anywhere;
}

.chapter-title span,
.chapter-duration {
  color: var(--muted);
  font-size: 0.9rem;
}

.chapter-duration {
  white-space: nowrap;
  font-weight: 780;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: #2e403b;
  line-height: 1.48;
}

.transcript-panel {
  margin-bottom: 18px;
}

.transcript {
  max-height: 440px;
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: #fbfaf6;
  color: #26332f;
  line-height: 1.62;
}

.transcript p + p {
  margin-top: 12px;
}

.feedback-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.feedback-panel p {
  color: var(--muted);
  line-height: 1.5;
}

form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--leaf);
  font-weight: 820;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(23, 70, 59, 0.22);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: white;
  line-height: 1.45;
}

.saved-note {
  color: var(--leaf-2) !important;
  font-weight: 820;
}

.medical-note {
  padding: 14px 16px;
  color: #33443f;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.62);
}

@media (max-width: 780px) {
  .app-shell {
    padding: 10px;
  }

  .walk-hero,
  .content-grid,
  .feedback-panel {
    grid-template-columns: 1fr;
  }

  .walk-hero {
    min-height: auto;
  }

  .hero-copy {
    padding: 26px 18px 6px;
  }

  h1 {
    max-width: 11ch;
  }

  #routeCanvas {
    min-height: 210px;
  }

  .chapter-button {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .chapter-duration {
    grid-column: 2;
  }
}
