/* ============================================================
   Bowl After Bowl — Main Stylesheet
   Ported from the original Next.js project's:
     - styles/globals.css
     - all component *.module.css files

   NOTE: Fonts are loaded via <link> tags in base.html, NOT here.
   Do NOT add @import font rules — they cause sequential loading
   delays that produce a flash of unstyled content (FOUC).
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) ----------------- */
:root {
  /* Grey scale (purple-tinted) */
  --color-grey-50:  hsl(265, 55%, 96%);
  --color-grey-100: hsl(265, 19%, 88%);
  --color-grey-200: hsl(265,  7%, 70%);
  --color-grey-300: hsl(265,  6%, 66%);
  --color-grey-400: hsl(265,  4%, 57%);
  --color-grey-500: hsl(265,  3%, 53%);
  --color-grey-600: hsl(265,  4%, 42%);
  --color-grey-700: hsl(265,  4%, 31%);
  --color-grey-800: hsl(276,  5%, 20%);
  --color-grey-900: hsl(280,  5%, 13%);

  /* Purple — primary brand */
  --color-primary-50:  #E4CFFE;
  --color-primary-100: #BD86F4;
  --color-primary-200: #AC59FF;
  --color-primary-300: #973DF2;
  --color-primary-400: #7830BF;
  --color-primary-500: #8127DB;
  --color-primary-600: #481D73;
  --color-primary-700: #281040;  /* page background */

  /* Green — success / text highlight */
  --color-success-50:  #E4CFFE;  /* NOTE: original reuses primary-50 hex for this token */
  --color-success-100: #AAFF82;  /* primary body text color */
  --color-success-500: #81D959;  /* headings, links, neon glow source */

  /* Error */
  --color-error-100: #f1acc9;
  --color-error-500: #a10c4a;

  /* Spacing scale */
  --size-1:  0.25rem;
  --size-2:  0.5rem;
  --size-3:  0.75rem;
  --size-4:  1rem;
  --size-5:  1.25rem;
  --size-6:  1.5rem;
  --size-8:  2rem;
  --size-16: 4rem;
  --size-20: 5rem;
  --size-40: 10rem;
}

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

html {
  background-color: var(--color-primary-700);
}

body {
  margin: 0;
  min-height: 100vh;
  /* Sticky footer: <main> grows to fill leftover space, footer stays at bottom */
  display: flex;
  flex-direction: column;
  /* Standard safeguard: prevent any overflowing child from creating
     horizontal scroll. The nav dropdown uses position:absolute so
     this does not affect it. */
  overflow-x: hidden;
  background-color: var(--color-primary-700);
  color: var(--color-success-100);
  font-family: 'paralucent', 'Roboto', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}
body.has-persistent-player {
  padding-bottom: 7rem;
}

/* Grow to fill leftover flex space so the footer is always at the bottom */
main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', 'paralucent', sans-serif;
}

a { text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* --- Navigation -------------------------------------------- */
.nav-link {
  color: var(--color-success-500);
  font-size: 1.62rem;
  font-family: 'sunflower', 'Oswald', sans-serif;
  font-weight: 400;
  position: relative;
  display: inline-block;
  padding: 0.08rem 1.05rem 0.18rem;
  border-radius: 0.4rem;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, transform 0.15s ease, text-shadow 0.15s ease, letter-spacing 0.15s ease, background-color 0.15s ease;
}
.nav-link::before,
.nav-link::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1.62rem;
  height: 1.62rem;
  background-image: url("../images/leaf.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform: translateY(-50%) scale(0.72);
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(129, 217, 89, 0.4));
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.nav-link::before {
  left: -0.36rem;
}
.nav-link::after {
  right: -0.36rem;
  transform: translateY(-50%) scale(0.72) scaleX(-1);
}
.nav-link:hover::before,
.nav-link:hover::after,
.nav-link.active::before,
.nav-link.active::after {
  opacity: 1;
}
.nav-link:hover::before,
.nav-link.active::before {
  transform: translateY(-50%) scale(1);
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: translateY(-50%) scale(1) scaleX(-1);
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-success-100);
  text-shadow: 0 0 12px rgba(129, 217, 89, 0.45);
}
.nav-link:hover {
  transform: translateY(-1px) scale(1.03);
  letter-spacing: 0.02em;
}
.nav-link.active {
  font-size: 1.8rem;
}

/* --- Main navigation bar ----------------------------------- */
.main-nav {
  background-color: var(--color-primary-600);
  border-bottom: 2px solid var(--color-primary-300);
}
.main-nav .inner {
  max-width: 87rem;
  margin: 0 auto;
  padding: 0 1rem;       /* minimal vertical padding — logo fills the height */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}
/* Site logo in nav */
.nav-logo {
  font-family: 'sunflower', 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-success-500);
  white-space: nowrap;
}
.nav-logo:hover { color: var(--color-success-100); }

/* Logo image — preserves aspect ratio, fills nav height */
.nav-logo-img {
  height: 9rem;
  width: auto;
  display: block;
  transition: opacity 0.15s ease;
}
.nav-logo:hover .nav-logo-img { opacity: 0.85; }

/* Nav ⚡ Boost button — pill button sitting alongside the nav links */
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
}

/* --- Hamburger button — hidden on desktop, shown on mobile --- */
/* Three-span stack that animates into an ✕ when open. */
.nav-hamburger {
  display: none;          /* hidden by default; shown in mobile media query below */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  line-height: 0;
}
/* Each bar */
.nav-hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--color-success-500);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
/* Animate to ✕ when JS adds .open to the button */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Mobile nav overrides (MUST come after all base nav rules) --- */
/* Placing the media query last ensures it wins the cascade for the
   properties it overrides (display, flex-wrap, position). */
@media (max-width: 700px) {
  /* Shrink logo */
  .nav-logo-img { height: 4.5rem; }

  /* Lock inner row — logo left, hamburger right, no wrapping */
  .main-nav { position: relative; }   /* dropdown anchors to this */
  .main-nav .inner { flex-wrap: nowrap; }

  /* Show the hamburger button */
  .nav-hamburger { display: flex; }

  /* Collapse the link list — absolutely positioned dropdown */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;           /* flush below the nav bar */
    left: 0;
    right: 0;
    flex-direction: column;
    margin-left: 0;
    justify-content: flex-start;
    background-color: var(--color-primary-600);
    border-bottom: 2px solid var(--color-primary-300);
    padding: var(--size-4);
    gap: var(--size-2);
    z-index: 200;
  }
  /* Revealed when JS adds .nav-open to the <ul> */
  .nav-links.nav-open { display: flex; }

  /* Slightly smaller link text in the dropdown */
  .nav-link { font-size: 1.35rem; }
}

/* --- Hero section ------------------------------------------ */
.hero {
  text-align: center;
  background-image: linear-gradient(
    to bottom,
    var(--color-primary-700),
    var(--color-primary-600),
    var(--color-primary-400)
  );
  padding: var(--size-8) 0;
}

.hero-image {
  width: 300px;
  height: 300px;
  margin: auto;
  overflow: hidden;
  background-color: var(--color-grey-700);
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-image img {
  object-fit: cover;
  object-position: top;
  width: 100%;
  height: 100%;
}

.hero h1 {
  font-family: 'doublebass', 'Oswald', sans-serif;
  font-size: clamp(2.2rem, 11.5vw, var(--size-16));
  margin: var(--size-4) 0;
  color: var(--color-success-500);
  white-space: nowrap;
}

.hero p {
  font-family: 'paralucent', 'Roboto', sans-serif;
  font-size: var(--size-6);
  color: var(--color-success-500);
  width: 90%;
  max-width: 40rem;
  margin: auto;
}

.hero .btn-primary:hover {
  color: var(--color-primary-600);
}

/* --- Home page live hero (replaces static logo hero) ----------- */
/*
   Wraps the left-column live card on the homepage.
   Uses gradient top background matching the old hero, but the content
   is the same live-card used on /live/.
*/
.home-live-hero {
  /* Full-width gradient strip across the top of the page */
  background-image: linear-gradient(
    to bottom,
    var(--color-primary-700),
    var(--color-primary-600) 60%,
    transparent
  );
  padding-top: var(--size-8);
  padding-bottom: var(--size-8);
  /* Constrain card width so it doesn't stretch wall-to-wall on large screens */
  max-width: 52rem;
}

.section-latest .section-heading-row h2,
.section-featured .section-heading-row h2,
.section-latest .section-heading-link {
  font-family: 'paralucent', 'Oswald', sans-serif;
}

/* --- Neon flicker header (used on All Episodes h1, etc.) --- */
/*
   HOW THE EFFECT WORKS:
   - The heading uses the 'Benda' typekit font
   - A purple border surrounds it (rounded pill shape)
   - The @keyframes flicker animation cycles between:
       ON state: stacked green text-shadow layers (neon glow) +
                 stacked purple box-shadow layers (border glow)
       OFF state: no shadow at all (simulates neon flicker/stutter)
   - The timing (0%,18%,22%,25%,33%,53%,57%,100% = ON; 20%,24%,32%,55% = OFF)
     creates a realistic irregular flicker cadence.
*/
.neon-header {
  font-family: 'Benda', sans-serif;
  font-weight: 500;
  font-size: 3rem;
  color: var(--color-success-50);
  text-align: center;
  animation: flicker 1.2s infinite alternate;
  border: 0.3rem solid var(--color-primary-50);
  padding: 0.4em 1em;
  border-radius: 2rem;
  display: inline-block;
  /* Never wider than its container — prevents overflow on small screens */
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .neon-header { font-size: 4rem; }
}

@keyframes flicker {
  0%, 18%, 22%, 25%, 33%, 53%, 57%, 100% {
    /* Green text glow — multiple layers spread the light outward */
    text-shadow:
      0 0   4px var(--color-success-50),
      0 0  10px var(--color-success-100),
      0 0  21px var(--color-success-100),
      0 0  82px var(--color-success-100),
      0 0  42px var(--color-success-500),
      0 0  92px var(--color-success-500),
      0 0 102px var(--color-success-500),
      0 0 150px var(--color-success-500);
    /* Purple border/box glow */
    box-shadow:
      0 0 0.2rem  var(--color-primary-100),
      0 0 0.2rem  var(--color-primary-100),
      0 0 2rem    var(--color-primary-300),
      0 0 0.8rem  var(--color-primary-300),
      0 0 2.8rem  var(--color-primary-300),
      inset 0 0 1.3rem var(--color-primary-300);
  }
  20%, 24%, 32%, 55% {
    /* OFF frames — neon is "out" */
    text-shadow: none;
    box-shadow: none;
  }
}

/* --- Page section base (shared across all content pages) --- */
/* Common width + centering; each page-specific class only sets max-width. */
.page-section {
  width: 90%;
  margin: var(--size-8) auto;
}

/* --- Section wrappers -------------------------------------- */
.section-featured { max-width: 80rem; }
.section-latest {
  max-width: 84rem;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-4);
  margin-bottom: var(--size-4);
}

.section-heading-row-centered {
  justify-content: center;
}

.section-heading-row h2,
.section-featured h2 {
  font-size: var(--size-8);
  color: var(--color-success-100);
  margin: 0;
}

.section-heading-link {
  color: var(--color-primary-100);
  font-size: 0.95rem;
}

.section-heading-link:hover {
  color: var(--color-success-100);
  text-decoration: underline;
}

.section-featured h2 {
  text-align: center;
}

@media (min-width: 768px) {
  .section-heading-row h2,
  .section-featured h2 { font-size: var(--size-16); }
}

.episodes-slider-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.slider-control-btn {
  border: 1px solid var(--color-primary-100);
  background-color: var(--color-primary-600);
  color: var(--color-success-100);
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  border-radius: 50%;
}

.slider-control-btn:hover {
  background-color: var(--color-primary-500);
}

.episodes-slider {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0.15rem 0.8rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13.5rem, 18rem);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
  overscroll-behavior-x: contain;
}

.episodes-slider::-webkit-scrollbar {
  display: none;
}

.episodes-slider .episode-card {
  scroll-snap-align: start;
  background-color: var(--color-primary-600);
  border: 1px solid var(--color-primary-500);
  border-radius: 0.8rem;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.episodes-slider .episode-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-success-500);
}

.slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.slider-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  border: 0;
  background-color: var(--color-primary-300);
  opacity: 0.55;
  padding: 0;
}

.slider-dot.active {
  background-color: var(--color-success-500);
  opacity: 1;
  transform: scale(1.1);
}

@media (max-width: 700px) {
  .section-heading-row {
    flex-wrap: wrap;
  }

  .section-heading-row h2 {
    font-size: var(--size-8);
  }

  .episodes-slider-shell {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.45rem;
  }

  .episodes-slider {
    grid-auto-columns: minmax(12.5rem, 74vw);
  }

  .slider-control-btn {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    font-size: 0.95rem;
  }
}

