:root {
  color-scheme: dark;
  --bg: #141618;
  --surface: #202326;
  --surface-2: #2b3034;
  --surface-3: #383e43;
  --text: #f5f1e8;
  --muted: #bac0c7;
  --line: #464c52;
  --green: #35d06f;
  --blue: #2487ff;
  --aqua: #56c7d9;
  --rose: #ef6f6c;
  --gold: #e0b857;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(86, 199, 217, 0.18), transparent 28rem),
    radial-gradient(circle at 85% 42%, rgba(224, 184, 87, 0.08), transparent 24rem),
    linear-gradient(145deg, #17191b 0%, #1c1a17 44%, #151c1d 100%);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  right: 50%;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: #07120b;
  background: var(--green);
  font-weight: 850;
  text-decoration: none;
  transform: translate(50%, -180%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translate(50%, 0);
}

.app-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  min-height: calc(100vh - 6.5rem);
  padding: 1rem 1rem 7.5rem;
}

.content,
.player {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(32, 35, 38, 0.9);
  backdrop-filter: blur(22px);
}

.section-heading h2,
.about-panel h2 {
  margin: 0;
}

.nav-links {
  display: grid;
  gap: 0.45rem;
}

.nav-links-main {
  padding: 0 1rem;
}

.nav-links a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 750;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--surface-2);
  color: var(--text);
}

.section-heading span,
.player span,
.episode-meta,
.continue-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.content {
  border-radius: 8px;
  overflow: hidden;
}

.hero {
  min-height: 17rem;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: linear-gradient(145deg, rgba(30, 33, 35, 0.92), rgba(25, 33, 34, 0.94));
}

