@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600;700&family=Quicksand:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --cream: #f7f0e6;
  --peach: #f2c5a0;
  --rose: #d58a7f;
  --berry: #6b3a48;
  --ink: #2a1f25;
  --mint: #b7d5c1;
  --paper: #fffaf3;
  --shadow: 0 18px 40px rgba(70, 39, 50, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Quicksand", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #fff6e9 0%, rgba(255, 246, 233, 0) 55%),
    radial-gradient(circle at 20% 20%, #f3e0d1 0%, rgba(243, 224, 209, 0) 45%),
    linear-gradient(120deg, #f7efe6 0%, #f4e4d3 50%, #f3e7dd 100%);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--rose);
  margin: 0 0 10px;
}

h1 {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 2.8vw, 3.2rem);
  margin: 0 0 12px;
  color: var(--berry);
}

.title-link {
  color: inherit;
  text-decoration: none;
}

.title-link:hover {
  text-decoration: underline;
}

.subtitle {
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
  color: #3f2a32;
}

.hero-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.label {
  color: var(--rose);
  font-weight: 600;
}

.value {
  font-weight: 600;
  color: var(--berry);
}

.progress-track {
  height: 10px;
  background: #f0e2d2;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(120deg, var(--mint), var(--peach));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 18px;
}

.pill {
  background: rgba(213, 138, 127, 0.18);
  color: var(--berry);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.hint {
  color: #6b4d57;
  font-size: 0.9rem;
}

.episode-list {
  display: grid;
  gap: 18px;
}

.next-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.next-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.next-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  color: var(--rose);
  font-weight: 600;
}

.next-title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  color: var(--berry);
}


.next-arc {
  display: inline-flex;
  align-items: center;
  background: rgba(183, 213, 193, 0.35);
  color: #2f4f40;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
}

.next-arc.filler {
  background: rgba(242, 167, 92, 0.3);
  color: #7a3c12;
}

.next-actions {
  margin-top: 6px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--mint), var(--peach));
  color: #2a1f25;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 10px 18px rgba(97, 68, 46, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none;
  cursor: pointer;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(97, 68, 46, 0.22);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.compact-button {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.subtle-link {
  margin-top: 6px;
  display: inline-flex;
}

.text-link {
  color: #6b4d57;
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

.episode {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.episode-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.episode-number {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  color: var(--berry);
  font-weight: 600;
}

.episode-arc {
  background: rgba(183, 213, 193, 0.35);
  color: #2f4f40;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.episode-arc.filler {
  background: rgba(242, 167, 92, 0.3);
  color: #7a3c12;
}

.episode-desc {
  margin: 0;
  color: #3e2b33;
  line-height: 1.6;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #5b3b45;
  margin-left: auto;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: #c49a6c;
}

.note {
  width: 100%;
  min-height: 90px;
  border: 1px solid rgba(213, 138, 127, 0.3);
  border-radius: 16px;
  padding: 12px 14px;
  font-family: "Quicksand", sans-serif;
  background: rgba(255, 255, 255, 0.7);
  color: #3e2b33;
  resize: vertical;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.note:focus {
  outline: none;
  border-color: rgba(213, 138, 127, 0.7);
  box-shadow: 0 0 0 4px rgba(213, 138, 127, 0.15);
}

.footer {
  margin-top: 34px;
  text-align: center;
  color: #74515d;
  font-size: 0.9rem;
}

code {
  background: rgba(43, 26, 31, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 36px 18px 48px;
  }

  .episode {
    padding: 18px;
  }
}