/* Touch-first phones: arrows fight scroll-snap + are redundant with swipe; keep dots. */
@media (pointer: coarse) and (max-width: 768px) {
  .episodes-slider-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .slider-control-btn {
    display: none;
  }
}

/* --- Episode grid ------------------------------------------ */
.episodes-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.5rem;
  align-content: center;
}

/* --- Episode card ------------------------------------------ */
.episode-card {
  text-align: center;
  min-width: 0; /* same grid overflow fix as .bud-card */
}
.episode-card a { color: var(--color-grey-100); }
.episode-card-media {
  position: relative;
}
.episode-card-image-link,
.episode-card-content-link {
  display: block;
}

.episode-card-image {
  width: 100%;
  aspect-ratio: 1;   /* podcast artwork is always square — no clipping needed */
  overflow: hidden;
}
.episode-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fills the square container; no cropping since source is 1:1 */
}

.episode-card-content { padding: var(--size-4); }

/* Episode number (h3) uses 'paralucent' typekit font */
.episode-card-content h3 {
  margin: var(--size-1) 0;
  font-size: var(--size-6);
  font-family: 'paralucent', 'Roboto', 'Segoe UI Symbol', sans-serif;
  font-weight: 700;
  font-style: normal;
  color: var(--color-success-500);
}

/* Episode title (h4) — same font */
.episode-card-content h4 {
  font-size: var(--size-4);
  font-family: 'paralucent', 'Roboto', 'Segoe UI Symbol', sans-serif;
  font-weight: 700;
  font-style: normal;
  margin: var(--size-2) 0;
  color: var(--color-success-500);
}

.episode-card-content time {
  font-style: italic;
  color: var(--color-primary-100);
}

.episode-card-content p {
  line-height: var(--size-6);
  margin: 0;
}

/* --- Primary button (offset shadow style) ------------------ */
/* Works on both <button> and <a> — display:inline-block is required
   so the ::after pseudo-element has dimensions to offset from. */
.btn-primary {
  font-size: var(--size-8);
  font-family: 'gal-gothic-variable', 'Oswald', sans-serif; /* Oswald is the loaded fallback */
  font-style: normal;
  font-variation-settings: "wght" 420;
  padding: 1rem 2rem;
  outline: 0;
  margin: 2rem;
  border: 2px solid #fff;
  cursor: pointer;
  position: relative;
  display: inline-block;
  isolation: isolate;
  color: #fff;                   /* white — readable on both dark bg and hero gradient */
  background-color: transparent;
  transition: .3s ease;
}
.btn-primary::after {
  content: "";
  background-color: var(--color-success-500);
  width: 100%;
  z-index: -1;
  position: absolute;
  height: 100%;
  top: 7px;
  left: 7px;
  transition: 0.2s;
}
.btn-primary:hover {
  top: 0;
  left: 0;
  font-variation-settings: "wght" 710;
  color: var(--color-primary-700);  /* dark purple text over the green shadow on hover */
}
.btn-primary:hover::after {
  top: 0;
  left: 0;
}

/* --- Form submit button ------------------------------------ */
/* Quiet, understated — meant not to compete with the neon header */
.btn-form {
  background-color: var(--color-primary-700);  /* #281040 — darkest purple */
  border: 1px solid var(--color-primary-700);
  padding: var(--size-2) var(--size-4);        /* 0.5rem 1rem */
  border-radius: 4px;
  color: var(--color-primary-50);              /* #E4CFFE — light lavender */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.btn-form:hover {
  background-color: var(--color-primary-500);  /* #8127DB — bright purple */
  border-color:     var(--color-primary-500);
}

/* Episode artwork overlay control (explicitly overrides .btn-form defaults) */
.episode-card .episode-card-play-btn {
  position: absolute;
  bottom: 0.55rem;
  right: 0.55rem;
  width: 2.35rem;
  height: 2.35rem;
  min-width: 2.35rem;
  min-height: 2.35rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-primary-100);
  background-color: rgba(40, 16, 64, 0.88);
  color: var(--color-success-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 1;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: opacity 0.16s ease, transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
.episode-card .episode-card-share-btn {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  width: 2.2rem;
  height: 2.2rem;
  min-width: 2.2rem;
  min-height: 2.2rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-primary-100);
  background-color: rgba(40, 16, 64, 0.88);
  color: var(--color-success-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: opacity 0.16s ease, transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
.episode-card .episode-card-share-btn:hover {
  background-color: var(--color-primary-500);
  border-color: var(--color-success-500);
}
.episode-card .episode-card-play-btn::before {
  content: "";
  display: block;
}
.episode-card .episode-card-play-btn[data-state="play"]::before {
  width: 0;
  height: 0;
  border-top: 0.34rem solid transparent;
  border-bottom: 0.34rem solid transparent;
  border-left: 0.52rem solid var(--color-success-100);
  margin-left: 0.08rem;
}
.episode-card .episode-card-play-btn[data-state="pause"]::before {
  width: 0.56rem;
  height: 0.66rem;
  background:
    linear-gradient(
      to right,
      var(--color-success-100) 0,
      var(--color-success-100) 0.19rem,
      transparent 0.19rem,
      transparent 0.37rem,
      var(--color-success-100) 0.37rem,
      var(--color-success-100) 0.56rem
    );
}
.episode-card .episode-card-play-btn:hover {
  background-color: var(--color-primary-500);
  border-color: var(--color-success-500);
  color: var(--color-success-50);
}

/* Desktop: show control only on card hover/focus */
@media (hover: hover) and (pointer: fine) {
  .episode-card .episode-card-play-btn,
  .episode-card .episode-card-share-btn {
    width: 3.525rem;
    height: 3.525rem;
    min-width: 3.525rem;
    min-height: 3.525rem;
  }
  .episode-card .episode-card-play-btn[data-state="play"]::before {
    border-top-width: 0.51rem;
    border-bottom-width: 0.51rem;
    border-left-width: 0.78rem;
    margin-left: 0.12rem;
  }
  .episode-card .episode-card-play-btn[data-state="pause"]::before {
    width: 0.84rem;
    height: 0.99rem;
    background:
      linear-gradient(
        to right,
        var(--color-success-100) 0,
        var(--color-success-100) 0.29rem,
        transparent 0.29rem,
        transparent 0.56rem,
        var(--color-success-100) 0.56rem,
        var(--color-success-100) 0.84rem
      );
  }
  .episode-card .episode-card-share-btn .share-trigger-icon {
    width: 1.45rem;
    height: 1.45rem;
  }
  .episode-card .episode-card-play-btn {
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
  }
  .episode-card .episode-card-share-btn {
    left: 0.55rem;
    right: auto;
    top: auto;
    bottom: 0.55rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
  }
  .episode-card:hover .episode-card-play-btn,
  .episode-card:hover .episode-card-share-btn,
  .episode-card .episode-card-play-btn:focus-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .episode-card .episode-card-share-btn:focus-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* Touch/mobile: keep it visible (no hover affordance) */
@media (hover: none), (pointer: coarse) {
  .episode-card .episode-card-play-btn {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .episode-card .episode-card-share-btn {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

/* --- Neon header centering wrapper ------------------------- */
/* .neon-header is display:inline-block (needed for the pill border),
   so it can't center itself. Wrap it in this div to center it. */
.neon-header-wrap {
  text-align: center;
  margin-bottom: var(--size-8);
}

/* --- Flash messages ---------------------------------------- */
.messages {
  max-width: 80rem;
  margin: 1rem auto;
  padding: 0 1.5rem;
}
.message {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}
.message-error   { background-color: var(--color-error-500);   color: var(--color-grey-50); }
.message-success { background-color: var(--color-primary-600); color: var(--color-success-100); }

/* --- Live alert strip -------------------------------------- */
.live-alert {
  background-color: rgba(72, 29, 115, 0.95);
  border-bottom: 1px solid var(--color-primary-300);
}
.live-alert-upcoming {
  background-color: rgba(40, 16, 64, 0.92);
}
.live-alert-inner {
  width: min(94%, 80rem);
  margin: 0 auto;
  padding: 0.45rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.live-alert-text {
  margin: 0;
  color: var(--color-success-100);
  font-size: 0.9rem;
}
.live-alert-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.live-alert-listen-btn,
.live-alert-watch-btn,
.live-listen-btn,
.live-chat-btn,
.live-boost-btn {
  font-weight: 700;
  color: var(--color-success-500);
  border-color: var(--color-primary-300);
}
.live-alert-listen-btn:hover,
.live-alert-watch-btn:hover,
.live-listen-btn:hover,
.live-chat-btn:hover,
.live-boost-btn:hover {
  color: var(--color-success-100);
  background-color: var(--color-primary-500);
  border-color: var(--color-primary-500);
}

/* --- Live page --------------------------------------------- */
.live-page {
  max-width: 110rem;
}
.live-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 12rem;
  margin-bottom: 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
  border-radius: 0.65rem;
  border: 2px dashed var(--color-primary-400);
  background: rgba(0, 0, 0, 0.25);
  color: var(--color-grey-100);
}
.live-video-placeholder-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-success-100);
  letter-spacing: 0.03em;
}
.live-video-placeholder-hint {
  font-size: 0.92rem;
  color: var(--color-grey-200);
  max-width: 28rem;
  line-height: 1.4;
}
.live-now-playing {
  display: grid;
  grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr);
  gap: 0.95rem;
  align-items: start;
  margin-bottom: 1rem;
  padding: 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--color-primary-300);
  background: rgba(0, 0, 0, 0.25);
}
.live-now-playing-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--color-primary-300);
  background: #000;
}
.live-now-playing-body {
  min-width: 0;
}
.live-now-playing-heading {
  margin: 0.25rem 0 0;
  color: var(--color-success-100);
  font-size: 1.05rem;
}
.live-now-playing-title {
  margin: 0.3rem 0 0;
  color: var(--color-grey-100);
  font-weight: 700;
  font-size: 1.02rem;
}
.live-now-playing-subtitle {
  margin: 0.38rem 0 0;
  color: var(--color-primary-100);
  font-style: italic;
}
.live-broadcast-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(22rem, 28rem);
  gap: 1rem;
  align-items: start;
}
.live-page-top-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.live-card {
  background-color: var(--color-primary-600);
  border: 1px solid var(--color-primary-500);
  border-radius: 0.75rem;
  padding: 1rem;
}
.live-card-stream {
  min-width: 0;
}
.live-chat-card {
  min-width: 0;
}
.live-card-status {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.45rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-success-100);
  border: 1px solid var(--color-primary-200);
  background-color: rgba(172, 89, 255, 0.18);
}
.live-card-status-upcoming {
  border-color: var(--color-primary-100);
  background-color: rgba(189, 134, 244, 0.22);
}
.live-card-status-ended {
  border-color: var(--color-grey-400);
  background-color: rgba(57, 53, 66, 0.4);
  color: var(--color-grey-100);
}
.live-card h2 {
  margin: 0;
  color: var(--color-success-100);
}
.live-card-subtitle {
  margin: 0.4rem 0 0;
  color: var(--color-primary-100);
  font-style: italic;
}
.live-card-summary {
  margin: 0.55rem 0 0;
  color: var(--color-grey-100);
}
.live-video-wrap {
  margin-top: 0.9rem;
}
.live-video-player {
  width: 100%;
  display: block;
  border-radius: 0.65rem;
  border: 1px solid var(--color-primary-300);
  background: #000;
}
.live-video-player-embed {
  /* Keep iframe wrapper content-sized with no forced extra vertical space. */
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
}
.live-video-player-media {
  aspect-ratio: 16 / 9;
  min-height: 28rem;
}
.live-fallback-note {
  margin: 0.65rem 0 0;
  color: var(--color-grey-200);
}
.live-card-actions {
  justify-content: flex-start;
  margin-top: 0.9rem;
  margin-bottom: 0;
}
.live-chat-embed-wrap {
  margin-top: 0.7rem;
  border: 1px solid var(--color-primary-300);
  border-radius: 0.65rem;
  overflow: hidden;
  background: #0b0b0b;
}
.live-chat-embed {
  width: 100%;
  /* Taller + viewport-aware so more of The Lounge is visible without extra page scroll. */
  height: min(48rem, calc(100vh - 14rem));
  border: 0;
  display: block;
}
@media (max-width: 980px) {
  .live-broadcast-layout {
    grid-template-columns: 1fr;
  }
  .live-now-playing {
    grid-template-columns: 1fr;
  }
  .live-now-playing-art {
    max-width: 18rem;
  }
  .live-chat-embed {
    height: min(42rem, calc(100vh - 11rem));
  }
  .live-video-player-media {
    min-height: 14rem;
  }
}

