:root {
  --sea: #0b1c2c;
  --sea-2: #10263a;
  --panel: #142f47;
  --line: #24425e;
  --ink: #eef4f9;
  --muted: #9fb4c8;
  --rope: #e9c27a;
  --rope-ink: #0b1c2c;
  --foam: #ffffff;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); line-height: 1.5;
  background: radial-gradient(1200px 600px at 50% -200px, #1b3f5f 0%, var(--sea) 60%) fixed var(--sea);
}
a { color: var(--rope); }
main { max-width: 880px; margin: 0 auto; padding: 0 16px 56px; }
h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin: 36px 0 12px; font-weight: 700; }
h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin: 24px 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* masthead */
.masthead { padding: 40px 16px 8px; text-align: center; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.logo { filter: drop-shadow(0 6px 12px rgba(0,0,0,.35)); }
.wordmark { font-size: 3rem; font-weight: 800; letter-spacing: 0.02em; line-height: 1; }
.tagline { margin: 10px 0 0; color: var(--muted); }

/* live */
.live { margin-top: 24px; }
.live-head { display: flex; justify-content: space-between; align-items: baseline; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ff4d4d; margin-right: 8px; box-shadow: 0 0 0 0 rgba(255,77,77,.6); animation: pulse 2s infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,77,.6); } 70% { box-shadow: 0 0 0 10px rgba(255,77,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); } }
.listeners { color: var(--muted); font-size: 0.85rem; }
.player { display: flex; align-items: center; gap: 18px; background: linear-gradient(180deg, var(--panel), var(--sea-2)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.play { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #5a3d17; background: radial-gradient(circle at 35% 30%, #f3d9a4, #c98f3d 70%); color: var(--rope-ink); cursor: pointer; flex: none; display: grid; place-items: center; box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), 0 6px 14px rgba(0,0,0,.35); transition: transform .1s; }
.play:hover { transform: scale(1.04); }
.play:active { transform: scale(.98); }
.now-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--rope); font-weight: 700; }
.now-title { font-weight: 700; font-size: 1.2rem; margin-top: 2px; }
.now-hint { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* grid */
.formats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.formats li { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.formats b { display: block; }
.formats span { color: var(--muted); font-size: 0.85rem; }

/* replays */
.replays-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 0.8rem; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--rope); color: var(--rope-ink); border-color: var(--rope); font-weight: 700; }
.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.episodes li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; cursor: pointer; }
.episodes li:hover, .episodes li:focus-within { border-color: var(--rope); }
.episodes .mini { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3d9a4, #c98f3d 70%); border: 2px solid #5a3d17; display: grid; place-items: center; color: var(--rope-ink); }
.episodes .title { font-weight: 600; }
.episodes .meta { color: var(--muted); font-size: 0.85rem; white-space: nowrap; text-align: right; }
.chip { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--rope); font-weight: 700; }

/* transcript */
.transcript { position: relative; margin-top: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.transcript h2 { text-transform: none; letter-spacing: 0; font-size: 1.5rem; color: var(--ink); margin: 4px 0 0; }
.transcript audio { width: 100%; margin: 12px 0 16px; }
.close { position: absolute; top: 10px; right: 12px; background: transparent; border: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; }
.line { margin: 0 0 12px; }
.line .who { color: var(--rope); font-weight: 700; margin-right: 6px; }
.line sup a { color: var(--muted); text-decoration: none; margin-left: 2px; font-size: 0.7rem; }
#sources { padding-left: 20px; font-size: 0.9rem; }
#sources li { margin-bottom: 6px; }
#sources li:target { background: rgba(233,194,122,.15); border-radius: 6px; }

.prose { padding-top: 16px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; padding: 18px 16px 32px; text-align: center; }
@media (max-width: 600px) {
  .wordmark { font-size: 2.3rem; }
  .episodes li { grid-template-columns: auto 1fr; }
  .episodes .meta { grid-column: 2; text-align: left; white-space: normal; }
}
