:root {
  --ink: #10201c;
  --ink-soft: #3d524c;
  --paper: #f3f6f4;
  --mist: #d7e4df;
  --line: rgba(16, 32, 28, 0.12);
  --accent: #0f7a6c;
  --accent-deep: #0a5a50;
  --play-glow: rgba(15, 122, 108, 0.28);
  --danger: #9b3b2e;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
  --radius-play: 999px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shell: min(34rem, 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 10% -10%, #c8e6de 0%, transparent 55%),
    radial-gradient(90% 70% at 110% 10%, #e8efd8 0%, transparent 50%),
    radial-gradient(80% 60% at 50% 110%, #d5e3ea 0%, transparent 45%),
    linear-gradient(180deg, #eef3f0 0%, #f3f6f4 45%, #ebe8e1 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: multiply;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem
    calc(2.5rem + var(--safe-bottom));
}

.brand-block {
  margin-bottom: 2.25rem;
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.tagline {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 400;
}

.now {
  animation: rise 800ms cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
}

.now-label {
  margin: 0 0 0.65rem;
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.now-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.now-meta {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.now-summary {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 36em;
}

.player {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.1rem;
  align-items: center;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.play-btn {
  width: 4.5rem;
  height: 4.5rem;
  border: 0;
  border-radius: var(--radius-play);
  background: var(--accent);
  color: #f7fffc;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 28px var(--play-glow);
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease,
    box-shadow 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.play-btn:hover:not(:disabled) {
  background: var(--accent-deep);
  transform: scale(1.03);
}

.play-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.play-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, white);
  outline-offset: 3px;
}

.play-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.55rem 0 0.55rem 0.95rem;
  border-color: transparent transparent transparent currentColor;
  margin-left: 0.2rem;
  transition: opacity 120ms ease;
}

.play-btn.is-playing .play-icon {
  width: 0.85rem;
  height: 0.95rem;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(currentColor, currentColor) left / 0.28rem 100% no-repeat,
    linear-gradient(currentColor, currentColor) right / 0.28rem 100% no-repeat;
}

.transport {
  min-width: 0;
}

.scrub {
  width: 100%;
  appearance: none;
  height: 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mist) 70%, var(--ink) 8%);
  outline: none;
}

.scrub::-webkit-slider-thumb {
  appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(16, 32, 28, 0.25);
  cursor: pointer;
}

.scrub::-moz-range-thumb {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(16, 32, 28, 0.25);
  cursor: pointer;
}

.scrub:disabled {
  opacity: 0.5;
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.speed-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.speed {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.speed.is-active {
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, white);
}

.speed:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status {
  min-height: 1.25rem;
  margin: 0.9rem 0 0;
  color: var(--danger);
  font-size: 0.88rem;
}

.archive {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  animation: rise 900ms cubic-bezier(0.22, 1, 0.36, 1) 140ms both;
}

.archive-title {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.episode-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.episode-list li + li {
  border-top: 1px solid var(--line);
}

.episode-item {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.episode-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.episode-item.is-current .episode-item-title {
  color: var(--accent-deep);
}

.episode-item-title {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
}

.episode-item-date {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.episode-item-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

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

@media (min-width: 720px) {
  .shell {
    padding-top: 3rem;
  }

  .player {
    gap: 1.25rem 1.5rem;
  }

  .play-btn {
    width: 5rem;
    height: 5rem;
  }
}