/* --- Footer ------------------------------------------------ */
.main-footer {
  background-color: var(--color-primary-600);
  border-top: 2px solid var(--color-primary-500);
  padding: 1.15rem 1.5rem 1rem;
  margin-top: 4rem;
  text-align: center;
  color: var(--color-grey-200);
  font-size: 1rem;
  line-height: 1.35;
}
.main-footer p {
  margin: 0.2rem 0;
}
.main-footer a { color: var(--color-success-500); }
.main-footer a:hover { color: var(--color-success-100); }
.footer-links-row {
  font-weight: 700;
  text-align: center;
}
.footer-links-row a {
  padding: 0 0.6rem;
}
/* Footer support row: ⚡ Boost + PayPal donate side by side */
.footer-support-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.35rem;
}
/* ⚡ Boost the Show button in the footer — matches .episode-detail-share-btn styling
   but uses --color-primary-700 background so it contrasts against the footer's
   --color-primary-600 background (inverse of the episode detail context). */
.footer-boost-btn {
  border: 1px solid var(--color-primary-100);
  background-color: var(--color-primary-700);
  color: var(--color-success-100);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.footer-boost-btn:hover {
  background-color: var(--color-primary-500);
}
.footer-donate-wrap {
  /* margin handled by parent .footer-support-row; keep vertical reset */
  margin: 0;
}

.paypal-donate-form {
  margin: 0;
}

.paypal-donate-image {
  border: 0;
}

.footer-donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-success-500);
  color: var(--color-success-100);
  background-color: var(--color-primary-700);
  font-weight: 700;
}
.footer-donate-btn:hover {
  background-color: var(--color-primary-500);
}
.footer-copyright-row {
  color: var(--color-grey-300);
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

/* --- Share dialog ------------------------------------------ */
.share-dialog {
  border: 1px solid var(--color-primary-300);
  border-radius: 0.75rem;
  background-color: var(--color-primary-600);
  color: var(--color-success-100);
  width: min(95vw, 34rem);
  padding: 0;
}
.share-dialog::backdrop {
  background: rgba(12, 3, 20, 0.72);
}
.share-dialog-panel {
  margin: 0;
  padding: 1rem;
}
.share-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.share-dialog-header h2 {
  margin: 0;
  font-size: 1.25rem;
}
.share-close-btn {
  border: 1px solid var(--color-primary-300);
  background-color: var(--color-primary-700);
  color: var(--color-success-100);
  border-radius: 0.4rem;
  width: 1.9rem;
  height: 1.9rem;
  line-height: 1;
}
.share-dialog-subtitle {
  margin: 0.45rem 0 0.8rem;
  color: var(--color-grey-200);
  font-size: 0.9rem;
}
.share-field-label {
  display: block;
  font-size: 0.82rem;
  color: var(--color-grey-200);
  margin-bottom: 0.35rem;
}
.share-message-input,
.share-link-input {
  width: 100%;
  border: 1px solid var(--color-primary-300);
  border-radius: 0.45rem;
  background-color: var(--color-primary-700);
  color: var(--color-success-100);
  padding: 0.6rem;
  margin-bottom: 0.65rem;
}
.share-timestamp-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
}
.share-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.2rem 0 0.8rem;
}
.share-platform-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.share-platform-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.share-platform-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-primary-300);
  border-radius: 50%;
  width: 2.3rem;
  height: 2.3rem;
  color: var(--color-success-100);
  background-color: var(--color-primary-700);
  font-size: 1rem;
  line-height: 1;
  overflow: hidden;
}
.share-platform-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}
.share-platform-icon-raster {
  object-fit: contain;
}
.share-trigger-icon {
  width: 1rem;
  height: 1rem;
  display: block;
}
.share-platform-btn:hover {
  background-color: var(--color-primary-500);
}
.share-platform-label {
  font-size: 0.62rem;
  line-height: 1;
  color: var(--color-success-100);
}
.share-feedback {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  color: var(--color-grey-200);
  font-size: 0.8rem;
}

/* --- Persistent player: height animation -------------------- */
/*
 * The outer .persistent-player MUST NOT have overflow:hidden — that would
 * clip the .player-tabs-row which protrudes above the bar via translateY(-100%).
 *
 * Instead, .persistent-player-body is the clip/animate target.
 * max-height transition drives the collapse/expand animation.
 * Body padding transitions at the same easing so the page content moves smoothly.
 */
.persistent-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 350;
  background-color: var(--color-primary-600);
  border-top: 2px solid var(--color-primary-300);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
  line-height: 1.2;
  /* overflow MUST stay visible so the tab row above is not clipped */
  overflow: visible;
}
/* Inner clip wrapper — this is what animates, not the outer section */
.persistent-player-body {
  overflow: hidden;
  max-height: 12rem;           /* generous cap covers the full expanded player */
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.persistent-player--minimized .persistent-player-body {
  max-height: 3.4rem;          /* just tall enough for the thin bar */
}
body.has-persistent-player {
  transition: padding-bottom 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.persistent-player-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.5rem 0.9rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "edgeL meta edgeR"
    "edgeL timeline edgeR"
    "edgeL nav edgeR";
  column-gap: 1rem;
  row-gap: 0.28rem;
  align-items: center;
}
.persistent-player-edge--left {
  grid-area: edgeL;
  display: flex;
  align-items: center;
  justify-content: center;
}
.persistent-player-edge--right {
  grid-area: edgeR;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}
.persistent-player-meta {
  grid-area: meta;
  min-width: 0;
  text-align: center;
}
.persistent-player-label {
  display: none;
}
.persistent-player-title {
  color: var(--color-success-500);
  display: block;
  font-family: 'paralucent', sans-serif;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.persistent-player-title:hover {
  color: var(--color-success-100);
}
.persistent-player audio {
  display: none;
}
.persistent-timeline-row {
  grid-area: timeline;
  display: grid;
  grid-template-columns: auto 1fr auto 4.5rem auto;
  align-items: center;
  gap: 0.45rem;
}
.persistent-nav-row {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
}
.persistent-nav-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
}
.persistent-control-btn {
  border: 1px solid var(--color-primary-100);
  background-color: var(--color-primary-700);
  color: var(--color-success-100);
  width: 1.78rem;
  height: 1.78rem;
  min-width: 1.78rem;
  min-height: 1.78rem;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.9rem;
  position: relative;
}
.persistent-nav-cluster #persistent-toggle-btn {
  width: 2.06rem;
  height: 2.06rem;
  min-width: 2.06rem;
  min-height: 2.06rem;
}
.persistent-nav-cluster #persistent-back-30-btn,
.persistent-nav-cluster #persistent-forward-30-btn {
  width: 1.92rem;
  height: 1.92rem;
  min-width: 1.92rem;
  min-height: 1.92rem;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.3rem 1.3rem;
}
.persistent-nav-cluster #persistent-back-30-btn {
  background-image: url("../images/replay-30.png");
}
.persistent-nav-cluster #persistent-forward-30-btn {
  background-image: url("../images/forward-30.png");
}
.persistent-control-btn:hover {
  background-color: var(--color-primary-500);
}
.persistent-control-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
#persistent-boost-btn:disabled {
  opacity: 0.35;
  filter: grayscale(1);
  cursor: not-allowed;
}
.persistent-toggle-btn {
  font-size: 0;
}
.persistent-toggle-btn::before {
  content: "";
  display: block;
}
.persistent-toggle-btn[data-state="play"]::before {
  width: 0;
  height: 0;
  border-top: 0.36rem solid transparent;
  border-bottom: 0.36rem solid transparent;
  border-left: 0.55rem solid var(--color-success-100);
  margin-left: 0.08rem;
}
.persistent-toggle-btn[data-state="pause"]::before {
  width: 0.6rem;
  height: 0.7rem;
  background:
    linear-gradient(
      to right,
      var(--color-success-100) 0,
      var(--color-success-100) 0.2rem,
      transparent 0.2rem,
      transparent 0.4rem,
      var(--color-success-100) 0.4rem,
      var(--color-success-100) 0.6rem
    );
}
.persistent-time {
  font-family: 'Oswald', 'paralucent', sans-serif;
  font-size: 0.78rem;
  color: var(--color-grey-100);
  min-width: 2rem;
  text-align: center;
}
.persistent-seek {
  width: 100%;
  accent-color: var(--color-success-500);
  height: 0.95rem;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.persistent-seek::-webkit-slider-runnable-track {
  height: 0.32rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-success-500), var(--color-primary-200));
}
.persistent-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  margin-top: -0.29rem;
  background: var(--color-success-100);
  border: 1px solid var(--color-primary-700);
}
.persistent-seek::-moz-range-track {
  height: 0.32rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-success-500), var(--color-primary-200));
  border: 0;
}
.persistent-seek::-moz-range-progress {
  height: 0.32rem;
  border-radius: 999px;
  background: var(--color-success-500);
}
.persistent-seek::-moz-range-thumb {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--color-success-100);
  border: 1px solid var(--color-primary-700);
}
.persistent-seek::-moz-focus-outer {
  border: 0;
}
.persistent-volume {
  width: 100%;
  height: 0.9rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--color-success-500);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.persistent-volume::-webkit-slider-runnable-track {
  height: 0.26rem;
  border-radius: 999px;
  background: var(--color-primary-200);
}
.persistent-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  margin-top: -0.24rem;
  background: var(--color-success-100);
  border: 1px solid var(--color-primary-700);
}
.persistent-volume::-moz-range-track {
  height: 0.26rem;
  border-radius: 999px;
  background: var(--color-primary-200);
  border: 0;
}
.persistent-volume::-moz-range-progress {
  height: 0.26rem;
  border-radius: 999px;
  background: var(--color-success-500);
}
.persistent-volume::-moz-range-thumb {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--color-success-100);
  border: 1px solid var(--color-primary-700);
}
.persistent-volume::-moz-focus-outer {
  border: 0;
}
@media (min-width: 701px) {
  #persistent-share-btn,
  #persistent-boost-btn {
    width: 3.65rem;
    height: 3.65rem;
    min-width: 3.65rem;
    min-height: 3.65rem;
  }
  #persistent-share-btn .share-trigger-icon {
    width: 1.75rem;
    height: 1.75rem;
  }
  #persistent-boost-btn {
    font-size: 1.65rem;
  }
  .persistent-nav-cluster {
    gap: 0.55rem;
  }
  .persistent-timeline-row .persistent-control-btn {
    width: 2.35rem;
    height: 2.35rem;
    min-width: 2.35rem;
    min-height: 2.35rem;
    font-size: 1.05rem;
  }
  .persistent-nav-cluster .persistent-control-btn {
    width: 2.55rem;
    height: 2.55rem;
    min-width: 2.55rem;
    min-height: 2.55rem;
    font-size: 1.05rem;
  }
  .persistent-nav-cluster #persistent-toggle-btn {
    width: 2.95rem;
    height: 2.95rem;
    min-width: 2.95rem;
    min-height: 2.95rem;
  }
  .persistent-nav-cluster #persistent-back-30-btn,
  .persistent-nav-cluster #persistent-forward-30-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    background-size: 1.68rem 1.68rem;
  }
  .persistent-nav-cluster .persistent-toggle-btn[data-state="play"]::before {
    border-top-width: 0.48rem;
    border-bottom-width: 0.48rem;
    border-left-width: 0.74rem;
    margin-left: 0.1rem;
  }
  .persistent-nav-cluster .persistent-toggle-btn[data-state="pause"]::before {
    width: 0.78rem;
    height: 0.92rem;
    background:
      linear-gradient(
        to right,
        var(--color-success-100) 0,
        var(--color-success-100) 0.26rem,
        transparent 0.26rem,
        transparent 0.52rem,
        var(--color-success-100) 0.52rem,
        var(--color-success-100) 0.78rem
      );
  }
}
@media (max-width: 700px) {
  body.has-persistent-player {
    padding-bottom: 6.25rem;
  }
  .persistent-player-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "meta meta meta"
      "timeline timeline timeline"
      "edgeL nav edgeR";
    column-gap: 0.65rem;
    row-gap: 0.22rem;
    padding: 0.35rem 0.6rem;
  }
  .persistent-player-title {
    font-size: 0.8rem;
    line-height: 1.2;
  }
  .persistent-timeline-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 0.28rem;
  }
  .persistent-time {
    display: inline-block;
    min-width: 1.75rem;
    font-size: 0.68rem;
  }
  .persistent-seek {
    min-width: 0;
    display: block;
  }
  .persistent-nav-cluster {
    gap: 0.3rem;
  }
  .persistent-control-btn {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    font-size: 0.84rem;
  }
  .persistent-nav-cluster #persistent-toggle-btn {
    width: 2.55rem;
    height: 2.55rem;
    min-width: 2.55rem;
    min-height: 2.55rem;
  }
  .persistent-nav-cluster #persistent-back-30-btn,
  .persistent-nav-cluster #persistent-forward-30-btn {
    width: 2.35rem;
    height: 2.35rem;
    min-width: 2.35rem;
    min-height: 2.35rem;
    background-size: 1.38rem 1.38rem;
  }
  .persistent-volume {
    display: none;
  }
}