.hero-art {
  display: block;
  width: min(100%, 34rem);
  max-height: 16rem;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.about-panel {
  margin-inline: clamp(1rem, 3vw, 1.8rem);
  margin-top: 0.2rem;
  margin-bottom: 0.6rem;
  padding: 1rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(35, 38, 41, 0.72);
}

.about-panel p {
  margin: 0;
}

.about-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.about-panel-head p {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.about-panel h2 {
  font-size: 1.2rem;
}

.about-panel > p {
  margin-top: 0.8rem;
  line-height: 1.55;
  color: var(--text);
}

.about-panel-meta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.85rem;
}

.about-panel-meta span {
  color: var(--muted);
}

.icon-button {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.play-button {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #07120b;
  box-shadow: 0 16px 36px rgba(53, 208, 111, 0.28);
}

.toolbar,
.section-block {
  padding-inline: clamp(1rem, 3vw, 1.8rem);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding-block: 1.1rem;
  background: rgba(32, 35, 38, 0.45);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(100%, 25rem);
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip {
  min-height: 2.35rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid transparent;
}

.chip.active,
.chip:hover {
  border-color: rgba(53, 208, 111, 0.5);
  background: rgba(53, 208, 111, 0.15);
}

.section-block {
  padding-block: 1.2rem 1.55rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.8rem;
}

.section-heading h3 {
  font-size: 1.35rem;
}

.section-heading h2 {
  font-size: 1.35rem;
}

.continue-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.continue-strip.single {
  grid-template-columns: minmax(0, 1fr);
}

.continue-card,
.episode-row {
  border-radius: 8px;
  background: rgba(45, 50, 54, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.continue-card {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem;
  color: var(--text);
  text-align: right;
}

.continue-card strong,
.episode-title,
.player strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-list {
  display: grid;
  gap: 0.45rem;
}

.episode-row {
  display: grid;
  grid-template-columns: 3rem 4.25rem minmax(8rem, 1fr) 7rem 4rem;
  gap: 0.9rem;
  align-items: center;
  min-height: 6rem;
  padding: 0.55rem 0.7rem;
  transition: background 160ms ease, transform 160ms ease;
}

.episode-row:hover,
.episode-row.active {
  background: var(--surface-3);
}

.episode-row.active {
  border-color: rgba(53, 208, 111, 0.5);
}

.row-play,
.icon-button {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.row-play:hover,
.icon-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(86, 199, 217, 0.26), rgba(239, 111, 108, 0.2)),
    var(--surface-3);
  background-position: center;
  background-size: cover;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.cover.placeholder {
  display: grid;
  place-items: center;
}

.cover.placeholder::after {
  content: "♪";
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.8rem;
}

.episode-info {
  min-width: 0;
}

.episode-title {
  display: block;
  font-weight: 850;
  margin-bottom: 0.28rem;
}

.episode-description {
  display: -webkit-box;
  margin: 0 0 0.35rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.episode-meta {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.episode-status {
  justify-self: start;
  min-width: 5.5rem;
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  color: #0f1710;
  background: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.favorite {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
}

.favorite.active,
.favorite:hover {
  color: var(--rose);
}

.player {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(18rem, 2fr) minmax(9rem, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 5.7rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: rgba(29, 32, 35, 0.88);
  box-shadow: var(--shadow);
}

.now-playing {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.cover.small {
  width: 3.6rem;
}

.player-controls {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
}

.buttons {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.play-button {
  width: 3rem;
  height: 3rem;
  font-size: 1rem;
}

.timeline {
  display: grid;
  grid-template-columns: 3.3rem minmax(7rem, 1fr) 3.3rem;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
}

.timeline input[type="range"] {
  direction: ltr;
}

.volume {
  display: grid;
  grid-template-columns: auto minmax(5rem, 1fr);
  gap: 0.55rem;
  align-items: center;
}

input[type="range"] {
  accent-color: var(--green);
  width: 100%;
}

.site-footer {
  padding: 1.2rem clamp(1rem, 3vw, 1.8rem) 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.site-footer a,
.back-link {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover,
.back-link:hover {
  color: var(--green);
}

.static-page {
  max-width: 58rem;
  margin: 0 auto;
}

.page-header {
  padding: clamp(1.4rem, 5vw, 3rem) clamp(1rem, 4vw, 2.4rem) 1rem;
}

.page-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.legal-content {
  padding: 0 clamp(1rem, 4vw, 2.4rem) 2rem;
}

.legal-content h2 {
  margin: 1.7rem 0 0.65rem;
  font-size: 1.35rem;
}

.legal-content p,
.legal-content li {
  line-height: 1.75;
}

.legal-content ul {
  padding-inline-start: 1.4rem;
}

.empty-state {
  min-height: 8rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.accessibility-widget {
  position: fixed;
  left: 1rem;
  bottom: 7.25rem;
  z-index: 20;
  display: grid;
  justify-items: start;
  gap: 0.55rem;
}

.share-widget {
  position: fixed;
  right: 1rem;
  bottom: 7.25rem;
  z-index: 20;
  display: grid;
  justify-items: end;
  gap: 0.55rem;
}

.share-toggle {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  color: #111;
  background: var(--gold);
  box-shadow: 0 14px 34px rgba(224, 184, 87, 0.25);
}

.share-icon {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-toggle:hover,
.share-toggle[aria-expanded="true"] {
  background: #f0ca6b;
}

.share-panel {
  width: min(18.5rem, calc(100vw - 2rem));
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(24, 26, 28, 0.98);
  box-shadow: var(--shadow);
}

.share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.share-option {
  width: 100%;
  min-height: 2.55rem;
  margin-top: 0.45rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  text-align: right;
}

.share-option:hover {
  border-color: var(--gold);
  background: var(--surface-3);
}

.share-status {
  display: block;
  min-height: 1.3rem;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.accessibility-toggle {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 14px 34px rgba(36, 135, 255, 0.28);
  font-size: 1.35rem;
}

.accessibility-toggle:hover,
.accessibility-toggle[aria-expanded="true"] {
  background: #0f6fe8;
}

.accessibility-panel {
  width: min(18.5rem, calc(100vw - 2rem));
  max-height: min(31rem, calc(100vh - 13rem));
  overflow: auto;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(24, 26, 28, 0.98);
  box-shadow: var(--shadow);
}

.accessibility-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.accessibility-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 2.55rem;
  margin-top: 0.45rem;
  padding: 0 0.8rem;
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: right;
}

.accessibility-option[aria-pressed="true"] {
  color: #07120b;
  background: var(--green);
  border-color: transparent;
  font-weight: 800;
}

.accessibility-option.muted {
  color: var(--muted);
}

body.a11y-large-text {
  font-size: 1.12rem;
}

body.a11y-large-text .section-heading span,
body.a11y-large-text .player span,
body.a11y-large-text .episode-meta,
body.a11y-large-text .continue-card span {
  font-size: 1rem;
}

body.a11y-high-contrast {
  --bg: #000;
  --surface: #050505;
  --surface-2: #111;
  --surface-3: #1c1c1c;
  --text: #fff;
  --muted: #e6e6e6;
  --line: #fff;
  --green: #75ff91;
  --blue: #55a8ff;
  --aqua: #91ecff;
  background: #000;
}

body.a11y-light-mode {
  --bg: #f6f7f8;
  --surface: #fff;
  --surface-2: #e9edf1;
  --surface-3: #dbe2e8;
  --text: #15191d;
  --muted: #4f5963;
  --line: #b9c2cc;
  background:
    radial-gradient(circle at 15% 10%, rgba(36, 135, 255, 0.12), transparent 28rem),
    linear-gradient(145deg, #f7f9fb 0%, #f2f4f5 48%, #eaf2f4 100%);
}

body.a11y-light-mode .content,
body.a11y-light-mode .player,
body.a11y-light-mode .accessibility-panel,
body.a11y-light-mode .share-panel,
body.a11y-light-mode .continue-card,
body.a11y-light-mode .episode-row {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(21, 25, 29, 0.14);
}

body.a11y-light-mode .hero {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(234, 242, 244, 0.9));
}

body.a11y-light-mode .toolbar {
  background: rgba(255, 255, 255, 0.64);
}

body.a11y-text-spacing {
  letter-spacing: 0.04em;
}

body.a11y-text-spacing p,
body.a11y-text-spacing li,
body.a11y-text-spacing .episode-description,
body.a11y-text-spacing .about-panel > p {
  line-height: 1.9;
}

body.a11y-underline-links a {
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 0.12em;
}

body.a11y-readable-font {
  font-family: Arial, "Segoe UI", sans-serif;
}

body.a11y-strong-focus a:focus-visible,
body.a11y-strong-focus button:focus-visible,
body.a11y-strong-focus input:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 5px;
  box-shadow: 0 0 0 7px rgba(0, 0, 0, 0.48);
}

body.a11y-high-contrast .content,
body.a11y-high-contrast .player,
body.a11y-high-contrast .accessibility-panel,
body.a11y-high-contrast .share-panel,
body.a11y-high-contrast .continue-card,
body.a11y-high-contrast .episode-row {
  border-color: #fff;
  box-shadow: none;
}

body.a11y-high-contrast a,
body.a11y-high-contrast button,
body.a11y-high-contrast input {
  outline-color: #fff;
}

body.a11y-reduced-motion *,
body.a11y-reduced-motion *::before,
body.a11y-reduced-motion *::after {
  scroll-behavior: auto !important;
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}

@media (max-width: 900px) {
  .app-shell {
    padding-bottom: 11.9rem;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .continue-strip {
    grid-template-columns: 1fr;
  }

  .player {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem 0.9rem;
    align-items: center;
    min-height: 0;
  }

  .now-playing {
    grid-column: 1 / -1;
  }

  .player-controls {
    justify-items: stretch;
    min-width: 0;
  }

  .timeline {
    grid-template-columns: 2.7rem minmax(0, 1fr) 2.7rem;
    gap: 0.45rem;
  }

  .volume {
    align-self: center;
    min-width: 2rem;
    justify-items: center;
    gap: 0.25rem;
  }

  .volume input[type="range"] {
    width: 1.25rem;
    height: 5.75rem;
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
  }

  .accessibility-widget {
    bottom: 11.4rem;
  }

  .share-widget {
    bottom: 11.4rem;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 0.5rem 0.5rem 12.2rem;
  }

  .hero {
    min-height: 12.5rem;
    padding: 0.65rem;
  }

  .hero-art {
    width: min(100%, 19rem);
    max-height: 11.9rem;
  }

  .nav-links-main {
    padding: 0 0.65rem;
  }

  .toolbar,
  .section-block {
    padding-inline: 0.75rem;
  }

  .chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chip {
    padding: 0 0.45rem;
  }

  .episode-row {
    grid-template-columns: 2.45rem 3.45rem minmax(0, 1fr) 2.35rem;
    gap: 0.58rem;
    padding: 0.5rem;
  }

  .episode-status {
    display: none;
  }

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

  .player {
    inset-inline: 0.6rem;
    bottom: 0.6rem;
    gap: 0.55rem 0.65rem;
    padding: 0.58rem;
  }

  .now-playing {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.55rem;
  }

  .cover.small {
    width: 3rem;
  }

  .buttons {
    gap: 0.42rem;
  }

  .play-button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .row-play,
  .icon-button {
    width: 2.35rem;
    height: 2.35rem;
  }

  .timeline {
    grid-template-columns: 2.35rem minmax(0, 1fr) 2.35rem;
    gap: 0.38rem;
  }

  .volume {
    min-width: 1.9rem;
  }

  .volume input[type="range"] {
    width: 1.1rem;
    height: 5.1rem;
  }

  .accessibility-widget {
    left: 0.75rem;
    bottom: 11.2rem;
  }

  .share-widget {
    right: 0.75rem;
    bottom: 11.2rem;
  }

  .accessibility-toggle {
    width: 3rem;
    height: 3rem;
  }

  .share-toggle {
    width: 3rem;
    height: 3rem;
  }
}
