:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --ink: #1d1f1c;
  --muted: #5c5f5a;
  --accent: #3c5a4c;
  --accent-2: #a36d2c;
  --card: #ffffff;
  --line: rgba(29, 31, 28, 0.12);
  --shadow: 0 24px 60px rgba(22, 25, 22, 0.12);
  --shadow-soft: 0 12px 26px rgba(22, 25, 22, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.5;
}

.ambient {
  position: fixed;
  inset: -10% -10% auto -10%;
  height: 60vh;
  background: radial-gradient(circle at top left, rgba(60, 90, 76, 0.22), transparent 60%),
    radial-gradient(circle at 30% 30%, rgba(163, 109, 44, 0.2), transparent 55%),
    radial-gradient(circle at top right, rgba(42, 64, 52, 0.18), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.site-header {
  padding: 44px clamp(24px, 6vw, 80px) 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #385243, #5a7c66);
  color: #fdf8ee;
  box-shadow: var(--shadow);
}

.brand-text h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 0 0 8px;
}

.subhead {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

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

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  background: rgba(29, 31, 28, 0.08);
  border: 1px solid rgba(29, 31, 28, 0.09);
}

.layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: clamp(20px, 4vw, 48px);
  padding: 20px clamp(24px, 6vw, 80px) 80px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: calc(100vh - 24px);
  padding-right: 4px;
}

.panel-block {
  padding: 18px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  backdrop-filter: blur(3px);
}

.panel-block h2,
.panel-block h3 {
  margin: 0 0 10px;
  font-family: "Fraunces", serif;
}

.panel-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.search {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.search input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search input:focus {
  outline: none;
  border-color: rgba(42, 93, 74, 0.45);
  box-shadow: 0 0 0 3px rgba(42, 93, 74, 0.16);
}

.nav-root {
  display: grid;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-root::-webkit-scrollbar {
  width: 8px;
}

.nav-root::-webkit-scrollbar-thumb {
  background: rgba(29, 31, 28, 0.22);
  border-radius: 999px;
}

.nav-series {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.nav-series:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.nav-series h4 {
  margin: 0 0 8px;
  font-family: "Fraunces", serif;
}

.nav-series details {
  margin-bottom: 8px;
}

.nav-series summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 6px;
}

.nav-series a {
  display: inline-block;
  margin: 2px 6px 2px 0;
  text-decoration: none;
  color: var(--accent);
  font-size: 0.9rem;
  border-radius: 8px;
  padding: 2px 6px;
}

.nav-series a:hover {
  background: rgba(42, 93, 74, 0.1);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 24px;
  align-items: center;
}

.intro h2 {
  margin: 0 0 10px;
  font-family: "Fraunces", serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.intro p {
  margin: 0;
  color: var(--muted);
}


.stats {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.stat-value {
  font-size: 1.6rem;
  font-family: "Fraunces", serif;
}

.series-root {
  display: grid;
  gap: 40px;
}


.series {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.series-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.series-header h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
}

.series-header span {
  color: var(--muted);
  font-size: 0.95rem;
}

.season {
  margin-bottom: 26px;
}

.season h4 {
  margin: 0 0 12px;
  font-family: "Fraunces", serif;
  color: var(--accent);
}

.episode-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(60, 90, 76, 0.06), rgba(163, 109, 44, 0.05));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.episode-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

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

.episode-card h5 {
  margin: 0;
  font-size: 1.15rem;
}

.episode-meta {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 260px);
  gap: 8px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 12px 0 16px;
  align-items: center;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(42, 93, 74, 0.25);
  color: #1f4135;
  background: rgba(42, 93, 74, 0.09);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.84rem;
  font-weight: 600;
}

.episode-meta a {
  color: var(--accent);
  text-decoration: none;
}

.episode-meta a:hover {
  text-decoration: underline;
}

.tg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: #fff;
  background: #2a5d4a;
  min-width: 180px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.episode-meta a.tg-button {
  color: #fff;
}

.episode-meta a.tg-button:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.tg-button[disabled] {
  background: #9aa39d;
  color: #f1f1f1;
  cursor: not-allowed;
}

.episode-shot {
  border-radius: 14px;
  overflow: hidden;
  border: 1px dashed rgba(29, 31, 28, 0.2);
  background: rgba(255, 255, 255, 0.6);
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.episode-shot img {
  width: 100%;
  height: auto;
  display: block;
}

.analysis {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.analysis h6 {
  margin: 0;
  font-size: 1rem;
  font-family: "Fraunces", serif;
}

.analysis ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.analysis li {
  margin-bottom: 6px;
}

.analysis {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.copy-link {
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.copy-link:hover {
  border-color: rgba(42, 93, 74, 0.45);
  transform: translateY(-1px);
}

.site-footer {
  padding: 20px 24px 40px;
  text-align: center;
  color: var(--muted);
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.3s ease;
}

.to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.legal {
  font-size: 0.9rem;
  color: var(--muted);
}

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

  .side-panel {
    position: static;
    height: auto;
    padding-right: 0;
  }

  .intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .layout {
    display: block;
    padding: 16px;
  }

  .side-panel {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: 16px;
  }

  .nav-root {
    max-height: 240px;
  }

  .content {
    margin-left: 0;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header {
    padding-top: 28px;
  }

  .episode-card header {
    flex-direction: column;
    align-items: flex-start;
  }
}