/* --- Player tab row ----------------------------------------- */
/*
 * Lives OUTSIDE .persistent-player in the DOM so its z-index is not
 * capped by the player's stacking context. This lets the tabs show
 * above the fullscreen overlay (z-index 500) while still appearing flush
 * against the top edge of the player bar.
 *
 * JS (positionTabsRow + ResizeObserver) sets `bottom` in real-time so
 * the tabs track the animate player height during minimize transitions.
 *
 * On mobile: hidden until .has-persistent-player is on <body>.
 */
.player-tabs-row {
  position: fixed;
  bottom: 0;           /* JS overrides this with the actual player top */
  left: 0.8rem;
  z-index: 501;        /* above fullscreen overlay (500) and player (350) */
  display: none;
  align-items: flex-end;
}
/* Explicit slide class — JS adds this before animating, removes after */
.player-tabs-row.player-tabs--slide {
  transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
body.has-persistent-player .player-tabs-row {
  display: flex;
}
/* Mobile: hide until player first shown (same as before) */
@media (max-width: 700px) {
  .player-tabs-row {
    display: none;
  }
  body.has-persistent-player .player-tabs-row {
    display: flex;
  }
}

.player-tab {
  height: 1.6rem;
  min-width: 3rem;
  padding: 0 0.7rem;
  border: 2px solid var(--color-primary-300);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, filter 0.15s ease;
}
.player-tab:first-child {
  border-radius: 0.4rem 0 0 0;
  border-right-width: 1px;
}
.player-tab:last-child {
  border-radius: 0 0.4rem 0 0;
  border-left-width: 1px;
}

/* Minimize tab — matches the player bar (purple) */
.player-tab--minimize {
  background-color: var(--color-primary-600);
}
.player-tab--minimize:hover {
  background-color: var(--color-primary-500);
}

/* Expand tab — green accent to stand out as the "open" action.
   No hover state: the green color is already visually distinct, and a
   hover background change causes GPU compositing color artifacts on desktop. */
.player-tab--expand {
  background-color: var(--color-success-500);
}

/* Tab chevron icons — shared between tabs and the fullscreen close button */
.player-tab__icon {
  display: block;
  width: 0.58rem;
  height: 0.58rem;
  border-right: 2.5px solid currentColor;
  border-top: 2.5px solid currentColor;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Down chevron (minimize tab default; also used in fullscreen close) */
.player-tab__icon--down {
  color: var(--color-success-100);
  transform: rotate(135deg); /* ↓ */
  margin-top: -0.22rem;
}
/* Up chevron (legacy — no longer used on tabs, kept for any inline refs) */
.player-tab__icon--up {
  color: var(--color-primary-700);
  transform: rotate(-45deg); /* ↑ */
  margin-top: 0.14rem;
}
/*
 * Fullscreen / expand icon — two opposing corner brackets (classic ⤢ symbol).
 * Icon: 0.72rem. Each bracket: 0.28rem. Gap in centre: 0.16rem (no overlap).
 * 0.28 + 0.28 = 0.56 < 0.72 → the brackets never touch → no plus-sign artefact.
 */
.player-tab__icon--fullscreen {
  position: relative;
  width: 0.72rem;
  height: 0.72rem;
  border: none;      /* reset the shared chevron border from .player-tab__icon */
  transition: none;
}
/* Shared pseudo-element base */
.player-tab__icon--fullscreen::before,
.player-tab__icon--fullscreen::after {
  content: "";
  position: absolute;
  width: 0.28rem;
  height: 0.28rem;
}
/* Expand ┌  — top-left corner bracket */
.player-tab__icon--fullscreen::before {
  top: 0; left: 0;
  border-top: 2.5px solid var(--color-primary-700);
  border-left: 2.5px solid var(--color-primary-700);
}
/* Expand ┘  — bottom-right corner bracket */
.player-tab__icon--fullscreen::after {
  bottom: 0; right: 0;
  border-bottom: 2.5px solid var(--color-primary-700);
  border-right: 2.5px solid var(--color-primary-700);
}

/* --- Collapse icon state (when fullscreen is open) --------- */
/*
 * Flip to the standard "exit fullscreen" shape:
 *   ┘ in the top-left  ( border-bottom + border-right, anchor={top:0,left:0} )
 *   ┌ in the bottom-right ( border-top + border-left, anchor={bottom:0,right:0} )
 * Same 0.28rem size, same positions — only the border edges change.
 */
.player-tabs--fullscreen .player-tab--expand .player-tab__icon--fullscreen::before {
  top: 0; left: 0; bottom: auto; right: auto;
  border-top: none; border-left: none;
  border-bottom: 2.5px solid var(--color-primary-700);
  border-right: 2.5px solid var(--color-primary-700);
}
.player-tabs--fullscreen .player-tab--expand .player-tab__icon--fullscreen::after {
  bottom: 0; right: 0; top: auto; left: auto;
  border-bottom: none; border-right: none;
  border-top: 2.5px solid var(--color-primary-700);
  border-left: 2.5px solid var(--color-primary-700);
}

/*
 * Minimized state (.player-tabs--minimized on the tabs row):
 * Tabs are outside the player element, so we can't use a descendant
 * selector from .persistent-player--minimized. JS adds this class directly.
 * Flip the purple chevron to point UP (↑) = "click to restore".
 */
.player-tabs--minimized .player-tab--minimize .player-tab__icon--down {
  transform: rotate(-45deg); /* ↑ */
  margin-top: 0.14rem;
}

/*
 * Fullscreen-active state (.player-tabs--fullscreen on the tabs row):
 * Purple tab: always shows ↓ regardless of minimize state.
 */
.player-tabs--fullscreen .player-tab--minimize .player-tab__icon--down {
  transform: rotate(135deg) !important;
  margin-top: -0.22rem !important;
}

/* On mobile: tabs hidden until player has been activated */
@media (max-width: 700px) {
  .player-tabs-row {
    display: none;
  }
  body.has-persistent-player .player-tabs-row {
    display: flex;
  }
}

/* --- Expand button (legacy — now replaced by tab; kept for safety) - */
.player-expand-btn { display: none; }
.player-expand-btn__icon { display: none; }

/* --- Player minimized state --------------------------------- */
/*
 * When minimized, swap out the full player grid for a dedicated thin bar.
 * The normal .persistent-player-inner is hidden completely; the
 * .player-minimized-bar takes its place within the same clip wrapper.
 */

/* Minimized bar: hidden by default, full-width flex row when active */
.player-minimized-bar {
  display: none;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.75rem;
  box-sizing: border-box;
}
.persistent-player--minimized .player-minimized-bar {
  display: flex;
}
/* Hide the full player grid when minimized */
.persistent-player--minimized .persistent-player-inner {
  display: none;
}

/* Play/pause mirror button in minimized bar */
.player-min-toggle {
  flex-shrink: 0;
}

/* Scrolling title ticker ------------------------------------ */
/*
 * The title wrapper clips to a fixed region; the inner span scrolls
 * continuously. JS doubles the title text for a seamless loop and sets
 * animation-duration proportional to character count.
 */
.player-min-title-wrap {
  overflow: hidden;
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  height: 1.2em;
  display: flex;
  align-items: center;
}
.player-min-title {
  display: inline-block;
  white-space: nowrap;
  font-family: 'paralucent', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-success-500);
  animation: player-ticker linear infinite;
  animation-play-state: running;
  /* 0.5s pause before the first scroll cycle; subsequent loops are seamless */
  animation-delay: 0.5s;
  /* Duration set dynamically by JS */
}
@keyframes player-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* Don't animate short titles that don't need scrolling */
.player-min-title.ticker-static {
  animation: none;
}

/* Timecodes in minimized bar */
.player-min-time {
  flex-shrink: 0;
  font-size: 0.72rem;
  min-width: 2rem;
}

/* Non-interactive CSS progress bar -------------------------  */
.player-min-progress {
  flex: 2 1 0;       /* takes 2× as much space as each timecode column */
  min-width: 3rem;
  height: 0.32rem;
  background: var(--color-primary-300);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.player-min-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--color-success-500);
  border-radius: 999px;
  transition: width 0.8s linear;
  pointer-events: none;
}

/* Mute button in minimized bar */
.player-min-mute {
  flex-shrink: 0;
}

/* Smaller body padding when minimized */
body.has-persistent-player.player-is-minimized {
  padding-bottom: 3rem !important;
}
@media (max-width: 700px) {
  body.has-persistent-player.player-is-minimized {
    padding-bottom: 2.8rem !important;
  }
  /* Tighten gaps a touch on small screens */
  .player-minimized-bar {
    gap: 0.38rem;
    padding: 0.35rem 0.55rem;
  }
  .player-min-title {
    font-size: 0.75rem;
  }
}

/* --- Now Playing fullscreen overlay ------------------------- */
/*
 * Slides up from the bottom over the full viewport.
 * Uses class-based show/hide (.player-fullscreen--open) so CSS
 * transitions can run smoothly instead of display:none snapping.
 * pointer-events:none when closed prevents invisible click traps.
 */
.player-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: linear-gradient(165deg, var(--color-primary-800, #1a0a2e) 0%, var(--color-primary-700) 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Hidden state: slid down below viewport */
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity   0.35s ease;
}
/* Open state: transition to fully visible */
.player-fullscreen--open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Mobile inner: single column, vertically scrollable */
.player-fullscreen__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  max-width: 42rem;
  margin: 0 auto;
  /* top pad = tab row height (1.6rem) + gap (0.6rem) so art never hides behind tabs */
  padding: 2.2rem 1.2rem 2rem;
  overflow-y: auto;
  gap: 0.9rem;
}

/* Right column: holds content */
.player-fullscreen__right {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0.85rem;
}

/* Artwork */
.player-fullscreen__art-wrap {
  width: 100%;
  max-width: 18rem;
  aspect-ratio: 1 / 1;
  border-radius: 0.85rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
  background-color: var(--color-primary-600);
  position: relative;
  /* Subtle pop-in on open */
  transition: box-shadow 0.35s ease;
}
.player-fullscreen--open .player-fullscreen__art-wrap {
  box-shadow: 0 12px 48px rgba(0,0,0,0.65);
}
.player-fullscreen__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.player-fullscreen__art[hidden] {
  display: none;
}
.player-fullscreen__art-placeholder {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    var(--color-primary-600),
    var(--color-primary-600) 1.5rem,
    var(--color-primary-700) 1.5rem,
    var(--color-primary-700) 3rem
  );
  opacity: 0.5;
}

/* Titles */
.player-fullscreen__titles {
  text-align: center;
  width: 100%;
}
.player-fullscreen__chapter-title {
  font-family: 'paralucent', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-success-100);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}
.player-fullscreen__episode-title {
  font-family: 'paralucent', sans-serif;
  font-size: 0.88rem;
  color: var(--color-grey-200);
  display: block;
  text-decoration: none;
}
.player-fullscreen__episode-title:hover {
  color: var(--color-success-100);
}

/* Timeline / seek row */
.player-fullscreen__timeline {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

/* Playback controls */
.player-fullscreen__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}
.player-fullscreen__controls .persistent-control-btn {
  width: 2.6rem;
  height: 2.6rem;
  min-width: 2.6rem;
  min-height: 2.6rem;
  font-size: 1rem;
}
.player-fullscreen__play-btn {
  width: 3.2rem !important;
  height: 3.2rem !important;
  min-width: 3.2rem !important;
  min-height: 3.2rem !important;
}
#player-fullscreen-back-30 {
  font-size: 0;
  background-image: url("../images/replay-30.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.5rem 1.5rem;
}
#player-fullscreen-forward-30 {
  font-size: 0;
  background-image: url("../images/forward-30.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.5rem 1.5rem;
}

/* Shownotes panel */
.player-fullscreen__shownotes {
  width: 100%;
  border-top: 1px solid var(--color-primary-300);
  padding-top: 0.9rem;
  margin-top: 0.2rem;
}
.player-fullscreen__shownotes[hidden] {
  display: none;
}
.player-fullscreen__shownotes-heading {
  font-family: 'paralucent', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-grey-100);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.player-fullscreen__shownotes-body {
  font-size: 0.88rem;
  color: var(--color-grey-200);
  line-height: 1.6;
}
.player-fullscreen__shownotes-body a {
  color: var(--color-success-500);
}
.player-fullscreen__shownotes-body a:hover {
  color: var(--color-success-100);
}

