/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --bg:       #000;
  --bg2:      #0f0f0f;
  --bg3:      #1a1a1a;
  --border:   #2a2a2a;
  --text:     #e0e0e0;
  --muted:    #888;
  --gold:     #ffd700;
  --cyan:     #00cfff;
  --green:    #00e676;
  --red:      #ff5252;
  --radius:   10px;
  --nav-h:    60px;
}

/* ── Base ── */
html { font-size: 18px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 8px); /* room for bottom nav */
}

/* ── Skip nav ── */
.skip-link {
  position: absolute;
  top: -999px; left: 0;
  background: var(--gold); color: #000;
  font-weight: bold; padding: 10px 18px;
  z-index: 9999; border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

/* ── Top bar ── */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-brand {
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.topbar-nav { display: none; } /* hidden on mobile, shown on desktop */

/* ── Bottom nav (mobile) ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.68rem;
  padding: 6px 0;
  transition: color 0.15s;
  min-height: 48px;
}
.bottom-nav a .icon { font-size: 1.35rem; line-height: 1; }
.bottom-nav a[aria-current="page"],
.bottom-nav a:hover,
.bottom-nav a:focus {
  color: var(--gold);
  outline: none;
}
.bottom-nav a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
.soon { opacity: 0.4; pointer-events: none; }

/* ── Main ── */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.2rem 1rem 1rem;
}

/* ── Headings ── */
h1 { color: var(--gold); font-size: 1.8rem; margin-bottom: 0.3rem; }
h2 { color: var(--cyan); font-size: 1.2rem; margin: 1.6rem 0 0.8rem; }
h3 { color: var(--text); font-size: 1rem; margin-bottom: 0.3rem; }
p  { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.5rem; }

/* ── Cards ── */
.card {
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 0.9rem;
}
.card:hover, .card:focus {
  border-color: var(--gold);
  background: #1a1500;
  outline: none;
}
.card:focus-visible { box-shadow: 0 0 0 3px rgba(255,215,0,0.35); }
.card-title { color: var(--gold); font-size: 1.1rem; font-weight: bold; margin-bottom: 0.25rem; }
.card-desc  { color: #ccc; font-size: 0.88rem; line-height: 1.5; }
.badge {
  display: inline-block;
  font-size: 0.7rem; font-weight: bold;
  padding: 0.15rem 0.5rem;
  border-radius: 4px; margin-top: 0.5rem;
}
.badge-action  { background: #e53935; color: #fff; }
.badge-logic   { background: #00bcd4; color: #000; }
.badge-trivia  { background: #4caf50; color: #000; }
.badge-adventure { background: #ff7043; color: #fff; }
.badge-drama   { background: #9c27b0; color: #fff; }

/* ── Button ── */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  background: var(--bg3); color: var(--text);
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem 1.1rem;
  font-size: 1rem; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  min-height: 48px;
}
button:hover, button:focus, .btn:hover, .btn:focus {
  border-color: var(--gold); background: #1a1500; outline: none;
}
button:focus-visible, .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(255,215,0,0.35);
}
.btn-primary { background: var(--gold); color: #000; border-color: var(--gold); font-weight: bold; }
.btn-primary:hover, .btn-primary:focus { background: #e6c200; border-color: #e6c200; }

/* ── Audio player ── */
.player-box {
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
}
.player-title { color: var(--gold); font-size: 1rem; font-weight: bold; margin-bottom: 0.2rem; }
.player-ep    { color: var(--muted); font-size: 0.82rem; margin-bottom: 0.9rem; }
audio {
  width: 100%; height: 46px;
  accent-color: var(--gold);
  margin-bottom: 0.7rem;
}
.player-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Episode list ── */
.ep-list { list-style: none; }
.ep-item {
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ep-item:hover, .ep-item:focus {
  border-color: var(--gold); background: #1a1500; outline: none;
}
.ep-item:focus-visible { box-shadow: 0 0 0 3px rgba(255,215,0,0.35); }
.ep-num {
  width: 34px; height: 34px; min-width: 34px;
  background: var(--bg3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--gold); font-weight: bold;
}
.ep-num.playing { background: var(--gold); color: #000; }
.ep-info { flex: 1; min-width: 0; }
.ep-name { font-size: 0.95rem; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-dur  { font-size: 0.78rem; color: var(--muted); }

/* ── Live region ── */
#sr-live {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ── Desktop ── */
@media (min-width: 640px) {
  body { padding-bottom: 1rem; }
  .bottom-nav { display: none; }
  .topbar-nav { display: flex; gap: 0.5rem; }
  .topbar-nav a {
    color: var(--muted); text-decoration: none;
    font-size: 0.88rem; padding: 6px 12px; border-radius: 6px;
    transition: color 0.15s, background 0.15s;
  }
  .topbar-nav a:hover,
  .topbar-nav a:focus,
  .topbar-nav a[aria-current="page"] { color: var(--gold); background: #1a1500; outline: none; }
  .topbar-nav a:focus-visible { box-shadow: 0 0 0 3px rgba(255,215,0,0.35); }
  h1 { font-size: 2.1rem; }
  main { padding: 2rem 1.5rem 2rem; }
}