/* Desktop: true 2-column grid — art left, everything else right */
@media (min-width: 701px) {
  .player-fullscreen__inner {
    display: grid;
    grid-template-columns: clamp(16rem, 38%, 24rem) 1fr;
    grid-template-rows: 1fr;
    align-items: start;
    gap: 2.5rem;
    max-width: 80rem;
    height: 100%;
    /* Top pad clears the absolute close button; left/right are generous */
    /* top pad clears the floating tab row (1.6rem tabs + 0.6rem gap) */
    padding: 2.2rem 3rem 2.5rem;
    overflow-y: auto;
  }
  .player-fullscreen__art-wrap {
    /* Stick the art as you scroll through shownotes */
    position: sticky;
    top: 0;
    width: 100%;
    max-width: none;
    align-self: flex-start;
  }
  .player-fullscreen__right {
    align-items: flex-start; /* left-align content in right column */
    padding-top: 0.25rem;
    overflow-y: auto;
  }
  .player-fullscreen__titles,
  .player-fullscreen__timeline,
  .player-fullscreen__controls,
  .player-fullscreen__shownotes {
    width: 100%;
    text-align: left;
  }
  .player-fullscreen__controls {
    justify-content: flex-start;
  }
  .player-fullscreen__chapter-title {
    font-size: 1.3rem;
  }
  .player-fullscreen__episode-title {
    font-size: 0.95rem;
  }
}

/* --- Episode detail page ----------------------------------- */
.episode-detail {
  width: 90%;
  /* Widened from 50rem to accommodate the two-column media row on desktop */
  max-width: 64rem;
  margin: 2rem auto;
}

/*
 * Two-column media row: album art (left) + sidebar (right).
 * Mobile default is block (stacked), grid kicks in at tablet+.
 */
.episode-detail-media-row {
  display: block; /* stacked on mobile — no change to mobile layout */
  margin-bottom: 2rem;
}

/* On desktop, switch to a two-column grid.
   Art column gets ~42% (5fr), sidebar gets ~58% (7fr). */
@media (min-width: 701px) {
  .episode-detail-media-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}

/* Inside the art column the image-wrap's bottom margin is replaced by the grid gap */
.episode-detail-art-col .episode-detail-image-wrap {
  margin-bottom: 0;
}

/* Sidebar stacks chapters + persons vertically; no extra styling needed */
.episode-detail-sidebar {
  display: flex;
  flex-direction: column;
}
.episode-detail-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--color-success-500);
  font-size: 0.9rem;
}
.episode-detail-back:hover { color: var(--color-success-100); }

.episode-detail-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary-100);
  margin-bottom: 0.5rem;
}
.episode-detail h1 {
  font-size: 2.5rem;
  color: var(--color-success-500);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
.episode-detail-share-row {
  margin: 0.4rem 0 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.episode-detail-share-btn {
  border: 1px solid var(--color-primary-100);
  background-color: var(--color-primary-600);
  color: var(--color-success-100);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.episode-detail-share-btn:hover {
  background-color: var(--color-primary-500);
}
.episode-detail-share-btn .episode-detail-boost-glyph {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.episode-detail-share-time-note {
  margin: -0.6rem 0 1rem;
  color: var(--color-grey-300);
  font-size: 0.82rem;
}
.episode-detail time {
  font-style: italic;
  color: var(--color-primary-100);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 1.5rem;
}
.episode-detail-image-wrap {
  position: relative;
  margin-bottom: 2rem;
}
.episode-detail-image {
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.episode-detail-play-btn {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  width: 5.4rem;
  height: 5.4rem;
  min-width: 5.4rem;
  min-height: 5.4rem;
  border-radius: 50%;
  border: 1px solid var(--color-primary-100);
  background-color: rgba(40, 16, 64, 0.9);
  color: var(--color-success-100);
  font-size: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.episode-detail-play-btn::before {
  content: "";
  display: block;
}
.episode-detail-play-btn[data-state="play"]::before {
  width: 0;
  height: 0;
  border-top: 0.825rem solid transparent;
  border-bottom: 0.825rem solid transparent;
  border-left: 1.24rem solid var(--color-success-100);
  margin-left: 0.165rem;
}
.episode-detail-play-btn[data-state="pause"]::before {
  width: 1.39rem;
  height: 1.61rem;
  background:
    linear-gradient(
      to right,
      var(--color-success-100) 0,
      var(--color-success-100) 0.465rem,
      transparent 0.465rem,
      transparent 0.923rem,
      var(--color-success-100) 0.923rem,
      var(--color-success-100) 1.39rem
    );
}
.episode-detail-play-btn:hover {
  background-color: var(--color-primary-500);
  border-color: var(--color-success-500);
}
.episode-video-section {
  margin: 0 0 2rem;
  padding: 1rem;
  border: 1px solid var(--color-primary-500);
  border-radius: 0.75rem;
  background-color: rgba(40, 16, 64, 0.65);
}
.episode-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.episode-video-header h2 {
  margin: 0;
  color: var(--color-success-100);
  font-size: 1.35rem;
}
.episode-video-direct-link {
  color: var(--color-primary-100);
  font-size: 0.86rem;
}
.episode-video-direct-link:hover {
  color: var(--color-success-100);
  text-decoration: underline;
}
.episode-video-wrap {
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid var(--color-primary-300);
  background: #000;
}
.episode-video-player {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
}
@media (max-width: 700px) {
  .episode-detail-play-btn {
    width: 3.83rem;
    height: 3.83rem;
    min-width: 3.83rem;
    min-height: 3.83rem;
  }
  .episode-detail-play-btn[data-state="play"]::before {
    border-top-width: 0.615rem;
    border-bottom-width: 0.615rem;
    border-left-width: 0.93rem;
    margin-left: 0.12rem;
  }
  .episode-detail-play-btn[data-state="pause"]::before {
    width: 1.01rem;
    height: 1.2rem;
    background:
      linear-gradient(
        to right,
        var(--color-success-100) 0,
        var(--color-success-100) 0.338rem,
        transparent 0.338rem,
        transparent 0.675rem,
        var(--color-success-100) 0.675rem,
        var(--color-success-100) 1.01rem
      );
  }
}
.episode-chapters-accordion {
  margin-bottom: 2rem;
  border: 1px solid var(--color-primary-500);
  border-radius: 0.75rem;
  background-color: var(--color-primary-600);
}
.episode-chapters-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.8rem 1rem;
  font-family: 'Oswald', 'paralucent', sans-serif;
  color: var(--color-success-100);
}
.episode-chapters-summary::-webkit-details-marker {
  display: none;
}
.episode-chapters-summary::before {
  content: "▸";
  margin-right: 0.55rem;
  color: var(--color-success-500);
}
.episode-chapters-accordion[open] .episode-chapters-summary::before {
  content: "▾";
}
.episode-chapters-empty-note {
  margin: 0;
  color: var(--color-success-100);
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.65;
}
.episode-chapters {
  padding: 0 1rem 1rem;
}
.episode-chapters-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.episode-chapter-btn {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid var(--color-primary-300);
  background-color: var(--color-primary-700);
  color: var(--color-success-100);
  border-radius: 0.45rem;
  padding: 0.45rem 0.6rem;
}
.episode-chapter-btn:hover {
  border-color: var(--color-success-500);
  background-color: var(--color-primary-500);
}
.episode-chapter-time {
  font-family: 'Oswald', 'paralucent', sans-serif;
  color: var(--color-primary-100);
  font-size: 0.85rem;
}
.episode-chapter-title {
  font-size: 0.95rem;
}
.episode-description {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* --- Episode detail: "In This Episode" persons strip ---------- */
.episode-persons {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-primary-500);
}
.episode-persons-heading {
  color: var(--color-success-100);
  font-size: var(--size-5);
  margin: 0 0 var(--size-4);
}
/* Horizontal scroll of avatar chips */
.episode-persons-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-4);
}
.episode-person-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--size-1);
  text-align: center;
  width: 5rem;
  text-decoration: none;
}
/* Circular avatar */
.episode-person-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary-300);
  transition: border-color 0.15s ease;
}
/* Fallback initial circle */
.episode-person-avatar-fallback {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--color-primary-500);
  border: 2px solid var(--color-primary-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-success-100);
  transition: border-color 0.15s ease;
}
.episode-person-link:hover .episode-person-avatar,
.episode-person-link:hover .episode-person-avatar-fallback {
  border-color: var(--color-success-500);
}
.episode-person-name {
  font-size: 0.8rem;
  font-family: 'paralucent', sans-serif;
  font-weight: 700;
  color: var(--color-success-500);
  line-height: 1.2;
  overflow-wrap: break-word;
  width: 100%;
}
.episode-person-link:hover .episode-person-name { color: var(--color-success-100); }
/* "Host" label under hosts' names */
.episode-person-role {
  font-size: 0.65rem;
  color: var(--color-grey-400);
  font-style: italic;
}

.episode-shownotes {
  border-top: 1px solid var(--color-primary-500);
  padding-top: 2rem;
}
.episode-shownotes h2 {
  color: var(--color-success-500);
  margin-bottom: 1rem;
}
/* Style the raw HTML pulled from the RSS feed's content:encoded */
.episode-shownotes a { color: var(--color-primary-100); }
.episode-shownotes a:hover { color: var(--color-success-100); text-decoration: underline; }
.episode-shownotes p { margin-bottom: 1rem; }
.episode-shownotes ul,
.episode-shownotes ol { padding-left: 1.5rem; margin-bottom: 1rem; }

/* Fallback tile when an episode card has no artwork */
.episode-card-image-fallback {
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--color-primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* --- Shared page utilities --------------------------------- */
/* h1 on standard content pages — sits below the neon-header-wrap */
.contact-section h1,
.buds-section h1 {
  color: var(--color-success-100);
  margin-bottom: var(--size-2);
}

/* Subtitle / tagline below the neon header, used on any page */
.subtitle {
  color: var(--color-success-500);
  font-size: var(--size-6);
  font-weight: 700;
  margin-bottom: var(--size-8);
}

/* --- Contact page ------------------------------------------ */
.contact-section { max-width: 40rem; }
.form-group { margin-bottom: var(--size-5); }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-grey-100);
  margin-bottom: var(--size-2);
}

/* Styled inputs and textareas — used via class="form-input" on widgets */
.form-input {
  width: 100%;
  padding: var(--size-2) var(--size-4);
  background-color: var(--color-primary-600);
  border: 1px solid var(--color-primary-300);
  border-radius: 4px;
  color: var(--color-success-100);
  font-family: 'paralucent', 'Roboto', sans-serif;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-success-500);
  box-shadow: 0 0 0 3px rgba(129, 217, 89, 0.2);
}
.form-input::placeholder { color: var(--color-grey-400); }

.form-error {
  color: var(--color-error-100);
  font-size: 0.875rem;
  margin-top: var(--size-1);
}

/* --- Buds page --------------------------------------------- */
/* h1 and .subtitle handled by shared utilities above */
.buds-section { max-width: 80rem; }
.buds-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1.5rem;
}
/* Force 2 columns on small phones — minmax(12rem) only fits 1 on 320–375px screens */
@media (max-width: 500px) {
  .buds-grid { grid-template-columns: repeat(2, 1fr); }
}
.bud-card {
  background-color: var(--color-primary-600);
  border: 1px solid var(--color-primary-500);
  border-radius: 0.75rem;
  padding: var(--size-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--size-3);
  /* CSS Grid items default to min-width:auto, meaning they won't shrink
     below their content's minimum width. Setting 0 lets the card shrink
     to fit its column so content can't blow out the grid. */
  min-width: 0;
  position: relative;
}
.bud-card--nostr-verified {
  padding-top: 2.15rem;
}
.bud-card-nostr-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.5rem 0.22rem 0.38rem;
  border-radius: 9999px;
  background-color: rgba(40, 16, 64, 0.92);
  border: 1px solid var(--color-success-500);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  color: var(--color-success-100);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.bud-card-nostr-badge-icon {
  width: 0.78rem;
  height: 0.78rem;
  flex-shrink: 0;
  stroke: var(--color-success-500);
}
.bud-card-nostr-badge-text {
  white-space: nowrap;
}
.bud-card-nostr-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  margin-top: 0.15rem;
}
.bud-card-njump {
  font-size: 0.8125rem;
  color: var(--color-primary-100);
  text-decoration: none;
  transition: color 0.15s ease;
  overflow-wrap: break-word;
  word-break: break-word;
  text-align: center;
  line-height: 1.3;
}
.bud-card-njump:hover {
  color: var(--color-success-100);
  text-decoration: underline;
}
.bud-card-copy-npub {
  font: inherit;
  font-size: 0.65rem;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  letter-spacing: 0.02em;
  padding: 0.14rem 0.55rem;
  margin: 0;
  border-radius: 0.3rem;
  border: 1px solid var(--color-primary-300);
  background-color: var(--color-primary-700);
  color: var(--color-grey-200);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.bud-card-copy-npub:hover {
  border-color: var(--color-success-500);
  color: var(--color-success-100);
  background-color: var(--color-primary-600);
}
.bud-card-copy-npub-status {
  font-size: 0.65rem;
  color: var(--color-success-500);
  line-height: 1.2;
  min-height: 1em;
}
/* Circular avatar image */
.bud-card-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary-300);
}
/* Fallback tile showing the bud's first initial */
.bud-card-avatar-fallback {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: var(--color-primary-500);
  border: 2px solid var(--color-primary-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-success-100);
}
.bud-card-name {
  font-family: 'paralucent', sans-serif;
  font-weight: 700;
  color: var(--color-success-500);
  margin: 0;
  font-size: var(--size-5);
  overflow-wrap: break-word; /* wrap long names rather than overflowing */
  word-break: break-word;
  width: 100%;
}
/* Episode count badge on each card */
.bud-card-count {
  font-size: 0.75rem;
  color: var(--color-grey-400);
  font-style: italic;
}
/* External site link — sits outside the main card link-wrap */
.bud-card-link {
  color: var(--color-primary-100);
  font-size: 0.875rem;
  transition: color 0.15s ease;
  overflow-wrap: break-word; /* prevent long URLs from overflowing the card */
  word-break: break-all;
  width: 100%;
  text-align: center;
}
.bud-card-link:hover { color: var(--color-success-100); text-decoration: underline; }

/* Wraps avatar + name + count; makes the whole card clickable to detail page */
.bud-card-link-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--size-3);
  text-decoration: none;
  width: 100%;
}
.bud-card-link-wrap:hover .bud-card-name { color: var(--color-success-100); }

/* Empty state message */
.buds-empty {
  color: var(--color-grey-400);
  grid-column: 1 / -1;
}

/* --- Sort controls (shared; used on buds list, potentially others) --- */
.sort-controls {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  margin-bottom: var(--size-8);
  flex-wrap: wrap;
}
.sort-label {
  color: var(--color-grey-400);
  font-size: 0.875rem;
}
.sort-btn {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--color-primary-300);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--color-success-500);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sort-btn:hover {
  background-color: var(--color-primary-500);
  color: var(--color-success-100);
}
.sort-btn.active {
  background-color: var(--color-primary-500);
  color: var(--color-success-100);
  border-color: var(--color-primary-500);
  font-weight: 700;
}

/* --- Bud detail page --------------------------------------- */
.bud-detail { max-width: 80rem; }

.bud-detail-back {
  display: inline-block;
  margin-bottom: var(--size-6);
  color: var(--color-success-500);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}
.bud-detail-back:hover { color: var(--color-success-100); }

/* Profile card: avatar left, info right; stacks on mobile */
.bud-profile {
  display: flex;
  gap: var(--size-8);
  align-items: flex-start;
  background-color: var(--color-primary-600);
  border: 1px solid var(--color-primary-500);
  border-radius: 0.75rem;
  padding: var(--size-8);
  margin-bottom: var(--size-8);
}
@media (max-width: 600px) {
  .bud-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Large circular avatar on detail page */
.bud-profile-avatar {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary-300);
  flex-shrink: 0;
}
/* Fallback initial circle */
.bud-profile-avatar-fallback {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background-color: var(--color-primary-500);
  border: 3px solid var(--color-primary-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-success-100);
  flex-shrink: 0;
}

.bud-profile-name {
  font-family: 'paralucent', sans-serif;
  font-size: var(--size-8);
  font-weight: 700;
  color: var(--color-success-500);
  margin: 0 0 var(--size-4);
}
.bud-profile-bio {
  color: var(--color-grey-100);
  line-height: 1.7;
  margin-bottom: var(--size-4);
}
.bud-profile-link {
  color: var(--color-primary-100);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}
.bud-profile-link:hover { color: var(--color-success-100); text-decoration: underline; }

.bud-profile-nostr-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--size-3) var(--size-4);
  margin-top: var(--size-4);
}
.bud-profile-nostr-label {
  color: var(--color-grey-100);
  font-size: 0.9rem;
}
.bud-copy-npub-btn {
  flex-shrink: 0;
}
.bud-copy-npub-status {
  font-size: 0.85rem;
  color: var(--color-success-100);
  min-height: 1.2em;
}
@media (max-width: 600px) {
  .bud-profile-nostr-row {
    justify-content: center;
  }
}

/* Episodes section on the detail page */
.bud-episodes-heading {
  color: var(--color-success-100);
  font-size: var(--size-6);
  margin-bottom: var(--size-6);
}
/* Force 3 columns on the bud detail episode grid */
.bud-detail .episodes-grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 700px) {
  .bud-detail .episodes-grid { grid-template-columns: repeat(2, 1fr); }
}

.bud-no-episodes {
  color: var(--color-grey-400);
  font-style: italic;
}

/* --- Success / confirmation page --------------------------- */
.success-section {
  width: 90%;
  max-width: 40rem;
  margin: var(--size-20) auto;
  text-align: center;
}
.success-section .icon  { font-size: 4rem; margin-bottom: var(--size-6); }
.success-section h1     { font-size: var(--size-16); color: var(--color-success-500); margin-bottom: var(--size-4); }
.success-section p      { font-size: var(--size-5); color: var(--color-grey-100); margin-bottom: var(--size-8); }

/* --- Pagination -------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin: var(--size-8) 0;
  flex-wrap: wrap;
}
/* Shared styles for links, current page, and disabled buttons */
.pagination a,
.pagination .current,
.pagination .disabled {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-primary-300);
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
}
.pagination a {
  color: var(--color-success-500);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.pagination a:hover {
  background-color: var(--color-primary-500);
  color: var(--color-success-100);
}
/* Current page — highlighted */
.pagination .current {
  background-color: var(--color-primary-500);
  color: var(--color-success-100);
  font-weight: 700;
}
/* Prev/Next when at first/last page */
.pagination .disabled {
  color: var(--color-grey-600);
  border-color: var(--color-grey-700);
  cursor: default;
}
/* Page count label */
.pagination .page-info {
  color: var(--color-grey-300);
  font-size: 0.85rem;
  padding: 0 0.5rem;
}

/* --- Episodes page layout (sidebar + grid) ----------------- */
.episodes-layout { max-width: 80rem; }

/* Two-column layout: sidebar left, grid right. Stacks on mobile. */
.episodes-with-sidebar {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 700px) {
  .episodes-with-sidebar { grid-template-columns: 1fr; }
}

/* Force 3 columns within the sidebar layout — the sidebar eats enough
   horizontal space that auto-fill would otherwise give 4 columns. */
.episodes-layout .episodes-grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 700px) {
  /* 2 per row on mobile — matches the UX of podcast/music apps */
  .episodes-layout .episodes-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Archive filter sidebar -------------------------------- */
.archive-sidebar {
  background-color: var(--color-primary-600);
  border: 1px solid var(--color-primary-500);
  border-radius: 0.75rem;
  padding: var(--size-4);
  position: sticky;
  top: 1rem;
}
.archive-sidebar h3 {
  font-family: 'Oswald', sans-serif;
  font-size: var(--size-5);
  color: var(--color-success-500);
  margin: 0 0 var(--size-3);
}
.archive-year-group { margin-bottom: var(--size-2); }

/* --- Mobile archive dropdown ------------------------------- */
/* Hidden on desktop — the sidebar handles filtering there.
   On mobile the sidebar is hidden and this select takes over. */
.archive-select {
  display: none;
}

@media (max-width: 700px) {
  .archive-sidebar  { display: none; }
  .archive-select {
    display: block;
    width: 100%;
    padding: var(--size-2) var(--size-3);
    background-color: var(--color-primary-600);
    border: 1px solid var(--color-primary-500);
    border-radius: 0.5rem;
    color: var(--color-success-100);
    font-family: 'paralucent', 'Roboto', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    /* webkit/blink override so the arrow colour matches */
    -webkit-appearance: auto;
    appearance: auto;
  }
  .archive-select:focus {
    outline: none;
    border-color: var(--color-success-500);
    box-shadow: 0 0 0 2px rgba(129, 217, 89, 0.25);
  }
}

/* Year link — bold, acts as a section heading */
.archive-year-link {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-success-100);
  padding: 0.2rem 0;
  transition: color 0.15s ease;
}
.archive-year-link:hover,
.archive-year-link.active { color: var(--color-success-500); }

/* Month list — shown when the parent year is selected */
.archive-months {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0 0 0 var(--size-4);
}
.archive-months li a {
  display: block;
  color: var(--color-grey-200);
  font-size: 0.85rem;
  padding: 0.15rem 0;
  transition: color 0.15s ease;
}
.archive-months li a:hover,
.archive-months li a.active { color: var(--color-success-500); }

/* Clear filters link */
.archive-clear {
  display: inline-block;
  margin-bottom: var(--size-3);
  color: var(--color-primary-100);
  font-size: 0.8rem;
  text-decoration: underline;
}
.archive-clear:hover { color: var(--color-success-100); }

/* Active filter label above the grid */
.filter-active-label {
  color: var(--color-grey-300);
  font-size: 0.85rem;
  margin-bottom: var(--size-4);
}

/* --- Podroll / Roll Call pages ----------------------------- */
.podroll-list-section {
  max-width: 80rem;
}
.podroll-grid .podroll-card .episode-card-content h4 {
  min-height: 2.4em;
}
.podroll-subtitle {
  color: var(--color-grey-200);
  font-size: 0.88rem;
  line-height: 1.35;
}
@media (max-width: 700px) {
  .podroll-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }
  .podroll-grid .podroll-card .episode-card-content {
    padding: var(--size-3);
  }
  .podroll-grid .podroll-card .episode-card-content h4 {
    font-size: 0.93rem;
    line-height: 1.25;
  }
  .podroll-grid .podroll-card .podroll-subtitle {
    font-size: 0.78rem;
    line-height: 1.25;
  }
}

/* --- Value for Value page ---------------------------------- */
.v4v-section {
  max-width: 84rem;
}

.v4v-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.v4v-card {
  background-color: var(--color-primary-600);
  border: 1px solid var(--color-primary-500);
  border-radius: 0.75rem;
  padding: var(--size-5);
}

.v4v-card h2 {
  margin: 0 0 0.45rem;
  color: var(--color-success-100);
  font-size: 1.25rem;
}

.v4v-card p {
  margin: 0.5rem 0 0;
  color: var(--color-grey-100);
}

.v4v-card a {
  color: var(--color-primary-100);
}

.v4v-card a:hover {
  color: var(--color-success-100);
  text-decoration: underline;
}

.v4v-note {
  color: var(--color-grey-300);
  font-size: 0.85rem;
}

.v4v-phone-link {
  color: var(--color-success-500);
  font-weight: 700;
  text-decoration: underline;
}

.v4v-phone-link:hover {
  color: #5ea73f;
}

.v4v-mailing {
  line-height: 1.5;
}

.v4v-btn {
  margin: 0.9rem 0 0;
  font-size: 1rem;
  padding: 0.65rem 1rem;
}

.v4v-card .paypal-donate-form {
  margin-top: 0.9rem;
}

.v4v-card-paypal .paypal-donate-form {
  display: flex;
  justify-content: center;
}

.v4v-nostr-list {
  margin-top: 0.8rem;
  gap: var(--size-5);
  justify-content: center;
}

.v4v-nostr-link .episode-person-avatar-fallback {
  width: 3.2rem;
  height: 3.2rem;
}

.podroll-detail {
  max-width: 56rem;
}
.podroll-show-subtitle {
  color: var(--color-success-100);
  font-size: 1.05rem;
  font-style: italic;
  margin: 0 0 0.6rem;
}
.podroll-show-summary {
  color: var(--color-grey-100);
  margin-bottom: 1rem;
}
.podroll-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.podroll-links a,
.podroll-open-link {
  color: var(--color-primary-100);
}
.podroll-link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background-color: var(--color-success-500);
  border-color: var(--color-success-500);
  color: var(--color-primary-500);
  font-weight: 700;
}
.podroll-links .podroll-link-btn,
.podroll-links .podroll-link-btn:visited,
.podroll-links button.podroll-link-btn {
  color: var(--color-primary-500) !important;
}
.podroll-link-icon {
  width: 0.95rem;
  height: 0.95rem;
  display: inline-block;
  flex: 0 0 auto;
}
.podroll-guid-status {
  font-size: 0.85rem;
  color: var(--color-success-100);
  align-self: center;
  min-width: 5.2rem;
}
.podroll-links .podroll-link-btn:hover,
.podroll-links .podroll-link-btn:focus-visible {
  background-color: var(--color-success-100);
  border-color: var(--color-success-100);
  color: var(--color-primary-500) !important;
  text-decoration: none;
}
.podroll-links a:hover,
.podroll-open-link:hover {
  color: var(--color-success-100);
  text-decoration: underline;
}

.podroll-recent h2 {
  color: var(--color-success-500);
  margin-bottom: 0.25rem;
}
.podroll-refresh-meta {
  margin: 0 0 0.9rem;
  color: var(--color-grey-300);
  font-size: 0.8rem;
}
.podroll-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.podroll-recent-item {
  display: block;
  border: 1px solid var(--color-primary-500);
  background: var(--color-primary-600);
  border-radius: 0.6rem;
  padding: 0.75rem;
  overflow: hidden;
}
.podroll-recent-art-wrap {
  position: relative;
  float: right;
  margin-left: 0.9rem;
  margin-bottom: 0.45rem;
}
.podroll-recent-art {
  width: 168px;
  height: 168px;
  border-radius: 0.45rem;
  object-fit: cover;
}
.podroll-recent-art-fallback {
  width: 168px;
  height: 168px;
  border-radius: 0.45rem;
}
.podroll-recent-play-btn {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  width: 2.2rem;
  height: 2.2rem;
  min-width: 2.2rem;
  min-height: 2.2rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-primary-100);
  background-color: rgba(40, 16, 64, 0.88);
  color: var(--color-success-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 1;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.podroll-recent-share-btn {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  width: 2.2rem;
  height: 2.2rem;
  min-width: 2.2rem;
  min-height: 2.2rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-primary-100);
  background-color: rgba(40, 16, 64, 0.88);
  color: var(--color-success-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.podroll-recent-share-btn:hover {
  background-color: var(--color-primary-500);
  border-color: var(--color-success-500);
}
.podroll-recent-share-btn .share-trigger-icon {
  width: 1rem;
  height: 1rem;
}
.podroll-recent-play-btn::before {
  content: "";
  display: block;
}
.podroll-recent-play-btn[data-state="play"]::before {
  width: 0;
  height: 0;
  border-top: 0.34rem solid transparent;
  border-bottom: 0.34rem solid transparent;
  border-left: 0.52rem solid var(--color-success-100);
  margin-left: 0.08rem;
}
.podroll-recent-play-btn[data-state="pause"]::before {
  width: 0.56rem;
  height: 0.66rem;
  background:
    linear-gradient(
      to right,
      var(--color-success-100) 0,
      var(--color-success-100) 0.19rem,
      transparent 0.19rem,
      transparent 0.37rem,
      var(--color-success-100) 0.37rem,
      var(--color-success-100) 0.56rem
    );
}
.podroll-recent-play-btn:hover {
  background-color: var(--color-primary-500);
  border-color: var(--color-success-500);
}
@media (min-width: 701px) and (hover: hover) and (pointer: fine) {
  .podroll-recent-play-btn,
  .podroll-recent-share-btn {
    width: 3.3rem;
    height: 3.3rem;
    min-width: 3.3rem;
    min-height: 3.3rem;
  }
  .podroll-recent-share-btn {
    left: 0.45rem;
    right: auto;
    top: auto;
    bottom: 0.45rem;
  }
  .podroll-recent-play-btn[data-state="play"]::before {
    border-top-width: 0.51rem;
    border-bottom-width: 0.51rem;
    border-left-width: 0.78rem;
    margin-left: 0.12rem;
  }
  .podroll-recent-play-btn[data-state="pause"]::before {
    width: 0.84rem;
    height: 0.99rem;
    background:
      linear-gradient(
        to right,
        var(--color-success-100) 0,
        var(--color-success-100) 0.29rem,
        transparent 0.29rem,
        transparent 0.56rem,
        var(--color-success-100) 0.56rem,
        var(--color-success-100) 0.84rem
      );
  }
  .podroll-recent-share-btn .share-trigger-icon {
    width: 1.35rem;
    height: 1.35rem;
  }
}
.podroll-recent-body h4 {
  margin: 0 0 0.35rem;
  color: var(--color-success-100);
  font-size: 1.05rem;
}
.podroll-recent-meta {
  color: var(--color-primary-100);
  font-size: 0.82rem;
  margin: 0 0 0.45rem;
}
.podroll-recent-body p {
  margin: 0.25rem 0;
}
.podroll-recent-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.5rem;
}
.podroll-recent-more-wrap {
  margin: 1rem 0 0;
  text-align: center;
}
.podroll-recent-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 700px) {
  .podroll-recent-item {
    overflow: hidden;
  }
  .podroll-recent-art-wrap {
    margin-left: 0.65rem;
    margin-bottom: 0.35rem;
  }
  .podroll-recent-art {
    width: 120px;
    height: 120px;
    aspect-ratio: auto;
  }
  .podroll-recent-art-fallback {
    width: 120px;
    height: 120px;
    aspect-ratio: auto;
  }
  .podroll-recent-actions {
    flex-wrap: wrap;
  }
  .podroll-open-link {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .podroll-recent-play-btn {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
  }
  .podroll-recent-play-btn[data-state="play"]::before {
    border-top-width: 0.4rem;
    border-bottom-width: 0.4rem;
    border-left-width: 0.62rem;
    margin-left: 0.09rem;
  }
  .podroll-recent-play-btn[data-state="pause"]::before {
    width: 0.68rem;
    height: 0.78rem;
    background:
      linear-gradient(
        to right,
        var(--color-success-100) 0,
        var(--color-success-100) 0.23rem,
        transparent 0.23rem,
        transparent 0.45rem,
        var(--color-success-100) 0.45rem,
        var(--color-success-100) 0.68rem
      );
  }
  .podroll-recent-body h4 {
    font-size: 0.98rem;
    line-height: 1.25;
  }
  .podroll-recent-body p {
    font-size: 0.88rem;
  }
}

/* —— Nostr nav + BYOW boost modal —— */
.nav-nostr-item {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.nav-nostr-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.nav-nostr-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.nav-nostr-btn {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.35rem;
  border: 1px solid var(--color-success-500);
  background: transparent;
  color: var(--color-success-100);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-nostr-btn:hover {
  background: rgba(156, 255, 122, 0.12);
}
.nav-nostr-secondary {
  border-color: var(--color-grey-400);
  color: var(--color-grey-200);
}
.nav-nostr-signedin .nav-nostr-avatar {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  object-fit: cover;
}
.nav-nostr-signedin .nav-nostr-label {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-nostr-signedin .nav-nostr-label--loading {
  max-width: 11rem;
  color: rgba(225, 213, 255, 0.85);
  font-style: italic;
  font-size: 0.8rem;
}
.nav-nostr-signedin .nav-nostr-avatar--loading {
  display: inline-block;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.35);
  animation: bab-nostr-profile-pulse 1.1s ease-in-out infinite;
}
@keyframes bab-nostr-profile-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}
.nav-nostr-dropdown-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 0.12rem;
  font-size: 0.55rem;
  line-height: 1;
  opacity: 0.8;
}
.nav-nostr-dropdown-chevron::before {
  content: '▾';
  display: block;
  transition: transform 0.15s ease;
}
.nav-nostr-dropdown-toggle[aria-expanded='true'] .nav-nostr-dropdown-chevron::before {
  transform: rotate(180deg);
}
.nav-nostr-diamond {
  color: #f472d6;
}
.nav-nostr-err {
  font-size: 0.7rem;
  color: #ffb3c9;
  margin: 0;
  text-align: right;
  max-width: 12rem;
}

/* Native dialog UA styles (esp. mobile Safari / Chrome) add a light outer border — strip it; chrome lives on .bab-nostr-backup-panel */
dialog.bab-nostr-backup-dialog {
  margin: auto;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  max-width: calc(100vw - 1.5rem);
  box-shadow: none;
}

.bab-nostr-backup-dialog::backdrop {
  background: rgba(12, 3, 24, 0.88);
}
.bab-nostr-backup-panel {
  padding: 1.25rem;
  max-width: 32rem;
  border: 1px solid var(--color-success-500);
  border-radius: 0.6rem;
  background: var(--color-primary-600);
  color: var(--color-success-100);
}
.bab-nostr-backup-warning {
  font-size: 0.9rem;
  color: var(--color-grey-200);
}
.bab-nostr-backup-textarea {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  margin: 0.75rem 0;
  padding: 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid var(--color-primary-500);
  background: var(--color-primary-700);
  color: var(--color-success-100);
  resize: vertical;
}
.bab-nostr-backup-tip {
  font-size: 0.85rem;
  color: var(--color-grey-200);
  margin: 0.5rem 0 0;
}
.bab-nostr-backup-actions,
.bab-nostr-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}
.bab-nostr-intro-panel {
  max-width: 38rem;
  max-height: min(85vh, 32rem);
  overflow-y: auto;
}
.bab-nostr-intro-panel h2 {
  margin-top: 0;
}
.bab-nostr-intro-body {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-grey-100);
}
.bab-nostr-intro-body a {
  color: var(--color-success-500);
  text-decoration: underline;
}
.bab-nostr-intro-body a:hover {
  color: var(--color-success-300);
}
.bab-nostr-intro-resources {
  margin-bottom: 0;
  font-size: 0.88rem;
}
.bab-nostr-intro-list {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
}
.bab-nostr-intro-list li {
  margin-bottom: 0.35rem;
}
.btn-form-secondary {
  background: transparent;
  border: 1px solid var(--color-grey-400);
  color: var(--color-grey-200);
}
.btn-form-secondary:hover {
  border-color: var(--color-success-500);
  color: var(--color-success-100);
}
.nav-nostr-signedin-wrap.nav-nostr-dropdown {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.nav-nostr-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 11rem;
  padding: 0.35rem 0;
  margin: 0;
  border-radius: 0.45rem;
  border: 1px solid var(--color-success-500);
  background: var(--color-primary-700);
  box-shadow: 0 0.4rem 1.15rem rgba(0, 0, 0, 0.4);
  z-index: 220;
}
.nav-nostr-dropdown-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.5rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--color-success-100);
  cursor: pointer;
  text-decoration: none;
}
.nav-nostr-dropdown-item:hover,
.nav-nostr-dropdown-item:focus-visible {
  background: rgba(156, 255, 122, 0.14);
  outline: none;
}
.nav-nostr-dropdown-item--signout {
  margin-top: 0.2rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--color-primary-500);
  color: var(--color-grey-200);
  font-weight: 600;
}
.nav-nostr-dropdown-item--signout:hover,
.nav-nostr-dropdown-item--signout:focus-visible {
  color: var(--color-success-100);
}
.bab-nostr-signin-chooser-panel {
  position: relative;
  max-width: 28rem;
  max-height: min(90vh, 36rem);
  overflow-y: auto;
}
.bab-nostr-signin-chooser-panel > h2 {
  margin-top: 0;
}
.bab-nostr-signin-chooser-lead {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--color-grey-200);
  margin: 0 0 0.85rem;
}
.bab-nostr-signin-chooser-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.bab-nostr-signin-option {
  border: 1px solid var(--color-primary-300);
  border-radius: 0.45rem;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.12);
}
.bab-nostr-signin-option--recommended {
  border-color: var(--color-success-500);
  box-shadow: 0 0 0 1px rgba(129, 217, 89, 0.22);
}
.bab-nostr-signin-option h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  color: var(--color-success-100);
}
.bab-nostr-signin-option-desc {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--color-grey-200);
}
.bab-nostr-signin-option-desc strong {
  color: var(--color-success-300);
  font-weight: 700;
}
.bab-nostr-signin-option-hint {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  line-height: 1.3;
  color: #ffb3c9;
}
.bab-nostr-signin-chooser-footer {
  margin-top: 0.85rem;
  padding-top: 0.35rem;
}
.bab-nostr-signin-chooser-footer .btn-form {
  width: 100%;
}
.nostr-profile-page {
  max-width: 40rem;
}
.nostr-profile-panel {
  margin-top: var(--size-6);
  padding: var(--size-6);
  border-radius: 0.5rem;
  border: 1px solid var(--color-primary-300);
  background: var(--color-primary-600);
  color: var(--color-success-100);
}
.nostr-profile-gate p {
  margin: 0;
  line-height: 1.45;
}
.nostr-profile-npub-row .form-label {
  margin-bottom: var(--size-2);
}
.nostr-profile-npub {
  display: block;
  word-break: break-all;
  font-size: 0.8rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.35rem;
  background: var(--color-primary-700);
  border: 1px solid var(--color-primary-300);
}
.nostr-profile-relays-hint {
  font-size: 0.8rem;
  color: var(--color-grey-200);
  margin: 0 0 var(--size-4);
}
.nostr-profile-hint {
  font-weight: 400;
  opacity: 0.85;
}
.nostr-profile-about {
  min-height: 6rem;
  resize: vertical;
}
.nostr-profile-feedback {
  font-size: 0.9rem;
  color: var(--color-success-500);
  margin: var(--size-4) 0;
}
.nostr-profile-feedback--err {
  color: var(--color-error-100);
}
.bab-boost-backdrop {
  position: fixed;
  inset: 0;
  z-index: 420;
  isolation: isolate;
  background: rgba(12, 3, 24, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* --- Boost success: strike video in <dialog> (top layer above wallet UI) */
/* Mobile: edge-to-edge. Desktop (≥700px): centered modal, darkened ::backdrop, max ~768px wide. */
dialog.bab-boost-strike-dialog {
  margin: 0;
  border: none;
  padding: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  box-sizing: border-box;
  background: transparent;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}
dialog.bab-boost-strike-dialog::backdrop {
  background: rgba(12, 3, 24, 0.94);
}
@media (min-width: 700px) {
  dialog.bab-boost-strike-dialog {
    width: min(92vw, 48rem);
    height: auto;
    max-width: min(92vw, 48rem);
    max-height: min(88vh, 50rem);
    margin: auto;
    padding: 0;
    border-radius: 0.85rem;
    overflow: hidden;
    background: var(--color-primary-600);
    border: 1px solid var(--color-success-500);
    box-shadow: 0 1.25rem 3.5rem rgba(0, 0, 0, 0.55);
  }
  dialog.bab-boost-strike-dialog::backdrop {
    background: rgba(12, 3, 24, 0.82);
  }
}
.bab-boost-strike {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  animation: babBoostStrikeFadeIn 0.35s ease-out both;
  pointer-events: none;
}
@media (min-width: 700px) {
  .bab-boost-strike {
    padding: 0.65rem 0.65rem 0.75rem;
    max-height: min(88vh, 50rem);
  }
}
.bab-boost-strike--fallback {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: rgba(12, 3, 24, 0.94);
}
.bab-boost-strike--out {
  animation: babBoostStrikeFadeOut 0.4s ease-in forwards;
}
@keyframes babBoostStrikeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes babBoostStrikeFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
/* Strike clip (MP4) + title burn-in */
.bab-boost-strike--video {
  width: 100%;
  padding: 0.75rem;
  gap: 0.65rem;
}
.bab-boost-strike-video-wrap {
  position: relative;
  width: min(100%, 40rem);
  margin: 0 auto;
  border-radius: 0.65rem;
  overflow: hidden;
  box-shadow: 0 0.5rem 2.25rem rgba(0, 0, 0, 0.55);
  border: 2px solid var(--color-success-500);
  background: #0a0514;
}
@media (min-width: 700px) {
  .bab-boost-strike--video {
    padding: 0;
    gap: 0.5rem;
  }
  .bab-boost-strike-video-wrap {
    width: 100%;
    max-width: none;
    max-height: min(78vh, 44rem);
    border-radius: 0.55rem;
    box-shadow: none;
    border-width: 1px;
    border-color: rgba(129, 217, 89, 0.45);
  }
  .bab-boost-strike-video {
    max-height: min(78vh, 44rem);
    width: 100%;
    object-fit: contain;
  }
}
.bab-boost-strike-video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.bab-boost-strike-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem 1.1rem 1.15rem;
  background: linear-gradient(
    180deg,
    transparent 38%,
    rgba(12, 3, 24, 0.55) 72%,
    rgba(12, 3, 24, 0.92) 100%
  );
  pointer-events: none;
}
.bab-boost-strike-video-title {
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: 'Oswald', 'paralucent', sans-serif;
  font-size: clamp(1.35rem, 4.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.15;
  color: var(--color-success-100);
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.95),
    0 0 1.25rem rgba(129, 217, 89, 0.45);
}
.bab-boost-strike-sound-btn {
  pointer-events: auto;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  padding: 0.28rem 0.75rem;
  align-self: center;
}
.bab-boost-strike-caption {
  margin: 0;
  font-family: 'Oswald', 'paralucent', sans-serif;
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-success-500);
  text-shadow: 0 0 1rem rgba(129, 217, 89, 0.45);
  text-align: center;
  animation: babBoostStrikeCaption 0.45s ease-out 0.15s both;
}
@keyframes babBoostStrikeCaption {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.bab-boost-strike-note {
  margin: 0.25rem 0 0;
  max-width: 24rem;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-error-100);
  pointer-events: auto;
}

.bab-boost-panel {
  position: relative;
  width: 100%;
  max-width: 26rem;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--color-success-500);
  background: var(--color-primary-600);
  color: var(--color-success-100);
}
.bab-boost-panel.card-like {
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.45);
}
@media (min-width: 701px) {
  .bab-boost-panel {
    max-width: min(40rem, calc(100vw - 2.5rem));
    padding: 1.4rem 1.5rem 1.05rem;
  }
}
.bab-boost-close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  font-size: 1.35rem;
  line-height: 1;
  border: none;
  background: transparent;
  color: var(--color-grey-300);
  cursor: pointer;
}
.bab-boost-stamp {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #fde68a;
  border: 1px solid rgba(245, 224, 83, 0.45);
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
}
.bab-boost-title {
  font-size: 1.25rem;
  margin: 0.4rem 0 0.15rem;
  color: var(--color-success-500);
}
.bab-boost-sub.muted {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-grey-300);
}
.bab-boost-body {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.bab-boost-label {
  font-size: 0.8rem;
  color: var(--color-grey-200);
  margin-top: 0.35rem;
}
.bab-boost-input,
.bab-boost-textarea {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  border: 1px solid var(--color-primary-500);
  background: var(--color-primary-700);
  color: var(--color-success-100);
}
.bab-boost-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: none;
}
.bab-boost-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}
.bab-boost-progress,
.bab-boost-pub,
.bab-boost-err {
  font-size: 0.8rem;
  margin: 0.25rem 0 0;
}
.bab-boost-err {
  color: #ffb3b3;
}
.bab-boost-connect {
  width: 100%;
  margin-top: 0.25rem;
  font-weight: 600;
}
.bab-boost-advanced-nwc {
  margin-top: 0.75rem;
  padding: 0.5rem 0 0;
  border-top: 1px solid rgba(245, 224, 83, 0.2);
}
.bab-boost-advanced-summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--color-grey-300);
  list-style: none;
}
.bab-boost-advanced-summary::-webkit-details-marker {
  display: none;
}
.bab-boost-advanced-nwc[open] .bab-boost-advanced-summary {
  margin-bottom: 0.35rem;
}

/* --- Boost modal: collapsible value-splits accordion ----------- */
.bab-boost-splits {
  margin-top: 0.75rem;
  padding: 0.5rem 0 0;
  border-top: 1px solid rgba(245, 224, 83, 0.2);
}
.bab-boost-splits-summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--color-grey-300);
  list-style: none;
  user-select: none;
}
.bab-boost-splits-summary::-webkit-details-marker { display: none; }
.bab-boost-splits[open] .bab-boost-splits-summary {
  margin-bottom: 0.4rem;
}
.bab-boost-splits-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}
/* Each recipient row: name on the left, percentage right-aligned */
.bab-boost-split-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  padding: 0.18rem 0.3rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
}
.bab-boost-split-name {
  color: var(--color-success-100);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0.6rem;
}
.bab-boost-split-pct {
  color: var(--color-success-500);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
/* Small note shown when Value Time Splits are active */
.bab-boost-splits-note {
  font-size: 0.72rem;
  margin: 0.35rem 0 0;
  font-style: italic;
}
.bab-boost-wallet {
  margin-top: 0.65rem;
  padding: 0.65rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(245, 224, 83, 0.28);
  background: rgba(0, 0, 0, 0.15);
}
.bab-boost-nwc-status {
  font-size: 0.78rem;
  margin: 0.35rem 0 0;
}
.bab-boost-v4v-link-wrap {
  font-size: 0.78rem;
  margin: 0.45rem 0 0;
}
.bab-boost-v4v-link-wrap a {
  color: var(--color-success-500);
  text-decoration: underline;
}
.bab-boost-rail-hint {
  font-size: 0.78rem;
  margin: 0.2rem 0 0;
  min-height: 1.2em;
  line-height: 1.35;
}
.bab-boost-msg-wrap {
  position: relative;
}
.bab-nostr-mention-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 60;
  margin: 0.15rem 0 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--color-primary-800, #321052);
  border: 1px solid var(--color-primary-500);
  border-radius: 0.35rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.bab-nostr-mention-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  text-align: left;
  padding: 0.42rem 0.55rem;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--color-success-100);
  cursor: pointer;
  font: inherit;
}
.bab-nostr-mention-item:last-child {
  border-bottom: none;
}
.bab-nostr-mention-item:hover,
.bab-nostr-mention-item.is-active {
  background: rgba(245, 224, 83, 0.12);
}
.bab-nostr-mention-empty {
  cursor: default;
  color: var(--color-grey-300);
  font-size: 0.78rem;
  line-height: 1.35;
}
.bab-nostr-mention-name {
  font-weight: 600;
  font-size: 0.88rem;
}
.bab-nostr-mention-npub {
  font-size: 0.72rem;
  color: var(--color-grey-300);
}
.bab-boost-msg-preview-wrap {
  margin-top: 0.35rem;
  padding: 0.42rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px dashed rgba(245, 224, 83, 0.28);
  background: rgba(0, 0, 0, 0.12);
}
.bab-boost-msg-preview-label {
  display: block;
  font-size: 0.72rem;
  margin-bottom: 0.28rem;
}
.bab-boost-msg-preview {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-success-200);
  word-break: break-word;
}
.bab-boost-mention-link {
  color: var(--color-success-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bab-boost-mention-hint {
  font-size: 0.76rem;
  margin: 0 0 0.25rem;
  line-height: 1.38;
}
.bab-boost-mention-hint code {
  font-size: 0.85em;
  color: #fde68a;
}
.bab-boost-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-primary-500);
}
.live-nip53-actions {
  margin-top: 0.85rem;
}
.live-nip53-hint {
  font-size: 0.85rem;
  color: var(--color-grey-300);
  margin: 0 0 0.5rem;
}
.v4v-nwc-panel {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--color-primary-500);
  border-radius: 0.6rem;
  background: var(--color-primary-600);
}
.v4v-nwc-summary {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-success-500);
  cursor: pointer;
  list-style: none;
}
.v4v-nwc-summary::-webkit-details-marker {
  display: none;
}
.v4v-nwc-panel[open] .v4v-nwc-summary {
  margin-bottom: 0.65rem;
}
.v4v-nwc-panel-body {
  padding-top: 0.15rem;
}
.v4v-nwc-panel-body p {
  font-size: 0.9rem;
  color: var(--color-grey-200);
}
.v4v-nwc-input {
  width: 100%;
  font: inherit;
  padding: 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid var(--color-primary-500);
  background: var(--color-primary-700);
  color: var(--color-success-100);
  margin: 0.5rem 0;
}
.bud-claim-section {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--color-primary-500);
  border-radius: 0.6rem;
  background: var(--color-primary-600);
}
.bud-claim-form label {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.65rem;
  color: var(--color-grey-200);
}
.bud-claim-form input,
.bud-claim-form textarea {
  width: 100%;
  margin-top: 0.25rem;
}

/* --- Desktop: +40% root rem for content typography only -----------------
   Neon headers + main nav text stay the same apparent size (calc undo).
   Restricted to landscape so portrait desktops (e.g. rotated ultrawides)
   render at normal scale instead of oversized. */
@media (min-width: 701px) and (orientation: landscape) {
  html {
    font-size: 140%;
  }

  .neon-header {
    font-size: calc(3rem / 1.4);
  }

  .nav-link {
    font-size: calc(1.62rem / 1.4);
  }
  .nav-link.active {
    font-size: calc(1.8rem / 1.4);
  }
  .nav-logo {
    font-size: calc(1.5rem / 1.4);
  }
  .nav-nostr-btn {
    font-size: calc(0.85rem / 1.4);
  }
  .nav-nostr-err {
    font-size: calc(0.7rem / 1.4);
  }
}

/* --- Portrait desktop overrides -----------------------------------
 * Catches rotated monitors and any viewport taller than it is wide
 * (e.g. a 29" ultrawide in portrait at ~1030px).
 * The 140% font-scale block above is already landscape-only, so
 * text sizing is naturally correct here.  We just need to switch
 * the nav to hamburger mode so links don't crowd the bar.
 * Only applies to viewports wider than the mobile breakpoint (>700px)
 * so it doesn't double-up with the max-width:700px rules. */
@media (orientation: portrait) and (min-width: 701px) {
  /* Show hamburger, anchor dropdown to nav bar */
  .main-nav { position: relative; }
  .main-nav .inner { flex-wrap: nowrap; }
  .nav-hamburger { display: flex; }

  /* Collapse link list to a dropdown identical to mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    margin-left: 0;
    justify-content: flex-start;
    background-color: var(--color-primary-600);
    border-bottom: 2px solid var(--color-primary-300);
    padding: var(--size-4);
    gap: var(--size-2);
    z-index: 200;
  }
  .nav-links.nav-open { display: flex; }
  .nav-link { font-size: 1.35rem; }

  /* Shrink logo slightly so it doesn't dominate the thin nav bar */
  .nav-logo-img { height: 5.5rem; }

  /* Neon header: bump to 4rem (no 140% scale means this reads correctly) */
  .neon-header { font-size: 4rem; }
}


  .neon-header {
    font-size: calc(4rem / 1.4);
  }
}
